![]() |
Home · Overview · Users Guide · Reference Guide |
Settings
is the virtual base class for the EventGeneratorSettings and
TableGeneratorSettings classes. More...
#include "Settings.h"
Settings() | |
virtual | ~Settings() |
bool | readSettingsFromFile(const char*) |
virtual bool | list(ostream& = cout) |
TParticlePDG* | lookupPDG(int) const |
string | particleName(int pdgID) |
static TRandom3* | randomGenerator() |
unsigned int | seed() const |
void | setSeed(unsigned int) |
int | userInt() const |
double | userDouble() const |
string | userString() const |
void | setUserInt(int) |
void | setUserDouble(double) |
void | setUserString(const string&) |
The Settings class is the virtual base class for the EventGeneratorSettings and TableGeneratorSettings classes. It is not directly used in Sartre but defines the basic features of the "Settings" mechanism in Sartre.
Constructor.
Destructor.
Reads and sets all parameters from file (runcard). For file format
and syntax see the runcard reference page.
Returns false
if file does not exist or could not be read, otherwise
return true
.
Prints all parameter with their current value. Useful to call after Sartre::init() to verify that all parameters are set and to keep log.
Return pointer to TParticlePDG, a ROOT class that provides PDG information (e.g. mass, spin, etc.) on particle pdgId.
Returns name of the particle for given PDG identifier pdgId.
Static method. Returns pointer to the main random generator used in Sartre. Note that there is only one instance of TRandom3 in Sartre.
Returns the set seed for Sartre's random number generator. Note that it is not the current seed at the time when the method is used but the original seed defined, that is the one set in Sartre::init().
Sets the seed for Sartre's random number generator to value. Be aware that when called after Sartre::init() this method will set the new seed, ignoring previously defined seeds. The equivalent runcard entry is seed.
Returns integer user variable. See also setUserInt(). Main advantage of adding variables to the "Settings" mechanism is to give the user some parameters to use in his application that can be set via runcards.
Returns floating point user variable. See also setUserDouble(). Main advantage of adding variables to the "Settings" mechanism is to give the user some parameters to use in his application that can be set via runcards.
Returns string user variable. See also setUserString(). Main advantage of adding variables to the "Settings" mechanism is to give the user some parameters to use in his application that can be set via runcards.
Sets user integer parameter to val. See also userInt(). The equivalent runcard entry is userInt.
Sets user floating point parameter to val. See also userDouble(). The equivalent runcard entry is userDouble.
Sets user string parameter to val. See also userString(). The equivalent runcard entry is userString.
Last Update: January 8, 2013 |