Geant4-11
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4UserPhysicsListMessenger Class Reference

#include <G4UserPhysicsListMessenger.hh>

Inheritance diagram for G4UserPhysicsListMessenger:
G4UImessenger

Public Member Functions

G4bool CommandsShouldBeInMaster () const
 
 G4UserPhysicsListMessenger (G4VUserPhysicsList *pParticleList)
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator!= (const G4UImessenger &messenger) const
 
G4bool operator== (const G4UImessenger &messenger) const
 
virtual void SetNewValue (G4UIcommand *command, G4String newValues)
 
virtual ~G4UserPhysicsListMessenger ()
 

Protected Member Functions

void AddUIcommand (G4UIcommand *newCommand)
 
G4String BtoS (G4bool b)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
G4String DtoS (G4double a)
 
G4String ItoS (G4int i)
 
G4bool StoB (G4String s)
 
G4double StoD (G4String s)
 
G4int StoI (G4String s)
 
G4long StoL (G4String s)
 

Protected Attributes

G4UIdirectorybaseDir = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 
G4VUserPhysicsListthePhysicsList = nullptr
 

Private Member Functions

 G4UserPhysicsListMessenger ()
 

Private Attributes

G4UIcmdWithAStringaddProcManCmd = nullptr
 
G4UIcommandapplyCutsCmd = nullptr
 
G4UIcmdWithAnIntegerasciiCmd = nullptr
 
G4UIcmdWithAStringbuildPTCmd = nullptr
 
G4UIcmdWithAStringdumpCutValuesCmd = nullptr
 
G4UIcmdWithoutParameterdumpListCmd = nullptr
 
G4UIcmdWithAnIntegerdumpOrdParamCmd = nullptr
 
G4UIcmdWithAStringgetCutForAGivenParticleCmd = nullptr
 
G4UIcmdWithAStringretrieveCmd = nullptr
 
G4UIcmdWithADoubleAndUnitsetCutCmd = nullptr
 
G4UIcommandsetCutForAGivenParticleCmd = nullptr
 
G4UIcommandsetCutRCmd = nullptr
 
G4UIcmdWithAStringstoreCmd = nullptr
 
G4UIdirectorytheDirectory = nullptr
 
G4UIcmdWithAnIntegerverboseCmd = nullptr
 

Detailed Description

Definition at line 63 of file G4UserPhysicsListMessenger.hh.

Constructor & Destructor Documentation

◆ G4UserPhysicsListMessenger() [1/2]

G4UserPhysicsListMessenger::G4UserPhysicsListMessenger ( G4VUserPhysicsList pParticleList)

Definition at line 48 of file G4UserPhysicsListMessenger.cc.

