63 "If G4 kernel is not initialized, it will be initialized.");
100 "Display begin_of_event information at given frequency.");
102 "If it is set to zero, only the begin_of_run is shown.");
112 "This command is valid only for multi-threaded mode.");
114 "The command is ignored if it is issued in sequential mode.");
124 "Set the number of threads to be the number of available logical cores.");
127 "This command is valid only for multi-threaded mode.");
129 "The command is ignored if it is issued in sequential mode.");
135 "Locks each thread to a specific logical core. Workers "
136 "are locked in round robin to logical cores.");
138 "This command is valid only for multi-threaded mode.");
141 "This command is ignored if it is issued in sequential mode.");
143 "If a value n>0 is provided it starts setting affinity "
144 "from the n-th CPU (note: counting from 1).");
146 "third logical CPU (number 2).");
148 "If a value n<0 is provided never locks on n-th CPU.");
157 "Set the event modulo for dispatching events to worker threads");
159 "i.e. each worker thread is ordered to simulate N events and then");
162 "If it is set to zero (default value), N is roughly given by this.");
164 " N = int( sqrt( number_of_events / number_of_threads ) )");
166 "The value N may affect on the computing performance in particular");
168 "if N is too small compared to the total number of events.");
170 "The second parameter seedOnce specifies how frequently each worker");
172 "thread is seeded by the random number sequence centrally managed");
175 " - If seedOnce is set to 0 (default), seeds that are centrally managed");
177 " by G4MTRunManager are set for every event of every worker thread.");
179 " This option guarantees event reproducibility regardless of number");
182 " - If seedOnce is set to 1, seeds are set only once for the first");
184 " event of each run of each worker thread. Event reproducibility is");
186 " guaranteed only if the same number of worker threads are used.");
188 " On the other hand, this option offers better computing performance");
190 " in particular for applications with relatively small primary");
193 " - If seedOnce is set to 2, seeds are set only for the first event of");
195 " group of N events. This option is reserved for the future use when");
197 " Geant4 allows number of threads to be dynamically changed during an");
201 "This command is ignored if it is issued in sequential mode.");
216 "In case name of a region is not given, all regions will be displayed.");
224 "Note that material-cuts-couple information is updated");
250 "If softAbort is false (default), currently processing event "
251 "will be immediately aborted,");
253 "processing the current event.");
265 "This command must be applied if geometry has been modified");
272 "This command must be applied if the user needs his/her");
275 "/run/geometryModified is automatically issued with this command.");
291 "called when a run starts.");
293 "But the user may use this to visualize the scoring "
294 "world(s) before a run to start.");
304 "Initialize the random number generator with integer seed stream.");
307 "Actual number of integers to be used depends on the individual "
308 "random number engine.");
309#ifdef G4MULTITHREADED
319 "Define the directory name of the rndm status files.");
329 "beginning of event (currentEvent.rndm) ");
344 "Reset the status of the rndm engine from a file.");
348 " /random/setDirectoryName.");
358 "Reset the status of the rndm engine from a file at each event.");
360 "Note that the file must follow the following naming convention:");
362 "number and #2 is the event number.");
364 "For example to re-seed the first event of the first "
365 "run the file should be called run0evt0.rndm.");
367 "If for a specific run/event the file is not found, "
368 "the standard re-seeding strategy is used.");
370 "strong reproducibility studies.");
372 " /random/setDirectoryName.");
379 "Save random number status at beginning of each event.");
381 "File name contains run and event numbers: runXXXevtYYY.rndm");
389 " flag = 1 : status before primary particle generation is stored");
391 " flag = 2 : status before event processing (after primary "
392 "particle generation) is stored");
395 "Note: Some performance overhead may be seen by storing rndm "
396 "status, in particular");
398 "for the case of simplest geometry and small number of tracks per event.");
407 "Force workers to process current stack of UI commands.");
460 const char* nv = (
const char*) newValue;
461 std::istringstream is(nv);
490 G4cout <<
"*** /run/numberOfThreads command is issued in sequential mode."
491 <<
"\nCommand is ignored." <<
G4endl;
496 "/run/numberOfThreads command is issued to local thread.");
509 G4cout <<
"*** /run/useMaximumLogicalCores command is issued in "
511 <<
"\nCommand is ignored." <<
G4endl;
517 "/run/useMaximumLogicalCores command is issued to local thread.");
530 G4cout <<
"*** /run/pinAffinity command is issued in sequential mode."
531 <<
"\nCommand is ignored." <<
G4endl;
536 "/run/pinAffinity command is issued to local thread.");
546 const char* nv = (
const char*) newValue;
547 std::istringstream is(nv);
548 is >> nevMod >> sOnce;
554 G4cout <<
"*** /run/eventModulo command is issued in sequential mode."
555 <<
"\nCommand is ignored." <<
G4endl;
560 "/run/eventModulo command is issued to local thread.");
565 if(newValue ==
"**ALL**")
578 else if(command ==
optCmd)
623 while(!(vl = next()).
empty())
625 seeds[idx] =
StoL(vl);
630 G4cerr <<
"/random/setSeeds should have at least two values. "
637 G4Random::setTheSeeds(seeds);
692 "/run/workersProcessCmds command issued on a "
693 "non-G4MTRunManager class instance.");
699 <<
"*** /run/workersProcessCmds command is issued in sequential mode."
700 <<
"\nCommand is ignored." <<
G4endl;
705 "/run/workersProcessCmds command is issued to local thread.");
758 G4cout <<
"*** /run/eventModulo command is valid only in MT mode."
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
static G4int SeedOncePerCommunication()
static void SetSeedOncePerCommunication(G4int val)
virtual void RequestWorkersProcessCommandsStack()
static G4ProductionCutsTable * GetProductionCutsTable()
virtual void AbortRun(G4bool softAbort=false)
virtual void Initialize()
virtual void RestoreRandomNumberStatus(const G4String &fileN)
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void SetRandomNumberStoreDir(const G4String &dir)
virtual void rndmSaveThisEvent()
virtual void RestoreRndmEachEvent(G4bool)
virtual void AbortEvent()
virtual void rndmSaveThisRun()
virtual void BeamOn(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
RMType GetRunManagerType() const
void PhysicsHasBeenModified()
void SetVerboseLevel(G4int vl)
const G4String & GetRandomNumberStoreDir() const
void SetRandomNumberStorePerEvent(G4bool flag)
void GeometryHasBeenModified(G4bool prop=true)
void SetGeometryToBeOptimized(G4bool vl)
void StoreRandomNumberStatusToG4Event(G4int vl)
G4int GetFlagRandomNumberStatusToG4Event() const
void SetRandomNumberStore(G4bool flag)
void DumpRegion(const G4String &rname) const
G4int GetVerboseLevel() const
virtual void ConstructScoringWorlds()
void SetPrintProgress(G4int i)
G4UIcmdWithAnInteger * verboseCmd
G4UIcmdWithoutParameter * physCmd
G4UIcmdWithABool * optCmd
G4MaterialScanner * materialScanner
G4UIcmdWithoutParameter * saveThisRunCmd
G4RunMessenger(G4RunManager *runMgr)
G4UIcmdWithoutParameter * saveThisEventCmd
G4UIcmdWithABool * restoreRandCmdMT
G4UIcmdWithAString * restoreRandCmd
G4UIdirectory * randomDirectory
G4UIcmdWithAnInteger * randEvtCmd
G4UIcmdWithAString * randDirCmd
G4UIcmdWithoutParameter * initCmd
G4UIcmdWithoutParameter * geomCmd
G4String GetCurrentValue(G4UIcommand *command)
G4UIcmdWithAString * dumpRegCmd
G4UIcmdWithABool * saveEachEventCmd
G4UIdirectory * runDirectory
G4UIcmdWithAString * seedCmd
G4UIcmdWithABool * savingFlagCmd
G4UIcmdWithABool * brkBoECmd
G4UIcmdWithoutParameter * dumpCoupleCmd
G4UIcmdWithoutParameter * abortEventCmd
G4UIcmdWithAnInteger * printProgCmd
G4UIcmdWithABool * brkEoECmd
G4UIcmdWithABool * geomRebCmd
G4UIcmdWithABool * abortCmd
G4UIcmdWithoutParameter * maxThreadsCmd
void SetNewValue(G4UIcommand *command, G4String newValues)
G4UIcmdWithAnInteger * nThreadsCmd
G4UIcmdWithoutParameter * constScoreCmd
G4RunManager * runManager
G4UIcmdWithAnInteger * pinAffinityCmd
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(G4int defVal)
void SetToBeBroadcasted(G4bool val)
static G4String ConvertToString(G4bool boolVal)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)
void SetPauseAtBeginOfEvent(G4bool vl)
static G4UImanager * GetUIpointer()
void SetPauseAtEndOfEvent(G4bool vl)
void SetDefaultValue(const char *theDefaultValue)
void SetParameterRange(const char *theRange)
G4int G4GetNumberOfCores()
bool SetPinAffinity(int idx, NativeThread &at)