Geant4  10.02.p03
ExExChDetectorConstructionMessenger Class Reference

#include <ExExChDetectorConstructionMessenger.hh>

Inheritance diagram for ExExChDetectorConstructionMessenger:
Collaboration diagram for ExExChDetectorConstructionMessenger:

Public Member Functions

 ExExChDetectorConstructionMessenger (ExExChDetectorConstruction *mpga)
 
 ~ExExChDetectorConstructionMessenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValues)
 
virtual 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

ExExChDetectorConstructionfTarget
 
G4UIdirectoryfMyXtalDirectory
 
G4UIcmdWithAStringfXtalMaterialCmd
 
G4UIcmdWith3VectorAndUnitfXtalCurvatureRadiusCmd
 
G4UIcmdWith3VectorAndUnitfXtalSizeCmd
 
G4UIcmdWith3VectorAndUnitfXtalAngleCmd
 
G4UIcmdWith3VectorAndUnitfXtalCellSizeCmd
 
G4UIcmdWith3VectorAndUnitfXtalCellAngleCmd
 
G4UIcmdWithADoubleAndUnitfXtalCellThermalVibration
 
G4UIcmdWith3VectorfXtalMillerCmd
 
G4UIcmdWithAStringfAddXtal
 

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 41 of file ExExChDetectorConstructionMessenger.hh.

Constructor & Destructor Documentation

◆ ExExChDetectorConstructionMessenger()

ExExChDetectorConstructionMessenger::ExExChDetectorConstructionMessenger ( ExExChDetectorConstruction mpga)

Definition at line 39 of file ExExChDetectorConstructionMessenger.cc.

41 :fTarget(mpga){
42  fMyXtalDirectory = new G4UIdirectory("/xtal/");
43  fMyXtalDirectory->SetGuidance("Xtal setup control commands.");
44 
45  fXtalMaterialCmd = new G4UIcmdWithAString("/xtal/setMaterial",
46  this);
47  fXtalMaterialCmd->SetGuidance("Set Xtal material.");
48  fXtalMaterialCmd->SetParameterName("xMat",true);
50 
52  new G4UIcmdWith3VectorAndUnit("/xtal/setCurvRadius",this);
53  fXtalCurvatureRadiusCmd->SetGuidance("Set Xtal curvature radius.");
55  "xtalcry",
56  "xtalcrz",
57  true);
60 
61  fXtalSizeCmd = new G4UIcmdWith3VectorAndUnit("/xtal/setSize",this);
62  fXtalSizeCmd->SetGuidance("Set Xtal size.");
63  fXtalSizeCmd->SetParameterName("xtalSizeX",
64  "xtalSizeY",
65  "xtalSizeZ",
66  true);
69 
70  fXtalAngleCmd = new G4UIcmdWith3VectorAndUnit("/xtal/setAngle",this);
71  fXtalAngleCmd->SetGuidance("Set Xtal angles in the world.");
72  fXtalAngleCmd->SetParameterName("xtalAngleX",
73  "xtalAngleY",
74  "xtalAngleZ",
75  true);
78 
79  fXtalCellSizeCmd = new G4UIcmdWith3VectorAndUnit("/xtal/setCellSize",this);
80  fXtalCellSizeCmd->SetGuidance("Set Xtal cell size.");
81  fXtalCellSizeCmd->SetParameterName("xtalCellSizeX",
82  "xtalCellSizeY",
83  "xtalCellSizeZ",
84  true);
85  fXtalCellSizeCmd->SetDefaultValue(G4ThreeVector(5.431,5.431,5.431));
86  fXtalCellSizeCmd->SetDefaultUnit("angstrom");
87 
89  new G4UIcmdWith3VectorAndUnit("/xtal/setCellAngle",this);
90  fXtalCellAngleCmd->SetGuidance("Set Xtal cell angles in the world.");
91  fXtalCellAngleCmd->SetParameterName("xtalCellAngleX",
92  "xtalCellAngleY",
93  "xtalCellAngleZ",
94  true);
97 
99  new G4UIcmdWithADoubleAndUnit("/xtal/setThermVibr",this);
100  fXtalCellThermalVibration->SetGuidance("Thermal vibration amplitude");
101  fXtalCellThermalVibration->SetParameterName("xtalThermVibr",true);
104 
105  fXtalMillerCmd = new G4UIcmdWith3Vector("/xtal/setMiller",this);
106  fXtalMillerCmd->SetGuidance("Set Miller Indexes");
107  fXtalMillerCmd->SetParameterName("xtalMiller1",
108  "xtalMiller2",
109  "xtalMiller3",
110  true);
112 
113  fAddXtal = new G4UIcmdWithAString("/addxtal",this);
114  fAddXtal->SetGuidance("Add Xtal.");
115  fAddXtal->SetParameterName("addxtal",true);
116 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
CLHEP::Hep3Vector G4ThreeVector
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetDefaultValue(G4ThreeVector defVal)
void SetDefaultValue(const char *defVal)
void SetDefaultUnit(const char *defUnit)
void SetDefaultValue(G4ThreeVector defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~ExExChDetectorConstructionMessenger()

ExExChDetectorConstructionMessenger::~ExExChDetectorConstructionMessenger ( )

Definition at line 121 of file ExExChDetectorConstructionMessenger.cc.

Here is the caller graph for this function:

Member Function Documentation

◆ GetCurrentValue()

G4String ExExChDetectorConstructionMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 173 of file ExExChDetectorConstructionMessenger.cc.

174  {
175  G4String cv;
176 
177  if( command==fXtalMaterialCmd ){
178  cv = fTarget->GetXtalMaterial();
179  }
180  if( command==fXtalCurvatureRadiusCmd ){
183  }
184  if( command==fXtalSizeCmd ){
186  }
187  if( command==fXtalAngleCmd ){
189  }
190  if( command==fXtalCellSizeCmd ){
192  fTarget->GetXtalCellSize(),"angstrom");
193  }
194  if( command==fXtalCellAngleCmd ){
196  fTarget->GetXtalCellAngle(),"deg");
197  }
198  if( command==fXtalCellThermalVibration ){
201  }
202  if( command==fXtalMillerCmd ){
204  }
205 
206  return cv;
207 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
Here is the call graph for this function:

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 134 of file ExExChDetectorConstructionMessenger.cc.

