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

#include <CCalPrimaryGeneratorMessenger.hh>

Inheritance diagram for CCalPrimaryGeneratorMessenger:
G4UImessenger

Public Member Functions

 CCalPrimaryGeneratorMessenger (CCalPrimaryGeneratorAction *myGun)
 
 ~CCalPrimaryGeneratorMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
- 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 44 of file CCalPrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

CCalPrimaryGeneratorMessenger::CCalPrimaryGeneratorMessenger ( CCalPrimaryGeneratorAction myGun)

Definition at line 43 of file CCalPrimaryGeneratorMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_Idle, G4State_PreInit, python.hepunit::pi, G4UIcmdWithAString::SetCandidates(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithAString::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithADouble::SetParameterName(), and G4UIcmdWithADoubleAndUnit::SetParameterName().

43  : myAction(myGun) {
44 
45  verboseCmd = new G4UIcmdWithAnInteger("/CCal/generator/verbose",this);
46  verboseCmd->SetGuidance("set Verbosity level ");
47  verboseCmd->SetParameterName("value",true);
48  verboseCmd->SetDefaultValue(0);
50 
51  rndmCmd = new G4UIcmdWithAString("/CCal/generator/random",this);
52  rndmCmd->SetGuidance("Choose randomly energy and direction of the incident particle.");
53  rndmCmd->SetGuidance(" Choice : on,off(default)");
54  rndmCmd->SetParameterName("choice",true);
55  rndmCmd->SetDefaultValue("off");
56  rndmCmd->SetCandidates("on off ON OFF");
58 
59  scanCmd = new G4UIcmdWithAString("/CCal/generator/scan",this);
60  scanCmd->SetGuidance("Scan eta and phi ranges with single incident particle");
61  scanCmd->SetGuidance(" Choice : on,off(default)");
62  scanCmd->SetGuidance(" Ranges : etamin/max, phimin/max are set by other commands ");
63  scanCmd->SetParameterName("choice",true);
64  scanCmd->SetDefaultValue("off");
65  scanCmd->SetCandidates("on off ON OFF");
67 
68  minEnergyCmd = new G4UIcmdWithADoubleAndUnit("/CCal/generator/minEnergy",this);
69  minEnergyCmd->SetGuidance("Set minimum Energy for the incident particle.");
70  minEnergyCmd->SetParameterName("value",true);
71  minEnergyCmd->SetDefaultValue(1.);
72  minEnergyCmd->SetDefaultUnit("GeV");
74 
75  maxEnergyCmd = new G4UIcmdWithADoubleAndUnit("/CCal/generator/maxEnergy",this);
76  maxEnergyCmd->SetGuidance("Set maximum Energy for the incident particle.");
77  maxEnergyCmd->SetParameterName("value",true);
78  maxEnergyCmd->SetDefaultValue(1.);
79  maxEnergyCmd->SetDefaultUnit("TeV");
81 
82  minPhiCmd = new G4UIcmdWithADoubleAndUnit("/CCal/generator/minPhi",this);
83  minPhiCmd->SetGuidance("Set minimum Phi angle for the incident particle direction");
84  minPhiCmd->SetGuidance(" Choice : from 0 to 2*pi ");
85  minPhiCmd->SetParameterName("value",true);
86  minPhiCmd->SetDefaultValue(0);
87  minPhiCmd->SetDefaultUnit("radian");
89 
90  maxPhiCmd = new G4UIcmdWithADoubleAndUnit("/CCal/generator/maxPhi",this);
91  maxPhiCmd->SetGuidance("Set maximum Phi angle for the incident particle direction");
92  maxPhiCmd->SetGuidance(" Choice : from 0 to 2*pi ");
93  maxPhiCmd->SetParameterName("value",true);
94  maxPhiCmd->SetDefaultValue(2.*pi);
95  maxPhiCmd->SetDefaultUnit("radian");
97 
98  stepsPhiCmd = new G4UIcmdWithAnInteger("/CCal/generator/stepsPhi",this);
99  stepsPhiCmd->SetGuidance("number of steps along Phi for scan ");
100  stepsPhiCmd->SetParameterName("value",true);
101  stepsPhiCmd->SetDefaultValue(1);
103 
104  minEtaCmd = new G4UIcmdWithADouble("/CCal/generator/minEta",this);
105  minEtaCmd->SetGuidance("Set minimum Eta angle for the incident particle direction");
106  minEtaCmd->SetGuidance(" Choice : from 0 to infinity");
107  minEtaCmd->SetParameterName("value",true);
108  minEtaCmd->SetDefaultValue(0);
110 
111  maxEtaCmd = new G4UIcmdWithADouble("/CCal/generator/maxEta",this);
112  maxEtaCmd->SetGuidance("Set maximum Eta angle for the incident particle direction");
113  maxEtaCmd->SetGuidance(" Choice : from 0 to infinity");
114  maxEtaCmd->SetParameterName("value",true);
115  maxEtaCmd->SetDefaultValue(3.5);
117 
118  stepsEtaCmd = new G4UIcmdWithAnInteger("/CCal/generator/stepsEta",this);
119  stepsEtaCmd->SetGuidance("number of steps along Eta for scan ");
120  stepsEtaCmd->SetParameterName("value",true);
121  stepsEtaCmd->SetDefaultValue(1);
123 
124  runNoCmd = new G4UIcmdWithAnInteger("/CCal/generator/runNo",this);
125  runNoCmd->SetGuidance("set the run number ");
126  runNoCmd->SetParameterName("value",true);
127  runNoCmd->SetDefaultValue(0);
129 
130 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
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 SetDefaultUnit(const char *defUnit)
void SetDefaultValue(G4double defVal)
void SetCandidates(const char *candidateList)
void SetDefaultValue(G4int defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
CCalPrimaryGeneratorMessenger::~CCalPrimaryGeneratorMessenger ( )

Definition at line 132 of file CCalPrimaryGeneratorMessenger.cc.

132  {
133 
134  if (verboseCmd)
135  delete verboseCmd;
136  if (scanCmd)
137  delete rndmCmd;
138  if (scanCmd)
139  delete scanCmd;
140  if (minEnergyCmd)
141  delete minEnergyCmd;
142  if (maxEnergyCmd)
143  delete maxEnergyCmd;
144  if (minPhiCmd)
145  delete minPhiCmd;
146  if (maxPhiCmd)
147  delete maxPhiCmd;
148  if (stepsPhiCmd)
149  delete stepsPhiCmd;
150  if (minEtaCmd)
151  delete minEtaCmd;
152  if (maxEtaCmd)
153  delete maxEtaCmd;
154  if (stepsEtaCmd)
155  delete stepsEtaCmd;
156  if (runNoCmd)
157  delete runNoCmd;
158 
159 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 161 of file CCalPrimaryGeneratorMessenger.cc.

References G4UIcmdWithADouble::GetNewDoubleValue(), G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4UIcmdWithAnInteger::GetNewIntValue(), CCalPrimaryGeneratorAction::SetMaximumEnergy(), CCalPrimaryGeneratorAction::SetMaximumEta(), CCalPrimaryGeneratorAction::SetMaximumPhi(), CCalPrimaryGeneratorAction::SetMinimumEnergy(), CCalPrimaryGeneratorAction::SetMinimumEta(), CCalPrimaryGeneratorAction::SetMinimumPhi(), CCalPrimaryGeneratorAction::SetRandom(), CCalPrimaryGeneratorAction::SetRunNo(), CCalPrimaryGeneratorAction::SetScan(), CCalPrimaryGeneratorAction::SetStepsEta(), CCalPrimaryGeneratorAction::SetStepsPhi(), and CCalPrimaryGeneratorAction::SetVerboseLevel().

162  {
163  if (command == verboseCmd)
164  myAction->SetVerboseLevel(verboseCmd->GetNewIntValue(newValues));
165  else if (command == rndmCmd)
166  myAction->SetRandom(newValues);
167  else if (command == scanCmd)
168  myAction->SetScan(newValues);
169  else if (command == minEnergyCmd)
170  myAction->SetMinimumEnergy(minEnergyCmd->GetNewDoubleValue(newValues));
171  else if (command == maxEnergyCmd)
172  myAction->SetMaximumEnergy(maxEnergyCmd->GetNewDoubleValue(newValues));
173  else if (command == minPhiCmd)
174  myAction->SetMinimumPhi(minPhiCmd->GetNewDoubleValue(newValues));
175  else if (command == maxPhiCmd)
176  myAction->SetMaximumPhi(maxPhiCmd->GetNewDoubleValue(newValues));
177  else if (command == stepsPhiCmd)
178  myAction->SetStepsPhi(stepsPhiCmd->GetNewIntValue(newValues));
179  else if (command == minEtaCmd)
180  myAction->SetMinimumEta(minEtaCmd->GetNewDoubleValue(newValues));
181  else if (command == maxEtaCmd)
182  myAction->SetMaximumEta(maxEtaCmd->GetNewDoubleValue(newValues));
183  else if (command == stepsEtaCmd)
184  myAction->SetStepsEta(stepsEtaCmd->GetNewIntValue(newValues));
185  else if (command == runNoCmd)
186  myAction->SetRunNo(runNoCmd->GetNewIntValue(newValues));
187 
188 }
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)

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