50 : thePhysicsList(pParticleList)
51{
52 G4UIparameter* param = nullptr;
53 // /run/particle directory
54 theDirectory = new G4UIdirectory("/run/particle/");
55 theDirectory->SetGuidance("Commands for G4VUserPhysicsList.");
56
57 // /run/particle/Verbose command
58 verboseCmd = new G4UIcmdWithAnInteger("/run/particle/verbose", this);
59 verboseCmd->SetGuidance("Set the Verbose level of G4VUserPhysicsList.");
60 verboseCmd->SetGuidance(" 0 : Silent (default)");
61 verboseCmd->SetGuidance(" 1 : Display warning messages");
62 verboseCmd->SetGuidance(" 2 : Display more");
63 verboseCmd->SetParameterName("level", true);
65 verboseCmd->SetRange("level >=0 && level <=3");
66
67 // /run/setCut command
68 setCutCmd = new G4UIcmdWithADoubleAndUnit("/run/setCut", this);
69 setCutCmd->SetGuidance("Set default cut value ");
70 setCutCmd->SetParameterName("cut", false);
72 setCutCmd->SetRange("cut >=0.0");
75
76 // /run/setCutForAGivenParticle command
78 new G4UIcommand("/run/setCutForAGivenParticle", this);
80 "Set a cut value to a specific particle ");
82 "Usage: /run/setCutForAGivenParticle gamma 1. mm");
83 param = new G4UIparameter("particleName", 's', false);
84 param->SetParameterCandidates("e- e+ gamma proton");
86 param = new G4UIparameter("cut", 'd', false);
87 param->SetDefaultValue("1.");
88 param->SetParameterRange("cut>=0.0");
90 param = new G4UIparameter("unit", 's', false);
91 param->SetDefaultUnit("mm");
94
95 // /run/getCutForAGivenParticle command
97 new G4UIcmdWithAString("/run/getCutForAGivenParticle", this);
99 "Get a cut value to a specific particle ");
101 "Usage: /run/getCutForAGivenParticle gamma ");
102 getCutForAGivenParticleCmd->SetParameterName("particleName", false, false);
103 getCutForAGivenParticleCmd->SetCandidates("e- e+ gamma proton");
106
107 // /run/setCutForRegion command
108 setCutRCmd = new G4UIcommand("/run/setCutForRegion", this);
109 setCutRCmd->SetGuidance("Set cut value for a region");
110 param = new G4UIparameter("Region", 's', false);
111 setCutRCmd->SetParameter(param);
112 param = new G4UIparameter("cut", 'd', false);
113 param->SetParameterRange("cut >=0.0");
114 setCutRCmd->SetParameter(param);
115 param = new G4UIparameter("Unit", 's', true);
116 param->SetDefaultValue("mm");
119 setCutRCmd->SetParameter(param);
121
122 // /run/particle/DumpList command
123 dumpListCmd = new G4UIcmdWithoutParameter("/run/particle/dumpList", this);
124 dumpListCmd->SetGuidance("Dump List of particles in G4VUserPhysicsList. ");
125
126 // /run/particle/addProcManager command
127 addProcManCmd = new G4UIcmdWithAString("/run/particle/addProcManager", this);
129 addProcManCmd->SetGuidance("add process manager to specified particle type");
130 addProcManCmd->SetParameterName("particleType", true);
134
135 // /run/particle/buildPhysicsTable command
136 buildPTCmd = new G4UIcmdWithAString("/run/particle/buildPhysicsTable", this);
137 buildPTCmd->SetGuidance("build physics table of specified particle type");
138 buildPTCmd->SetParameterName("particleType", true);
142
143 // /run/particle/storePhysicsTable command
144 storeCmd = new G4UIcmdWithAString("/run/particle/storePhysicsTable", this);
145 storeCmd->SetGuidance("Store Physics Table");
146 storeCmd->SetGuidance(" Enter directory name");
147 storeCmd->SetParameterName("dirName", true);
150
151 // /run/particle/retrievePhysicsTable command
153 new G4UIcmdWithAString("/run/particle/retrievePhysicsTable", this);
154 retrieveCmd->SetGuidance("Retrieve Physics Table");
155 retrieveCmd->SetGuidance(" Enter directory name or OFF to switch off");
156 retrieveCmd->SetParameterName("dirName", true);
159
160 // /run/particle/setStoredInAscii command
161 asciiCmd = new G4UIcmdWithAnInteger("/run/particle/setStoredInAscii", this);
163 "Switch on/off ascii mode in store/retrieve Physics Table");
164 asciiCmd->SetGuidance(" Enter 0(binary) or 1(ascii)");
165 asciiCmd->SetParameterName("ascii", true);
168 asciiCmd->SetRange("ascii ==0 || ascii ==1");
169
170 // Commnad /run/particle/applyCuts command
171 applyCutsCmd = new G4UIcommand("/run/particle/applyCuts", this);
172 applyCutsCmd->SetGuidance("Set applyCuts flag for a particle.");
174 " Some EM processes which do not have infrared divergence");
176 "may generate gamma, e- and/or e+ with kinetic energies");
178 "below the production threshold. By setting this flag,");
180 "such secondaries below threshold are eliminated and");
182 "kinetic energies of such secondaries are accumulated");
183 applyCutsCmd->SetGuidance("to the energy deposition of their mother.");
185 " Note that 'applyCuts' makes sense only for gamma,");
187 "e- and e+. If this command is issued for other particle,");
189 "a warning message is displayed and the command is");
190 applyCutsCmd->SetGuidance("ignored.");
192 " If particle name is 'all', this command affects on");
193 applyCutsCmd->SetGuidance("gamma, e- and e+.");
194 param = new G4UIparameter("Flag", 's', true);
195 param->SetDefaultValue("true");
197 param = new G4UIparameter("Particle", 's', true);
198 param->SetDefaultValue("all");
201
202 // /run/particle/dumpCutValues command
204 new G4UIcmdWithAString("/run/particle/dumpCutValues", this);
206 "Dump a list of production threshold values in range and energy");
207 dumpCutValuesCmd->SetGuidance("for all registered material-cuts-couples.");
209 "Dumping a list takes place when you issue 'beamOn' and");
211 "actual conversion tables from range to energy are available.");
213 "If you want a list 'immediately', use '/run/dumpRegion' for threshold");
215 "list given in range only. Also, '/run/dumpCouples' gives you the");
217 "current list if you have already issued 'run/beamOn' at least once.");
218 dumpCutValuesCmd->SetParameterName("particle", true);
221
222 // /run/particle/dumpCutValues command
224 new G4UIcmdWithAnInteger("/run/particle/dumpOrderingParam", this);
225 dumpOrdParamCmd->SetGuidance("Dump a list of ordering parameter ");
226 dumpOrdParamCmd->SetParameterName("subtype", true);
230}
@ G4State_EventProc
@ G4State_Init
@ G4State_Idle
@ G4State_GeomClosed
@ G4State_PreInit
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
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)
Definition: G4UIcommand.hh:172
static G4String CategoryOf(const char *unitName)
Definition: G4UIcommand.cc:371
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:146
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
static G4String UnitsList(const char *unitCategory)
Definition: G4UIcommand.cc:377
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:288
void SetDefaultValue(const char *theDefaultValue)
void SetParameterRange(const char *theRange)
void SetParameterCandidates(const char *theString)
void SetDefaultUnit(const char *theDefaultUnit)
G4UIcmdWithAnInteger * dumpOrdParamCmd
G4UIcmdWithAString * getCutForAGivenParticleCmd
G4UIcmdWithoutParameter * dumpListCmd
G4UIcmdWithADoubleAndUnit * setCutCmd

