30 static std::string tutname =
"mp104_processH1: ";
31 static std::string logfile =
"mp104_processH1.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"};
43 gROOT->SetBatch(kTRUE);
50 ROOT::TTreeProcessorMP pool(3);
52 std::cout << tutname <<
"processing the H1 dataset with a lambda \n";
54 auto hListFun = pool.Process(files, doH1,
"h42");
57 if (checkH1(hListFun) < 0)
61 if (doFit(hListFun, logfile.c_str()) < 0)
69 TString selectorPath = gROOT->GetTutorialDir();
70 selectorPath +=
"/tree/h1analysisTreeReader.C+";
71 std::cout << tutname <<
"processing the H1 dataset with selector '" << selectorPath <<
"'\n";
72 auto sel = TSelector::GetSelector(selectorPath);
75 gSystem->RedirectOutput(logfile.c_str(),
"w", &gRH);
76 auto hListSel = pool.Process(files, *sel,
"h42");
77 gSystem->RedirectOutput(0, 0, &gRH);
80 if (checkH1(hListSel) < 0)
84 if (doFit(hListSel, logfile.c_str()) < 0)