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";
std::vector<std::string> files {"root://eospublic.cern.ch//eos/root-eos/h1/dstarmb.root",
"root://eospublic.cern.ch//eos/root-eos/h1/dstarp1a.root",
"root://eospublic.cern.ch//eos/root-eos/h1/dstarp1b.root",
"root://eospublic.cern.ch//eos/root-eos/h1/dstarp2.root"};
int mp104_processH1()
{
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 += "/analysis/tree/h1analysisTreeReader.C+";
std::cout << tutname << "processing the H1 dataset with selector '" << selectorPath << "'\n";
gSystem->RedirectOutput(logfile.c_str(),
"w", &gRH);
auto hListSel = pool.Process(files, *
sel,
"h42");
gSystem->RedirectOutput(
nullptr,
nullptr, &gRH);
if (checkH1(hListSel) < 0)
return -1;
if (doFit(hListSel, logfile.c_str()) < 0)
return -1;
return 0;
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
This class provides an interface to process a TTree dataset in parallel with multi-process technology...
static TSelector * GetSelector(const char *filename)
The code in filename is loaded (interpreted or compiled, see below), filename must contain a valid cl...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Print(Option_t *option="") const override
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.