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

#include <RMC01DetectorMessenger.hh>

Inheritance diagram for RMC01DetectorMessenger:
Collaboration diagram for RMC01DetectorMessenger:

Public Member Functions

 RMC01DetectorMessenger (RMC01DetectorConstruction *)
 
virtual ~RMC01DetectorMessenger ()
 
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 63 of file RMC01DetectorMessenger.hh.

Constructor & Destructor Documentation

RMC01DetectorMessenger::RMC01DetectorMessenger ( RMC01DetectorConstruction GeneralDet)

Definition at line 51 of file RMC01DetectorMessenger.cc.

53 : G4UImessenger(),
54  fTheDetector(GeneralDet),
55  fGeneralDir(0),
56  fDetDir(0),
57  fSetSensitiveVolumeHeightCmd(0),
58  fSetSensitiveVolumeRadiusCmd(0),
59  fSetShieldingThicknessCmd(0)
60 {
61 
62  fGeneralDir= new G4UIdirectory("/RMC01/");
63  fGeneralDir->SetGuidance(
64  "Control of the Geant4 Reverse Monte Carlo example1");
65 
66 
67 
68  fDetDir = new G4UIdirectory("/RMC01/geometry/");
69  fDetDir->SetGuidance("Geometry control");
70 
71 
72  fSetSensitiveVolumeHeightCmd = new G4UIcmdWithADoubleAndUnit(
73  "/RMC01/geometry/SetSensitiveVolumeHeight",this);
74  fSetSensitiveVolumeHeightCmd->SetGuidance(
75  "Set the height of the sensitive cylinder");
76  fSetSensitiveVolumeHeightCmd->AvailableForStates(G4State_PreInit);
77 
78  fSetSensitiveVolumeRadiusCmd = new G4UIcmdWithADoubleAndUnit(
79  "/RMC01/geometry/SetSensitiveVolumeRadius",this);
80  fSetSensitiveVolumeRadiusCmd->SetGuidance(
81  "Set the radius of the sensitive cylinder");
82  fSetSensitiveVolumeRadiusCmd->AvailableForStates(G4State_PreInit);
83 
84  fSetShieldingThicknessCmd = new G4UIcmdWithADoubleAndUnit(
85  "/RMC01/geometry/SetShieldingThickness",this);
86  fSetShieldingThicknessCmd->SetGuidance(
87  "Set the thickness of the Aluminum Shielding sphere");
88  fSetShieldingThicknessCmd->AvailableForStates(G4State_PreInit);
89 
90 }
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:

RMC01DetectorMessenger::~RMC01DetectorMessenger ( )
virtual

Definition at line 94 of file RMC01DetectorMessenger.cc.

95 {
96  if (fGeneralDir ) delete fGeneralDir;
97  if (fDetDir) delete fDetDir;
98  if (fSetSensitiveVolumeHeightCmd) delete fSetSensitiveVolumeHeightCmd;
99  if (fSetSensitiveVolumeRadiusCmd) delete fSetSensitiveVolumeRadiusCmd;
100  if (fSetShieldingThicknessCmd) delete fSetShieldingThicknessCmd;
101 
102 }

Member Function Documentation

void RMC01DetectorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 106 of file RMC01DetectorMessenger.cc.

108 { if( command == fSetSensitiveVolumeHeightCmd ){
109  fTheDetector->SetSensitiveVolumeHeight(
110  fSetSensitiveVolumeHeightCmd->GetNewDoubleValue(newValue));
111  }
112 
113  else if( command == fSetSensitiveVolumeRadiusCmd ){
114  fTheDetector->SetSensitiveVolumeRadius(
115  fSetSensitiveVolumeRadiusCmd->GetNewDoubleValue(newValue));
116  }
117 
118  else if( command == fSetShieldingThicknessCmd ){
119  fTheDetector->SetShieldingThickness(
120  fSetShieldingThicknessCmd->GetNewDoubleValue(newValue));
121  }
122 }
static G4double GetNewDoubleValue(const char *paramString)

Here is the call graph for this function:


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