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

#include <IORTGeometryMessenger.hh>

Inheritance diagram for IORTGeometryMessenger:
Collaboration diagram for IORTGeometryMessenger:

Public Member Functions

 IORTGeometryMessenger (IORTGeometryController *)
 
 ~IORTGeometryMessenger ()
 
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 53 of file IORTGeometryMessenger.hh.

Constructor & Destructor Documentation

IORTGeometryMessenger::IORTGeometryMessenger ( IORTGeometryController controller)

Definition at line 48 of file IORTGeometryMessenger.cc.

49  :iortGeometryController(controller)
50 
51 {
52  changeTheGeometryDir = new G4UIdirectory("/geometrySetup/");
53  changeTheGeometryDir -> SetGuidance("Geometry setup");
54 
55  changeTheGeometryCmd = new G4UIcmdWithAString("/geometrySetup/selectGeometry",this);
56  changeTheGeometryCmd -> SetGuidance("Select the geometry you wish to use");
57  changeTheGeometryCmd -> SetParameterName("Geometry",false);
58 // changeTheGeometryCmd -> AvailableForStates(G4State_PreInit);
59  changeTheGeometryCmd -> AvailableForStates(G4State_PreInit,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
60 
61  updateCmd = new G4UIcmdWithoutParameter("/geometrySetup/update",this);
62  updateCmd->SetGuidance("Update collimator geometry.");
63  updateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
64  updateCmd->SetGuidance("if you changed geometrical value(s).");
66 }
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:

IORTGeometryMessenger::~IORTGeometryMessenger ( )

Definition at line 69 of file IORTGeometryMessenger.cc.

70 {
71  delete changeTheGeometryDir;
72  delete changeTheGeometryCmd;
73  delete updateCmd;
74 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 76 of file IORTGeometryMessenger.cc.

77 {
78  if( command == changeTheGeometryCmd )
79  { iortGeometryController -> SetGeometry (newValue);}
80  // { iortGeometryController -> registerGeometry(G4VUserDetectorConstruction* detector);}
81 
82  else if (command == updateCmd)
83  {
84  iortGeometryController -> UpdateGeometry();
85  }
86 
87 }

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