Geant4  10.01.p03
G4RunMessenger.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4RunMessenger.cc 86051 2014-11-07 08:30:30Z gcosmo $
28 //
29 
30 #include "G4RunMessenger.hh"
31 #include "G4RunManager.hh"
32 #include "G4MTRunManager.hh"
33 #include "G4UIdirectory.hh"
35 #include "G4UIcmdWithAString.hh"
36 #include "G4UIcmdWithAnInteger.hh"
37 #include "G4UIcmdWithABool.hh"
38 #include "G4UIcommand.hh"
39 #include "G4UIparameter.hh"
40 #include "G4UImanager.hh"
41 #include "G4ProductionCutsTable.hh"
42 #include "G4ios.hh"
43 #include "G4MaterialScanner.hh"
44 #include "G4Tokenizer.hh"
45 #include "Randomize.hh"
46 #include <sstream>
47 
49 :runManager(runMgr)
50 {
51  runDirectory = new G4UIdirectory("/run/");
52  runDirectory->SetGuidance("Run control commands.");
53 
54  initCmd = new G4UIcmdWithoutParameter("/run/initialize",this);
55  initCmd->SetGuidance("Initialize G4 kernel.");
57 
58  beamOnCmd = new G4UIcommand("/run/beamOn",this);
59  beamOnCmd->SetGuidance("Start a Run.");
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");
67  beamOnCmd->SetGuidance("event.");
68  beamOnCmd->SetGuidance("If the third argument (nSelect) is given, the");
69  beamOnCmd->SetGuidance("macro file will be executed only for the first");
70  beamOnCmd->SetGuidance("nSelect events.");
73  G4UIparameter* p1 = new G4UIparameter("numberOfEvent",'i',true);
74  p1->SetDefaultValue(1);
75  p1->SetParameterRange("numberOfEvent >= 0");
77  G4UIparameter* p2 = new G4UIparameter("macroFile",'s',true);
78  p2->SetDefaultValue("***NULL***");
80  G4UIparameter* p3 = new G4UIparameter("nSelect",'i',true);
81  p3->SetDefaultValue(-1);
82  p3->SetParameterRange("nSelect>=-1");
84  //beamOnCmd->SetToBeBroadcasted(false);
85 
86  verboseCmd = new G4UIcmdWithAnInteger("/run/verbose",this);
87  verboseCmd->SetGuidance("Set the Verbose level of G4RunManager.");
88  verboseCmd->SetGuidance(" 0 : Silent (default)");
89  verboseCmd->SetGuidance(" 1 : Display main topics");
90  verboseCmd->SetGuidance(" 2 : Display main topics and run summary");
91  verboseCmd->SetParameterName("level",true);
93  verboseCmd->SetRange("level >=0 && level <=2");
94 
95  printProgCmd = new G4UIcmdWithAnInteger("/run/printProgress",this);
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.");
99  printProgCmd->SetParameterName("mod",true);
101  printProgCmd->SetRange("mod>=-1");
102 
103  nThreadsCmd = new G4UIcmdWithAnInteger("/run/numberOfThreads",this);
104  nThreadsCmd->SetGuidance("Set the number of threads to be used.");
105  nThreadsCmd->SetGuidance("This command works only in PreInit state.");
106  nThreadsCmd->SetGuidance("This command is valid only for multi-threaded mode.");
107  nThreadsCmd->SetGuidance("The command is ignored if it is issued in sequential mode.");
108  nThreadsCmd->SetParameterName("nThreads",true);
110  nThreadsCmd->SetRange("nThreads >0");
113 
114  maxThreadsCmd = new G4UIcmdWithoutParameter("/run/useMaximumLogicalCores",this);
115  maxThreadsCmd->SetGuidance("Set the number of threads to be the number of available logical cores.");
116  maxThreadsCmd->SetGuidance("This command works only in PreInit state.");
117  maxThreadsCmd->SetGuidance("This command is valid only for multi-threaded mode.");
118  maxThreadsCmd->SetGuidance("The command is ignored if it is issued in sequential mode.");
121 
122  pinAffinityCmd = new G4UIcmdWithAnInteger("/run/pinAffinity",this);
123  pinAffinityCmd->SetGuidance("Locks each thread to a specific logical core. Workers are locked in round robin to logical cores.");
124  pinAffinityCmd->SetGuidance("This command is valid only for multi-threaded mode.");
125  pinAffinityCmd->SetGuidance("This command works only in PreInit state.");
126  pinAffinityCmd->SetGuidance("This command is ignored if it is issued in sequential mode.");
127  pinAffinityCmd->SetGuidance("If a value n>0 is provided it starts setting affinity from the n-th CPU (note: counting from 1).");
128  pinAffinityCmd->SetGuidance("E.g. /run/pinAffinity 3 locks first thread on third logical CPU (number 2).");
129  pinAffinityCmd->SetGuidance("If a value n<0 is provided never locks on n-th CPU.");
130  pinAffinityCmd->SetParameterName("pinAffinity",true);
133  pinAffinityCmd->SetRange("pinAffinity > 0 || pinAffinity < 0");
135 
136  evModCmd = new G4UIcommand("/run/eventModulo",this);
137  evModCmd->SetGuidance("Set the event modulo for dispatching events to worker threads");
138  evModCmd->SetGuidance("i.e. each worker thread is ordered to simulate N events and then");
139  evModCmd->SetGuidance("comes back to G4MTRunManager for next set.");
140  evModCmd->SetGuidance("If it is set to zero (default value), N is roughly given by this.");
141  evModCmd->SetGuidance(" N = int( sqrt( number_of_events / number_of_threads ) )");
142  evModCmd->SetGuidance("The value N may affect on the computing performance in particular");
143  evModCmd->SetGuidance("if N is too small compared to the total number of events.");
144  evModCmd->SetGuidance("The second parameter seedOnce specifies how frequently each worker");
145  evModCmd->SetGuidance("thread is seeded by the random number sequence contrally managed");
146  evModCmd->SetGuidance("by the master G4MTRunManager.");
147  evModCmd->SetGuidance(" - If seedOnce is set to 0 (default), seeds that are centrally managed");
148  evModCmd->SetGuidance(" by G4MTRunManager are set for every event of every worker thread.");
149  evModCmd->SetGuidance(" This option guarantees event reproducability regardless of number");
150  evModCmd->SetGuidance(" of threads.");
151  evModCmd->SetGuidance(" - If seedOnce is set to 1, seeds are set only once for the first");
152  evModCmd->SetGuidance(" event of each run of each worker thread. Event reproducability is");
153  evModCmd->SetGuidance(" guaranteed only if the same number of worker threads are used.");
154  evModCmd->SetGuidance(" On the other hand, this option offers better computing performance");
155  evModCmd->SetGuidance(" in particular for applications with relatively small primary");
156  evModCmd->SetGuidance(" particle energy and large number of events.");
157  evModCmd->SetGuidance(" - If seedOnce is set to 2, seeds are set only for the first event of");
158  evModCmd->SetGuidance(" group of N events. This option is reserved for the future use when");
159  evModCmd->SetGuidance(" Geant4 allows number of threads to be dynatically changed during an");
160  evModCmd->SetGuidance(" event loop.");
161  evModCmd->SetGuidance("This command is valid only for multi-threaded mode.");
162  evModCmd->SetGuidance("This command is ignored if it is issued in sequential mode.");
163  G4UIparameter* emp1 = new G4UIparameter("N",'i',true);
164  emp1->SetDefaultValue(0);
165  emp1->SetParameterRange("N >= 0");
166  evModCmd->SetParameter(emp1);
167  G4UIparameter* emp2 = new G4UIparameter("seedOnce",'i',true);
168  emp2->SetDefaultValue(0);
169  emp2->SetParameterRange("seedOnce >= 0 && seedOnce <=2");
170  evModCmd->SetParameter(emp2);
173 
174  dumpRegCmd = new G4UIcmdWithAString("/run/dumpRegion",this);
175  dumpRegCmd->SetGuidance("Dump region information.");
176  dumpRegCmd->SetGuidance("In case name of a region is not given, all regions will be displayed.");
177  dumpRegCmd->SetParameterName("regionName", true);
178  dumpRegCmd->SetDefaultValue("**ALL**");
180 
181  dumpCoupleCmd = new G4UIcmdWithoutParameter("/run/dumpCouples",this);
182  dumpCoupleCmd->SetGuidance("Dump material-cuts-couple information.");
183  dumpCoupleCmd->SetGuidance("Note that material-cuts-couple information is updated");
184  dumpCoupleCmd->SetGuidance("after BeamOn has started.");
186 
187  optCmd = new G4UIcmdWithABool("/run/optimizeGeometry",this);
188  optCmd->SetGuidance("Set the optimization flag for geometry.");
189  optCmd->SetGuidance("If it is set to TRUE, G4GeometryManager will optimize");
190  optCmd->SetGuidance("the geometry definitions.");
191  optCmd->SetGuidance("GEANT4 is initialized with this flag as TRUE.");
192  optCmd->SetParameterName("optimizeFlag",true);
193  optCmd->SetDefaultValue(true);
195 
196  brkBoECmd = new G4UIcmdWithABool("/run/breakAtBeginOfEvent",this);
197  brkBoECmd->SetGuidance("Set a break point at the begining of every event.");
198  brkBoECmd->SetParameterName("flag",true);
199  brkBoECmd->SetDefaultValue(true);
200 
201  brkEoECmd = new G4UIcmdWithABool("/run/breakAtEndOfEvent",this);
202  brkEoECmd->SetGuidance("Set a break point at the end of every event.");
203  brkEoECmd->SetParameterName("flag",true);
204  brkEoECmd->SetDefaultValue(true);
205 
206  abortCmd = new G4UIcmdWithABool("/run/abort",this);
207  abortCmd->SetGuidance("Abort current run processing.");
208  abortCmd->SetGuidance("If softAbort is false (default), currently processing event will be immediately aborted,");
209  abortCmd->SetGuidance("while softAbort is true, abortion occurs after processing the current event.");
211  abortCmd->SetParameterName("softAbort",true);
212  abortCmd->SetDefaultValue(false);
213 
214  abortEventCmd = new G4UIcmdWithoutParameter("/run/abortCurrentEvent",this);
215  abortEventCmd->SetGuidance("Abort currently processing event.");
217 
218  geomCmd = new G4UIcmdWithoutParameter("/run/geometryModified",this);
219  geomCmd->SetGuidance("Force geometry to be closed (re-voxellized) again.");
220  geomCmd->SetGuidance("This command must be applied if geometry has been modified");
221  geomCmd->SetGuidance(" after the first initialization (or BeamOn).");
223 
224  geomRebCmd = new G4UIcmdWithABool("/run/reinitializeGeometry",this);
225  geomRebCmd->SetGuidance("Force geometry to be rebuilt once again.");
226  geomRebCmd->SetGuidance("This command must be applied if the user needs his/her");
227  geomRebCmd->SetGuidance(" detector construction to be reinvoked.");
228  geomRebCmd->SetGuidance("/run/geometryModified is automatically issued with this command.");
229  geomRebCmd->SetParameterName("destroyFirst",true);
230  geomRebCmd->SetDefaultValue(false);
232 
233  physCmd = new G4UIcmdWithoutParameter("/run/physicsModified",this);
234  physCmd->SetGuidance("Force all physics tables recalculated again.");
235  physCmd->SetGuidance("This command must be applied");
236  physCmd->SetGuidance(" if physics process has been modified after the");
237  physCmd->SetGuidance(" first initialization (or BeamOn).");
239 
240  constScoreCmd = new G4UIcmdWithoutParameter("/run/constructScoringWorlds",this);
241  constScoreCmd->SetGuidance("Constrct scoring parallel world(s) if defined.");
242  constScoreCmd->SetGuidance("This command is not mandatory, but automatically called when a run starts.");
243  constScoreCmd->SetGuidance("But the user may use this to visualize the scoring world(s) before a run to start.");
245 
247 
248  randomDirectory = new G4UIdirectory("/random/");
249  randomDirectory->SetGuidance("Random number status control commands.");
250 
251  seedCmd = new G4UIcmdWithAString("/random/setSeeds",this);
252  seedCmd->SetGuidance("Initialize the random number generator with integer seed stream.");
253  seedCmd->SetGuidance("Number of integers should be more than 1.");
254  seedCmd->SetGuidance("Actual number of integers to be used depends on the individual random number engine.");
255 #ifdef G4MULTITHREADED
256  seedCmd->SetGuidance("This command sets the seeds for the master thread.");
257 #endif
258  seedCmd->SetParameterName("IntArray",false);
260  seedCmd->SetToBeBroadcasted(false);
261 
262  randDirCmd = new G4UIcmdWithAString("/random/setDirectoryName",this);
263  randDirCmd->SetGuidance("Define the directory name of the rndm status files.");
264  randDirCmd->SetGuidance("Directory will be created if it does not exist.");
265  randDirCmd->SetParameterName("fileName",true);
268 
269  savingFlagCmd = new G4UIcmdWithABool("/random/setSavingFlag",this);
270  savingFlagCmd->SetGuidance("The randomNumberStatus will be saved at :");
271  savingFlagCmd->SetGuidance("begining of run (currentRun.rndm) and "
272  "begining of event (currentEvent.rndm) ");
273  savingFlagCmd->SetParameterName("flag",true);
275 
276  saveThisRunCmd = new G4UIcmdWithoutParameter("/random/saveThisRun",this);
277  saveThisRunCmd->SetGuidance("copy currentRun.rndm to runXXX.rndm");
279 
280  saveThisEventCmd = new G4UIcmdWithoutParameter("/random/saveThisEvent",this);
281  saveThisEventCmd->SetGuidance("copy currentEvent.rndm to runXXXevtYYY.rndm");
283 
284  restoreRandCmd = new G4UIcmdWithAString("/random/resetEngineFrom",this);
285  restoreRandCmd->SetGuidance("Reset the status of the rndm engine from a file.");
286  restoreRandCmd->SetGuidance("See CLHEP manual for detail.");
287  restoreRandCmd->SetGuidance("The engine status must be stored beforehand.");
288  restoreRandCmd->SetGuidance("Directory of the status file should be set by"
289  " /random/setDirectoryName.");
290  restoreRandCmd->SetParameterName("fileName",true);
291  restoreRandCmd->SetDefaultValue("currentRun.rndm");
294 
295  saveEachEventCmd = new G4UIcmdWithABool("/random/saveEachEventFlag",this);
296  saveEachEventCmd->SetGuidance("Save random number status at beginning of each event.");
297  saveEachEventCmd->SetGuidance("File name contains run and event numbers: runXXXevtYYY.rndm");
298  saveEachEventCmd->SetParameterName("flag",true);
300 
301  randEvtCmd = new G4UIcmdWithAnInteger("/run/storeRndmStatToEvent",this);
302  randEvtCmd->SetGuidance("Flag to store rndm status to G4Event object.");
303  randEvtCmd->SetGuidance(" flag = 0 : not store (default)");
304  randEvtCmd->SetGuidance(" flag = 1 : status before primary particle generation is stored");
305  randEvtCmd->SetGuidance(" flag = 2 : status before event processing (after primary particle generation) is stored");
306  randEvtCmd->SetGuidance(" flag = 3 : both are stored");
307  randEvtCmd->SetGuidance("Note: Some performance overhead may be seen by storing rndm status, in particular");
308  randEvtCmd->SetGuidance("for the case of simplest geometry and small number of tracks per event.");
309  randEvtCmd->SetParameterName("flag",true);
311  randEvtCmd->SetRange("flag>=0 && flag<3");
313 
314 }
315 
317 {
318  delete materialScanner;
319  delete beamOnCmd;
320  delete verboseCmd;
321  delete printProgCmd;
322  delete nThreadsCmd;
323  delete maxThreadsCmd;
324  delete evModCmd;
325  delete optCmd;
326  delete dumpRegCmd;
327  delete dumpCoupleCmd;
328  delete brkBoECmd;
329  delete brkEoECmd;
330  delete abortCmd;
331  delete abortEventCmd;
332  delete initCmd;
333  delete geomCmd;
334  delete geomRebCmd;
335  delete physCmd;
336  delete randEvtCmd;
337  delete constScoreCmd;
338 
339  delete seedCmd;
340  delete savingFlagCmd;
341  delete saveThisRunCmd;
342  delete saveThisEventCmd;
343  delete restoreRandCmd;
344  delete randomDirectory;
345  delete saveEachEventCmd;
346 
347  delete randDirCmd;
348  delete runDirectory;
349 }
350 
352 {
353  if( command==beamOnCmd )
354  {
355  G4int nev;
356  G4int nst;
357  const char* nv = (const char*)newValue;
358  std::istringstream is(nv);
359  is >> nev >> macroFileName >> nst;
360  if(macroFileName=="***NULL***")
361  { runManager->BeamOn(nev); }
362  else
363  { runManager->BeamOn(nev,macroFileName,nst); }
364  }
365  else if( command==verboseCmd )
367  else if( command == printProgCmd )
369  else if( command==nThreadsCmd )
370  {
372  if( rmType==G4RunManager::masterRM )
373  {
374  static_cast<G4MTRunManager*>(runManager)->SetNumberOfThreads(
375  nThreadsCmd->GetNewIntValue(newValue));
376  }
377  else if ( rmType==G4RunManager::sequentialRM )
378  {
379  G4cout<<"*** /run/numberOfThreads command is issued in sequential mode."
380  <<"\nCommand is ignored."<<G4endl;
381  }
382  else
383  {
384  G4Exception("G4RunMessenger::ApplyNewCommand","Run0901",FatalException,
385  "/run/numberOfThreads command is issued to local thread.");
386  }
387  }
388  else if( command==maxThreadsCmd)
389  {
391  if( rmType==G4RunManager::masterRM )
392  {
393  static_cast<G4MTRunManager*>(runManager)->SetNumberOfThreads(
395  }
396  else if ( rmType==G4RunManager::sequentialRM )
397  {
398  G4cout<<"*** /run/useMaximumLogicalCores command is issued in sequential mode."
399  <<"\nCommand is ignored."<<G4endl;
400  }
401  else
402  {
403  G4Exception("G4RunMessenger::ApplyNewCommand","Run0901",FatalException,
404  "/run/useMaximumLogicalCores command is issued to local thread.");
405  }
406  }
407  else if ( command == pinAffinityCmd )
408  {
410  if( rmType==G4RunManager::masterRM )
411  {
412  static_cast<G4MTRunManager*>(runManager)->SetPinAffinity(
413  pinAffinityCmd->GetNewIntValue(newValue) );
414  }
415  else if ( rmType==G4RunManager::sequentialRM )
416  {
417  G4cout<<"*** /run/pinAffinity command is issued in sequential mode."
418  <<"\nCommand is ignored."<<G4endl;
419  }
420  else
421  {
422  G4Exception("G4RunMessenger::ApplyNewCommand","Run0901",FatalException,
423  "/run/pinAffinity command is issued to local thread.");
424  }
425 
426  }
427  else if( command==evModCmd)
428  {
430  if( rmType==G4RunManager::masterRM )
431  {
432  G4int nevMod = 0;
433  G4int sOnce = 0;
434  const char* nv = (const char*)newValue;
435  std::istringstream is(nv);
436  is >> nevMod >> sOnce;
437  static_cast<G4MTRunManager*>(runManager)->SetEventModulo(nevMod);
439  }
440  else if ( rmType==G4RunManager::sequentialRM )
441  {
442  G4cout<<"*** /run/eventModulo command is issued in sequential mode."
443  <<"\nCommand is ignored."<<G4endl;
444  }
445  else
446  {
447  G4Exception("G4RunMessenger::ApplyNewCommand","Run0902",FatalException,
448  "/run/eventModulo command is issued to local thread.");
449  }
450  }
451  else if( command==dumpRegCmd )
452  {
453  if(newValue=="**ALL**")
454  { runManager->DumpRegion(); }
455  else
456  { runManager->DumpRegion(newValue); }
457  }
458  else if( command==dumpCoupleCmd)
459  {
461  }
462  else if( command==optCmd )
464  else if( command==brkBoECmd )
466  else if( command==brkEoECmd )
468  else if( command==abortCmd )
469  { runManager->AbortRun(abortCmd->GetNewBoolValue(newValue)); }
470  else if( command==abortEventCmd )
471  { runManager->AbortEvent(); }
472  else if( command==initCmd )
473  { runManager->Initialize(); }
474  else if( command==geomCmd )
476  else if( command==geomRebCmd )
478  else if( command==physCmd )
480  else if( command==seedCmd )
481  {
482  G4Tokenizer next(newValue);
483  G4int idx=0;
484  long seeds[100];
485  G4String vl;
486  while(!(vl=next()).isNull())
487  { seeds[idx] = (long)(StoI(vl)); idx++; }
488  if(idx<2)
489  { G4cerr << "/random/setSeeds should have at least two integers. Command ignored." << G4endl; }
490  else
491  {
492  seeds[idx] = 0;
493  G4Random::setTheSeeds(seeds);
494  }
495  }
496  else if( command==randDirCmd )
497  { runManager->SetRandomNumberStoreDir(newValue); }
498  else if( command==savingFlagCmd )
500  else if( command==saveThisRunCmd )
502  else if( command==saveThisEventCmd )
504  else if( command==restoreRandCmd )
505  { runManager->RestoreRandomNumberStatus(newValue); }
506  else if( command==randEvtCmd )
508  else if( command==saveEachEventCmd)
510  else if( command==constScoreCmd )
512 
513 }
514 
516 {
517  G4String cv;
518 
519  if( command==verboseCmd )
521  else if( command == printProgCmd )
523  else if( command==randDirCmd )
525  else if( command==randEvtCmd )
527  else if( command==nThreadsCmd )
528  {
530  if( rmType==G4RunManager::masterRM )
531  {
533  static_cast<G4MTRunManager*>(runManager)->GetNumberOfThreads());
534  }
535  else if ( rmType==G4RunManager::sequentialRM )
536  {
537  cv = "0";
538  }
539  }
540  else if( command==evModCmd)
541  {
543  if( rmType==G4RunManager::masterRM )
544  {
546  static_cast<G4MTRunManager*>(runManager)->GetEventModulo() )
548  }
549  else if ( rmType==G4RunManager::sequentialRM )
550  { G4cout<<"*** /run/eventModulo command is valid only in MT mode."<<G4endl; }
551  }
552 
553  return cv;
554 }
555 
G4UIcmdWithoutParameter * saveThisRunCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void GeometryHasBeenModified(G4bool prop=true)
G4UIcmdWithABool * optCmd
G4int GetVerboseLevel() const
virtual void AbortRun(G4bool softAbort=false)
G4UIcmdWithAString * randDirCmd
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:152
G4int GetPrintProgress()
G4RunMessenger(G4RunManager *runMgr)
G4UIcmdWithoutParameter * initCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIdirectory * runDirectory
const G4String & GetRandomNumberStoreDir() const
void SetVerboseLevel(G4int vl)
G4UIcmdWithAString * restoreRandCmd
static G4int GetNewIntValue(const char *paramString)
void SetParameterRange(const char *theRange)
G4UIcmdWithAnInteger * nThreadsCmd
G4UIdirectory * randomDirectory
void SetPrintProgress(G4int i)
G4UIcmdWithAnInteger * printProgCmd
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:184
void SetGeometryToBeOptimized(G4bool vl)
void SetDefaultValue(const char *theDefaultValue)
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
void SetRandomNumberStorePerEvent(G4bool flag)
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
G4UIcmdWithoutParameter * constScoreCmd
G4UIcmdWithABool * savingFlagCmd
void SetRandomNumberStore(G4bool flag)
G4int GetFlagRandomNumberStatusToG4Event() const
G4String GetCurrentValue(G4UIcommand *command)
G4UIcmdWithoutParameter * maxThreadsCmd
int G4int
Definition: G4Types.hh:78
G4UIcmdWithoutParameter * geomCmd
static G4bool GetNewBoolValue(const char *paramString)
void SetDefaultValue(G4bool defVal)
G4MaterialScanner * materialScanner
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
virtual void RestoreRandomNumberStatus(const G4String &fileN)
G4UIcmdWithoutParameter * dumpCoupleCmd
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
G4UIcmdWithABool * geomRebCmd
virtual void ConstructScoringWorlds()
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4int G4GetNumberOfCores()
Definition: G4Threading.cc:126
const G4double p2
const G4double p1
virtual void rndmSaveThisEvent()
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4String macroFileName
G4UIcmdWithAString * seedCmd
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
G4int StoI(G4String s)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4UIcmdWithoutParameter * physCmd
void SetNewValue(G4UIcommand *command, G4String newValues)
static G4ProductionCutsTable * GetProductionCutsTable()
G4UIcmdWithABool * brkEoECmd
G4RunManager * runManager
G4UIcmdWithoutParameter * abortEventCmd
void SetDefaultValue(const char *defVal)
G4UIcmdWithABool * saveEachEventCmd
void SetPauseAtEndOfEvent(G4bool vl)
Definition: G4UImanager.hh:196
G4UIcmdWithAString * dumpRegCmd
G4UIcommand * beamOnCmd
G4UIcmdWithABool * brkBoECmd
G4UIcmdWithAnInteger * randEvtCmd
static G4int SeedOncePerCommunication()
void SetPauseAtBeginOfEvent(G4bool vl)
Definition: G4UImanager.hh:192
virtual void Initialize()
#define G4endl
Definition: G4ios.hh:61
G4UIcmdWithAnInteger * pinAffinityCmd
G4UIcmdWithoutParameter * saveThisEventCmd
virtual void AbortEvent()
void SetDefaultValue(G4int defVal)
void SetRandomNumberStoreDir(const G4String &dir)
G4UIcmdWithABool * abortCmd
static void SetSeedOncePerCommunication(G4int val)
void DumpRegion(const G4String &rname) const
G4UIcommand * evModCmd
G4UIcmdWithAnInteger * verboseCmd
G4GLOB_DLL std::ostream G4cerr