References addProcManCmd, applyCutsCmd, asciiCmd, G4UIcommand::AvailableForStates(), buildPTCmd, G4UIcommand::CategoryOf(), dumpCutValuesCmd, dumpListCmd, dumpOrdParamCmd, G4State_EventProc, G4State_GeomClosed, G4State_Idle, G4State_Init, G4State_PreInit, getCutForAGivenParticleCmd, retrieveCmd, G4UIcmdWithAString::SetCandidates(), setCutCmd, setCutForAGivenParticleCmd, setCutRCmd, G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIparameter::SetDefaultUnit(), G4UIcmdWithAString::SetDefaultValue(), G4UIparameter::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcommand::SetParameter(), G4UIparameter::SetParameterCandidates(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithAString::SetParameterName(), G4UIparameter::SetParameterRange(), G4UIcommand::SetRange(), G4UIcommand::SetToBeBroadcasted(), storeCmd, theDirectory, G4UIcommand::UnitsList(), and verboseCmd.

◆ ~G4UserPhysicsListMessenger()

G4UserPhysicsListMessenger::~G4UserPhysicsListMessenger ( )
virtual

◆ G4UserPhysicsListMessenger() [2/2]

G4UserPhysicsListMessenger::G4UserPhysicsListMessenger ( )
inlineprivate

Definition at line 79 of file G4UserPhysicsListMessenger.hh.

79{}

Member Function Documentation

◆ AddUIcommand()

void G4UImessenger::AddUIcommand ( G4UIcommand newCommand)
protectedinherited

Definition at line 149 of file G4UImessenger.cc.

150{
151 G4cerr << "Warning : Old style definition of G4UIcommand <"
152 << newCommand->GetCommandPath() << ">." << G4endl;
153}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:136

References G4cerr, G4endl, and G4UIcommand::GetCommandPath().

◆ BtoS()

G4String G4UImessenger::BtoS ( G4bool  b)
protectedinherited

Definition at line 98 of file G4UImessenger.cc.

99{
100 G4String vl = "0";
101 if(b)
102 vl = "true";
103 return vl;
104}

◆ CommandsShouldBeInMaster()

G4bool G4UImessenger::CommandsShouldBeInMaster ( ) const
inlineinherited

Definition at line 77 of file G4UImessenger.hh.

78 {
80 }
G4bool commandsShouldBeInMaster

References G4UImessenger::commandsShouldBeInMaster.

Referenced by G4UIcommand::G4UIcommandCommonConstructorCode().

◆ CreateCommand()

template<typename T >
T * G4UImessenger::CreateCommand ( const G4String cname,
const G4String dsc 
)
protectedinherited

Definition at line 110 of file G4UImessenger.hh.

111{
112 G4String path;
113 if(cname[0] != '/')
114 {
115 path = baseDirName + cname;
116 if(path[0] != '/')
117 path = "/" + path;
118 }
119
120 T* command = new T(path.c_str(), this);
121 command->SetGuidance(dsc.c_str());
122
123 return command;
124}
G4String baseDirName

References G4UImessenger::baseDirName.

◆ CreateDirectory()

void G4UImessenger::CreateDirectory ( const G4String path,
const G4String dsc,
G4bool  commandsToBeBroadcasted = true 
)
protectedinherited

Definition at line 156 of file G4UImessenger.cc.

158{
160
161 G4String fullpath = path;
162 if(fullpath.back() != '/')
163 fullpath.append("/");
164
165 G4UIcommandTree* tree = ui->GetTree()->FindCommandTree(fullpath.c_str());
166 if(tree != nullptr)
167 {
168 baseDirName = tree->GetPathName();
169 }
170 else
171 {
172 baseDir = new G4UIdirectory(fullpath.c_str(), commandsToBeBroadcasted);
173 baseDirName = fullpath;
174 baseDir->SetGuidance(dsc.c_str());
175 }
176}
const G4String & GetPathName() const
G4UIcommandTree * FindCommandTree(const char *commandPath)
G4UIcommandTree * GetTree() const
Definition: G4UImanager.hh:186
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
G4UIdirectory * baseDir

References G4UImessenger::baseDir, G4UImessenger::baseDirName, G4UIcommandTree::FindCommandTree(), G4UIcommandTree::GetPathName(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), and G4UIcommand::SetGuidance().

Referenced by G4MoleculeShootMessenger::G4MoleculeShootMessenger(), and G4UImessenger::G4UImessenger().

◆ DtoS()

G4String G4UImessenger::DtoS ( G4double  a)
protectedinherited

Definition at line 90 of file G4UImessenger.cc.

91{
92 std::ostringstream os;
93 os << a;
94 return G4String(os.str());
95}

Referenced by G4ScoreQuantityMessenger::FilterCommands(), and G4UIcontrolMessenger::SetNewValue().

◆ GetCurrentValue()

G4String G4UserPhysicsListMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 382 of file G4UserPhysicsListMessenger.cc.

383{
384 G4String cv;
385 G4String candidates("none");
387
388 if(command == setCutCmd)
389 {
391 }
392 else if(command == verboseCmd)
393 {
395 }
396 else if(command == addProcManCmd)
397 {
398 // set candidate list
399 piter->reset();
400 while((*piter)())
401 {
402 G4ParticleDefinition* particle = piter->value();
403 candidates += " " + particle->GetParticleName();
404 }
405 addProcManCmd->SetCandidates(candidates);
406 cv = "";
407 }
408 else if(command == buildPTCmd)
409 {
410 // set candidate list
411 piter->reset();
412 while((*piter)())
413 {
414 G4ParticleDefinition* particle = piter->value();
415 candidates += " " + particle->GetParticleName();
416 }
417 addProcManCmd->SetCandidates(candidates);
418 cv = "";
419 }
420 else if(command == storeCmd)
421 {
423 }
424 else if(command == retrieveCmd)
425 {
427 {
429 }
430 else
431 {
432 cv = "OFF";
433 }
434 }
435 else if(command == asciiCmd)
436 {
438 {
439 cv = "1";
440 }
441 else
442 {
443 cv = "0";
444 }
445 }
446
447 return cv;
448}
const G4String & GetParticleName() const
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:445
G4bool IsStoredInAscii() const
G4int GetVerboseLevel() const
const G4String & GetPhysicsTableDirectory() const
G4bool IsPhysicsTableRetrieved() const
G4double GetDefaultCutValue() const

References addProcManCmd, asciiCmd, buildPTCmd, G4UIcommand::ConvertToString(), G4VUserPhysicsList::GetDefaultCutValue(), G4ParticleTable::GetIterator(), G4ParticleDefinition::GetParticleName(), G4ParticleTable::GetParticleTable(), G4VUserPhysicsList::GetPhysicsTableDirectory(), G4VUserPhysicsList::GetVerboseLevel(), G4VUserPhysicsList::IsPhysicsTableRetrieved(), G4VUserPhysicsList::IsStoredInAscii(), retrieveCmd, G4UIcmdWithAString::SetCandidates(), setCutCmd, storeCmd, thePhysicsList, and verboseCmd.

◆ ItoS()

G4String G4UImessenger::ItoS ( G4int  i)
protectedinherited

Definition at line 82 of file G4UImessenger.cc.

83{
84 std::ostringstream os;
85 os << i;
86 return G4String(os.str());
87}

Referenced by G4GenericMessenger::DeclareMethod(), and G4ParticleGunMessenger::GetCurrentValue().

◆ operator!=()

G4bool G4UImessenger::operator!= ( const G4UImessenger messenger) const
inherited

Definition at line 76 of file G4UImessenger.cc.

77{
78 return this != &messenger;
79}

◆ operator==()

G4bool G4UImessenger::operator== ( const G4UImessenger messenger) const
inherited

Definition at line 70 of file G4UImessenger.cc.

71{
72 return this == &messenger;
73}

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 253 of file G4UserPhysicsListMessenger.cc.

255{
257 if(command == setCutCmd)
258 {
259 G4double newCut = setCutCmd->GetNewDoubleValue(newValue);
262 }
263 else if(command == setCutForAGivenParticleCmd)
264 {
265 G4String particleName, unit;
266 G4double cut;
267 std::istringstream str(newValue);
268 str >> particleName >> cut >> unit;
269 thePhysicsList->SetCutValue(cut * G4UIcommand::ValueOf(unit), particleName);
270 }
271 else if(command == getCutForAGivenParticleCmd)
272 {
273 G4cout << thePhysicsList->GetCutValue(newValue) / mm << "[mm]" << G4endl;
274 }
275 else if(command == setCutRCmd)
276 {
277 std::istringstream is(newValue);
278 G4String regName;
279 G4String uniName;
280 G4double cVal = -1.0;
281 is >> regName >> cVal >> uniName;
282 if(is.fail())
283 {
284 ed << "illegal arguments : " << newValue;
285 command->CommandFailed(ed);
286 return;
287 }
289 regName);
290 }
291 else if(command == verboseCmd)
292 {
294 }
295 else if(command == dumpListCmd)
296 {
298 }
299 else if(command == dumpOrdParamCmd)
300 {
301 G4int stype = dumpOrdParamCmd->GetNewIntValue(newValue);
303 stype);
304 }
305 else if(command == addProcManCmd)
306 {
307 G4ParticleDefinition* particle =
308 (G4ParticleTable::GetParticleTable())->FindParticle(newValue);
309 if(particle == nullptr)
310 {
311 ed << " Particle is not found : " << newValue;
312 command->CommandFailed(ed);
313 return;
314 }
315 else if(particle->GetProcessManager() != nullptr)
316 {
317 ed << " Particle is not initialized : " << newValue;
318 command->CommandFailed(ed);
319 return;
320 }
322 }
323 else if(command == buildPTCmd)
324 {
325 G4ParticleDefinition* particle =
326 (G4ParticleTable::GetParticleTable())->FindParticle(newValue);
327 if(particle == nullptr)
328 {
329 ed << " Particle is not found : " << newValue;
330 command->CommandFailed(ed);
331 return;
332 }
335 }
336 else if(command == storeCmd)
337 {
339 }
340 else if(command == retrieveCmd)
341 {
342 if((newValue == "OFF") || (newValue == "off"))
343 {
345 }
346 else
347 {
349 }
350 }
351 else if(command == asciiCmd)
352 {
353 if(asciiCmd->GetNewIntValue(newValue) == 0)
354 {
356 }
357 else
358 {
360 }
361 }
362 else if(command == applyCutsCmd)
363 {
364 G4Tokenizer next(newValue);
365
366 // check 1st argument
367 G4String temp = G4String(next());
368 G4bool flag = (temp == "true" || temp == "TRUE");
369
370 // check 2nd argument
371 G4String name = G4String(next());
372
374 }
375 else if(command == dumpCutValuesCmd)
376 {
378 }
379}
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
static constexpr double mm
Definition: G4SIunits.hh:95
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
static G4PhysicsListHelper * GetPhysicsListHelper()
void DumpOrdingParameterTable(G4int subType=-1) const
static G4double GetNewDoubleValue(const char *paramString)
static G4int GetNewIntValue(const char *paramString)
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:363
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
Definition: G4UIcommand.hh:179
G4double GetCutValue(const G4String &pname) const
void SetDefaultCutValue(G4double newCutValue)
void SetPhysicsTableRetrieved(const G4String &directory="")
void PreparePhysicsTable(G4ParticleDefinition *)
void SetCutValue(G4double aCut, const G4String &pname)
void SetCutsForRegion(G4double aCut, const G4String &rname)
void AddProcessManager(G4ParticleDefinition *newParticle, G4ProcessManager *newManager=nullptr)
G4bool StorePhysicsTable(const G4String &directory=".")
void SetVerboseLevel(G4int value)
void SetApplyCuts(G4bool value, const G4String &name)
void DumpCutValuesTable(G4int flag=1)
const char * name(G4int ptype)

