Geant4  10.02.p03
ExG4RunAction01Messenger Class Reference

#include <ExG4RunAction01Messenger.hh>

Inheritance diagram for ExG4RunAction01Messenger:
Collaboration diagram for ExG4RunAction01Messenger:

Public Member Functions

 ExG4RunAction01Messenger (ExG4RunAction01 *)
 
 ~ExG4RunAction01Messenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
 ExG4RunAction01Messenger (ExG4RunAction01 *)
 
 ~ExG4RunAction01Messenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
 ExG4RunAction01Messenger (ExG4RunAction01 *)
 
 ~ExG4RunAction01Messenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

ExG4RunAction01fRunAction
 
G4UIdirectoryfTopDirectory
 
G4UIdirectoryfDirectory
 
G4UIcmdWithAnIntegerfSetVerboseLevelCmd
 
G4UIcmdWithABoolfSetSaveRndmCmd
 
G4UIcmdWithABoolfSetReadRndmCmd
 
G4UIcmdWithAStringfSetRndmFileNameCmd
 
G4UIcmdWithABoolfSetAutoSeedCmd
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Messenger class that defines commands for ExG4RunAction01

It implements commands:

  • /ExG4/run/verboseLevel level
  • /ExG4/run/saveRndm true|false
  • /ExG4/run/readRndm true|false
  • /ExG4/run/rndmFileName fileName
  • /ExG4/run/autoSeed true|false

Definition at line 53 of file common/include/ExG4RunAction01Messenger.hh.

Constructor & Destructor Documentation

◆ ExG4RunAction01Messenger() [1/3]

ExG4RunAction01Messenger::ExG4RunAction01Messenger ( ExG4RunAction01 runAction)

Definition at line 42 of file common/src/ExG4RunAction01Messenger.cc.

43  : G4UImessenger(),
44  fRunAction (runAction),
45  fTopDirectory(0),
46  fDirectory(0),
48  fSetSaveRndmCmd(0),
49  fSetReadRndmCmd(0),
52 {
53  fTopDirectory = new G4UIdirectory("/ExG4/");
54  fTopDirectory->SetGuidance("UI commands of common example classes");
55 
56  fDirectory = new G4UIdirectory("/ExG4/event/");
57  fDirectory->SetGuidance("Event control");
58 
59  fSetVerboseLevelCmd = new G4UIcmdWithAnInteger("/ExG4/run/verboseLevel",this);
60  fSetVerboseLevelCmd->SetGuidance("Set run verbose level ." );
61  fSetVerboseLevelCmd->SetParameterName("VerboseLevel",false);
63 
64  fSetSaveRndmCmd = new G4UIcmdWithABool("/ExG4/run/saveRndm",this);
66  ->SetGuidance("Activate saving random number at beginOfRun and endOfRun .");
67  fSetSaveRndmCmd->SetParameterName("SaveRndm",false);
69 
70  fSetReadRndmCmd = new G4UIcmdWithABool("/ExG4/run/readRndm",this);
71  fSetReadRndmCmd->SetGuidance("Get rndm status from an external file at beginOfRun.");
72  fSetReadRndmCmd->SetParameterName("ReadRndm",false);
74 
75  fSetRndmFileNameCmd = new G4UIcmdWithAString("/ExG4/run/rndmFileName",this);
76  fSetRndmFileNameCmd->SetGuidance("Set rndm file name (to read from).");
77  fSetRndmFileNameCmd->SetParameterName("RndmFileName",false);
79 
80  fSetAutoSeedCmd = new G4UIcmdWithABool("/ExG4/run/autoSeed",this);
81  fSetAutoSeedCmd->SetGuidance("Switch on/off time-based random seeds");
82  fSetAutoSeedCmd->SetGuidance(" true: run seeds determined by system time");
83  fSetAutoSeedCmd->SetGuidance(" false: use command 'random/resetEngineFrom'");
84  fSetAutoSeedCmd->SetParameterName("AutoSeed",false);
86 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
Here is the call graph for this function:

◆ ~ExG4RunAction01Messenger() [1/3]

ExG4RunAction01Messenger::~ExG4RunAction01Messenger ( )

◆ ExG4RunAction01Messenger() [2/3]

ExG4RunAction01Messenger::ExG4RunAction01Messenger ( ExG4RunAction01 )

◆ ~ExG4RunAction01Messenger() [2/3]

ExG4RunAction01Messenger::~ExG4RunAction01Messenger ( )

◆ ExG4RunAction01Messenger() [3/3]

ExG4RunAction01Messenger::ExG4RunAction01Messenger ( ExG4RunAction01 )

◆ ~ExG4RunAction01Messenger() [3/3]

ExG4RunAction01Messenger::~ExG4RunAction01Messenger ( )

Member Function Documentation

◆ SetNewValue() [1/3]

void ExG4RunAction01Messenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 103 of file common/src/ExG4RunAction01Messenger.cc.

104 {
105  if ( command == fSetVerboseLevelCmd ) {
107  }
108  else if ( command == fSetSaveRndmCmd ) {
110  }
111  else if ( command == fSetReadRndmCmd ) {
113  }
114  else if (command == fSetRndmFileNameCmd) {
115  fRunAction->SetRndmFileName(newValues);
116  }
117  else if ( command == fSetAutoSeedCmd ) {
119  }
120 }
void SetRndmFileName(const G4String &fileName)
static G4int GetNewIntValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
Here is the call graph for this function:

◆ SetNewValue() [2/3]

virtual void ExG4RunAction01Messenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

◆ SetNewValue() [3/3]

virtual void ExG4RunAction01Messenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Member Data Documentation

◆ fDirectory

G4UIdirectory * ExG4RunAction01Messenger::fDirectory
private

Definition at line 66 of file common/include/ExG4RunAction01Messenger.hh.

◆ fRunAction

ExG4RunAction01 * ExG4RunAction01Messenger::fRunAction
private

Definition at line 63 of file common/include/ExG4RunAction01Messenger.hh.

◆ fSetAutoSeedCmd

G4UIcmdWithABool * ExG4RunAction01Messenger::fSetAutoSeedCmd
private

Definition at line 71 of file common/include/ExG4RunAction01Messenger.hh.

◆ fSetReadRndmCmd

G4UIcmdWithABool * ExG4RunAction01Messenger::fSetReadRndmCmd
private

Definition at line 69 of file common/include/ExG4RunAction01Messenger.hh.

◆ fSetRndmFileNameCmd

G4UIcmdWithAString * ExG4RunAction01Messenger::fSetRndmFileNameCmd
private

Definition at line 70 of file common/include/ExG4RunAction01Messenger.hh.

◆ fSetSaveRndmCmd

G4UIcmdWithABool * ExG4RunAction01Messenger::fSetSaveRndmCmd
private

Definition at line 68 of file common/include/ExG4RunAction01Messenger.hh.

◆ fSetVerboseLevelCmd

G4UIcmdWithAnInteger * ExG4RunAction01Messenger::fSetVerboseLevelCmd
private

Definition at line 67 of file common/include/ExG4RunAction01Messenger.hh.

◆ fTopDirectory

G4UIdirectory * ExG4RunAction01Messenger::fTopDirectory
private

Definition at line 65 of file common/include/ExG4RunAction01Messenger.hh.


The documentation for this class was generated from the following files: