14 const UInt_t nNumbers = 20000000U;
17 const UInt_t nThreads = 4U;
19 Int_t mtbb001_fillHistos()
23 auto workItem = [](
UInt_t workerID) {
26 TFile f(
Form(
"myFile_%u.root", workerID),
"RECREATE");
27 TH1F h(
Form(
"myHisto_%u", workerID),
"The Histogram", 64, -4, 4);
28 for (
UInt_t i = 0; i < nNumbers; ++i) {
29 h.Fill(workerRndm.Gaus());
Random number generator class based on M.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
1-D histogram with a float per channel (see TH1 documentation)}
This class provides a simple interface to execute the same task multiple times in parallel...
char * Form(const char *fmt,...)
void EnableThreadSafety()
Enables the global mutex to make ROOT thread safe/aware.
A pseudo container class which is a generator of indices.