#include <G4ParticleMessenger.hh>
Definition at line 75 of file G4ParticleMessenger.hh.
◆ G4ParticleMessenger() [1/2]
G4ParticleMessenger::G4ParticleMessenger |
( |
G4ParticleTable * |
pTable = nullptr | ) |
|
Definition at line 46 of file G4ParticleMessenger.cc.
47{
48
49 if ( pTable == nullptr)
50 {
52 }
53 else
54 {
55 theParticleTable = pTable;
56 }
57
58
60 thisDirectory->
SetGuidance(
"Particle control commands.");
61
62
68
69
72 listCmd->
SetGuidance(
" all(default)/lepton/baryon/meson/nucleus/quarks");
75 listCmd->
SetCandidates(
"all lepton baryon meson nucleus quarks");
77
78
84
85
87 createAllIonCmd->
SetGuidance(
"Create All ions (ground state)");
90
91
93 createAllIsomerCmd->
SetGuidance(
"Create All isomers");
96
97
99 verboseCmd->
SetGuidance(
"Set Verbose level of particle table.");
101 verboseCmd->
SetGuidance(
" 1 : Display warning messages");
105 verboseCmd->
SetRange(
"verbose_level >=0");
106
107
109}
static G4ParticleTable * GetParticleTable()
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
void SetToBeBroadcasted(G4bool val)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)
◆ ~G4ParticleMessenger()
G4ParticleMessenger::~G4ParticleMessenger |
( |
| ) |
|
|
virtual |
Definition at line 112 of file G4ParticleMessenger.cc.
113{
114 delete fParticlePropertyMessenger;
115
116 delete listCmd;
117 delete selectCmd;
118 delete findCmd;
119 delete createAllIonCmd;
120 delete createAllIsomerCmd;
121 delete verboseCmd;
122
123 delete thisDirectory;
124}
◆ G4ParticleMessenger() [2/2]
◆ GetCurrentValue()
Reimplemented from G4UImessenger.
Definition at line 206 of file G4ParticleMessenger.cc.
207{
208 if( command==selectCmd )
209 {
210
211
214 piter -> reset();
215 while( (*piter)() )
216 {
219 }
221
222 static const G4String noName(
"none");
223
224 if(currentParticle == nullptr)
225 {
226
227 return noName;
228 }
229 else
230 {
232 }
233 }
234 else if( command==verboseCmd )
235 {
236
238 }
239 return "";
240}
const G4String & GetParticleName() const
G4int GetVerboseLevel() const
G4PTblDicIterator * GetIterator() const
static G4String ConvertToString(G4bool boolVal)
◆ operator=()
◆ SetNewValue()
Reimplemented from G4UImessenger.
Definition at line 127 of file G4ParticleMessenger.cc.
128{
129 if( command==listCmd )
130 {
131
134 piter -> reset();
135
136 while( (*piter)() )
137 {
140 {
142 if ((counter++)%4 == 3)
143 {
145 }
146 else
147 {
149 }
150 }
151 }
153 if (counter == 0) {
G4cout << newValues <<
" is not found " <<
G4endl; }
154
155
156
158 piter -> reset();
159 while( (*piter)() )
160 {
163 }
165
166 }
167 else if( command==selectCmd )
168 {
169
171 }
172 else if( command==findCmd )
173 {
174
177 if(tmp == nullptr)
178 {
179 G4cout <<
"Unknown particle [" << newValues <<
"]. Command ignored."
181 }
182 else
183 {
186 }
187 }
188 else if( command==createAllIonCmd )
189 {
190
192 }
193 else if( command==createAllIsomerCmd )
194 {
195
197 }
198 else if( command==verboseCmd )
199 {
200
202 }
203}
G4GLOB_DLL std::ostream G4cout
const G4String & GetParticleType() const
G4IonTable * GetIonTable() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetVerboseLevel(G4int value)
void SelectParticle(const G4String &name)
static G4int GetNewIntValue(const char *paramString)
The documentation for this class was generated from the following files: