13Int_t mp102_readNtuplesFillHistosAndFit()
21 TChain inputChain(
"multiCore");
22 inputChain.Add(
"mp101_multiCore_*.root");
23 if (inputChain.GetNtrees() <= 0) {
24 Printf(
" No files in the TChain: did you run mp101_fillNtuples.C before?");
27 TH1F outHisto(
"outHisto",
"Random Numbers", 128, -4, 4);
28 inputChain.Draw(
"r >> outHisto");
38 const auto nFiles = inputChain.GetListOfFiles()->GetEntries();
43 auto partialHisto =
new TH1F(
"outHistoMP",
"Random Numbers", 128, -4, 4);
44 while (reader.Next()) {
45 partialHisto->Fill(*randomRV);
54 auto sumHistogram = workers.Process(inputChain, workItem,
"multiCore");
55 sumHistogram->Fit(
"gaus", 0);
void Printf(const char *fmt,...)
This class provides an interface to process a TTree dataset in parallel with multi-process technology...
A chain is a collection of files containing TTree objects.
1-D histogram with a float per channel (see TH1 documentation)}
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...