References G4VUserPhysicsList::AddProcessManager(), addProcManCmd, applyCutsCmd, asciiCmd, G4VUserPhysicsList::BuildPhysicsTable(), buildPTCmd, G4UIcommand::CommandFailed(), dumpCutValuesCmd, G4VUserPhysicsList::DumpCutValuesTable(), G4VUserPhysicsList::DumpList(), dumpListCmd, G4PhysicsListHelper::DumpOrdingParameterTable(), dumpOrdParamCmd, G4cout, G4endl, getCutForAGivenParticleCmd, G4VUserPhysicsList::GetCutValue(), G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4UIcmdWithAnInteger::GetNewIntValue(), G4ParticleTable::GetParticleTable(), G4PhysicsListHelper::GetPhysicsListHelper(), G4ParticleDefinition::GetProcessManager(), mm, G4InuclParticleNames::name(), G4VUserPhysicsList::PreparePhysicsTable(), G4VUserPhysicsList::ResetPhysicsTableRetrieved(), G4VUserPhysicsList::ResetStoredInAscii(), retrieveCmd, G4VUserPhysicsList::SetApplyCuts(), setCutCmd, setCutForAGivenParticleCmd, setCutRCmd, G4VUserPhysicsList::SetCuts(), G4VUserPhysicsList::SetCutsForRegion(), G4VUserPhysicsList::SetCutValue(), G4VUserPhysicsList::SetDefaultCutValue(), G4VUserPhysicsList::SetPhysicsTableRetrieved(), G4VUserPhysicsList::SetStoredInAscii(), G4VUserPhysicsList::SetVerboseLevel(), storeCmd, G4VUserPhysicsList::StorePhysicsTable(), thePhysicsList, G4UIcommand::ValueOf(), and verboseCmd.

