DAS  3.0
Das Analysis System
applyTFormula.cc File Reference
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <vector>
#include <filesystem>
#include <TEfficiency.h>
#include <TFile.h>
#include <TH1.h>
#include <TString.h>
#include <TTreeFormula.h>
#include "Math/VectorUtil.h"
#include <darwin.h>
+ Include dependency graph for applyTFormula.cc:

Namespaces

 Darwin
 
 Darwin::Tools
 

Functions

void applyTFormula (const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
 
int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
109 {
110  try {
112 
113  vector<fs::path> inputs;
114  fs::path output;
115 
116  DT::Options options("Apply a event-level selection based on a TTreeFormula.\n"
117  "Note: out-of-bounds accesses with C-style syntax pass silently."
118  "For STL containers, use at() instead of [] if you want to throw exceptions.\n"
119  "Note: additional quotation marks are required for parallel.",
121  options.inputs("inputs", &inputs, "input ROOT file(s) or directory")
122  .output("output", &output, "output ROOT file")
123  .arg<string>("formula", "skims.formula", "TTreeFormula syntax or STL-style syntax (prefix ‘@’)");
124  const auto& config = options(argc, argv);
125  const auto& slice = options.slice();
126  const int steering = options.steering();
127 
128  DT::applyTFormula(inputs, output, config, steering, slice);
129  }
130  catch (boost::exception& e) {
131  DE::Diagnostic(e);
132  return EXIT_FAILURE;
133  }
134 
135  return EXIT_SUCCESS;
136 }
Darwin::Tools::fill
@ fill
activate -f to fill the tree
Definition: Options.h:27
DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.options
options
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:41
Darwin::Exceptions::Diagnostic
void Diagnostic(const boost::exception &e)
Definition: exceptions.h:131
Darwin::Tools::split
@ split
activate -k and -j to define slice
Definition: Options.h:26
Darwin::Tools::applyTFormula
void applyTFormula(const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: applyTFormula.cc:40
Darwin::Tools::StandardInit
void StandardInit()
Definition: FileUtils.cc:70
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:326
Darwin::Tools::Options
Common class to interpret the command line, based on Boost Program Options.
Definition: Options.h:58
jercExample.inputs
def inputs
Definition: jercExample.py:118