Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExG4EventAction01Messenger Class Reference

#include <ExG4EventAction01Messenger.hh>

Inheritance diagram for ExG4EventAction01Messenger:
Collaboration diagram for ExG4EventAction01Messenger:

Public Member Functions

 ExG4EventAction01Messenger (ExG4EventAction01 *eventAction)
 
 ~ExG4EventAction01Messenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
 ExG4EventAction01Messenger (ExG4EventAction01 *eventAction)
 
 ~ExG4EventAction01Messenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
 ExG4EventAction01Messenger (ExG4EventAction01 *eventAction)
 
 ~ExG4EventAction01Messenger ()
 
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 ExG4EventAction01

It implements commands:

  • /ExG4/event/verboseLevel level
  • /ExG4/event/printModulo modulo
  • /ExG4/event/saveRndm true|false

Definition at line 49 of file ExG4EventAction01Messenger.hh.

Constructor & Destructor Documentation

ExG4EventAction01Messenger::ExG4EventAction01Messenger ( ExG4EventAction01 eventAction)

Definition at line 41 of file ExG4EventAction01Messenger.cc.

43  : G4UImessenger(),
44  fEventAction(eventAction),
45  fTopDirectory(0),
46  fDirectory(0),
47  fSetVerboseLevelCmd(0),
48  fSetSaveRndmCmd(0)
49 {
50  fTopDirectory = new G4UIdirectory("/ExG4/");
51  fTopDirectory->SetGuidance("UI commands of common example classes");
52 
53  fDirectory = new G4UIdirectory("/ExG4/event/");
54  fDirectory->SetGuidance("Event control");
55 
56  fSetVerboseLevelCmd
57  = new G4UIcmdWithAnInteger("/ExG4/event/verboseLevel",this);
58  fSetVerboseLevelCmd->SetGuidance("Set event verbose level ." );
59  fSetVerboseLevelCmd->SetParameterName("VerboseLevel",false);
60  fSetVerboseLevelCmd->AvailableForStates(G4State_PreInit, G4State_Init);
61 
62  fSetSaveRndmCmd = new G4UIcmdWithABool("/ExG4/event/saveRndm",this);
63  fSetSaveRndmCmd
64  ->SetGuidance("Activate saving random number at endOfEvent.");
65  fSetSaveRndmCmd->SetParameterName("SaveRndm",false);
66  fSetSaveRndmCmd->AvailableForStates(G4State_Idle, G4State_Init);
67 }
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:

ExG4EventAction01Messenger::~ExG4EventAction01Messenger ( )

Definition at line 71 of file ExG4EventAction01Messenger.cc.

72 {
73  delete fTopDirectory;
74  delete fDirectory;
75  delete fSetVerboseLevelCmd;
76  delete fSetSaveRndmCmd;
77 }
ExG4EventAction01Messenger::ExG4EventAction01Messenger ( ExG4EventAction01 eventAction)
ExG4EventAction01Messenger::~ExG4EventAction01Messenger ( )
ExG4EventAction01Messenger::ExG4EventAction01Messenger ( ExG4EventAction01 eventAction)
ExG4EventAction01Messenger::~ExG4EventAction01Messenger ( )

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 81 of file ExG4EventAction01Messenger.cc.

83 {
84  if(command == fSetVerboseLevelCmd) {
85  fEventAction
86  ->SetVerboseLevel(fSetVerboseLevelCmd->GetNewIntValue(newValue));
87  }
88  else if ( command == fSetSaveRndmCmd ) {
89  fEventAction->SetSaveRndm(fSetSaveRndmCmd->GetNewBoolValue(newValue));
90  }
91 }
static G4int GetNewIntValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
void SetSaveRndm(G4bool value)
void SetVerboseLevel(G4int level)

Here is the call graph for this function:

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

Reimplemented from G4UImessenger.

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

Reimplemented from G4UImessenger.


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