Geant4  10.02.p03
F04DetectorMessenger Class Reference

#include <F04DetectorMessenger.hh>

Inheritance diagram for F04DetectorMessenger:
Collaboration diagram for F04DetectorMessenger:

Public Member Functions

 F04DetectorMessenger (F04DetectorConstruction *)
 
virtual ~F04DetectorMessenger ()
 
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
 

Private Attributes

F04DetectorConstructionfDetector
 
G4UIdirectoryfDetDir
 
G4UIcmdWithAStringfWorldMaterCmd
 
G4UIcmdWithADoubleAndUnitfWorldRCmd
 
G4UIcmdWithADoubleAndUnitfWorldZCmd
 
G4UIcmdWithADoubleAndUnitfCaptureRCmd
 
G4UIcmdWithADoubleAndUnitfCaptureZCmd
 
G4UIcmdWithADoubleAndUnitfTransferRCmd
 
G4UIcmdWithADoubleAndUnitfTransferZCmd
 
G4UIcmdWithADoubleAndUnitfTransferPCmd
 
G4UIcmdWithAStringfTgtMaterCmd
 
G4UIcmdWithADoubleAndUnitfTgtRadCmd
 
G4UIcmdWithADoubleAndUnitfTgtThickCmd
 
G4UIcmdWithADoubleAndUnitfTgtPosCmd
 
G4UIcmdWithAnIntegerfTgtAngCmd
 
G4UIcmdWithAStringfDgrMaterCmd
 
G4UIcmdWithADoubleAndUnitfDgrRadCmd
 
G4UIcmdWithADoubleAndUnitfDgrThickCmd
 
G4UIcmdWithADoubleAndUnitfDgrPosCmd
 

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 46 of file F04DetectorMessenger.hh.

Constructor & Destructor Documentation

◆ F04DetectorMessenger()

F04DetectorMessenger::F04DetectorMessenger ( F04DetectorConstruction detector)

Definition at line 42 of file F04DetectorMessenger.cc.

