Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
RunActionMessenger Class Reference

#include <RunActionMessenger.hh>

Inheritance diagram for RunActionMessenger:
G4UImessenger G4UImessenger G4UImessenger

Public Member Functions

 RunActionMessenger (RunAction *)
 
virtual ~RunActionMessenger ()
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
 RunActionMessenger (RunAction *)
 
virtual ~RunActionMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 
 RunActionMessenger (RunAction *)
 
 ~RunActionMessenger ()
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
- 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
 

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
 

Detailed Description

Definition at line 48 of file electromagnetic/TestEm2/include/RunActionMessenger.hh.

Constructor & Destructor Documentation

RunActionMessenger::RunActionMessenger ( RunAction run)

Definition at line 44 of file electromagnetic/TestEm2/src/RunActionMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_Idle, G4State_PreInit, G4UIcommand::SetGuidance(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWith3Vector::SetParameterName(), and G4UIcommand::SetRange().

45 :G4UImessenger(),fRun(run),
46  fRunDir(0),
47  fAccCmd(0),
48  fVerbCmd(0),
49  fHistoDir(0),
50  factoryCmd(0)
51 {
52  fRunDir = new G4UIdirectory("/testem/run/");
53  fRunDir->SetGuidance("run control");
54 
55  fAccCmd = new G4UIcmdWith3Vector("/testem/run/acceptance",this);
56  fAccCmd->SetGuidance("set Edep and RMS");
57  fAccCmd->SetGuidance("acceptance values for first layer");
58  fAccCmd->SetParameterName("edep","rms","limit",true);
59  fAccCmd->SetRange("edep>0 && edep<1 && rms>0");
61 
62  fVerbCmd = new G4UIcmdWithAnInteger("/testem/run/verbose",this);
63  fVerbCmd->SetGuidance("set verbose level for runAction");
64  fVerbCmd->SetParameterName("verbose",false);
65 
66  fHistoDir = new G4UIdirectory("/testem/histo/");
67  fHistoDir->SetGuidance("histograms control");
68 
69  factoryCmd = new G4UIcmdWithAString("/testem/histo/setFileName",this);
70  factoryCmd->SetGuidance("set name for the histograms file");
71 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:225
RunActionMessenger::~RunActionMessenger ( )
virtual

Definition at line 75 of file electromagnetic/TestEm2/src/RunActionMessenger.cc.

76 {
77  delete fVerbCmd;
78  delete fAccCmd;
79  delete fRunDir;
80  delete factoryCmd;
81  delete fHistoDir;
82 }
RunActionMessenger::RunActionMessenger ( RunAction )
virtual RunActionMessenger::~RunActionMessenger ( )
virtual
RunActionMessenger::RunActionMessenger ( RunAction )
RunActionMessenger::~RunActionMessenger ( )

Member Function Documentation

void RunActionMessenger::SetNewValue ( G4UIcommand ,
G4String   
)
virtual

Reimplemented from G4UImessenger.

virtual void RunActionMessenger::SetNewValue ( G4UIcommand ,
G4String   
)
virtual

Reimplemented from G4UImessenger.

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

Reimplemented from G4UImessenger.

Definition at line 86 of file electromagnetic/TestEm2/src/RunActionMessenger.cc.

References G4UIcmdWith3Vector::GetNew3VectorValue(), G4UIcmdWithAnInteger::GetNewIntValue(), RunAction::SetEdepAndRMS(), RunAction::SetHistoName(), and RunAction::SetVerbose().

87 {
88  if (command == fAccCmd )
89  { fRun->SetEdepAndRMS(fAccCmd->GetNew3VectorValue(newValue));}
90 
91  if (command == fVerbCmd )
92  { fRun->SetVerbose(fVerbCmd->GetNewIntValue(newValue));}
93 
94  if (command == factoryCmd)
95  { fRun->SetHistoName(newValue);}
96 }
static G4int GetNewIntValue(const char *paramString)
static G4ThreeVector GetNew3VectorValue(const char *paramString)

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