30 static std::string tutname =
"mp105_processEntryList: ";
31 static std::string logfile =
"mp105_processEntryList.log";
32 static RedirectHandle_t gRH;
34 std::vector<std::string> files = {
"http://root.cern.ch/files/h1/dstarmb.root",
35 "http://root.cern.ch/files/h1/dstarp1a.root",
36 "http://root.cern.ch/files/h1/dstarp1b.root",
37 "http://root.cern.ch/files/h1/dstarp2.root"};
39 int mp105_processEntryList()
43 gROOT->SetBatch(kTRUE);
49 ROOT::TTreeProcessorMP pool(3);
51 std::cout << tutname <<
"creating the entry list \n";
53 auto sumElist = pool.Process(files, doH1fillList,
"h42");
59 std::cout << tutname <<
" ERROR creating the entry list \n";
68 std::cout << tutname <<
"processing the entry list with a lambda \n";
71 auto hListFun = pool.Process(files, doH1useList, *sumElist,
"h42");
74 if (checkH1(hListFun) < 0)
78 if (doFit(hListFun, logfile.c_str()) < 0)
85 TString selectorPath = gROOT->GetTutorialDir();
86 selectorPath +=
"/tree/h1analysisTreeReader.C+";
87 std::cout << tutname <<
"processing the entry list with selector '" << selectorPath <<
"'\n";
88 auto sel = TSelector::GetSelector(selectorPath);
91 sel->SetOption(
"useList");
92 gSystem->RedirectOutput(logfile.c_str(),
"w", &gRH);
93 auto hListSel = pool.Process(files, *sel, *sumElist,
"h42");
94 gSystem->RedirectOutput(0, 0, &gRH);
97 if (checkH1(hListSel) < 0)
101 if (doFit(hListSel, logfile.c_str()) < 0)