Geant4  10.02.p03
F03DetectorMessenger Class Reference

#include <F03DetectorMessenger.hh>

Inheritance diagram for F03DetectorMessenger:
Collaboration diagram for F03DetectorMessenger:

Public Member Functions

 F03DetectorMessenger (F03DetectorConstruction *)
 
virtual ~F03DetectorMessenger ()
 
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

F03DetectorConstructionfDetector
 
G4UIdirectoryfDetDir
 
G4UIcmdWithAStringfAbsMaterCmd
 
G4UIcmdWithADoubleAndUnitfAbsThickCmd
 
G4UIcmdWithADoubleAndUnitfAbsRadCmd
 
G4UIcmdWithADoubleAndUnitfAbsZposCmd
 
G4UIcmdWithAStringfWorldMaterCmd
 
G4UIcmdWithADoubleAndUnitfWorldZCmd
 
G4UIcmdWithADoubleAndUnitfWorldRCmd
 

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 51 of file F03DetectorMessenger.hh.

Constructor & Destructor Documentation

◆ F03DetectorMessenger()

F03DetectorMessenger::F03DetectorMessenger ( F03DetectorConstruction det)

Definition at line 45 of file F03DetectorMessenger.cc.

46  : G4UImessenger(),
47  fDetector(det),
48  fDetDir(0),
49  fAbsMaterCmd(0),
50  fAbsThickCmd(0),
51  fAbsRadCmd(0),
52  fAbsZposCmd(0),
53  fWorldMaterCmd(0),
54  fWorldZCmd(0),
55  fWorldRCmd(0)
56 {
57  fDetDir = new G4UIdirectory("/calor/");
58  fDetDir->SetGuidance("F03 detector control.");
59 
60  fAbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
61  fAbsMaterCmd->SetGuidance("Select Material of the Absorber.");
62  fAbsMaterCmd->SetParameterName("choice",true);
66 
67  fWorldMaterCmd = new G4UIcmdWithAString("/calor/setWorldMat",this);
68  fWorldMaterCmd->SetGuidance("Select Material of the World.");
69  fWorldMaterCmd->SetParameterName("wchoice",true);
73 
74  fAbsThickCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsThick",this);
75  fAbsThickCmd->SetGuidance("Set Thickness of the Absorber");
76  fAbsThickCmd->SetParameterName("SizeZ",false,false);
78  fAbsThickCmd->SetRange("SizeZ>0.");
81 
82  fAbsRadCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsRad",this);
83  fAbsRadCmd->SetGuidance("Set radius of the Absorber");
84  fAbsRadCmd->SetParameterName("SizeR",false,false);
86  fAbsRadCmd->SetRange("SizeR>0.");
89 
90  fAbsZposCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsZpos",this);
91  fAbsZposCmd->SetGuidance("Set Z pos. of the Absorber");
92  fAbsZposCmd->SetParameterName("Zpos",false,false);
96 
97  fWorldZCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldZ",this);
98  fWorldZCmd->SetGuidance("Set Z size of the World");
99  fWorldZCmd->SetParameterName("WSizeZ",false,false);
100  fWorldZCmd->SetDefaultUnit("mm");
101  fWorldZCmd->SetRange("WSizeZ>0.");
104 
105  fWorldRCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldR",this);
106  fWorldRCmd->SetGuidance("Set R size of the World");
107  fWorldRCmd->SetParameterName("WSizeR",false,false);
108  fWorldRCmd->SetDefaultUnit("mm");
109  fWorldRCmd->SetRange("WSizeR>0.");
112 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * fAbsThickCmd
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:184
F03DetectorConstruction * fDetector
G4UIcmdWithAString * fAbsMaterCmd
G4UIcmdWithADoubleAndUnit * fAbsZposCmd
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4UIcmdWithAString * fWorldMaterCmd
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIcmdWithADoubleAndUnit * fWorldZCmd
G4UIcmdWithADoubleAndUnit * fAbsRadCmd
void SetDefaultValue(const char *defVal)
G4UIcmdWithADoubleAndUnit * fWorldRCmd
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~F03DetectorMessenger()

F03DetectorMessenger::~F03DetectorMessenger ( )
virtual

Definition at line 116 of file F03DetectorMessenger.cc.

117 {
118  delete fAbsMaterCmd;
119  delete fAbsThickCmd;
120  delete fAbsRadCmd;
121  delete fAbsZposCmd;
122  delete fWorldMaterCmd;
123  delete fWorldZCmd;
124  delete fWorldRCmd;
125  delete fDetDir;
126 }
G4UIcmdWithADoubleAndUnit * fAbsThickCmd
G4UIcmdWithAString * fAbsMaterCmd
G4UIcmdWithADoubleAndUnit * fAbsZposCmd
G4UIcmdWithAString * fWorldMaterCmd
G4UIcmdWithADoubleAndUnit * fWorldZCmd
G4UIcmdWithADoubleAndUnit * fAbsRadCmd
G4UIcmdWithADoubleAndUnit * fWorldRCmd

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 130 of file F03DetectorMessenger.cc.

131 {
132  if( command == fAbsMaterCmd )
133  { fDetector->SetAbsorberMaterial(newValue);}
134 
135  if( command == fWorldMaterCmd )
136  { fDetector->SetWorldMaterial(newValue);}
137 
138  if( command == fAbsThickCmd )
140 
141  if( command == fAbsRadCmd )
143 
144  if( command == fAbsZposCmd )
146 
147  if( command == fWorldZCmd )
149 
150  if( command == fWorldRCmd )
152 }
G4UIcmdWithADoubleAndUnit * fAbsThickCmd
F03DetectorConstruction * fDetector
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithAString * fAbsMaterCmd
G4UIcmdWithADoubleAndUnit * fAbsZposCmd
G4UIcmdWithAString * fWorldMaterCmd
G4UIcmdWithADoubleAndUnit * fWorldZCmd
G4UIcmdWithADoubleAndUnit * fAbsRadCmd
G4UIcmdWithADoubleAndUnit * fWorldRCmd
Here is the call graph for this function:

Member Data Documentation

◆ fAbsMaterCmd

G4UIcmdWithAString* F03DetectorMessenger::fAbsMaterCmd
private

Definition at line 66 of file F03DetectorMessenger.hh.

◆ fAbsRadCmd

G4UIcmdWithADoubleAndUnit* F03DetectorMessenger::fAbsRadCmd
private

Definition at line 68 of file F03DetectorMessenger.hh.

◆ fAbsThickCmd

G4UIcmdWithADoubleAndUnit* F03DetectorMessenger::fAbsThickCmd
private

Definition at line 67 of file F03DetectorMessenger.hh.

◆ fAbsZposCmd

G4UIcmdWithADoubleAndUnit* F03DetectorMessenger::fAbsZposCmd
private

Definition at line 70 of file F03DetectorMessenger.hh.

◆ fDetDir

G4UIdirectory* F03DetectorMessenger::fDetDir
private

Definition at line 64 of file F03DetectorMessenger.hh.

◆ fDetector

F03DetectorConstruction* F03DetectorMessenger::fDetector
private

Definition at line 62 of file F03DetectorMessenger.hh.

◆ fWorldMaterCmd

G4UIcmdWithAString* F03DetectorMessenger::fWorldMaterCmd
private

Definition at line 72 of file F03DetectorMessenger.hh.

◆ fWorldRCmd

G4UIcmdWithADoubleAndUnit* F03DetectorMessenger::fWorldRCmd
private

Definition at line 74 of file F03DetectorMessenger.hh.

◆ fWorldZCmd

G4UIcmdWithADoubleAndUnit* F03DetectorMessenger::fWorldZCmd
private

Definition at line 73 of file F03DetectorMessenger.hh.


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