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

#include <RunActionMessenger.hh>

Inheritance diagram for RunActionMessenger:
Collaboration diagram for RunActionMessenger:

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)
 
 RunActionMessenger (RunAction *)
 
virtual ~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
 
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

Definition at line 48 of file RunActionMessenger.hh.

Constructor & Destructor Documentation

RunActionMessenger::RunActionMessenger ( RunAction run)

Definition at line 44 of file RunActionMessenger.cc.

45 :G4UImessenger(),fRun(run),
46  fRunDir(0),
47  fAccCmd(0),
48  fVerbCmd(0),
49  fHistoDir(0),
50  fHFileCmd(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  fHFileCmd = new G4UIcmdWithAString("/testem/histo/setFileName",this);
70  fHFileCmd->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:240

Here is the call graph for this function:

RunActionMessenger::~RunActionMessenger ( )
virtual

Definition at line 75 of file RunActionMessenger.cc.

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

Member Function Documentation

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 RunActionMessenger.cc.

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 == fHFileCmd)
95  { fRun->SetHistoName(newValue);}
96 }
void SetVerbose(G4int val)
Definition: RunAction.cc:193
static G4int GetNewIntValue(const char *paramString)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
void SetEdepAndRMS(G4ThreeVector)
Definition: RunAction.cc:185
void SetHistoName(G4String &val)
Definition: RunAction.cc:141

Here is the call graph for this function:

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

Reimplemented from G4UImessenger.

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

Reimplemented from G4UImessenger.


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