16Int_t mtbb201_parallelHistoFill()
21 auto fillRandomHisto = [](
int seed = 0) {
23 auto h =
new TH1F(
"myHist",
"Filled in parallel", 128, -8, 8);
25 h->Fill(rndm.Gaus(0, 1));
32 auto sumRandomHisto = pool.MapReduce(fillRandomHisto, seeds, redfunc);
35 sumRandomHisto->Draw();
Merge collection of TObjects.
A pseudo container class which is a generator of indices.
This class provides a simple interface to execute the same task multiple times in parallel,...
1-D histogram with a float per channel (see TH1 documentation)}
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Random number generator class based on M.
void EnableThreadSafety()
Enables the global mutex to make ROOT thread safe/aware.