#include <G4ParticlePropertyMessenger.hh>
◆ G4ParticlePropertyMessenger() [1/2]
G4ParticlePropertyMessenger::G4ParticlePropertyMessenger |
( |
G4ParticleTable * |
pTable = nullptr | ) |
|
Definition at line 46 of file G4ParticlePropertyMessenger.cc.
48 : theParticleTable(pTable)
49{
50 if ( theParticleTable == nullptr)
52
53
55 thisDirectory->
SetGuidance(
"Particle Table control commands.");
56
57
60
61
64 stableCmd->
SetGuidance(
" false: Unstable true: Stable");
67
68
71 lifetimeCmd->
SetGuidance(
"Unit of the time can be :");
76
77
80
81
83 verboseCmd->
SetGuidance(
"Set Verbose level of particle property.");
85 verboseCmd->
SetGuidance(
" 1 : Display warning messages");
89 verboseCmd->
SetRange(
"verbose_level >=0");
90
91
93}
static G4ParticleTable * GetParticleTable()
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4double defVal)
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)
◆ ~G4ParticlePropertyMessenger()
G4ParticlePropertyMessenger::~G4ParticlePropertyMessenger |
( |
| ) |
|
|
virtual |
Definition at line 95 of file G4ParticlePropertyMessenger.cc.
96{
97 delete fDecayTableMessenger;
98 fDecayTableMessenger = nullptr;
99
100 delete stableCmd;
101 delete verboseCmd;
102 delete lifetimeCmd;
103 delete dumpCmd;
104 delete thisDirectory;
105}
◆ G4ParticlePropertyMessenger() [2/2]
◆ GetCurrentValue()
Reimplemented from G4UImessenger.
Definition at line 176 of file G4ParticlePropertyMessenger.cc.
177{
179
180 if ( SetCurrentParticle() == nullptr )
181 {
182 return returnValue;
183 }
184
185 if( command == stableCmd )
186 {
187
189 }
190 else if( command == lifetimeCmd )
191 {
192
194 }
195 else if( command==verboseCmd )
196 {
197
199 }
200
201 return returnValue;
202}
G4bool GetPDGStable() const
G4int GetVerboseLevel() const
G4double GetPDGLifeTime() const
static G4String ConvertToString(G4bool boolVal)
◆ operator=()
◆ SetNewValue()
Reimplemented from G4UImessenger.
Definition at line 107 of file G4ParticlePropertyMessenger.cc.
109{
110 if (SetCurrentParticle() == nullptr)
111 {
112 G4cout <<
"Particle is not selected yet !! Command ignored." <<
G4endl;
113 return;
114 }
115
116 if( command == dumpCmd )
117 {
118
120
121 }
122 else if (command == lifetimeCmd )
123 {
124
126
127 }
128 else if (command == stableCmd )
129 {
130
132 {
133 G4cout <<
"Life time is negative! Command ignored." <<
G4endl;
134 }
136 {
138 }
139 else
140 {
142 }
143
144 }
145 else if( command==verboseCmd )
146 {
147
149 }
150}
G4GLOB_DLL std::ostream G4cout
G4double GetPDGMass() const
void SetPDGStable(const G4bool aFlag)
void SetVerboseLevel(G4int value)
void SetPDGLifeTime(G4double aLifeTime)
static G4bool GetNewBoolValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4int GetNewIntValue(const char *paramString)
The documentation for this class was generated from the following files: