QwGeant4
QweakSimLeadGlassMessenger Class Reference

#include <QweakSimLeadGlassMessenger.hh>

Inherits G4UImessenger.

+ Collaboration diagram for QweakSimLeadGlassMessenger:

Public Member Functions

 QweakSimLeadGlassMessenger (QweakSimLeadGlass *)
 
 ~QweakSimLeadGlassMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 

Private Attributes

QweakSimLeadGlassmyLeadGlass
 
G4UIdirectory * LeadGlassDir
 
G4UIcmdWithAString * LeadGlass_SetMaterial_Cmd
 
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInX_Cmd
 
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInY_Cmd
 
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInZ_Cmd
 
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInX_Cmd
 
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInY_Cmd
 
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInZ_Cmd
 
G4UIcmdWithoutParameter * LeadGlass_SetEnabled_Cmd
 
G4UIcmdWithoutParameter * LeadGlass_SetDisabled_Cmd
 

Detailed Description

Definition at line 21 of file QweakSimLeadGlassMessenger.hh.

Constructor & Destructor Documentation

QweakSimLeadGlassMessenger::QweakSimLeadGlassMessenger ( QweakSimLeadGlass theLeadGlass)

Definition at line 18 of file QweakSimLeadGlassMessenger.cc.

References LeadGlass_SetCenterPositionInX_Cmd, LeadGlass_SetCenterPositionInY_Cmd, LeadGlass_SetCenterPositionInZ_Cmd, LeadGlass_SetDisabled_Cmd, LeadGlass_SetEnabled_Cmd, LeadGlass_SetMaterial_Cmd, LeadGlass_SetTiltAngleInX_Cmd, LeadGlass_SetTiltAngleInY_Cmd, LeadGlass_SetTiltAngleInZ_Cmd, and LeadGlassDir.

19 :myLeadGlass(theLeadGlass)
20 {
21 
22  LeadGlassDir = new G4UIdirectory("/LeadGlass/");
23  LeadGlassDir -> SetGuidance("Lead Glass Detector control.");
24 
25  //--- Material
26 
27  LeadGlass_SetMaterial_Cmd = new G4UIcmdWithAString("/LeadGlass/SetMaterial",this);
28  LeadGlass_SetMaterial_Cmd -> SetGuidance("Select Material of the LeadGlass.");
29  LeadGlass_SetMaterial_Cmd -> SetParameterName("choice",false);
30  LeadGlass_SetMaterial_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
31 
32  //--- Position
33 
34  LeadGlass_SetCenterPositionInX_Cmd = new G4UIcmdWithADoubleAndUnit("/LeadGlass/SetCenterPositionInX",this);
35  LeadGlass_SetCenterPositionInX_Cmd -> SetGuidance("Set the X position of the LeadGlass");
36  LeadGlass_SetCenterPositionInX_Cmd -> SetParameterName("Size",true);
37  LeadGlass_SetCenterPositionInX_Cmd -> SetUnitCategory("Length");
38  LeadGlass_SetCenterPositionInX_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
39 
40  LeadGlass_SetCenterPositionInY_Cmd = new G4UIcmdWithADoubleAndUnit("/LeadGlass/SetCenterPositionInY",this);
41  LeadGlass_SetCenterPositionInY_Cmd -> SetGuidance("Set the Y position of the LeadGlass");
42  LeadGlass_SetCenterPositionInY_Cmd -> SetParameterName("Size",true);
43  LeadGlass_SetCenterPositionInY_Cmd -> SetUnitCategory("Length");
44  LeadGlass_SetCenterPositionInY_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
45 
46  LeadGlass_SetCenterPositionInZ_Cmd = new G4UIcmdWithADoubleAndUnit("/LeadGlass/SetCenterPositionInZ",this);
47  LeadGlass_SetCenterPositionInZ_Cmd -> SetGuidance("Set the Z position of the LeadGlass");
48  LeadGlass_SetCenterPositionInZ_Cmd -> SetParameterName("Size",true);
49  LeadGlass_SetCenterPositionInZ_Cmd -> SetUnitCategory("Length");
50  LeadGlass_SetCenterPositionInZ_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
51 
52  //--- Rotation
53 
54  LeadGlass_SetTiltAngleInX_Cmd = new G4UIcmdWithADoubleAndUnit("/LeadGlass/SetTiltAngleInX",this);
55  LeadGlass_SetTiltAngleInX_Cmd -> SetGuidance("Set the X tilting angle of the LeadGlass");
56  LeadGlass_SetTiltAngleInX_Cmd -> SetParameterName("Angle",true);
57  LeadGlass_SetTiltAngleInX_Cmd -> SetDefaultUnit("degree");
58  LeadGlass_SetTiltAngleInX_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
59 
60  LeadGlass_SetTiltAngleInY_Cmd = new G4UIcmdWithADoubleAndUnit("/LeadGlass/SetTiltAngleInY",this);
61  LeadGlass_SetTiltAngleInY_Cmd -> SetGuidance("Set the Y tilting angle of the LeadGlass");
62  LeadGlass_SetTiltAngleInY_Cmd -> SetParameterName("Angle",true);
63  LeadGlass_SetTiltAngleInY_Cmd -> SetDefaultUnit("degree");
64  LeadGlass_SetTiltAngleInY_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
65 
66  LeadGlass_SetTiltAngleInZ_Cmd = new G4UIcmdWithADoubleAndUnit("/LeadGlass/SetTiltAngleInZ",this);
67  LeadGlass_SetTiltAngleInZ_Cmd -> SetGuidance("Set the Z tilting angle of the LeadGlass");
68  LeadGlass_SetTiltAngleInZ_Cmd -> SetParameterName("Angle",true);
69  LeadGlass_SetTiltAngleInZ_Cmd -> SetDefaultUnit("degree");
70  LeadGlass_SetTiltAngleInZ_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
71 
72  //--- Enable
73 
74  LeadGlass_SetEnabled_Cmd = new G4UIcmdWithoutParameter("/LeadGlass/Enable",this);
75  LeadGlass_SetEnabled_Cmd -> SetGuidance("Enables the LeadGlass");
76  LeadGlass_SetEnabled_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
77 
78  //--- Disable
79 
80  LeadGlass_SetDisabled_Cmd = new G4UIcmdWithoutParameter("/LeadGlass/Disable",this);
81  LeadGlass_SetDisabled_Cmd -> SetGuidance("Disables the LeadGlass");
82  LeadGlass_SetDisabled_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
83 
84 }
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInY_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInX_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInY_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInZ_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInZ_Cmd
G4UIcmdWithoutParameter * LeadGlass_SetEnabled_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInX_Cmd
G4UIcmdWithoutParameter * LeadGlass_SetDisabled_Cmd
G4UIcmdWithAString * LeadGlass_SetMaterial_Cmd
QweakSimLeadGlassMessenger::~QweakSimLeadGlassMessenger ( )

