|
RooParticle
Particle scattering simulator with ROOT
|
Run metadata helpers for the test programs. More...
Functions | |
| UInt_t | SeedFromJob (Int_t jobIndex, Long64_t seed=-1) |
| Seed of one job. | |
| TString | GitSHA () |
| Git revision the binary was built from. | |
| void | WriteCommon (UInt_t seed, Double_t dt, const char *integrator, Long64_t nevents, const char *inspectorCriteria) |
| Write the parameters every run shares. | |
Write one key/value pair | |
Writes a | |
| void | Write (const char *key, const char *value) |
| void | Write (const char *key, Double_t value) |
| void | Write (const char *key, Long64_t value) |
Variables | |
| const UInt_t | kDefaultSeed = 65539 |
| Seed used when no seed is given on the command line (job index 0). | |
Run metadata helpers for the test programs.
The parameters of a run are stored in the current ROOT file (gDirectory) as TNamed objects (name = key, title = value), so that a result file always tells how it was produced. Read them back with file->Get<TNamed>("seed")->GetTitle().
| TString runinfo::GitSHA | ( | ) |
Git revision the binary was built from.
RP_GIT_SHA, or "unknown" if that macro is not defined (no git, or no .git directory) Definition at line 15 of file runinfo.cpp.
| UInt_t runinfo::SeedFromJob | ( | Int_t | jobIndex, |
| Long64_t | seed = -1 |
||
| ) |
Seed of one job.
The explicit seed if given (seed >= 0), otherwise kDefaultSeed + jobIndex, so parallel jobs with different indices never share a seed and a rerun of the same index is reproducible.
| jobIndex | index of the job (for example the Condor process number) |
| seed | explicit seed, or a negative value (default -1) for none; an explicit seed is truncated to 32 bits |
Definition at line 10 of file runinfo.cpp.
| void runinfo::Write | ( | const char * | key, |
| const char * | value | ||
| ) |
| key | name of the entry |
| value | text stored as title |
Definition at line 19 of file runinfo.cpp.
| void runinfo::Write | ( | const char * | key, |
| Double_t | value | ||
| ) |
| key | name of the entry |
| value | number, stored as text with 17 significant digits ("%.17g") |
Definition at line 26 of file runinfo.cpp.
| void runinfo::Write | ( | const char * | key, |
| Long64_t | value | ||
| ) |
| key | name of the entry |
| value | integer, stored as decimal text |
Definition at line 30 of file runinfo.cpp.
| void runinfo::WriteCommon | ( | UInt_t | seed, |
| Double_t | dt, | ||
| const char * | integrator, | ||
| Long64_t | nevents, | ||
| const char * | inspectorCriteria | ||
| ) |
Write the parameters every run shares.
Writes the keys seed, dt, integrator, nevents, inspectors and git_sha (the last one is added automatically from GitSHA()) into the current ROOT directory.
| seed | random seed of the run |
| dt | time step in fm/c |
| integrator | integrator name (for example event::GetIntegratorName()) |
| nevents | number of events |
| inspectorCriteria | text describing the inspector criteria |
Definition at line 34 of file runinfo.cpp.
| const UInt_t runinfo::kDefaultSeed = 65539 |
Seed used when no seed is given on the command line (job index 0).
Definition at line 18 of file runinfo.hpp.