18const UInt_t nNumbers = 20000000U;
24const auto workSize = nNumbers / nWorkers;
44 TFile ofile(
"mp101_singleCore.root",
"RECREATE");
45 TNtuple randomNumbers(
"singleCore",
"Random Numbers",
"r");
46 fillRandom(randomNumbers, rndm, nNumbers);
47 randomNumbers.Write();
54 auto workItem = [](
UInt_t workerID) {
57 TFile ofile(
Form(
"mp101_multiCore_%u.root", workerID),
"RECREATE");
58 TNtuple workerRandomNumbers(
"multiCore",
"Random Numbers",
"r");
59 fillRandom(workerRandomNumbers, workerRndm, workSize);
60 workerRandomNumbers.Write();
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
This class provides a simple interface to execute the same task multiple times in parallel,...
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
A simple TTree restricted to a list of float variables only.
Random number generator class based on M.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...