Illustrate the usage of the multiproc to process the H1 analysis example.
static std::string tutname = "mp104_processH1: ";
static std::string logfile = "mp104_processH1.log";
const char *fh1[] = {"http://root.cern.ch/files/h1/dstarmb.root", "http://root.cern.ch/files/h1/dstarp1a.root",
"http://root.cern.ch/files/h1/dstarp1b.root", "http://root.cern.ch/files/h1/dstarp2.root"};
int mp104_processH1()
{
std::vector<std::string> files;
for (int i = 0; i < 4; i++) {
files.push_back(fh1[i]);
}
std::cout << tutname << "processing the H1 dataset with a lambda \n";
auto hListFun = pool.Process(files, doH1, "h42");
if (checkH1(hListFun) < 0) return -1;
if (
doFit(hListFun, logfile.c_str()) < 0)
return -1;
selectorPath += "/tree/h1analysisTreeReader.C+";
std::cout << tutname << "processing the H1 dataset with selector '" << selectorPath << "'\n";
auto hListSel = pool.Process(files, *sel, "h42");
if (checkH1(hListSel) < 0) return -1;
if (
doFit(hListSel, logfile.c_str()) < 0)
return -1;
return 0;
}
- Author
- Gerardo Ganis
Definition in file mp104_processH1.C.