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

Private Attributes

ExN04StackingActionmyAction
 
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

Constructor & Destructor Documentation

◆ ExN04StackingActionMessenger() [1/2]

ExN04StackingActionMessenger::ExN04StackingActionMessenger ( ExN04StackingAction msa)

Definition at line 40 of file eventgenerator/HepMC/HepMCEx01/src/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);
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);
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);
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() [1/2]

ExN04StackingActionMessenger::~ExN04StackingActionMessenger ( )

Definition at line 69 of file eventgenerator/HepMC/HepMCEx01/src/ExN04StackingActionMessenger.cc.

Here is the call graph for this function:

◆ ExN04StackingActionMessenger() [2/2]

ExN04StackingActionMessenger::ExN04StackingActionMessenger ( ExN04StackingAction msa)

◆ ~ExN04StackingActionMessenger() [2/2]

ExN04StackingActionMessenger::~ExN04StackingActionMessenger ( )

Member Function Documentation

◆ GetCurrentValue() [1/2]

G4String ExN04StackingActionMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 92 of file eventgenerator/HepMC/HepMCEx01/src/ExN04StackingActionMessenger.cc.

93 {
94  G4String cv;
95 
96  if( command==muonCmd )
98  else if( command==isomuonCmd )
100  else if( command==isoCmd )
102  else if( command==roiCmd )
103  { cv = roiCmd->ConvertToString(myAction->GetRoIAngle(),"deg"); }
104 
105  return cv;
106 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
Here is the call graph for this function:

◆ GetCurrentValue() [2/2]

G4String ExN04StackingActionMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

◆ SetNewValue() [1/2]

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

Reimplemented from G4UImessenger.

Definition at line 79 of file eventgenerator/HepMC/HepMCEx01/src/ExN04StackingActionMessenger.cc.

80 {
81  if( command==muonCmd )
83  else if( command==isomuonCmd )
85  else if( command==isoCmd )
87  else if( command==roiCmd )
89 }
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNewValue() [2/2]

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

Reimplemented from G4UImessenger.

Member Data Documentation

◆ isoCmd

G4UIcmdWithAnInteger * ExN04StackingActionMessenger::isoCmd
private

◆ isomuonCmd

G4UIcmdWithAnInteger * ExN04StackingActionMessenger::isomuonCmd
private

◆ muonCmd

G4UIcmdWithAnInteger * ExN04StackingActionMessenger::muonCmd
private

◆ myAction

ExN04StackingAction * ExN04StackingActionMessenger::myAction
private

◆ roiCmd

G4UIcmdWithADoubleAndUnit * ExN04StackingActionMessenger::roiCmd
private

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