14 const UInt_t poolSize = 4U;
16 Int_t mp201_parallelHistoFill()
20 auto fillRandomHisto = [](
int seed = 0) {
22 auto h =
new TH1F(
"myHist",
"Filled in parallel", 128, -8, 8);
24 h->
Fill(rndm.Gaus(0,1));
31 auto sumRandomHisto = pool.MapReduce(fillRandomHisto, seeds, redfunc);
34 sumRandomHisto->Draw();
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Random number generator class based on M.
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Merge collection of TObjects.
This class provides a simple interface to execute the same task multiple times in parallel...
A pseudo container class which is a generator of indices.