43  : fDetector(detector)
44 {
45  fDetDir = new G4UIdirectory("/field04/");
46  fDetDir->SetGuidance(" field04 Simulation ");
47 
48  fWorldMaterCmd = new G4UIcmdWithAString("/field04/SetWorldMat",this);
49  fWorldMaterCmd->SetGuidance("Select Material of the World");
50  fWorldMaterCmd->SetParameterName("wchoice",true);
54 
55  fWorldRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetWorldR",this);
56  fWorldRCmd->SetGuidance("Set Radius of the World");
57  fWorldRCmd->SetParameterName("WSizeR",false,false);
59  fWorldRCmd->SetRange("WSizeR>0.");
62 
63  fWorldZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetWorldZ",this);
64  fWorldZCmd->SetGuidance("Set Length of the World");
65  fWorldZCmd->SetParameterName("WSizeZ",false,false);
67  fWorldZCmd->SetRange("WSizeZ>0.");
70 
71  fCaptureRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetCaptureR",this);
72  fCaptureRCmd->SetGuidance("Set Radius of the Capture Magnet");
73  fCaptureRCmd->SetParameterName("CSizeR",false,false);
75  fCaptureRCmd->SetRange("CSizeR>0.");
78 
79  fCaptureZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetCaptureZ",this);
80  fCaptureZCmd->SetGuidance("Set Length of the Capture Magnet");
81  fCaptureZCmd->SetParameterName("CSizeZ",false,false);
83  fCaptureZCmd->SetRange("CSizeZ>0.");
86 
87  fTransferRCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferR",this);
88  fTransferRCmd->SetGuidance("Set Radius of the Transfer Magnet");
89  fTransferRCmd->SetParameterName("TSizeR",false,false);
91  fTransferRCmd->SetRange("TSizeR>0.");
94 
95  fTransferZCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferZ",this);
96  fTransferZCmd->SetGuidance("Set Length of the Transfer Magnet");
97  fTransferZCmd->SetParameterName("TSizeZ",false,false);
99  fTransferZCmd->SetRange("TSizeZ>0.");
102 
103  fTransferPCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTransferP",this);
104  fTransferPCmd->SetGuidance("Set Z pos of the T-Mgnt from end of C-Mgnt");
105  fTransferPCmd->SetParameterName("TSizeP",false,false);
109 
110  fTgtMaterCmd = new G4UIcmdWithAString("/field04/SetTgtMat",this);
111  fTgtMaterCmd->SetGuidance("Select Material of the Target");
112  fTgtMaterCmd->SetParameterName("tchoice",true);
113  fTgtMaterCmd->SetDefaultValue("Tungsten");
116 
117  fTgtRadCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtRad",this);
118  fTgtRadCmd->SetGuidance("Set Radius of the Target");
119  fTgtRadCmd->SetParameterName("TgtSizeR",false,false);
120  fTgtRadCmd->SetDefaultUnit("cm");
121  fTgtRadCmd->SetRange("TgtSizeR>0.");
124 
125  fTgtThickCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtThick",this);
126  fTgtThickCmd->SetGuidance("Set Thickness of the Target");
127  fTgtThickCmd->SetParameterName("TgtSizeZ",false,false);
129  fTgtThickCmd->SetRange("TgtSizeZ>0.");
132 
133  fTgtPosCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetTgtPos",this);
134  fTgtPosCmd->SetGuidance("Set Z pos of the tgt relative to C-Mgnt centre");
135  fTgtPosCmd->SetParameterName("TgtSizeP",false,false);
136  fTgtPosCmd->SetDefaultUnit("cm");
139 
140  fTgtAngCmd = new G4UIcmdWithAnInteger("/field04/SetTgtAng",this);
141  fTgtAngCmd->
142  SetGuidance("Set the angle [in deg] of the Tgt relative to C-Mgnt centre");
145 
146  fDgrMaterCmd = new G4UIcmdWithAString("/field04/SetDgrMat",this);
147  fDgrMaterCmd->SetGuidance("Select Material of the Degrader");
148  fDgrMaterCmd->SetParameterName("dchoice",true);
149  fDgrMaterCmd->SetDefaultValue("Lead");
152 
153  fDgrRadCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrRad",this);
154  fDgrRadCmd->SetGuidance("Set Radius of the Degrader");
155  fDgrRadCmd->SetParameterName("DrgSizeR",false,false);
156  fDgrRadCmd->SetDefaultUnit("cm");
157  fDgrRadCmd->SetRange("DrgSizeR>0.");
160 
161  fDgrThickCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrThick",this);
162  fDgrThickCmd->SetGuidance("Set Thickness of the Degrader");
163  fDgrThickCmd->SetParameterName("DgrSizeZ",false,false);
165  fDgrThickCmd->SetRange("DgrSizeZ>0.");
168 
169  fDgrPosCmd = new G4UIcmdWithADoubleAndUnit("/field04/SetDgrPos",this);
170  fDgrPosCmd->SetGuidance("Set Z pos of the Dgr relative to T-Mgnt centre");
171  fDgrPosCmd->SetParameterName("DgrSizeP",false,false);
172  fDgrPosCmd->SetDefaultUnit("cm");
175 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * fWorldRCmd
G4UIcmdWithAnInteger * fTgtAngCmd
G4UIcmdWithAString * fTgtMaterCmd
G4UIcmdWithADoubleAndUnit * fDgrThickCmd
G4UIcmdWithADoubleAndUnit * fTgtPosCmd
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:184
G4UIcmdWithADoubleAndUnit * fCaptureRCmd
G4UIcmdWithADoubleAndUnit * fTransferRCmd
G4UIcmdWithADoubleAndUnit * fWorldZCmd
G4UIcmdWithADoubleAndUnit * fCaptureZCmd
G4UIcmdWithAString * fDgrMaterCmd
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4UIcmdWithADoubleAndUnit * fTransferPCmd
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIcmdWithAString * fWorldMaterCmd
G4UIcmdWithADoubleAndUnit * fTgtThickCmd
G4UIcmdWithADoubleAndUnit * fTransferZCmd
void SetDefaultValue(const char *defVal)
void SetDefaultUnit(const char *defUnit)
F04DetectorConstruction * fDetector
G4UIcmdWithADoubleAndUnit * fDgrRadCmd
G4UIcmdWithADoubleAndUnit * fTgtRadCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * fDgrPosCmd
Here is the call graph for this function:

◆ ~F04DetectorMessenger()

F04DetectorMessenger::~F04DetectorMessenger ( )
virtual

Definition at line 179 of file F04DetectorMessenger.cc.

180 {
181  delete fDetDir;
182 
183  delete fWorldMaterCmd;
184  delete fWorldRCmd;
185  delete fWorldZCmd;
186 
187  delete fCaptureRCmd;
188  delete fCaptureZCmd;
189 
190  delete fTransferRCmd;
191  delete fTransferZCmd;
192  delete fTransferPCmd;
193 
194  delete fTgtMaterCmd;
195  delete fTgtRadCmd;
196  delete fTgtThickCmd;
197  delete fTgtPosCmd;
198  delete fTgtAngCmd;
199 
200  delete fDgrMaterCmd;
201  delete fDgrRadCmd;
202  delete fDgrThickCmd;
203  delete fDgrPosCmd;
204 }
G4UIcmdWithADoubleAndUnit * fWorldRCmd
G4UIcmdWithAnInteger * fTgtAngCmd
G4UIcmdWithAString * fTgtMaterCmd
G4UIcmdWithADoubleAndUnit * fDgrThickCmd
G4UIcmdWithADoubleAndUnit * fTgtPosCmd
G4UIcmdWithADoubleAndUnit * fCaptureRCmd
G4UIcmdWithADoubleAndUnit * fTransferRCmd
G4UIcmdWithADoubleAndUnit * fWorldZCmd
G4UIcmdWithADoubleAndUnit * fCaptureZCmd
G4UIcmdWithAString * fDgrMaterCmd
G4UIcmdWithADoubleAndUnit * fTransferPCmd
G4UIcmdWithAString * fWorldMaterCmd
G4UIcmdWithADoubleAndUnit * fTgtThickCmd
G4UIcmdWithADoubleAndUnit * fTransferZCmd
G4UIcmdWithADoubleAndUnit * fDgrRadCmd
G4UIcmdWithADoubleAndUnit * fTgtRadCmd
G4UIcmdWithADoubleAndUnit * fDgrPosCmd

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 208 of file F04DetectorMessenger.cc.

209 {
210  if( command == fWorldMaterCmd )
211  { fDetector->SetWorldMaterial(newValue);}
212 
213  if( command == fTgtMaterCmd )
214  { fDetector->SetTargetMaterial(newValue);}
215 
216  if( command == fDgrMaterCmd )
217  { fDetector->SetDegraderMaterial(newValue);}
218 
219  if( command == fWorldRCmd )
221 
222  if( command == fWorldZCmd )
224 
225  if( command == fCaptureRCmd )
227 
228  if( command == fCaptureZCmd )
230 
231  if( command == fTransferRCmd )
233 
234  if( command == fTransferZCmd )
236 
237  if( command == fTransferPCmd )
239 
240  if( command == fTgtRadCmd )
242 
243  if( command == fTgtThickCmd )
245 
246  if( command == fTgtPosCmd )
248 
249  if( command == fTgtAngCmd )
251 
252  if( command == fDgrRadCmd )
254 
255  if( command == fDgrThickCmd )
257 
258  if( command == fDgrPosCmd )
260 
261  if( command == fWorldZCmd )
263 
264  if( command == fWorldRCmd )
266 }
G4UIcmdWithADoubleAndUnit * fWorldRCmd
G4UIcmdWithAnInteger * fTgtAngCmd
G4UIcmdWithAString * fTgtMaterCmd
G4UIcmdWithADoubleAndUnit * fDgrThickCmd
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fTgtPosCmd
G4UIcmdWithADoubleAndUnit * fCaptureRCmd
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fTransferRCmd
G4UIcmdWithADoubleAndUnit * fWorldZCmd
G4UIcmdWithADoubleAndUnit * fCaptureZCmd
G4UIcmdWithAString * fDgrMaterCmd
G4UIcmdWithADoubleAndUnit * fTransferPCmd
G4UIcmdWithAString * fWorldMaterCmd
G4UIcmdWithADoubleAndUnit * fTgtThickCmd
G4UIcmdWithADoubleAndUnit * fTransferZCmd
F04DetectorConstruction * fDetector
G4UIcmdWithADoubleAndUnit * fDgrRadCmd
G4UIcmdWithADoubleAndUnit * fTgtRadCmd
G4UIcmdWithADoubleAndUnit * fDgrPosCmd
Here is the call graph for this function:

Member Data Documentation

◆ fCaptureRCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fCaptureRCmd
private

Definition at line 65 of file F04DetectorMessenger.hh.

◆ fCaptureZCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fCaptureZCmd
private

Definition at line 66 of file F04DetectorMessenger.hh.

◆ fDetDir

G4UIdirectory* F04DetectorMessenger::fDetDir
private

Definition at line 59 of file F04DetectorMessenger.hh.

◆ fDetector

F04DetectorConstruction* F04DetectorMessenger::fDetector
private

Definition at line 57 of file F04DetectorMessenger.hh.

◆ fDgrMaterCmd

G4UIcmdWithAString* F04DetectorMessenger::fDgrMaterCmd
private

Definition at line 78 of file F04DetectorMessenger.hh.

◆ fDgrPosCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fDgrPosCmd
private

Definition at line 81 of file F04DetectorMessenger.hh.

◆ fDgrRadCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fDgrRadCmd
private

Definition at line 79 of file F04DetectorMessenger.hh.

◆ fDgrThickCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fDgrThickCmd
private

Definition at line 80 of file F04DetectorMessenger.hh.

◆ fTgtAngCmd

G4UIcmdWithAnInteger* F04DetectorMessenger::fTgtAngCmd
private

Definition at line 76 of file F04DetectorMessenger.hh.

◆ fTgtMaterCmd

G4UIcmdWithAString* F04DetectorMessenger::fTgtMaterCmd
private

Definition at line 72 of file F04DetectorMessenger.hh.

◆ fTgtPosCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fTgtPosCmd
private

Definition at line 75 of file F04DetectorMessenger.hh.

◆ fTgtRadCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fTgtRadCmd
private

Definition at line 73 of file F04DetectorMessenger.hh.

◆ fTgtThickCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fTgtThickCmd
private

Definition at line 74 of file F04DetectorMessenger.hh.

◆ fTransferPCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fTransferPCmd
private

Definition at line 70 of file F04DetectorMessenger.hh.

◆ fTransferRCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fTransferRCmd
private

Definition at line 68 of file F04DetectorMessenger.hh.

◆ fTransferZCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fTransferZCmd
private

Definition at line 69 of file F04DetectorMessenger.hh.

◆ fWorldMaterCmd

G4UIcmdWithAString* F04DetectorMessenger::fWorldMaterCmd
private

Definition at line 61 of file F04DetectorMessenger.hh.

◆ fWorldRCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fWorldRCmd
private

Definition at line 62 of file F04DetectorMessenger.hh.

◆ fWorldZCmd

G4UIcmdWithADoubleAndUnit* F04DetectorMessenger::fWorldZCmd
private

Definition at line 63 of file F04DetectorMessenger.hh.


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