Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
Em10RunMessenger Class Reference

#include <Em10RunMessenger.hh>

Inheritance diagram for Em10RunMessenger:
G4UImessenger

Public Member Functions

 Em10RunMessenger (Em10RunAction *)
 
 ~Em10RunMessenger ()
 
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
 

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
 

Detailed Description

Definition at line 56 of file Em10RunMessenger.hh.

Constructor & Destructor Documentation

Em10RunMessenger::Em10RunMessenger ( Em10RunAction RA)

Definition at line 51 of file Em10RunMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_Idle, G4State_PreInit, G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcommand::SetRange(), and G4UIcmdWithADoubleAndUnit::SetUnitCategory().

52 :G4UImessenger(),runAction (RA)
53 {
54  plotDir = new G4UIdirectory("/plots/");
55  plotDir->SetGuidance("plot control");
56 
57  sethistNameCmd = new G4UIcmdWithAString("/plots/sethistName",this);
58  sethistNameCmd->SetGuidance("set name for the histogram file");
59 
60  setnbinStepCmd = new G4UIcmdWithAnInteger("/plots/setnbinStep",this);
61  setnbinStepCmd->SetGuidance("set nb of bins in #step plot");
62  setnbinStepCmd->SetParameterName("nbinStep",false);
63 
64  setSteplowCmd = new G4UIcmdWithADouble("/plots/setSteplow",this);
65  setSteplowCmd->SetGuidance("set lower limit for #step plot ");
66  setSteplowCmd->SetParameterName("Steplow",false);
67 
68  setStephighCmd = new G4UIcmdWithADouble("/plots/setStephigh",this);
69  setStephighCmd->SetGuidance("set upper limit for #step plot ");
70  setStephighCmd->SetParameterName("Stephigh",false);
71 
72  setnbinEnCmd = new G4UIcmdWithAnInteger("/plots/setnbinEn",this);
73  setnbinEnCmd->SetGuidance("set nb of bins in Edep plot");
74  setnbinEnCmd->SetParameterName("nbinE",false);
75 
76  setEnlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setEnlow",this);
77  setEnlowCmd->SetGuidance("set lower limit for Edep plot ");
78  setEnlowCmd->SetParameterName("Elow",false);
79  setEnlowCmd->SetUnitCategory("Energy");
80 
81  setEnhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setEnhigh",this);
82  setEnhighCmd->SetGuidance("set upper limit for Edep plot ");
83  setEnhighCmd->SetParameterName("Ehigh",false);
84  setEnhighCmd->SetUnitCategory("Energy");
85 
86  setnbinGammaCmd = new G4UIcmdWithAnInteger("/plots/setnbinGamma",this);
87  setnbinGammaCmd->SetGuidance("set nb of bins in gamma spectrum plot");
88  setnbinGammaCmd->SetParameterName("nbinGamma",false);
89 
90  setElowGammaCmd = new G4UIcmdWithADoubleAndUnit("/plots/setElowGamma",this);
91  setElowGammaCmd->SetGuidance("set lower limit for gamma spectrum plot ");
92  setElowGammaCmd->SetParameterName("ElowGamma",false);
93  setElowGammaCmd->SetUnitCategory("Energy");
94 
95  setEhighGammaCmd = new G4UIcmdWithADoubleAndUnit("/plots/setEhighGamma",this);
96  setEhighGammaCmd->SetGuidance("set upper limit for gamma spectrum plot ");
97  setEhighGammaCmd->SetParameterName("EhighGamma",false);
98  setEhighGammaCmd->SetUnitCategory("Energy");
99 
100  setnbinTtCmd = new G4UIcmdWithAnInteger("/plots/setnbinTt",this);
101  setnbinTtCmd->SetGuidance("set nb of bins in Etransmitted plot");
102  setnbinTtCmd->SetParameterName("nbinTt",false);
103 
104  setTtlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTtlow",this);
105  setTtlowCmd->SetGuidance("set lower limit for Etransmitted plot ");
106  setTtlowCmd->SetParameterName("Ttlow",false);
107 
108  setTthighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTthigh",this);
109  setTthighCmd->SetGuidance("set upper limit for Etransmitted plot ");
110  setTthighCmd->SetParameterName("Tthigh",false);
111 
112  setnbinTbCmd = new G4UIcmdWithAnInteger("/plots/setnbinTb",this);
113  setnbinTbCmd->SetGuidance("set nb of bins in Ebackscattering plot");
114  setnbinTbCmd->SetParameterName("nbinTb",false);
115 
116  setTblowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTblow",this);
117  setTblowCmd->SetGuidance("set lower limit for Ebackscattered plot ");
118  setTblowCmd->SetParameterName("Tblow",false);
119 
120  setTbhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTbhigh",this);
121  setTbhighCmd->SetGuidance("set upper limit for Ebackscattered plot ");
122  setTbhighCmd->SetParameterName("Tbhigh",false);
123 
124  setnbinTsecCmd = new G4UIcmdWithAnInteger("/plots/setnbinTsec",this);
125  setnbinTsecCmd->SetGuidance("set nb of bins in charged Tsecondary plot");
126  setnbinTsecCmd->SetParameterName("nbinTsec",false);
127 
128  setTseclowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTseclow",this);
129  setTseclowCmd->SetGuidance("set lower limit for charged Tsecondary plot ");
130  setTseclowCmd->SetParameterName("Tseclow",false);
131 
132  setTsechighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTsechigh",this);
133  setTsechighCmd->SetGuidance("set upper limit for charged Tsecondary plot ");
134  setTsechighCmd->SetParameterName("Tsechigh",false);
135 
136  setnbinRCmd = new G4UIcmdWithAnInteger("/plots/setnbinR",this);
137  setnbinRCmd->SetGuidance("set nb of bins in R plot");
138  setnbinRCmd->SetParameterName("nbinR",false);
139 
140  setRlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setRlow",this);
141  setRlowCmd->SetGuidance("set lower limit for R plot ");
142  setRlowCmd->SetParameterName("Rlow",false);
143 
144  setRhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setRhigh",this);
145  setRhighCmd->SetGuidance("set upper limit for R plot ");
146  setRhighCmd->SetParameterName("Rhigh",false);
147 
148  setnbinzvertexCmd = new G4UIcmdWithAnInteger("/plots/setnbinzvertex",this);
149  setnbinzvertexCmd->SetGuidance("set nb of bins in Z vertex plot");
150  setnbinzvertexCmd->SetParameterName("nbinZ",false);
151 
152  setzlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setzlow",this);
153  setzlowCmd->SetGuidance("set lower limit for Z vertex plot ");
154  setzlowCmd->SetParameterName("zlow",false);
155 
156  setzhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setzhigh",this);
157  setzhighCmd->SetGuidance("set upper limit for Z vertex plot ");
158  setzhighCmd->SetParameterName("zhigh",false);
159 
160  setnbinThCmd = new G4UIcmdWithAnInteger("/plots/setnbinTh",this);
161  setnbinThCmd->SetGuidance("set nb of bins in Theta transmitted plot");
162  setnbinThCmd->SetParameterName("nbinTh",false);
163 
164  setThlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setThlow",this);
165  setThlowCmd->SetGuidance("set lower limit for Theta transmitted plot ");
166  setThlowCmd->SetParameterName("Thlow",false);
167 
168  setThhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setThhigh",this);
169  setThhighCmd->SetGuidance("set upper limit for Theta transmitted plot ");
170  setThhighCmd->SetParameterName("Thhigh",false);
171 
172  setnbinThbackCmd = new G4UIcmdWithAnInteger("/plots/setnbinThback",this);
173  setnbinThbackCmd->SetGuidance("set nb of bins in backscattering Theta plot");
174  setnbinThbackCmd->SetParameterName("nbinThback",false);
175 
176  setThlowbackCmd = new G4UIcmdWithADoubleAndUnit("/plots/setThlowback",this);
177  setThlowbackCmd->SetGuidance("set lower limit for backscattering Theta plot ");
178  setThlowbackCmd->SetParameterName("Thlowback",false);
179 
180  setThhighbackCmd = new G4UIcmdWithADoubleAndUnit("/plots/setThhighback",this);
181  setThhighbackCmd->SetGuidance("set upper limit for backscattering Theta plot ");
182  setThhighbackCmd->SetParameterName("Thhighback",false);
183 
184  RndmDir = new G4UIdirectory("/rndm/");
185  RndmDir->SetGuidance("Rndm status control.");
186 
187  RndmSaveCmd = new G4UIcmdWithAnInteger("/rndm/save",this);
188  RndmSaveCmd->SetGuidance("set frequency to save rndm status on external files.");
189  RndmSaveCmd->SetGuidance("freq = 0 not saved");
190  RndmSaveCmd->SetGuidance("freq > 0 saved on: beginOfRun.rndm");
191  RndmSaveCmd->SetGuidance("freq = 1 saved on: endOfRun.rndm");
192  RndmSaveCmd->SetGuidance("freq = 2 saved on: endOfEvent.rndm");
193  RndmSaveCmd->SetParameterName("frequency",false);
194  RndmSaveCmd->SetRange("frequency>=0 && frequency<=2");
196 
197  RndmReadCmd = new G4UIcmdWithAString("/rndm/read",this);
198  RndmReadCmd->SetGuidance("get rndm status from an external file.");
199  RndmReadCmd->SetParameterName("fileName",true);
200  RndmReadCmd->SetDefaultValue ("beginOfRun.rndm");
202 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetUnitCategory(const char *unitCategory)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:225
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Em10RunMessenger::~Em10RunMessenger ( )

Definition at line 206 of file Em10RunMessenger.cc.

207 {
208  delete sethistNameCmd;
209 
210  delete setnbinStepCmd;
211  delete setSteplowCmd;
212  delete setStephighCmd;
213 
214  delete setnbinEnCmd;
215  delete setEnlowCmd;
216  delete setEnhighCmd;
217 
218  delete setnbinGammaCmd;
219  delete setElowGammaCmd;
220  delete setEhighGammaCmd;
221 
222  delete setnbinTtCmd;
223  delete setTtlowCmd;
224  delete setTthighCmd;
225 
226  delete setnbinTbCmd;
227  delete setTblowCmd;
228  delete setTbhighCmd;
229 
230  delete setnbinTsecCmd;
231  delete setTseclowCmd;
232  delete setTsechighCmd;
233 
234  delete setnbinRCmd;
235  delete setRlowCmd;
236  delete setRhighCmd;
237 
238  delete setnbinzvertexCmd;
239  delete setzlowCmd;
240  delete setzhighCmd;
241 
242  delete setnbinThCmd;
243  delete setThlowCmd;
244  delete setThhighCmd;
245 
246  delete setnbinThbackCmd;
247  delete setThlowbackCmd;
248  delete setThhighbackCmd;
249 
250  delete plotDir;
251 
252  delete RndmSaveCmd; delete RndmReadCmd; delete RndmDir;
253 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 257 of file Em10RunMessenger.cc.

References G4cout, G4endl, G4UIcmdWithADouble::GetNewDoubleValue(), G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4UIcmdWithAnInteger::GetNewIntValue(), CLHEP::HepRandom::restoreEngineStatus(), Em10RunAction::SetEhighGamma(), Em10RunAction::SetElowGamma(), Em10RunAction::SetEnhigh(), Em10RunAction::SetEnlow(), Em10RunAction::SethistName(), Em10RunAction::SetnbinEn(), Em10RunAction::SetnbinGamma(), Em10RunAction::SetnbinR(), Em10RunAction::SetnbinStep(), Em10RunAction::SetnbinTb(), Em10RunAction::SetnbinTh(), Em10RunAction::SetnbinThBack(), Em10RunAction::SetnbinTsec(), Em10RunAction::SetnbinTt(), Em10RunAction::Setnbinzvertex(), Em10RunAction::SetRhigh(), Em10RunAction::SetRlow(), Em10RunAction::SetRndmFreq(), Em10RunAction::SetStephigh(), Em10RunAction::SetSteplow(), Em10RunAction::SetTbhigh(), Em10RunAction::SetTblow(), Em10RunAction::SetThhigh(), Em10RunAction::SetThhighBack(), Em10RunAction::SetThlow(), Em10RunAction::SetThlowBack(), Em10RunAction::SetTsechigh(), Em10RunAction::SetTseclow(), Em10RunAction::SetTthigh(), Em10RunAction::SetTtlow(), Em10RunAction::Setzhigh(), Em10RunAction::Setzlow(), and CLHEP::HepRandom::showEngineStatus().

258 {
259  if( command == sethistNameCmd)
260  runAction
261  ->SethistName(newValues) ;
262 
263  if( command == setnbinStepCmd)
264  runAction
265  ->SetnbinStep(setnbinStepCmd->GetNewIntValue(newValues));
266 
267  if( command == setSteplowCmd)
268  runAction
269  ->SetSteplow( setSteplowCmd->GetNewDoubleValue(newValues));
270 
271  if( command == setStephighCmd)
272  runAction
273  ->SetStephigh( setStephighCmd->GetNewDoubleValue(newValues));
274 
275  if( command == setnbinEnCmd)
276  runAction
277  ->SetnbinEn(setnbinEnCmd->GetNewIntValue(newValues));
278 
279  if( command == setEnlowCmd)
280  runAction
281  ->SetEnlow( setEnlowCmd->GetNewDoubleValue(newValues));
282 
283  if( command == setEnhighCmd)
284  runAction
285  ->SetEnhigh( setEnhighCmd->GetNewDoubleValue(newValues));
286 
287  if( command == setnbinGammaCmd)
288  runAction
289  ->SetnbinGamma(setnbinGammaCmd->GetNewIntValue(newValues));
290 
291  if( command == setElowGammaCmd)
292  runAction
293  ->SetElowGamma( setElowGammaCmd->GetNewDoubleValue(newValues));
294 
295  if( command == setEhighGammaCmd)
296  runAction
297  ->SetEhighGamma( setEhighGammaCmd->GetNewDoubleValue(newValues));
298 
299  if( command == setnbinTtCmd)
300  runAction
301  ->SetnbinTt(setnbinTtCmd->GetNewIntValue(newValues));
302 
303  if( command == setTtlowCmd)
304  runAction
305  ->SetTtlow( setTtlowCmd->GetNewDoubleValue(newValues));
306 
307  if( command == setTthighCmd)
308  runAction
309  ->SetTthigh( setTthighCmd->GetNewDoubleValue(newValues));
310 
311  if( command == setnbinTbCmd)
312  runAction
313  ->SetnbinTb(setnbinTbCmd->GetNewIntValue(newValues));
314 
315  if( command == setTblowCmd)
316  runAction
317  ->SetTblow( setTblowCmd->GetNewDoubleValue(newValues));
318 
319  if( command == setTbhighCmd)
320  runAction
321  ->SetTbhigh( setTbhighCmd->GetNewDoubleValue(newValues));
322 
323  if( command == setnbinTsecCmd)
324  runAction
325  ->SetnbinTsec(setnbinTsecCmd->GetNewIntValue(newValues));
326 
327  if( command == setTseclowCmd)
328  runAction
329  ->SetTseclow( setTseclowCmd->GetNewDoubleValue(newValues));
330 
331  if( command == setTsechighCmd)
332  runAction
333  ->SetTsechigh( setTsechighCmd->GetNewDoubleValue(newValues));
334 
335  if( command == setnbinRCmd)
336  runAction
337  ->SetnbinR(setnbinRCmd->GetNewIntValue(newValues));
338 
339  if( command == setRlowCmd)
340  runAction
341  ->SetRlow( setRlowCmd->GetNewDoubleValue(newValues));
342 
343  if( command == setRhighCmd)
344  runAction
345  ->SetRhigh( setRhighCmd->GetNewDoubleValue(newValues));
346 
347  if( command == setnbinzvertexCmd)
348  runAction
349  ->Setnbinzvertex(setnbinzvertexCmd->GetNewIntValue(newValues));
350 
351  if( command == setzlowCmd)
352  runAction
353  ->Setzlow( setzlowCmd->GetNewDoubleValue(newValues));
354 
355  if( command == setzhighCmd)
356  runAction
357  ->Setzhigh( setzhighCmd->GetNewDoubleValue(newValues));
358 
359  if( command == setnbinThCmd)
360  runAction
361  ->SetnbinTh(setnbinThCmd->GetNewIntValue(newValues));
362 
363  if( command == setThlowCmd)
364  runAction
365  ->SetThlow( setThlowCmd->GetNewDoubleValue(newValues));
366 
367  if( command == setThhighCmd)
368  runAction
369  ->SetThhigh( setThhighCmd->GetNewDoubleValue(newValues));
370 
371  if( command == setnbinThbackCmd)
372  runAction
373  ->SetnbinThBack(setnbinThbackCmd->GetNewIntValue(newValues));
374 
375  if( command == setThlowbackCmd)
376  runAction
377  ->SetThlowBack( setThlowbackCmd->GetNewDoubleValue(newValues));
378 
379  if( command == setThhighbackCmd)
380  runAction
381  ->SetThhighBack( setThhighbackCmd->GetNewDoubleValue(newValues));
382 
383  if (command == RndmSaveCmd)
384  runAction->SetRndmFreq(RndmSaveCmd->GetNewIntValue(newValues));
385 
386  if (command == RndmReadCmd)
387  { G4cout << "\n---> rndm status restored from file: " << newValues << G4endl;
390  }
391 }
void SetThhigh(G4double Thhigh)
void SetEnhigh(G4double Enhigh)
void SetRndmFreq(G4int val)
void SethistName(G4String name)
void SetnbinR(G4int nbin)
static void restoreEngineStatus(const char filename[]="Config.conf")
Definition: Random.cc:180
void SetTblow(G4double Tblow)
void SetnbinTh(G4int nbin)
void SetEhighGamma(G4double Ehigh)
static G4int GetNewIntValue(const char *paramString)
void SetnbinGamma(G4int nbin)
void Setzlow(G4double z)
void SetnbinTt(G4int nbin)
static G4double GetNewDoubleValue(const char *paramString)
void SetTtlow(G4double Ttlow)
void Setzhigh(G4double z)
G4GLOB_DLL std::ostream G4cout
void SetRlow(G4double Rlow)
void SetnbinTsec(G4int nbin)
void SetTbhigh(G4double Tbhigh)
void SetnbinEn(G4int nbin)
static G4double GetNewDoubleValue(const char *paramString)
void SetnbinTb(G4int nbin)
void SetSteplow(G4double Slow)
void SetnbinStep(G4int nbin)
static void showEngineStatus()
Definition: Random.cc:203
void SetnbinThBack(G4int nbin)
void SetEnlow(G4double Elow)
void SetTthigh(G4double Tthigh)
void SetTseclow(G4double Tlow)
void SetTsechigh(G4double Thigh)
#define G4endl
Definition: G4ios.hh:61
void SetStephigh(G4double Shigh)
void Setnbinzvertex(G4int nbin)
void SetElowGamma(G4double Elow)
void SetThlowBack(G4double Thlow)
void SetRhigh(G4double Rhigh)
void SetThhighBack(G4double Thhigh)
void SetThlow(G4double Thlow)

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