30 static std::string tutname =
"mp105_processEntryList: ";
31 static std::string logfile =
"mp105_processEntryList.log";
34 const char *fh1[] = {
"http://root.cern.ch/files/h1/dstarmb.root",
"http://root.cern.ch/files/h1/dstarp1a.root",
35 "http://root.cern.ch/files/h1/dstarp1b.root",
"http://root.cern.ch/files/h1/dstarp2.root"};
37 int mp105_processEntryList()
46 std::vector<std::string> files;
47 for (
int i = 0; i < 4; i++) {
48 files.push_back(fh1[i]);
55 std::cout << tutname <<
"creating the entry list \n";
57 auto sumElist = pool.Process(files, doH1fillList,
"h42");
63 std::cout << tutname <<
" ERROR creating the entry list \n";
72 std::cout << tutname <<
"processing the entry list with a lambda \n";
75 auto hListFun = pool.Process(files, doH1useList, *sumElist,
"h42");
78 if (checkH1(hListFun) < 0)
return -1;
81 if (
doFit(hListFun, logfile.c_str()) < 0)
return -1;
88 selectorPath +=
"/tree/h1analysisTreeReader.C+";
89 std::cout << tutname <<
"processing the entry list with selector '" << selectorPath <<
"'\n";
95 auto hListSel = pool.Process(files, *sel, *sumElist,
"h42");
99 if (checkH1(hListSel) < 0)
return -1;
102 if (
doFit(hListSel, logfile.c_str()) < 0)
return -1;
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void doFit(int n, const char *fitter)
void Print(Option_t *option="") const
Print the real and cpu time passed between the start and stop events.
Lambdas used to check and fit the result of the H1 analysis.
This class provides an interface to process a TTree dataset in parallel with multi-process technology...
R__EXTERN TSystem * gSystem
static TSelector * GetSelector(const char *filename)
The code in filename is loaded (interpreted or compiled, see below), filename must contain a valid cl...
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=0)
Redirect standard output (stdout, stderr) to the specified file.
virtual void SetOption(const char *option)
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...