Definition at line 90 of file QweakSimLeadGlassMessenger.cc.

References LeadGlass_SetCenterPositionInX_Cmd, LeadGlass_SetCenterPositionInY_Cmd, LeadGlass_SetCenterPositionInZ_Cmd, LeadGlass_SetDisabled_Cmd, LeadGlass_SetEnabled_Cmd, LeadGlass_SetMaterial_Cmd, and LeadGlassDir.

91 {
93 
97 
100 
101  if (LeadGlassDir) delete LeadGlassDir;
102 
103 }
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInY_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInX_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInZ_Cmd
G4UIcmdWithoutParameter * LeadGlass_SetEnabled_Cmd
G4UIcmdWithoutParameter * LeadGlass_SetDisabled_Cmd
G4UIcmdWithAString * LeadGlass_SetMaterial_Cmd

Member Function Documentation

void QweakSimLeadGlassMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)

Definition at line 109 of file QweakSimLeadGlassMessenger.cc.

References LeadGlass_SetCenterPositionInX_Cmd, LeadGlass_SetCenterPositionInY_Cmd, LeadGlass_SetCenterPositionInZ_Cmd, LeadGlass_SetDisabled_Cmd, LeadGlass_SetEnabled_Cmd, LeadGlass_SetMaterial_Cmd, LeadGlass_SetTiltAngleInX_Cmd, LeadGlass_SetTiltAngleInY_Cmd, LeadGlass_SetTiltAngleInZ_Cmd, and myLeadGlass.

