Geant4  10.02.p03
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
 

Private Attributes

RE05StackingActionmyAction
 
G4UIcmdWithAnIntegermuonCmd
 
G4UIcmdWithAnIntegerisomuonCmd
 
G4UIcmdWithAnIntegerisoCmd
 
G4UIcmdWithADoubleAndUnitroiCmd
 

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::RE05StackingActionMessenger ( RE05StackingAction msa)

Definition at line 38 of file RE05StackingActionMessenger.cc.

39 :myAction(msa)
40 {
41  muonCmd = new G4UIcmdWithAnInteger("/mydet/reqmuon",this);
42  muonCmd->SetGuidance("Number of muon for the trigger.");
43  muonCmd->SetParameterName("N",true);
45  muonCmd->SetRange("N>=0");
46 
47  isomuonCmd = new G4UIcmdWithAnInteger("/mydet/isomuon",this);
48  isomuonCmd->SetGuidance("Number of isolated muon for the trigger.");
49  isomuonCmd->SetParameterName("N",true);
51  isomuonCmd->SetRange("N>=0");
52 
53  isoCmd = new G4UIcmdWithAnInteger("/mydet/isolation",this);
54  isoCmd->SetGuidance("Maximum allowed number of hits in tracker");
55  isoCmd->SetGuidance(" for an isolated muon track (includes hits by muon)");
56  isoCmd->SetParameterName("N",true);
58  isoCmd->SetRange("N>=0");
59 
60  roiCmd = new G4UIcmdWithADoubleAndUnit("/mydet/RoIangle",this);
61  roiCmd->SetGuidance("Define RoI angle");
62  roiCmd->SetParameterName("theta",true,true);
63  roiCmd->SetDefaultUnit("deg");
64 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * roiCmd
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::~RE05StackingActionMessenger ( )
virtual

Definition at line 66 of file RE05StackingActionMessenger.cc.

67 {
68  delete muonCmd;
69  delete isomuonCmd;
70  delete isoCmd;
71  delete roiCmd;
72 }
G4UIcmdWithADoubleAndUnit * roiCmd

Member Function Documentation

◆ GetCurrentValue()

G4String RE05StackingActionMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 86 of file RE05StackingActionMessenger.cc.

87 {
88  G4String cv;
89 
90  if( command==muonCmd )
92  else if( command==isomuonCmd )
94  else if( command==isoCmd )
96  else if( command==roiCmd )
97  { cv = roiCmd->ConvertToString(myAction->GetRoIAngle(),"deg"); }
98 
99  return cv;
100 }
G4UIcmdWithADoubleAndUnit * roiCmd
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
G4int GetNIsolation() const
G4int GetNRequestMuon() const
G4int GetNRequestIsoMuon() const
G4double GetRoIAngle() const
Here is the call graph for this function:

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 74 of file RE05StackingActionMessenger.cc.

75 {
76  if( command==muonCmd )
78  else if( command==isomuonCmd )
80  else if( command==isoCmd )
82  else if( command==roiCmd )
84 }
void SetNRequestMuon(G4int val)
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * roiCmd
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:

Member Data Documentation

◆ isoCmd

G4UIcmdWithAnInteger* RE05StackingActionMessenger::isoCmd
private

Definition at line 58 of file RE05StackingActionMessenger.hh.

◆ isomuonCmd

G4UIcmdWithAnInteger* RE05StackingActionMessenger::isomuonCmd
private

Definition at line 57 of file RE05StackingActionMessenger.hh.

◆ muonCmd

G4UIcmdWithAnInteger* RE05StackingActionMessenger::muonCmd
private

Definition at line 56 of file RE05StackingActionMessenger.hh.

◆ myAction

RE05StackingAction* RE05StackingActionMessenger::myAction
private

Definition at line 53 of file RE05StackingActionMessenger.hh.

◆ roiCmd

G4UIcmdWithADoubleAndUnit* RE05StackingActionMessenger::roiCmd
private

Definition at line 59 of file RE05StackingActionMessenger.hh.


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