◆ StoB()

G4bool G4UImessenger::StoB ( G4String  s)
protectedinherited

Definition at line 137 of file G4UImessenger.cc.

138{
140 G4bool vl = false;
141 if(v == "Y" || v == "YES" || v == "1" || v == "T" || v == "TRUE")
142 {
143 vl = true;
144 }
145 return vl;
146}
G4String to_upper_copy(G4String str)
Return uppercase copy of string.

References G4StrUtil::to_upper_copy().

Referenced by G4LocalThreadCoutMessenger::SetNewValue(), G4CascadeParamMessenger::SetNewValue(), G4ScoreQuantityMessenger::SetNewValue(), and G4ScoringMessenger::SetNewValue().

◆ StoD()

G4double G4UImessenger::StoD ( G4String  s)
protectedinherited

◆ StoI()

G4int G4UImessenger::StoI ( G4String  s)
protectedinherited

◆ StoL()

G4long G4UImessenger::StoL ( G4String  s)
protectedinherited

Definition at line 117 of file G4UImessenger.cc.

118{
119 G4long vl;
120 const char* t = str;
121 std::istringstream is(t);
122 is >> vl;
123 return vl;
124}
long G4long
Definition: G4Types.hh:87

Referenced by G4RunMessenger::SetNewValue().