110 {
111  G4cout << "=== Calling QweakSimLeadGlassMessenger::SetNewValue() " << newValue << G4endl;
112 
113  //--- Set New Material
114 
115  if (command == LeadGlass_SetMaterial_Cmd)
116  {
117  G4cout << "=== Messenger: Setting LeadGlass Material to " << newValue << G4endl;
118  myLeadGlass -> SetLeadGlass_Material(newValue);
119  }
120 
121  //--- Set New Position
122 
123  if (command == LeadGlass_SetCenterPositionInX_Cmd)
124  {
125  G4cout << "=== Messenger: Setting LeadGlass X position to " << newValue << G4endl;
126  myLeadGlass -> SetLeadGlass_CenterPositionInX(LeadGlass_SetCenterPositionInX_Cmd -> GetNewDoubleValue(newValue));
127  }
128 
129  if (command == LeadGlass_SetCenterPositionInY_Cmd)
130  {
131  G4cout << "=== Messenger: Setting LeadGlass Y position to " << newValue << G4endl;
132  myLeadGlass -> SetLeadGlass_CenterPositionInY(LeadGlass_SetCenterPositionInY_Cmd -> GetNewDoubleValue(newValue));
133  }
134 
135  if (command == LeadGlass_SetCenterPositionInZ_Cmd)
136  {
137  G4cout << "=== Messenger: Setting LeadGlass Z position to " << newValue << G4endl;
138  myLeadGlass -> SetLeadGlass_CenterPositionInZ(LeadGlass_SetCenterPositionInZ_Cmd -> GetNewDoubleValue(newValue));
139  }
140 
141  //--- Set New Tilting Anngle
142 
143  if (command == LeadGlass_SetTiltAngleInX_Cmd)
144  {
145  G4cout << "=== Messenger: Setting LeadGlass X tilting angle to " << newValue << G4endl;
146  myLeadGlass -> SetLeadGlass_TiltAngleInX(LeadGlass_SetTiltAngleInX_Cmd -> GetNewDoubleValue(newValue));
147  }
148 
149  if (command == LeadGlass_SetTiltAngleInY_Cmd)
150  {
151  G4cout << "=== Messenger: Setting LeadGlass Y tilting angle to " << newValue << G4endl;
152  myLeadGlass -> SetLeadGlass_TiltAngleInY(LeadGlass_SetTiltAngleInY_Cmd -> GetNewDoubleValue(newValue));
153  }
154 
155  if (command == LeadGlass_SetTiltAngleInZ_Cmd)
156  {
157  G4cout << "=== Messenger: Setting LeadGlass Z tilting angle to " << newValue << G4endl;
158  myLeadGlass -> SetLeadGlass_TiltAngleInZ(LeadGlass_SetTiltAngleInZ_Cmd -> GetNewDoubleValue(newValue));
159  }
160 
161  //--- Enable
162 
163  if (command == LeadGlass_SetEnabled_Cmd)
164  {
165  G4cout << "=== Messenger: ENABLE the LeadGlass" << G4endl;
166  myLeadGlass -> SetLeadGlass_Enabled();
167  }
168 
169  //----Disable
170 
171  if (command == LeadGlass_SetDisabled_Cmd)
172  {
173  G4cout << "=== Messenger: DISABLE the LeadGlass" << G4endl;
174  myLeadGlass -> SetLeadGlass_Disabled();
175  }
176 
177  G4cout << "=== Leaving QweakSimLeadGlassMessenger::SetNewValue() " << newValue << G4endl;
178 }
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInY_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInX_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInY_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInZ_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetCenterPositionInZ_Cmd
G4UIcmdWithoutParameter * LeadGlass_SetEnabled_Cmd
G4UIcmdWithADoubleAndUnit * LeadGlass_SetTiltAngleInX_Cmd
G4UIcmdWithoutParameter * LeadGlass_SetDisabled_Cmd
G4UIcmdWithAString * LeadGlass_SetMaterial_Cmd

Field Documentation

G4UIcmdWithADoubleAndUnit* QweakSimLeadGlassMessenger::LeadGlass_SetCenterPositionInX_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimLeadGlassMessenger::LeadGlass_SetCenterPositionInY_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimLeadGlassMessenger::LeadGlass_SetCenterPositionInZ_Cmd
private
G4UIcmdWithoutParameter* QweakSimLeadGlassMessenger::LeadGlass_SetDisabled_Cmd
private
G4UIcmdWithoutParameter* QweakSimLeadGlassMessenger::LeadGlass_SetEnabled_Cmd
private
G4UIcmdWithAString* QweakSimLeadGlassMessenger::LeadGlass_SetMaterial_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimLeadGlassMessenger::LeadGlass_SetTiltAngleInX_Cmd
private

Definition at line 43 of file QweakSimLeadGlassMessenger.hh.

Referenced by QweakSimLeadGlassMessenger(), and SetNewValue().

G4UIcmdWithADoubleAndUnit* QweakSimLeadGlassMessenger::LeadGlass_SetTiltAngleInY_Cmd
private

Definition at line 44 of file QweakSimLeadGlassMessenger.hh.

Referenced by QweakSimLeadGlassMessenger(), and SetNewValue().

G4UIcmdWithADoubleAndUnit* QweakSimLeadGlassMessenger::LeadGlass_SetTiltAngleInZ_Cmd
private

Definition at line 45 of file QweakSimLeadGlassMessenger.hh.

Referenced by QweakSimLeadGlassMessenger(), and SetNewValue().

G4UIdirectory* QweakSimLeadGlassMessenger::LeadGlassDir
private
QweakSimLeadGlass* QweakSimLeadGlassMessenger::myLeadGlass
private

Definition at line 33 of file QweakSimLeadGlassMessenger.hh.

Referenced by SetNewValue().


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