Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 

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 ExG4RunAction01Messenger.hh.

Constructor & Destructor Documentation

ExG4RunAction01Messenger::ExG4RunAction01Messenger ( ExG4RunAction01 runAction)

Definition at line 42 of file ExG4RunAction01Messenger.cc.

43  : G4UImessenger(),
44  fRunAction (runAction),
45  fTopDirectory(0),
46  fDirectory(0),
47  fSetVerboseLevelCmd(0),
48  fSetSaveRndmCmd(0),
49  fSetReadRndmCmd(0),
50  fSetRndmFileNameCmd(0),
51  fSetAutoSeedCmd(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);
62  fSetVerboseLevelCmd->AvailableForStates(G4State_PreInit, G4State_Init);
63 
64  fSetSaveRndmCmd = new G4UIcmdWithABool("/ExG4/run/saveRndm",this);
65  fSetSaveRndmCmd
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);
78  fSetRndmFileNameCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
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:240

Here is the call graph for this function:

ExG4RunAction01Messenger::~ExG4RunAction01Messenger ( )

Definition at line 90 of file ExG4RunAction01Messenger.cc.

91 {
92  delete fTopDirectory;
93  delete fDirectory;
94  delete fSetVerboseLevelCmd;
95  delete fSetSaveRndmCmd;
96  delete fSetReadRndmCmd;
97  delete fSetRndmFileNameCmd;
98  delete fSetAutoSeedCmd;
99 }
ExG4RunAction01Messenger::ExG4RunAction01Messenger ( ExG4RunAction01 )
ExG4RunAction01Messenger::~ExG4RunAction01Messenger ( )
ExG4RunAction01Messenger::ExG4RunAction01Messenger ( ExG4RunAction01 )
ExG4RunAction01Messenger::~ExG4RunAction01Messenger ( )

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 103 of file ExG4RunAction01Messenger.cc.

104 {
105  if ( command == fSetVerboseLevelCmd ) {
106  fRunAction->SetVerboseLevel(fSetVerboseLevelCmd->GetNewIntValue(newValues));
107  }
108  else if ( command == fSetSaveRndmCmd ) {
109  fRunAction->SetSaveRndm(fSetSaveRndmCmd->GetNewBoolValue(newValues));
110  }
111  else if ( command == fSetReadRndmCmd ) {
112  fRunAction->SetReadRndm(fSetReadRndmCmd->GetNewBoolValue(newValues));
113  }
114  else if (command == fSetRndmFileNameCmd) {
115  fRunAction->SetRndmFileName(newValues);
116  }
117  else if ( command == fSetAutoSeedCmd ) {
118  fRunAction->SetAutoSeed(fSetAutoSeedCmd->GetNewBoolValue(newValues));
119  }
120 }
void SetRndmFileName(const G4String &fileName)
void SetSaveRndm(G4bool value)
static G4int GetNewIntValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
void SetVerboseLevel(G4int level)
void SetReadRndm(G4bool value)
void SetAutoSeed(G4bool value)

Here is the call graph for this function:

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

Reimplemented from G4UImessenger.

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

Reimplemented from G4UImessenger.


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