DAS  3.0
Das Analysis System
main.cc File Reference
#include <boost/test/included/unit_test.hpp>
#include <boost/exception/all.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/info_parser.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include "test.h"
#include "exceptions.h"
#include "Options.h"
#include "UserInfo.h"
#include "MetaInfo.h"
#include "example01.cc"
#include "example02.cc"
#include "example03.cc"
#include "example04.cc"
#include "../bin/getMetaInfo.cc"
#include "../bin/printMetaInfo.cc"
#include "../bin/printEntries.cc"
#include "../bin/printBranches.cc"
#include "../bin/forceMetaInfo.cc"
+ Include dependency graph for main.cc:

Namespaces

 Darwin
 
 Darwin::Physics
 

Macros

#define DOXYGEN_SHOULD_SKIP_THIS
 
#define BOOST_TEST_MODULE   test
 
#define DARWIN_GIT_REPO   DARWIN
 

Functions

template<bool DARWIN_TEST_EXCEPTIONS = false>
void example02 (const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
 
template<bool DARWIN_TEST_EXCEPTIONS = false>
void example03 (const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
 
void example04 (const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
 
 BOOST_AUTO_TEST_CASE (output)
 
 BOOST_AUTO_TEST_CASE (getters)
 
 BOOST_AUTO_TEST_CASE (ntuple_producer)
 
 BOOST_AUTO_TEST_CASE (ntuple_weight_modifier)
 
 BOOST_AUTO_TEST_CASE (ntuple_JEC_modifier)
 
 BOOST_AUTO_TEST_CASE (projection)
 
 BOOST_AUTO_TEST_CASE (all_steps)
 
 BOOST_AUTO_TEST_CASE (getBool)
 
 BOOST_AUTO_TEST_CASE (forceMetaInfo)
 
 BOOST_AUTO_TEST_CASE (GetFirstTreeLocation)
 
 BOOST_AUTO_TEST_CASE (printEntries)
 
 BOOST_AUTO_TEST_CASE (printBranches)
 
 BOOST_AUTO_TEST_CASE (printMetaInfo)
 
 BOOST_AUTO_TEST_CASE (closure)
 
 BOOST_AUTO_TEST_CASE (exceptions)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   test

◆ DARWIN_GIT_REPO

#define DARWIN_GIT_REPO   DARWIN

◆ DOXYGEN_SHOULD_SKIP_THIS

#define DOXYGEN_SHOULD_SKIP_THIS

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/15]

BOOST_AUTO_TEST_CASE ( all_steps  )
255  {
256  pt::ptree config;
257  BOOST_REQUIRE_NO_THROW( pt::read_info("example.info", config) );
258  BOOST_REQUIRE_NO_THROW( DT::Options::parse_config(config) );
259  const int steering = DT::fill | DT::syst;
260  BOOST_REQUIRE_NO_THROW( DP::example01("ntuple01.root", config, steering) );
261  BOOST_REQUIRE_NO_THROW( DP::example02("ntuple01.root", "ntuple02.root", config, steering) );
262  BOOST_REQUIRE_NO_THROW( DP::example03("ntuple02.root", "ntuple03.root", config, steering) );
263  BOOST_REQUIRE_NO_THROW( DP::example04("ntuple03.root", "hists04.root", config, steering) );
264  }

◆ BOOST_AUTO_TEST_CASE() [2/15]

BOOST_AUTO_TEST_CASE ( closure  )
328  {
329  {
330  unique_ptr<TFile> f(TFile::Open("ntuple02.root"));
331  f->ls();
332  }
333 
334  vector<string> exts {"info", "xml", "json"};
335  for (string ext: exts) {
336  fs::path file = "out1." + ext;
337  vector<fs::path> inputs = {"ntuple02.root"};
338  BOOST_REQUIRE_NO_THROW( DT::getMetaInfo(inputs, file) );
339  }
340 
341  auto getHash = [](const fs::path& ntuple) {
342  auto rootfile = unique_ptr<TFile>(TFile::Open(ntuple.c_str(), "READ"));
343  auto events = unique_ptr<TTree>(rootfile->Get<TTree>("events"));
344  size_t Hash = hash<TTree*>{}(events.get());
345  return Hash;
346  };
347 
348  size_t Hash = getHash("ntuple02.root");
349 
350  pt::ptree config;
351  auto chain = [&config,&getHash](const fs::path& fOut, bool isMC) {
352  fs::remove("ntuple02.root");
353  fs::remove("ntuple03.root");
354  config.put<bool>("flags.isMC", isMC);
355  const int steering = DT::fill | DT::syst;
356  BOOST_REQUIRE_NO_THROW( DT::Options::parse_config(config) );
357  DP::example01("ntuple01.root", config, steering);
358  DP::example02("ntuple01.root", "ntuple02.root", config, steering);
359  DP::example02("ntuple02.root", "ntuple03.root", config, steering);
360  DP::example04("ntuple03.root", "hists04.root", config, steering);
361  vector<fs::path> inputs = {"hists04.root"};
362  DT::getMetaInfo(inputs, fOut);
363  size_t Hash = getHash("ntuple02.root");
364  fs::remove("ntuple01.root");
365  fs::rename("hists04.root", Form("hists04_%s_%s.root", &(fOut.extension().c_str()[1]), isMC ? "true" : "false"));
366  return Hash;
367  };
368 
369  pt::read_info("out1.info", config);
370  int oldseed = config.get<int>("preseed");
371  config.put<int>("preseed", 2*oldseed);
372  BOOST_TEST( Hash != chain("out2.info", true ) );
373  config.put<int>("preseed", oldseed);
374  BOOST_TEST( Hash == chain("out2.info", true ) );
375  BOOST_TEST( Hash != chain("out2.info", false) );
376 
377  pt::read_json("out1.json", config);
378  BOOST_TEST( Hash == chain("out2.json", true ) );
379  BOOST_TEST( Hash != chain("out2.json", false) );
380 
381  pt::read_xml("out1.xml", config);
382  config = config.get_child("userinfo");
383  BOOST_TEST( Hash == chain("out2.xml", true ) );
384  BOOST_TEST( Hash != chain("out2.xml", false) );
385 
386  vector<fs::path> inputs = {"hists04_info_true.root" , "hists04_json_true.root" , "hists04_xml_true.root" };
387  BOOST_TEST( DT::getMetaInfo(inputs, "true.info" ) == EXIT_SUCCESS );
388  inputs = {"hists04_info_false.root", "hists04_json_false.root", "hists04_xml_false.root"};
389  BOOST_TEST( DT::getMetaInfo(inputs, "false.info" ) == EXIT_SUCCESS );
390  inputs = {"hists04_info_true.root" , "hists04_info_false.root"};
391  BOOST_TEST( DT::getMetaInfo(inputs, "failure.info") == EXIT_FAILURE );
392 
393  for (string name: {"true", "false", "failure"})
394  fs::remove(name + ".info");
395 
396  for (string ext: exts) {
397  fs::remove("out1." + ext);
398  fs::remove("out2." + ext);
399  for (string b: {"true", "false"})
400  fs::remove("hists04_" + ext + "_" + b + ".root");
401  }
402  }

◆ BOOST_AUTO_TEST_CASE() [3/15]

BOOST_AUTO_TEST_CASE ( exceptions  )
405  {
406  // testing raw exception object
407  auto f = unique_ptr<TFile>(TFile::Open("ntuple02.root", "READ"));
408  auto t = unique_ptr<TTree>(f->Get<TTree>("events"));
409  DT::MetaInfo metainfo(t);
410  cout << DE::BadInput("Here is a bad input", metainfo).what() << endl;
411  t->GetEntry(5);
412  cout << DE::AnomalousEvent("Here is an anomally (just for the example)", t).what() << endl;
413 
414  // testing in real context
415  pt::ptree config;
416  BOOST_REQUIRE_NO_THROW( pt::read_info(DARWIN "/test/example.info", config) );
417  BOOST_REQUIRE_NO_THROW( DT::Options::parse_config(config) );
418  const int steering = DT::fill | DT::syst;
419  DP::example01("ntuple01.root", config, steering);
420  BOOST_REQUIRE_THROW( DP::example02<true>("ntuple01.root", "ntuple02.root", config, steering), boost::wrapexcept<DE::AnomalousEvent> );
421  BOOST_REQUIRE_THROW( DP::example01<true>("ntuple01.root", config, steering), boost::wrapexcept<DE::BadInput > );
422 
423  fs::remove("inexistent.out");
424  fs::remove("ntuple01.root");
425  }

◆ BOOST_AUTO_TEST_CASE() [4/15]

BOOST_AUTO_TEST_CASE ( forceMetaInfo  )
277  {
278  vector<fs::path> input = {"ntuple02.root"};
279  DT::getMetaInfo(input, "force02.info");
280  DT::forceMetaInfo("force02.info", "ntuple01.root", DT::verbose);
281  input = {"ntuple01.root"};
282  DT::getMetaInfo(input, "force01.info");
283  unique_ptr<TFile> f(TFile::Open("ntuple01.root", "READ"));
284  auto events = unique_ptr<TTree>(f->Get<TTree>("events"));
285  DT::MetaInfo metainfo(events);
286  BOOST_TEST( !metainfo.Find("history") );
287  BOOST_TEST( !metainfo.Get<bool>("git", "reproducible") );
288  }

◆ BOOST_AUTO_TEST_CASE() [5/15]

BOOST_AUTO_TEST_CASE ( getBool  )
267  {
268  BOOST_TEST( !DT::getBool("this will not work").has_value());
269  BOOST_TEST( DT::getBool("yes").has_value());
270  BOOST_TEST( DT::getBool("true" ).value() == true );
271  BOOST_TEST( DT::getBool("kTRUE").value() == true );
272  BOOST_TEST( DT::getBool("off" ).value() == false );
273  BOOST_TEST( DT::getBool("NO" ).value() == false );
274  }

◆ BOOST_AUTO_TEST_CASE() [6/15]

BOOST_AUTO_TEST_CASE ( GetFirstTreeLocation  )
291  {
292  BOOST_TEST( DT::GetFirstTreeLocation("ntuple01.root") == "events" );
293  BOOST_REQUIRE_NO_THROW( DT::GetFirstTreeLocation("ntuple01.root") );
294 
295  TFile::Open("GetFirstTreeLocation.root", "RECREATE")->Close();
296  BOOST_REQUIRE_THROW( DT::GetFirstTreeLocation("GetFirstTreeLocation.root"), boost::wrapexcept<DE::BadInput> );
297  }

◆ BOOST_AUTO_TEST_CASE() [7/15]

BOOST_AUTO_TEST_CASE ( getters  )
77  {
78  vector<fs::path> files;
79  BOOST_REQUIRE_THROW( DT::GetHist<TH1>(files, "h"), boost::wrapexcept<fs::filesystem_error> ); // bc empty
80  DT::Flow flow(DT::none);
81  BOOST_REQUIRE_THROW( flow.GetInputTree(files, {0, 1}, "t"), boost::wrapexcept<invalid_argument> ); // bc empty
82 
83  for (int i = 1; i < 4; ++i) {
84  fs::path name = Form("getters_%d.root", i);
85  cout << name << endl;
86  files.push_back(name);
87  unique_ptr<TFile> f(TFile::Open(name.c_str(), "RECREATE"));
88  auto h = make_unique<TH1F>("h", "h", 1, 0., 1.);
89  auto t = make_unique<TTree>("t", "t");
90  h->SetDirectory(f.get());
91  t->SetDirectory(f.get());
92  h->Write();
93  t->Write();
94  }
95 
96  BOOST_REQUIRE_THROW( DT::GetHist<TH1> (files, "thisHistDoesNotExist"), boost::wrapexcept<DE::BadInput> );
97  BOOST_REQUIRE_THROW( flow.GetInputTree(files, {1, 0}, "t" ), boost::wrapexcept<invalid_argument> );
98  BOOST_REQUIRE_THROW( flow.GetInputTree(files, {1, 0}, "thisTreeDoesNotExist"), boost::wrapexcept<DE::BadInput> );
99 
100  BOOST_REQUIRE_NO_THROW( DT::GetHist<TH1>(files, "h") );
101  }

◆ BOOST_AUTO_TEST_CASE() [8/15]

BOOST_AUTO_TEST_CASE ( ntuple_JEC_modifier  )
175  {
176  fs::path input, output;
177 
178  DT::Options options("Toy example to modify a n-tuple (JES corrections).",
180  options.input ("input" , &input , "input ROOT file" )
181  .output("output", &output, "output ROOT file");
182 
183  for (string mode: {"f", "F"}) {
184  string cmd = "example03 ntuple02_" + mode + ".root ntuple03_" + mode + ".root -j 3 -k 1 -" + mode + " -s";
185  auto const args = tokenize(cmd.c_str());
186  options(args.size(), args.data());
187  BOOST_REQUIRE_NO_THROW( options(args.size(), args.data()) );
188 
189  const auto& config = options(args.size(), args.data());
190  const auto& slice = options.slice();
191  const int steering = options.steering();
192 
193  BOOST_REQUIRE_NO_THROW( DP::example03(input, output, config, steering, slice) );
194  }
195 
196  vector<DP::RecJet> * recs_f = nullptr,
197  * recs_F = nullptr;
198  DT::Flow flow_f(DT::verbose),
199  flow_F(DT::verbose | DT::Friend);
200  flow_f.GetInputTree(vector<fs::path>{"ntuple03_f.root"});
201  flow_F.GetInputTree(vector<fs::path>{"ntuple03_F.root"});
202  BOOST_REQUIRE_NO_THROW( recs_f = flow_f.GetBranchReadOnly<vector<DP::RecJet>>("recJets") );
203  BOOST_REQUIRE_NO_THROW( recs_F = flow_F.GetBranchReadOnly<vector<DP::RecJet>>("recJets") );
204 
205  string active_branches_f = flow_f.DumpActiveBranches(),
206  active_branches_F = flow_F.DumpActiveBranches();
207  cout << "Without friends: " << active_branches_f << endl;
208  cout << "With friends: " << active_branches_F << endl;
209  BOOST_TEST( active_branches_f == active_branches_F );
210 
211  auto tIn_f = flow_f.GetInputTree(),
212  tIn_F = flow_F.GetInputTree();
213  BOOST_TEST( tIn_f->GetEntries() == tIn_F->GetEntries() );
214 
215  for (long long i = 0; i < tIn_f->GetEntries(); ++i) {
216  tIn_f->GetEntry(i);
217  tIn_F->GetEntry(i);
218  BOOST_TEST( recs_f->size() == recs_F->size() );
219  for (size_t j = 0; j < recs_f->size(); ++j)
220  BOOST_TEST( recs_f->at(j).CorrPt() == recs_F->at(j).CorrPt() );
221  }
222 
223  fs::remove("ntuple02_f.root");
224  fs::remove("ntuple03_f.root");
225  }

◆ BOOST_AUTO_TEST_CASE() [9/15]

BOOST_AUTO_TEST_CASE ( ntuple_producer  )
108  {
109  fs::path output;
110 
111  DT::Options options("This is just a toy example to generate a n-tuple.", DT::config | DT::fill);
112  options.output("output" , &output, "output ROOT file")
113  .arg<bool> ("isMC" , "flags.isMC" , "flag" )
114  .arg<float> ("R" , "flags.R" , "R parameter in jet clustering algorithm")
115  .arg<int > ("year" , "flags.year" , "year (20xx)" );
116 
117  auto const args = tokenize("example01 ntuple01.root -c example.info -f");
118  BOOST_REQUIRE_NO_THROW( options(args.size(), args.data()) );
119 
120  const auto& config = options(args.size(), args.data());
121  const int steering = options.steering();
122 
123  BOOST_REQUIRE_NO_THROW( DP::example01(output, config, steering) );
124  }

◆ BOOST_AUTO_TEST_CASE() [10/15]

BOOST_AUTO_TEST_CASE ( ntuple_weight_modifier  )
127  {
128  fs::path input, output;
129 
130  DT::Options options("Toy example to modify a n-tuple (filter application).",
132  options.input ("input" , &input , "input ROOT file" )
133  .output("output", &output, "output ROOT file")
134  .arg<fs::path>("filters", "corrections.filters", "location of list of event filters to apply");
135 
136  for (string mode: {"f", "F"}) {
137  string cmd = "example02 ntuple01.root ntuple02_" + mode + ".root -c example.info -v -j 2 -k 1 -" + mode;
138  auto const args = tokenize(cmd.c_str());
139  options(args.size(), args.data());
140  BOOST_REQUIRE_NO_THROW( options(args.size(), args.data()) );
141 
142  const auto& config = options(args.size(), args.data());
143  const auto& slice = options.slice();
144  const int steering = options.steering();
145 
146  DP::example02(input, output, config, steering, slice);
147  BOOST_REQUIRE_NO_THROW( DP::example02(input, output, config, steering, slice) );
148  }
149 
150  DP::RecEvent * event_f = nullptr,
151  * event_F = nullptr;
152  DT::Flow flow_f(DT::verbose),
153  flow_F(DT::verbose | DT::Friend);
154 
155  auto tIn_f = flow_f.GetInputTree({"ntuple02_f.root"}),
156  tIn_F = flow_F.GetInputTree({"ntuple02_F.root"});
157  BOOST_TEST( tIn_f->GetEntries() == tIn_F->GetEntries() );
158 
159  BOOST_TEST_MESSAGE( "Trying to load an inexistant branch" );
160  BOOST_TEST( flow_f.GetBranchReadOnly<DP::RecEvent>("event", DT::facultative) == nullptr );
161  BOOST_REQUIRE_THROW( flow_f.GetBranchReadOnly<DP::RecEvent>("event", DT::mandatory ), boost::wrapexcept<DE::BadInput> );
162 
163  BOOST_TEST_MESSAGE( "Loading the analog branch in the friend and no-friend n-tuples." );
164  BOOST_REQUIRE_NO_THROW( event_f = flow_f.GetBranchReadOnly<DP::RecEvent>("recEvent") );
165  BOOST_REQUIRE_NO_THROW( event_F = flow_F.GetBranchReadOnly<DP::RecEvent>("recEvent") );
166 
167  for (long long i = 0; i < tIn_f->GetEntries(); ++i) {
168  tIn_f->GetEntry(i);
169  tIn_F->GetEntry(i);
170  BOOST_TEST( event_f->weights.front() == event_F->weights.front() );
171  }
172  }

◆ BOOST_AUTO_TEST_CASE() [11/15]

BOOST_AUTO_TEST_CASE ( output  )
70  {
71  DT::Flow flow(DT::verbose);
72  BOOST_REQUIRE_THROW( DT::GetOutputFile("/this/file/does/not/exists.root"), boost::wrapexcept<fs::filesystem_error> );
73  BOOST_REQUIRE_NO_THROW( DT::GetOutputFile("this_file_is_allowed.root") );;
74  }

◆ BOOST_AUTO_TEST_CASE() [12/15]

BOOST_AUTO_TEST_CASE ( printBranches  )
314  {
315  vector<fs::path> inputs {"ntuple01.root"};
316  BOOST_REQUIRE_NO_THROW( DT::printBranches(inputs, DT::verbose) );
317  }

◆ BOOST_AUTO_TEST_CASE() [13/15]

BOOST_AUTO_TEST_CASE ( printEntries  )
300  {
301  auto f = TFile::Open("printEntries.root", "RECREATE");
302  f->mkdir("dir1");
303  auto d = f->mkdir("dir2"); d->cd();
304  auto dd = d->mkdir("subdir"); dd->cd();
305  auto t = new TTree("one_tree", "");
306  t->SetDirectory(dd);
307  t->Write();
308  f->Close();
309  BOOST_REQUIRE_NO_THROW( DT::printEntries({"printEntries.root"}, DT::verbose) );
310  fs::remove("printEntries.root");
311  }

◆ BOOST_AUTO_TEST_CASE() [14/15]

BOOST_AUTO_TEST_CASE ( printMetaInfo  )
320  {
321  vector<fs::path> inputs {"ntuple01.root"};
322  pt::ptree tree;
323  tree.put<string>("path", "preseed");
324  BOOST_REQUIRE_NO_THROW( DT::printMetaInfo(inputs, tree) );
325  }

◆ BOOST_AUTO_TEST_CASE() [15/15]

BOOST_AUTO_TEST_CASE ( projection  )
228  {
229  fs::path input, output;
230 
231  DT::Options options("Toy example to project a n-tuple.", DT::split);
232  options.input ("input" , &input , "input ROOT file" )
233  .output("output", &output, "output ROOT file");
234 
235  auto const args = tokenize("example04 ntuple03_F.root hists04.root");
236  BOOST_REQUIRE_NO_THROW( options(args.size(), args.data()) );
237 
238  const auto& config = options(args.size(), args.data());
239  const auto& slice = options.slice();
240  const int steering = options.steering();
241 
242  BOOST_REQUIRE_NO_THROW( DP::example04(input, output, config, steering, slice) );
243 
244  fs::remove("ntuple01.root");
245  fs::remove("ntuple02_F.root");
246  fs::remove("ntuple03_F.root");
247  fs::remove("hists04.root");
248  }
Darwin::Tools::GetFirstTreeLocation
std::string GetFirstTreeLocation(const std::filesystem::path &input)
one input ROOT file
Definition: FileUtils.cc:89
DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.name
name
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:48
Darwin::Tools::mandatory
@ mandatory
mounting branch is mandatory
Definition: Flow.h:28
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::Physics::example03
void example03(const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: main.cc:49
Darwin::Tools::Flow
User-friendly handling of input and output n-tuples.
Definition: Flow.h:55
Step::verbose
static bool verbose
Definition: Step.h:40
Darwin::Tools::Friend
@ Friend
activate -F to only fill the new branches
Definition: Options.h:28
Ntupliser_cfg.args
args
Definition: Ntupliser_cfg.py:11
BOOST_TEST
BOOST_TEST(gendijet.Rapidity()==1.3573785791881385)
Darwin::Tools::split
@ split
activate -k and -j to define slice
Definition: Options.h:26
std::hash< TTree * >
Hash from TTree obtained by combination of different elements.
Definition: UserInfo.h:286
Ntupliser_cfg.f
f
Definition: Ntupliser_cfg.py:256
Darwin::Physics::example02
void example02(const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: main.cc:41
Darwin::Tools::syst
@ syst
activate -s to systematic uncertainties
Definition: Options.h:29
Darwin::Tools::none
@ none
default (for simple executables)
Definition: Options.h:24
Darwin::Physics::example04
void example04(const fs::path &input, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0})
Definition: main.cc:56
compareFiles.files
files
Definition: compareFiles.py:125
Darwin::Tools::Options::parse_config
static void parse_config(boost::property_tree::ptree &, std::string="")
Parse config if given. This method calls itself to parse the tree structure.
Darwin::Tools::MetaInfo
Generic meta-information for n-tuple (including speficities to Darwin).
Definition: MetaInfo.h:65
Darwin::Tools::GetOutputFile
std::shared_ptr< TFile > GetOutputFile(const std::filesystem::path &, const std::source_location=std::source_location::current())
Shortcut to create a reproducible output file (see ROOT Doxygen for details)
Definition: FileUtils.cc:124
Darwin::Tools::forceMetaInfo
void forceMetaInfo(const fs::path &input, const fs::path &output, const int steering)
Definition: forceMetaInfo.cc:92
Darwin::Tools::printEntries
void printEntries(vector< fs::path > inputs, const int steering)
Definition: printEntries.cc:22
cmd
cmd
Definition: Core-cfgcmd.txt:1
Ntupliser_cfg.config
config
Definition: Ntupliser_cfg.py:264
DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.input
input
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:35
Darwin::Tools::Options
Common class to interpret the command line, based on Boost Program Options.
Definition: Options.h:58
Darwin::Physics::RecEvent
Generic detector-level event.
Definition: Event.h:64
Darwin::Tools::printBranches
void printBranches(vector< fs::path > inputs, const int steering)
Adapted from ROOT example
Definition: printBranches.cc:87
Ntupliser_cfg.isMC
string isMC
Definition: Ntupliser_cfg.py:59
Darwin::Tools::printMetaInfo
int printMetaInfo(vector< fs::path > inputs, const pt::ptree &config)
Definition: printMetaInfo.cc:33
jercExample.inputs
def inputs
Definition: jercExample.py:118
Darwin::Exceptions::AnomalousEvent
Generic exception for problematic event (during event loop).
Definition: exceptions.h:63
Darwin::Physics::AbstractEvent::weights
Weights weights
e.g. cross section normalisation
Definition: Event.h:26
Darwin::Tools::tokenize
std::vector< const char * > tokenize(const char *str)
Definition: test.h:15
Darwin::Exceptions::BadInput
Generic exception for ill-defined input (before the event loop).
Definition: exceptions.h:83
Darwin::Tools::facultative
@ facultative
mounting branch is facultative
Definition: Flow.h:29
Darwin::Tools::getBool
optional< bool > getBool(string s)
Translates a string into a boolean if possible.
Definition: forceMetaInfo.cc:32
Darwin::Tools::getMetaInfo
int getMetaInfo(vector< fs::path > inputs, const fs::path &output)
Print content of the first TTree::UserInfo() found in the root file.
Definition: getMetaInfo.cc:25