#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 155 of file G4ParticlePropertyMessenger.cc.
156{
158
160 if ( currentParticle == nullptr )
161 {
162 return returnValue;
163 }
164
165 if( command == stableCmd )
166 {
167
169 }
170 else if( command == lifetimeCmd )
171 {
172
174 }
175 else if( command==verboseCmd )
176 {
177
179 }
180
181 return returnValue;
182}
G4bool GetPDGStable() const
G4int GetVerboseLevel() const
G4double GetPDGLifeTime() const
const G4ParticleDefinition * GetSelectedParticle() const
static G4String ConvertToString(G4bool boolVal)
◆ operator=()
◆ SetNewValue()
Reimplemented from G4UImessenger.
Definition at line 107 of file G4ParticlePropertyMessenger.cc.
109{
112
113 if (currentParticle == nullptr)
114 {
115 G4cout <<
"Particle is not selected yet !! Command ignored." <<
G4endl;
116 return;
117 }
118
119 if( command == dumpCmd )
120 {
121
123
124 }
125 else if (command == lifetimeCmd )
126 {
127
129
130 }
131 else if (command == stableCmd )
132 {
133
135 {
136 G4cout <<
"Life time is negative! Command ignored." <<
G4endl;
137 }
139 {
141 }
142 else
143 {
145 }
146
147 }
148 else if( command==verboseCmd )
149 {
150
152 }
153}
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: