DAS  3.0
Das Analysis System
forceMetaInfo.cc File Reference
#include <cstdlib>
#include <iostream>
#include <filesystem>
#include <memory>
#include <regex>
#include "darwin.h"
#include <boost/property_tree/info_parser.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/algorithm/string.hpp>
#include <TFile.h>
#include <TTree.h>
#include <TString.h>
#include <TKey.h>
+ Include dependency graph for forceMetaInfo.cc:
+ This graph shows which files directly or indirectly include this file:

Namespaces

 Darwin
 
 Darwin::Tools
 

Functions

optional< bool > getBool (string s)
 
template<typename ... Args>
void FromPT2MetaInfo (const pt::ptree &elements, const MetaInfo &metainfo, ostream &cout, Args... args)
 
void forceMetaInfo (const fs::path &input, const fs::path &output, const int steering)
 
int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
130 {
131  try {
133 
134  fs::path input, output;
135 
136  DT::Options options("Force content of the first `TTree::UserInfo()` found any "
137  "directory of the output ROOT file. Use at your own risks.");
138  options.input("input", &input, "input file (INFO, JSON, or XML)")
139  .input("output", &output, "ROOT file");
140  options(argc, argv);
141  const int steering = options.steering();
142 
143  cerr << red << "Severe warning: you are running a dangerous command. "
144  "We hope that you know what you're doing.\n" << def;
145 
146  DT::forceMetaInfo(input, output, steering);
147 
148  return EXIT_SUCCESS;
149  }
150  catch (boost::exception& e) {
151  DE::Diagnostic(e);
152  return EXIT_FAILURE;
153  }
154 }
Ntupliser_cfg.cerr
cerr
Definition: Ntupliser_cfg.py:93
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
Step::def
static const char * def
Definition: Step.h:36
Darwin::Exceptions::Diagnostic
void Diagnostic(const boost::exception &e)
Definition: exceptions.h:116
Darwin::Tools::forceMetaInfo
void forceMetaInfo(const fs::path &input, const fs::path &output, const int steering)
Definition: forceMetaInfo.cc:92
Darwin::Tools::StandardInit
void StandardInit()
Definition: FileUtils.cc:25
Step::red
static const char * red
Definition: Step.h:34
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:56