Field Documentation

◆ addProcManCmd

G4UIcmdWithAString* G4UserPhysicsListMessenger::addProcManCmd = nullptr
private

◆ applyCutsCmd

G4UIcommand* G4UserPhysicsListMessenger::applyCutsCmd = nullptr
private

◆ asciiCmd

G4UIcmdWithAnInteger* G4UserPhysicsListMessenger::asciiCmd = nullptr
private

◆ baseDir

G4UIdirectory* G4UImessenger::baseDir = nullptr
protectedinherited

◆ baseDirName

G4String G4UImessenger::baseDirName = ""
protectedinherited

◆ buildPTCmd

G4UIcmdWithAString* G4UserPhysicsListMessenger::buildPTCmd = nullptr
private

◆ commandsShouldBeInMaster

G4bool G4UImessenger::commandsShouldBeInMaster = false
protectedinherited

◆ dumpCutValuesCmd

G4UIcmdWithAString* G4UserPhysicsListMessenger::dumpCutValuesCmd = nullptr
private

◆ dumpListCmd

G4UIcmdWithoutParameter* G4UserPhysicsListMessenger::dumpListCmd = nullptr
private

◆ dumpOrdParamCmd

G4UIcmdWithAnInteger* G4UserPhysicsListMessenger::dumpOrdParamCmd = nullptr
private

