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

#include <RE05StackingActionMessenger.hh>

Inheritance diagram for RE05StackingActionMessenger:
Collaboration diagram for RE05StackingActionMessenger:

Public Member Functions

 RE05StackingActionMessenger (RE05StackingAction *msa)
 
virtual ~RE05StackingActionMessenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValues)
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
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 42 of file RE05StackingActionMessenger.hh.

Constructor & Destructor Documentation

RE05StackingActionMessenger::RE05StackingActionMessenger ( RE05StackingAction msa)

Definition at line 40 of file RE05StackingActionMessenger.cc.

41 : G4UImessenger(),
42  fMyAction(msa),
43  fMuonCmd(0), fIsoMuonCmd(0), fIsoCmd(0), fRoiCmd(0)
44 {
45  fMuonCmd = new G4UIcmdWithAnInteger("/mydet/reqmuon",this);
46  fMuonCmd->SetGuidance("Number of muon for the trigger.");
47  fMuonCmd->SetParameterName("N",true);
48  fMuonCmd->SetDefaultValue(2);
49  fMuonCmd->SetRange("N>=0");
50 
51  fIsoMuonCmd = new G4UIcmdWithAnInteger("/mydet/isomuon",this);
52  fIsoMuonCmd->SetGuidance("Number of isolated muon for the trigger.");
53  fIsoMuonCmd->SetParameterName("N",true);
54  fIsoMuonCmd->SetDefaultValue(2);
55  fIsoMuonCmd->SetRange("N>=0");
56 
57  fIsoCmd = new G4UIcmdWithAnInteger("/mydet/isolation",this);
58  fIsoCmd->SetGuidance("Maximum allowed number of hits in tracker");
59  fIsoCmd->SetGuidance(" for an isolated muon track (includes hits by muon)");
60  fIsoCmd->SetParameterName("N",true);
61  fIsoCmd->SetDefaultValue(10);
62  fIsoCmd->SetRange("N>=0");
63 
64  fRoiCmd = new G4UIcmdWithADoubleAndUnit("/mydet/RoIangle",this);
65  fRoiCmd->SetGuidance("Define RoI angle");
66  fRoiCmd->SetParameterName("theta",true,true);
67  fRoiCmd->SetDefaultUnit("deg");
68 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetDefaultUnit(const char *defUnit)
void SetDefaultValue(G4int defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)

Here is the call graph for this function:

RE05StackingActionMessenger::~RE05StackingActionMessenger ( )
virtual

Definition at line 72 of file RE05StackingActionMessenger.cc.

73 {
74  delete fMuonCmd;
75  delete fIsoMuonCmd;
76  delete fIsoCmd;
77  delete fRoiCmd;
78 }

Member Function Documentation

G4String RE05StackingActionMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 96 of file RE05StackingActionMessenger.cc.

97 {
98  G4String cv;
99 
100  if( command==fMuonCmd )
101  { cv = fMuonCmd->ConvertToString(fMyAction->GetNRequestMuon()); }
102  else if( command==fIsoMuonCmd )
103  { cv = fIsoMuonCmd->ConvertToString(fMyAction->GetNRequestIsoMuon()); }
104  else if( command==fIsoCmd )
105  { cv = fIsoCmd->ConvertToString(fMyAction->GetNIsolation()); }
106  else if( command==fRoiCmd )
107  { cv = fRoiCmd->ConvertToString(fMyAction->GetRoIAngle(),"deg"); }
108 
109  return cv;
110 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
G4int GetNRequestIsoMuon() const
G4int GetNRequestMuon() const
G4double GetRoIAngle() const
G4int GetNIsolation() const

Here is the call graph for this function:

void RE05StackingActionMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 82 of file RE05StackingActionMessenger.cc.

83 {
84  if( command==fMuonCmd )
85  { fMyAction->SetNRequestMuon(fMuonCmd->GetNewIntValue(newValue)); }
86  else if( command==fIsoMuonCmd )
87  { fMyAction->SetNRequestIsoMuon(fIsoMuonCmd->GetNewIntValue(newValue)); }
88  else if( command==fIsoCmd )
89  { fMyAction->SetNIsolation(fIsoCmd->GetNewIntValue(newValue)); }
90  else if( command==fRoiCmd )
91  { fMyAction->SetRoIAngle(fRoiCmd->GetNewDoubleValue(newValue)); }
92 }
void SetNRequestMuon(G4int val)
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void SetRoIAngle(G4double val)
void SetNIsolation(G4int val)
void SetNRequestIsoMuon(G4int val)

Here is the call graph for this function:


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