Geant4  10.02.p03
Collimator70BeamLineMessenger Class Reference

#include <Collimator70BeamLineMessenger.hh>

Inheritance diagram for Collimator70BeamLineMessenger:
Collaboration diagram for Collimator70BeamLineMessenger:

Public Member Functions

 Collimator70BeamLineMessenger (Collimator70BeamLine *)
 
 ~Collimator70BeamLineMessenger ()
 
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

Collimator70BeamLinecollimator70
 
G4UIdirectorybeamLineDir
 
G4UIdirectoryFinalCollimatorIORTDir
 
G4UIcmdWithADoubleAndUnitinnerRadiusFinalCollimatorIORTCmd
 
G4UIcmdWithADoubleAndUnitOuterRadiusFinalCollimatorIORTCmd
 

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 52 of file Collimator70BeamLineMessenger.hh.

Constructor & Destructor Documentation

◆ Collimator70BeamLineMessenger()

Collimator70BeamLineMessenger::Collimator70BeamLineMessenger ( Collimator70BeamLine beamLine)

Definition at line 48 of file Collimator70BeamLineMessenger.cc.

49 :collimator70(beamLine)
50 
51 {
52 
53  beamLineDir = new G4UIdirectory("/beamLine/");
54  beamLineDir -> SetGuidance("set specification of range shifter");
55 
56  FinalCollimatorIORTDir = new G4UIdirectory("/beamLine/FinalCollimatorIORT/");
57  FinalCollimatorIORTDir -> SetGuidance("set specification of final collimator");
58 
59 
60  innerRadiusFinalCollimatorIORTCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/FinalCollimatorIORT/halfInnerRad",this);
61  innerRadiusFinalCollimatorIORTCmd -> SetGuidance("Set size of inner radius ( max 21.5 mm)");
62  innerRadiusFinalCollimatorIORTCmd -> SetParameterName("Size",false);
63  innerRadiusFinalCollimatorIORTCmd -> SetDefaultUnit("mm");
64  innerRadiusFinalCollimatorIORTCmd -> SetUnitCandidates("mm cm m");
65  innerRadiusFinalCollimatorIORTCmd -> AvailableForStates(G4State_Idle);
66 
67  OuterRadiusFinalCollimatorIORTCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/FinalCollimatorIORT/halfOuterRad",this);
68  OuterRadiusFinalCollimatorIORTCmd -> SetGuidance("Set size of outer radius ( max 21.5 mm)");
69  OuterRadiusFinalCollimatorIORTCmd -> SetParameterName("Size",false);
70  OuterRadiusFinalCollimatorIORTCmd -> SetDefaultUnit("mm");
71  OuterRadiusFinalCollimatorIORTCmd -> SetUnitCandidates("mm cm m");
72  OuterRadiusFinalCollimatorIORTCmd -> AvailableForStates(G4State_Idle);
73 
74 }
G4UIcmdWithADoubleAndUnit * OuterRadiusFinalCollimatorIORTCmd
G4UIcmdWithADoubleAndUnit * innerRadiusFinalCollimatorIORTCmd

◆ ~Collimator70BeamLineMessenger()

Collimator70BeamLineMessenger::~Collimator70BeamLineMessenger ( )

Definition at line 76 of file Collimator70BeamLineMessenger.cc.

77 {
78 
81  delete FinalCollimatorIORTDir;
82  delete beamLineDir;
83 
84 
85 }
G4UIcmdWithADoubleAndUnit * OuterRadiusFinalCollimatorIORTCmd
G4UIcmdWithADoubleAndUnit * innerRadiusFinalCollimatorIORTCmd

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 90 of file Collimator70BeamLineMessenger.cc.

91 {
92 
93 
94  if( command == innerRadiusFinalCollimatorIORTCmd )
95  { collimator70 -> SetInnerRadiusFinalCollimatorIORT
96  (innerRadiusFinalCollimatorIORTCmd -> GetNewDoubleValue(newValue));}
97 
98  else if( command == OuterRadiusFinalCollimatorIORTCmd )
99  { collimator70 -> SetOuterRadiusFinalCollimatorIORT
100  (OuterRadiusFinalCollimatorIORTCmd -> GetNewDoubleValue(newValue));}
101 
102 }
G4UIcmdWithADoubleAndUnit * OuterRadiusFinalCollimatorIORTCmd
G4UIcmdWithADoubleAndUnit * innerRadiusFinalCollimatorIORTCmd

Member Data Documentation

◆ beamLineDir

G4UIdirectory* Collimator70BeamLineMessenger::beamLineDir
private

Definition at line 66 of file Collimator70BeamLineMessenger.hh.

◆ collimator70

Collimator70BeamLine* Collimator70BeamLineMessenger::collimator70
private

Definition at line 63 of file Collimator70BeamLineMessenger.hh.

◆ FinalCollimatorIORTDir

G4UIdirectory* Collimator70BeamLineMessenger::FinalCollimatorIORTDir
private

Definition at line 68 of file Collimator70BeamLineMessenger.hh.

◆ innerRadiusFinalCollimatorIORTCmd

G4UIcmdWithADoubleAndUnit* Collimator70BeamLineMessenger::innerRadiusFinalCollimatorIORTCmd
private

Definition at line 74 of file Collimator70BeamLineMessenger.hh.

◆ OuterRadiusFinalCollimatorIORTCmd

G4UIcmdWithADoubleAndUnit* Collimator70BeamLineMessenger::OuterRadiusFinalCollimatorIORTCmd
private

Definition at line 78 of file Collimator70BeamLineMessenger.hh.


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