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

#include <ExN04StackingActionMessenger.hh>

Inheritance diagram for ExN04StackingActionMessenger:
Collaboration diagram for ExN04StackingActionMessenger:

Public Member Functions

 ExN04StackingActionMessenger (ExN04StackingAction *msa)
 
 ~ExN04StackingActionMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
G4String GetCurrentValue (G4UIcommand *command)
 
 ExN04StackingActionMessenger (ExN04StackingAction *msa)
 
 ~ExN04StackingActionMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
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 ExN04StackingActionMessenger.hh.

Constructor & Destructor Documentation

ExN04StackingActionMessenger::ExN04StackingActionMessenger ( ExN04StackingAction msa)

Definition at line 40 of file ExN04StackingActionMessenger.cc.

41  : myAction(msa)
42 {
43  muonCmd = new G4UIcmdWithAnInteger("/mydet/reqmuon",this);
44  muonCmd->SetGuidance("Number of muon for the trigger.");
45  muonCmd->SetParameterName("N",true);
46  muonCmd->SetDefaultValue(2);
47  muonCmd->SetRange("N>=0");
48 
49  isomuonCmd = new G4UIcmdWithAnInteger("/mydet/isomuon",this);
50  isomuonCmd->SetGuidance("Number of isolated muon for the trigger.");
51  isomuonCmd->SetParameterName("N",true);
52  isomuonCmd->SetDefaultValue(2);
53  isomuonCmd->SetRange("N>=0");
54 
55  isoCmd = new G4UIcmdWithAnInteger("/mydet/isolation",this);
56  isoCmd->SetGuidance("Maximum allowed number of hits in tracker");
57  isoCmd->SetGuidance(" for an isolated muon track (includes hits by muon)");
58  isoCmd->SetParameterName("N",true);
59  isoCmd->SetDefaultValue(10);
60  isoCmd->SetRange("N>=0");
61 
62  roiCmd = new G4UIcmdWithADoubleAndUnit("/mydet/RoIangle",this);
63  roiCmd->SetGuidance("Define RoI angle");
64  roiCmd->SetParameterName("theta",true,true);
65  roiCmd->SetDefaultUnit("deg");
66 }
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)
ExN04StackingActionMessenger::~ExN04StackingActionMessenger ( )

Definition at line 69 of file ExN04StackingActionMessenger.cc.

70 {
71  delete muonCmd;
72  delete isomuonCmd;
73  delete isoCmd;
74  delete roiCmd;
75 }
ExN04StackingActionMessenger::ExN04StackingActionMessenger ( ExN04StackingAction msa)
ExN04StackingActionMessenger::~ExN04StackingActionMessenger ( )

Member Function Documentation

G4String ExN04StackingActionMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 92 of file ExN04StackingActionMessenger.cc.

93 {
94  G4String cv;
95 
96  if( command==muonCmd )
97  { cv = muonCmd->ConvertToString(myAction->GetNRequestMuon()); }
98  else if( command==isomuonCmd )
99  { cv = isomuonCmd->ConvertToString(myAction->GetNRequestIsoMuon()); }
100  else if( command==isoCmd )
101  { cv = isoCmd->ConvertToString(myAction->GetNIsolation()); }
102  else if( command==roiCmd )
103  { cv = roiCmd->ConvertToString(myAction->GetRoIAngle(),"deg"); }
104 
105  return cv;
106 }
G4double GetRoIAngle() const
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
G4int GetNIsolation() const
G4int GetNRequestMuon() const
G4int GetNRequestIsoMuon() const

Here is the call graph for this function:

G4String ExN04StackingActionMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

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

Reimplemented from G4UImessenger.

Definition at line 79 of file ExN04StackingActionMessenger.cc.

80 {
81  if( command==muonCmd )
82  { myAction->SetNRequestMuon(muonCmd->GetNewIntValue(newValue)); }
83  else if( command==isomuonCmd )
84  { myAction->SetNRequestIsoMuon(isomuonCmd->GetNewIntValue(newValue)); }
85  else if( command==isoCmd )
86  { myAction->SetNIsolation(isoCmd->GetNewIntValue(newValue)); }
87  else if( command==roiCmd )
88  { myAction->SetRoIAngle(roiCmd->GetNewDoubleValue(newValue)); }
89 }
static G4int GetNewIntValue(const char *paramString)
void SetNIsolation(G4int val)
void SetRoIAngle(G4double val)
static G4double GetNewDoubleValue(const char *paramString)
void SetNRequestMuon(G4int val)
void SetNRequestIsoMuon(G4int val)
void ExN04StackingActionMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.


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