60 beamOnCmd->
SetGuidance(
"If G4 kernel is not initialized, it will be initialized.");
61 beamOnCmd->
SetGuidance(
"Default number of events to be processed is 1.");
62 beamOnCmd->
SetGuidance(
"The second and third arguments can be used for");
63 beamOnCmd->
SetGuidance(
"executing a macro file at the end of each event.");
64 beamOnCmd->
SetGuidance(
"If the second argument, i.e. name of the macro");
65 beamOnCmd->
SetGuidance(
"file, is given but the third argument is not,");
66 beamOnCmd->
SetGuidance(
"the macro file will be executed for all of the");
68 beamOnCmd->
SetGuidance(
"If the third argument (nSelect) is given, the");
69 beamOnCmd->
SetGuidance(
"macro file will be executed only for the first");
87 verboseCmd->
SetGuidance(
"Set the Verbose level of G4RunManager.");
89 verboseCmd->
SetGuidance(
" 1 : Display main topics");
90 verboseCmd->
SetGuidance(
" 2 : Display main topics and run summary");
93 verboseCmd->
SetRange(
"level >=0 && level <=2");
96 printProgCmd->
SetGuidance(
"Display begin_of_event information at given frequency.");
97 printProgCmd->
SetGuidance(
"If it is set to zero, only the begin_of_run is shown.");
98 printProgCmd->
SetGuidance(
"If it is set to -1, no print-out is shown.");
104 nThreadsCmd->
SetGuidance(
"Set the number of threads to be used.");
105 nThreadsCmd->
SetGuidance(
"This command is valid only for multi-threaded mode.");
106 nThreadsCmd->
SetGuidance(
"This command works only in PreInit state.");
107 nThreadsCmd->
SetGuidance(
"The command is ignored if it is issued in sequential mode.");
110 nThreadsCmd->
SetRange(
"nThreads >0");
115 evModCmd->
SetGuidance(
"Set the event modulo for dispatching events to worker threads");
116 evModCmd->
SetGuidance(
"i.e. each worker thread is ordered to simulate N events and then");
117 evModCmd->
SetGuidance(
"comes back to G4MTRunManager for next set.");
118 evModCmd->
SetGuidance(
"If it is set to zero (default value), N is roughly given by this.");
119 evModCmd->
SetGuidance(
" N = int( sqrt( number_of_events / number_of_threads ) )");
120 evModCmd->
SetGuidance(
"The value N may affect on the computing performance in particular");
121 evModCmd->
SetGuidance(
"if N is too small compared to the total number of events.");
122 evModCmd->
SetGuidance(
"This command is valid only for multi-threaded mode.");
123 evModCmd->
SetGuidance(
"This command is ignored if it is issued in sequential mode.");
131 dumpRegCmd->
SetGuidance(
"Dump region information.");
132 dumpRegCmd->
SetGuidance(
"In case name of a region is not given, all regions will be displayed.");
138 dumpCoupleCmd->
SetGuidance(
"Dump material-cuts-couple information.");
139 dumpCoupleCmd->
SetGuidance(
"Note that material-cuts-couple information is updated");
140 dumpCoupleCmd->
SetGuidance(
"after BeamOn has started.");
144 optCmd->
SetGuidance(
"Set the optimization flag for geometry.");
145 optCmd->
SetGuidance(
"If it is set to TRUE, G4GeometryManager will optimize");
147 optCmd->
SetGuidance(
"GEANT4 is initialized with this flag as TRUE.");
153 brkBoECmd->
SetGuidance(
"Set a break point at the begining of every event.");
158 brkEoECmd->
SetGuidance(
"Set a break point at the end of every event.");
163 abortCmd->
SetGuidance(
"Abort current run processing.");
164 abortCmd->
SetGuidance(
"If softAbort is false (default), currently processing event will be immediately aborted,");
165 abortCmd->
SetGuidance(
"while softAbort is true, abortion occurs after processing the current event.");
171 abortEventCmd->
SetGuidance(
"Abort currently processing event.");
175 geomCmd->
SetGuidance(
"Force geometry to be closed (re-voxellized) again.");
176 geomCmd->
SetGuidance(
"This command must be applied if geometry has been modified");
177 geomCmd->
SetGuidance(
" after the first initialization (or BeamOn).");
181 geomRebCmd->
SetGuidance(
"Force geometry to be rebuilt once again.");
182 geomRebCmd->
SetGuidance(
"This command must be applied if the user needs his/her");
183 geomRebCmd->
SetGuidance(
" detector construction to be reinvoked.");
184 geomRebCmd->
SetGuidance(
"/run/geometryModified is automatically issued with this command.");
190 physCmd->
SetGuidance(
"Force all physics tables recalculated again.");
191 physCmd->
SetGuidance(
"This command must be applied");
192 physCmd->
SetGuidance(
" if physics process has been modified after the");
193 physCmd->
SetGuidance(
" first initialization (or BeamOn).");
197 constScoreCmd->
SetGuidance(
"Constrct scoring parallel world(s) if defined.");
198 constScoreCmd->
SetGuidance(
"This command is not mandatory, but automatically called when a run starts.");
199 constScoreCmd->
SetGuidance(
"But the user may use this to visualize the scoring world(s) before a run to start.");
205 randomDirectory->
SetGuidance(
"Random number status control commands.");
208 seedCmd->
SetGuidance(
"Initialize the random number generator with integer seed stream.");
209 seedCmd->
SetGuidance(
"Number of integers should be more than 1.");
210 seedCmd->
SetGuidance(
"Actual number of integers to be used depends on the individual random number engine.");
215 randDirCmd->
SetGuidance(
"Define the directory name of the rndm status files.");
216 randDirCmd->
SetGuidance(
"Directory will be created if it does not exist.");
222 savingFlagCmd->
SetGuidance(
"The randomNumberStatus will be saved at :");
223 savingFlagCmd->
SetGuidance(
"begining of run (currentRun.rndm) and "
224 "begining of event (currentEvent.rndm) ");
229 saveThisRunCmd->
SetGuidance(
"copy currentRun.rndm to runXXX.rndm");
233 saveThisEventCmd->
SetGuidance(
"copy currentEvent.rndm to runXXXevtYYY.rndm");
237 restoreRandCmd->
SetGuidance(
"Reset the status of the rndm engine from a file.");
238 restoreRandCmd->
SetGuidance(
"See CLHEP manual for detail.");
239 restoreRandCmd->
SetGuidance(
"The engine status must be stored beforehand.");
240 restoreRandCmd->
SetGuidance(
"Directory of the status file should be set by"
241 " /random/setDirectoryName.");
248 saveEachEventCmd->
SetGuidance(
"Save random number status at beginning of each event.");
249 saveEachEventCmd->
SetGuidance(
"File name contains run and event numbers: runXXXevtYYY.rndm");
254 randEvtCmd->
SetGuidance(
"Flag to store rndm status to G4Event object.");
255 randEvtCmd->
SetGuidance(
" flag = 0 : not store (default)");
256 randEvtCmd->
SetGuidance(
" flag = 1 : status before primary particle generation is stored");
257 randEvtCmd->
SetGuidance(
" flag = 2 : status before event processing (after primary particle generation) is stored");
258 randEvtCmd->
SetGuidance(
" flag = 3 : both are stored");
259 randEvtCmd->
SetGuidance(
"Note: Some performance overhead may be seen by storing rndm status, in particular");
260 randEvtCmd->
SetGuidance(
"for the case of simplest geometry and small number of tracks per event.");
263 randEvtCmd->
SetRange(
"flag>=0 && flag<3");
270 delete materialScanner;
278 delete dumpCoupleCmd;
282 delete abortEventCmd;
288 delete constScoreCmd;
291 delete savingFlagCmd;
292 delete saveThisRunCmd;
293 delete saveThisEventCmd;
294 delete restoreRandCmd;
295 delete randomDirectory;
296 delete saveEachEventCmd;
304 if( command==beamOnCmd )
308 const char* nv = (
const char*)newValue;
309 std::istringstream is(nv);
310 is >> nev >> macroFileName >> nst;
311 if(macroFileName==
"***NULL***")
312 { runManager->
BeamOn(nev); }
314 { runManager->
BeamOn(nev,macroFileName,nst); }
316 else if( command==verboseCmd )
318 else if( command == printProgCmd )
320 else if( command==nThreadsCmd )
330 G4cout<<
"*** /run/numberOfThreads command is issued in sequential mode."
331 <<
"\nCommand is ignored."<<
G4endl;
336 "/run/numberOfThreads command is issued to local thread.");
339 else if( command==evModCmd)
348 G4cout<<
"*** /run/eventModulo command is issued in sequential mode."
349 <<
"\nCommand is ignored."<<
G4endl;
354 "/run/eventModulo command is issued to local thread.");
357 else if( command==dumpRegCmd )
359 if(newValue==
"**ALL**")
364 else if( command==dumpCoupleCmd)
368 else if( command==optCmd )
370 else if( command==brkBoECmd )
372 else if( command==brkEoECmd )
374 else if( command==abortCmd )
376 else if( command==abortEventCmd )
378 else if( command==initCmd )
380 else if( command==geomCmd )
382 else if( command==geomRebCmd )
384 else if( command==physCmd )
386 else if( command==seedCmd )
392 while(!(vl=next()).isNull())
393 { seeds[idx] = (long)(
StoI(vl)); idx++; }
395 {
G4cerr <<
"/random/setSeeds should have at least two integers. Command ignored." <<
G4endl; }
402 else if( command==randDirCmd )
404 else if( command==savingFlagCmd )
406 else if( command==saveThisRunCmd )
408 else if( command==saveThisEventCmd )
410 else if( command==restoreRandCmd )
412 else if( command==randEvtCmd )
414 else if( command==saveEachEventCmd)
416 else if( command==constScoreCmd )
425 if( command==verboseCmd )
427 else if( command == printProgCmd )
429 else if( command==randDirCmd )
431 else if( command==randEvtCmd )
433 else if( command==nThreadsCmd )
439 static_cast<G4MTRunManager*>(runManager)->GetNumberOfThreads());
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void GeometryHasBeenModified(G4bool prop=true)
G4int GetVerboseLevel() const
virtual void AbortRun(G4bool softAbort=false)
void SetParameter(G4UIparameter *const newParameter)
G4RunMessenger(G4RunManager *runMgr)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
const G4String & GetRandomNumberStoreDir() const
void SetVerboseLevel(G4int vl)
static G4int GetNewIntValue(const char *paramString)
void SetParameterRange(const char *theRange)
static void setTheSeeds(const long *seeds, int aux=-1)
void SetPrintProgress(G4int i)
void SetToBeBroadcasted(G4bool val)
void SetGeometryToBeOptimized(G4bool vl)
void SetDefaultValue(const char *theDefaultValue)
static G4String ConvertToString(G4bool boolVal)
void SetRandomNumberStorePerEvent(G4bool flag)
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
void SetRandomNumberStore(G4bool flag)
G4int GetFlagRandomNumberStatusToG4Event() const
G4String GetCurrentValue(G4UIcommand *command)
static G4bool GetNewBoolValue(const char *paramString)
void SetDefaultValue(G4bool defVal)
static G4UImanager * GetUIpointer()
virtual void RestoreRandomNumberStatus(const G4String &fileN)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
virtual void rndmSaveThisRun()
G4GLOB_DLL std::ostream G4cout
void StoreRandomNumberStatusToG4Event(G4int vl)
void PhysicsHasBeenModified()
RMType GetRunManagerType() const
virtual void ConstructScoringWorlds()
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
virtual void rndmSaveThisEvent()
void AvailableForStates(G4ApplicationState s1)
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetNewValue(G4UIcommand *command, G4String newValues)
static G4ProductionCutsTable * GetProductionCutsTable()
void SetDefaultValue(const char *defVal)
void SetPauseAtEndOfEvent(G4bool vl)
void SetPauseAtBeginOfEvent(G4bool vl)
virtual void Initialize()
virtual void AbortEvent()
void SetDefaultValue(G4int defVal)
void SetRandomNumberStoreDir(const G4String &dir)
void DumpRegion(const G4String &rname) const
G4GLOB_DLL std::ostream G4cerr