136  {
137  if(command==fXtalMaterialCmd ){
138  fTarget->SetXtalMaterial(newValue);
139  }
140  if(command==fXtalCurvatureRadiusCmd ){
143  }
144  if(command==fXtalSizeCmd ){
146  }
147  if(command==fXtalAngleCmd ){
149  }
150  if(command==fXtalCellSizeCmd ){
153  }
154  if(command==fXtalCellAngleCmd ){
157  }
158  if(command==fXtalCellThermalVibration ){
161  }
162  if(command==fXtalMillerCmd ){
164  }
165  if(command==fAddXtal ){
167  }
168 
169 }
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
void SetXtalMaterial(const G4String &name)
Here is the call graph for this function:

Member Data Documentation

◆ fAddXtal

G4UIcmdWithAString* ExExChDetectorConstructionMessenger::fAddXtal
private

Definition at line 63 of file ExExChDetectorConstructionMessenger.hh.

◆ fMyXtalDirectory

G4UIdirectory* ExExChDetectorConstructionMessenger::fMyXtalDirectory
private

Definition at line 54 of file ExExChDetectorConstructionMessenger.hh.

◆ fTarget

ExExChDetectorConstruction* ExExChDetectorConstructionMessenger::fTarget
private

Definition at line 52 of file ExExChDetectorConstructionMessenger.hh.

◆ fXtalAngleCmd

G4UIcmdWith3VectorAndUnit* ExExChDetectorConstructionMessenger::fXtalAngleCmd
private

Definition at line 58 of file ExExChDetectorConstructionMessenger.hh.

◆ fXtalCellAngleCmd

G4UIcmdWith3VectorAndUnit* ExExChDetectorConstructionMessenger::fXtalCellAngleCmd
private

Definition at line 60 of file ExExChDetectorConstructionMessenger.hh.

◆ fXtalCellSizeCmd

G4UIcmdWith3VectorAndUnit* ExExChDetectorConstructionMessenger::fXtalCellSizeCmd
private

Definition at line 59 of file ExExChDetectorConstructionMessenger.hh.

◆ fXtalCellThermalVibration

G4UIcmdWithADoubleAndUnit* ExExChDetectorConstructionMessenger::fXtalCellThermalVibration
private

Definition at line 61 of file ExExChDetectorConstructionMessenger.hh.

◆ fXtalCurvatureRadiusCmd

G4UIcmdWith3VectorAndUnit* ExExChDetectorConstructionMessenger::fXtalCurvatureRadiusCmd
private

Definition at line 56 of file ExExChDetectorConstructionMessenger.hh.

◆ fXtalMaterialCmd

G4UIcmdWithAString* ExExChDetectorConstructionMessenger::fXtalMaterialCmd
private

Definition at line 55 of file ExExChDetectorConstructionMessenger.hh.

◆ fXtalMillerCmd

G4UIcmdWith3Vector* ExExChDetectorConstructionMessenger::fXtalMillerCmd
private

Definition at line 62 of file ExExChDetectorConstructionMessenger.hh.

◆ fXtalSizeCmd

G4UIcmdWith3VectorAndUnit* ExExChDetectorConstructionMessenger::fXtalSizeCmd
private

Definition at line 57 of file ExExChDetectorConstructionMessenger.hh.


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