8 #include <G4UIdirectory.hh> 9 #include <G4UIcmdWithoutParameter.hh> 10 #include <G4UIcmdWithAnInteger.hh> 17 : fUserRunAction(rdm) {
19 fDir =
new G4UIdirectory(
"/edep/random/");
20 fDir->SetGuidance(
"Control of the random seed number.");
23 =
new G4UIcmdWithAnInteger(
"/edep/random/randomSeed",
this);
24 fRandomSeedCmd->SetGuidance(
"Sets the random number generator seed" 25 " using a single integer.");
28 =
new G4UIcmdWithoutParameter(
"/edep/random/timeRandomSeed",
this);
30 " using the system time.");
33 =
new G4UIcmdWithoutParameter(
"/edep/random/showRandomSeed",
this);
37 =
new G4UIcmdWithAnInteger(
"/edep/runId",
this);
38 fDetSimRunIdCmd->SetGuidance(
"This is the first run id that will be used by" 39 " GEANT. GEANT will automatically increment" 40 " the run id every time it starts a new" 41 " internal run so care must be taken if you" 42 " depend on this to pass-through the run id.");
45 =
new G4UIcmdWithAnInteger(
"/edep/subrunId",
this);
47 " documentation purposes. This has no" 48 " internal meaning.");
71 EDepSimLog(
"### Random number seed: " << seed);
82 EDepSimThrow(
"EDepSim::UserRunActionMessenger:: Unimplemented command");
87 return fDir->GetCommandPath();
#define EDepSimLog(outStream)
G4String GetPath()
Get the base directory for the messenger commands.
EDepSim::UserRunAction * fUserRunAction
#define EDepSimThrow(message)
Print an error message, and then throw an exception.
void SetTimeSeed()
Build a seed for the generator based on the system time.
G4UIcmdWithAnInteger * fDetSimSubrunIdCmd
virtual ~UserRunActionMessenger()
void SetNewValue(G4UIcommand *, G4String)
Handle messages from the UI processor.
void SetDetSimSubrunId(int v)
G4UIcmdWithoutParameter * fTimeRandomSeedCmd
void SetDetSimRunId(int v)
G4UIcmdWithoutParameter * fShowRandomSeedCmd
UserRunActionMessenger(EDepSim::UserRunAction *)
G4UIcmdWithAnInteger * fDetSimRunIdCmd
long GetSeed(void) const
Get the seed that started the low level random generator.
G4UIcmdWithAnInteger * fRandomSeedCmd