Parallel fill of a histogram This tutorial shows how a histogram can be filled in parallel with a multiprocess approach.
Int_t mp201_parallelHistoFill()
{
auto fillRandomHisto = [](int seed = 0) {
auto h =
new TH1F(
"myHist",
"Filled in parallel", 128, -8, 8);
}
};
auto sumRandomHisto = pool.MapReduce(fillRandomHisto, seeds, redfunc);
sumRandomHisto->Draw();
return 0;
}
- Author
- Danilo Piparo
Definition in file mp201_parallelHistoFill.C.