◆ getCutForAGivenParticleCmd

G4UIcmdWithAString* G4UserPhysicsListMessenger::getCutForAGivenParticleCmd = nullptr
private

◆ retrieveCmd

G4UIcmdWithAString* G4UserPhysicsListMessenger::retrieveCmd = nullptr
private

◆ setCutCmd

G4UIcmdWithADoubleAndUnit* G4UserPhysicsListMessenger::setCutCmd = nullptr
private

◆ setCutForAGivenParticleCmd

G4UIcommand* G4UserPhysicsListMessenger::setCutForAGivenParticleCmd = nullptr
private

◆ setCutRCmd

G4UIcommand* G4UserPhysicsListMessenger::setCutRCmd = nullptr
private

◆ storeCmd

G4UIcmdWithAString* G4UserPhysicsListMessenger::storeCmd = nullptr
private

◆ theDirectory

G4UIdirectory* G4UserPhysicsListMessenger::theDirectory = nullptr
private

◆ thePhysicsList

G4VUserPhysicsList* G4UserPhysicsListMessenger::thePhysicsList = nullptr
protected

Definition at line 75 of file G4UserPhysicsListMessenger.hh.

Referenced by GetCurrentValue(), and SetNewValue().

◆ verboseCmd

G4UIcmdWithAnInteger* G4UserPhysicsListMessenger::verboseCmd = nullptr
private

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