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

Private Attributes

IORTGeometryControlleriortGeometryController
 
G4UIdirectorychangeTheGeometryDir
 
G4UIcmdWithAStringchangeTheGeometryCmd
 

UI directory for the geometry control

More...
 
G4UIcmdWithoutParameterupdateCmd
 

Select the geometry

More...
 

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::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);
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 }
G4UIdirectory * changeTheGeometryDir
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
IORTGeometryController * iortGeometryController
G4UIcmdWithoutParameter * updateCmd
Select the geometry
G4UIcmdWithAString * changeTheGeometryCmd
UI directory for the geometry control
Here is the call graph for this function:

◆ ~IORTGeometryMessenger()

IORTGeometryMessenger::~IORTGeometryMessenger ( )

Definition at line 69 of file IORTGeometryMessenger.cc.

70 {
71  delete changeTheGeometryDir;
72  delete changeTheGeometryCmd;
73  delete updateCmd;
74 }
G4UIdirectory * changeTheGeometryDir
G4UIcmdWithoutParameter * updateCmd
Select the geometry
G4UIcmdWithAString * changeTheGeometryCmd
UI directory for the geometry control

Member Function Documentation

◆ SetNewValue()

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 }
IORTGeometryController * iortGeometryController
G4UIcmdWithoutParameter * updateCmd
Select the geometry
G4UIcmdWithAString * changeTheGeometryCmd
UI directory for the geometry control

Member Data Documentation

◆ changeTheGeometryCmd

G4UIcmdWithAString* IORTGeometryMessenger::changeTheGeometryCmd
private

UI directory for the geometry control

Definition at line 67 of file IORTGeometryMessenger.hh.

◆ changeTheGeometryDir

G4UIdirectory* IORTGeometryMessenger::changeTheGeometryDir
private

Definition at line 66 of file IORTGeometryMessenger.hh.

◆ iortGeometryController

IORTGeometryController* IORTGeometryMessenger::iortGeometryController
private

Definition at line 64 of file IORTGeometryMessenger.hh.

◆ updateCmd

G4UIcmdWithoutParameter* IORTGeometryMessenger::updateCmd
private

Select the geometry

Definition at line 68 of file IORTGeometryMessenger.hh.


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