Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UIcommand Class Reference

#include <G4UIcommand.hh>

+ Inheritance diagram for G4UIcommand:

Public Member Functions

 G4UIcommand ()
 
 G4UIcommand (const char *theCommandPath, G4UImessenger *theMessenger, G4bool tBB=true)
 
virtual ~G4UIcommand ()
 
G4bool operator== (const G4UIcommand &right) const
 
G4bool operator!= (const G4UIcommand &right) const
 
virtual G4int DoIt (G4String parameterList)
 
G4String GetCurrentValue ()
 
void AvailableForStates (G4ApplicationState s1)
 
void AvailableForStates (G4ApplicationState s1, G4ApplicationState s2)
 
void AvailableForStates (G4ApplicationState s1, G4ApplicationState s2, G4ApplicationState s3)
 
void AvailableForStates (G4ApplicationState s1, G4ApplicationState s2, G4ApplicationState s3, G4ApplicationState s4)
 
void AvailableForStates (G4ApplicationState s1, G4ApplicationState s2, G4ApplicationState s3, G4ApplicationState s4, G4ApplicationState s5)
 
G4bool IsAvailable ()
 
virtual void List ()
 
void SetRange (const char *rs)
 
const G4StringGetRange () const
 
std::size_t GetGuidanceEntries () const
 
const G4StringGetGuidanceLine (G4int i) const
 
const G4StringGetCommandPath () const
 
const G4StringGetCommandName () const
 
std::size_t GetParameterEntries () const
 
G4UIparameterGetParameter (G4int i) const
 
std::vector< G4ApplicationState > * GetStateList ()
 
G4UImessengerGetMessenger () const
 
void SetParameter (G4UIparameter *const newParameter)
 
void SetGuidance (const char *aGuidance)
 
const G4String GetTitle () const
 
void SetToBeBroadcasted (G4bool val)
 
G4bool ToBeBroadcasted () const
 
void SetToBeFlushed (G4bool val)
 
G4bool ToBeFlushed () const
 
void SetWorkerThreadOnly (G4bool val=true)
 
G4bool IsWorkerThreadOnly () const
 
void CommandFailed (G4int errCode, G4ExceptionDescription &ed)
 
void CommandFailed (G4ExceptionDescription &ed)
 
G4int IfCommandFailed ()
 
const G4StringGetFailureDescription ()
 
void ResetFailure ()
 

Static Public Member Functions

static G4String ConvertToString (G4bool boolVal)
 
static G4String ConvertToString (G4int intValue)
 
static G4String ConvertToString (G4long longValue)
 
static G4String ConvertToString (G4double doubleValue)
 
static G4String ConvertToString (G4double doubleValue, const char *unitName)
 
static G4String ConvertToString (G4ThreeVector vec)
 
static G4String ConvertToString (G4ThreeVector vec, const char *unitName)
 
static G4bool ConvertToBool (const char *st)
 
static G4int ConvertToInt (const char *st)
 
static G4long ConvertToLongInt (const char *st)
 
static G4double ConvertToDouble (const char *st)
 
static G4double ConvertToDimensionedDouble (const char *st)
 
static G4ThreeVector ConvertTo3Vector (const char *st)
 
static G4ThreeVector ConvertToDimensioned3Vector (const char *st)
 
static G4double ValueOf (const char *unitName)
 
static G4String CategoryOf (const char *unitName)
 
static G4String UnitsList (const char *unitCategory)
 

Protected Types

using yystype = G4UItokenNum::yystype
 
using tokenNum = G4UItokenNum::tokenNum
 

Protected Member Functions

G4int CheckNewValue (const char *newValue)
 

Protected Attributes

G4bool toBeBroadcasted = false
 
G4bool toBeFlushed = false
 
G4bool workerThreadOnly = false
 
G4int commandFailureCode = 0
 
G4String failureDescription = ""
 

Detailed Description

Definition at line 51 of file G4UIcommand.hh.

Member Typedef Documentation

◆ tokenNum

Definition at line 201 of file G4UIcommand.hh.

◆ yystype

Definition at line 200 of file G4UIcommand.hh.

Constructor & Destructor Documentation

◆ G4UIcommand() [1/2]

G4UIcommand::G4UIcommand ( )

Definition at line 49 of file G4UIcommand.cc.

50{
51}

◆ G4UIcommand() [2/2]

G4UIcommand::G4UIcommand ( const char *  theCommandPath,
G4UImessenger theMessenger,
G4bool  tBB = true 
)

Definition at line 54 of file G4UIcommand.cc.

56 : toBeBroadcasted(tBB)
57 , messenger(theMessenger)
58{
59 G4String comStr = theCommandPath;
60 if(!theMessenger)
61 { // this must be a directory
62 if(comStr(comStr.length() - 1) != '/')
63 {
64 G4cerr << "G4UIcommand Warning : " << G4endl;
65 G4cerr << " <" << theCommandPath << "> must be a directory." << G4endl;
66 G4cerr << " '/' is appended." << G4endl;
67 comStr += "/";
68 }
69 }
70 G4UIcommandCommonConstructorCode(comStr);
71 G4String nullString;
72 availabelStateList.clear();
73 availabelStateList.push_back(G4State_PreInit);
74 availabelStateList.push_back(G4State_Init);
75 availabelStateList.push_back(G4State_Idle);
76 availabelStateList.push_back(G4State_GeomClosed);
77 availabelStateList.push_back(G4State_EventProc);
78 availabelStateList.push_back(G4State_Abort);
79}
@ G4State_EventProc
@ G4State_Init
@ G4State_Idle
@ G4State_Abort
@ G4State_GeomClosed
@ G4State_PreInit
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4bool toBeBroadcasted
Definition: G4UIcommand.hh:205

◆ ~G4UIcommand()

G4UIcommand::~G4UIcommand ( )
virtual

Definition at line 105 of file G4UIcommand.cc.

106{
108 if(fUImanager)
109 {
110 fUImanager->RemoveCommand(this);
111 }
112
113 G4int n_parameterEntry = parameter.size();
114 for(G4int i_thParameter = 0; i_thParameter < n_parameterEntry;
115 ++i_thParameter)
116 {
117 delete parameter[i_thParameter];
118 }
119 parameter.clear();
120}
int G4int
Definition: G4Types.hh:85
void RemoveCommand(G4UIcommand *aCommand)
Definition: G4UImanager.cc:287
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77

Member Function Documentation

◆ AvailableForStates() [1/5]

void G4UIcommand::AvailableForStates ( G4ApplicationState  s1)

Definition at line 273 of file G4UIcommand.cc.

274{
275 availabelStateList.clear();
276 availabelStateList.push_back(s1);
277}

Referenced by G4AdjointSimMessenger::G4AdjointSimMessenger(), G4DeexParametersMessenger::G4DeexParametersMessenger(), G4EmExtraParametersMessenger::G4EmExtraParametersMessenger(), G4EmLowEParametersMessenger::G4EmLowEParametersMessenger(), G4EmMessenger::G4EmMessenger(), G4EmParametersMessenger::G4EmParametersMessenger(), G4ErrorMessenger::G4ErrorMessenger(), G4EvManMessenger::G4EvManMessenger(), G4FastSimulationMessenger::G4FastSimulationMessenger(), G4GDMLMessenger::G4GDMLMessenger(), G4GeometryMessenger::G4GeometryMessenger(), G4GlobalMagFieldMessenger::G4GlobalMagFieldMessenger(), G4GMocrenMessenger::G4GMocrenMessenger(), G4HadronicParametersMessenger::G4HadronicParametersMessenger(), G4INCLXXInterfaceMessenger::G4INCLXXInterfaceMessenger(), G4LocalThreadCoutMessenger::G4LocalThreadCoutMessenger(), G4MatScanMessenger::G4MatScanMessenger(), G4NeutronKillerMessenger::G4NeutronKillerMessenger(), G4NuclideTableMessenger::G4NuclideTableMessenger(), G4OpticalParametersMessenger::G4OpticalParametersMessenger(), G4ParticleHPMessenger::G4ParticleHPMessenger(), G4ParticleMessenger::G4ParticleMessenger(), G4ParticlePropertyMessenger::G4ParticlePropertyMessenger(), G4PhysListFactoryMessenger::G4PhysListFactoryMessenger(), G4PolarizationMessenger::G4PolarizationMessenger(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4ProcessTableMessenger::G4ProcessTableMessenger(), G4ProductionCutsTableMessenger::G4ProductionCutsTableMessenger(), G4RunMessenger::G4RunMessenger(), G4SchedulerMessenger::G4SchedulerMessenger(), G4StackingMessenger::G4StackingMessenger(), G4UCNBoundaryProcessMessenger::G4UCNBoundaryProcessMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), GFlashShowerModelMessenger::GFlashShowerModelMessenger(), and G4GenericMessenger::Command::SetStates().

◆ AvailableForStates() [2/5]

void G4UIcommand::AvailableForStates ( G4ApplicationState  s1,
G4ApplicationState  s2 
)

Definition at line 280 of file G4UIcommand.cc.

282{
283 availabelStateList.clear();
284 availabelStateList.push_back(s1);
285 availabelStateList.push_back(s2);
286}

◆ AvailableForStates() [3/5]

void G4UIcommand::AvailableForStates ( G4ApplicationState  s1,
G4ApplicationState  s2,
G4ApplicationState  s3 
)

Definition at line 289 of file G4UIcommand.cc.

292{
293 availabelStateList.clear();
294 availabelStateList.push_back(s1);
295 availabelStateList.push_back(s2);
296 availabelStateList.push_back(s3);
297}

◆ AvailableForStates() [4/5]

void G4UIcommand::AvailableForStates ( G4ApplicationState  s1,
G4ApplicationState  s2,
G4ApplicationState  s3,
G4ApplicationState  s4 
)

Definition at line 300 of file G4UIcommand.cc.

304{
305 availabelStateList.clear();
306 availabelStateList.push_back(s1);
307 availabelStateList.push_back(s2);
308 availabelStateList.push_back(s3);
309 availabelStateList.push_back(s4);
310}

◆ AvailableForStates() [5/5]

void G4UIcommand::AvailableForStates ( G4ApplicationState  s1,
G4ApplicationState  s2,
G4ApplicationState  s3,
G4ApplicationState  s4,
G4ApplicationState  s5 
)

Definition at line 313 of file G4UIcommand.cc.

318{
319 availabelStateList.clear();
320 availabelStateList.push_back(s1);
321 availabelStateList.push_back(s2);
322 availabelStateList.push_back(s3);
323 availabelStateList.push_back(s4);
324 availabelStateList.push_back(s5);
325}

◆ CategoryOf()

◆ CheckNewValue()

G4int G4UIcommand::CheckNewValue ( const char *  newValue)
protected

Definition at line 611 of file G4UIcommand.cc.

612{
613 yystype result;
614 // if( TypeCheck(newValue) == 0 ) return 1;
615 if(!rangeString.isNull())
616 {
617 if(RangeCheck(newValue) == 0)
619 }
620 return 0; // succeeded
621}
@ fParameterOutOfRange
G4bool isNull() const

Referenced by DoIt().

◆ CommandFailed() [1/2]

void G4UIcommand::CommandFailed ( G4ExceptionDescription ed)
inline

Definition at line 184 of file G4UIcommand.hh.

185 {
187 failureDescription = ed.str();
188 }
G4int commandFailureCode
Definition: G4UIcommand.hh:209
G4String failureDescription
Definition: G4UIcommand.hh:210

◆ CommandFailed() [2/2]

◆ ConvertTo3Vector()

G4ThreeVector G4UIcommand::ConvertTo3Vector ( const char *  st)
static

Definition at line 583 of file G4UIcommand.cc.

584{
585 G4double vx;
586 G4double vy;
587 G4double vz;
588 std::istringstream is(st);
589 is >> vx >> vy >> vz;
590 return G4ThreeVector(vx, vy, vz);
591}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83

Referenced by G4UIcmdWith3Vector::GetNew3VectorValue(), G4VisCommandsViewerSet::SetNewValue(), and G4AttCheck::Standard().

◆ ConvertToBool()

◆ ConvertToDimensioned3Vector()

G4ThreeVector G4UIcommand::ConvertToDimensioned3Vector ( const char *  st)
static

Definition at line 594 of file G4UIcommand.cc.

595{
596 G4double vx;
597 G4double vy;
598 G4double vz;
599 char unts[30];
600 std::istringstream is(st);
601 is >> vx >> vy >> vz >> unts;
602 G4String unt = unts;
603 G4double uv = ValueOf(unt);
604 return G4ThreeVector(vx * uv, vy * uv, vz * uv);
605}
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:348

Referenced by G4UIcmdWith3VectorAndUnit::GetNew3VectorValue(), G4GenericMessenger::SetNewValue(), and G4AttCheck::Standard().

◆ ConvertToDimensionedDouble()

G4double G4UIcommand::ConvertToDimensionedDouble ( const char *  st)
static

Definition at line 570 of file G4UIcommand.cc.

571{
572 G4double vl;
573 char unts[30];
574
575 std::istringstream is(st);
576 is >> vl >> unts;
577 G4String unt = unts;
578
579 return (vl * ValueOf(unt));
580}

Referenced by G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4TrajectoryDrawerUtils::GetPointsAndTimes(), G4GenericMessenger::SetNewValue(), G4VisCommandViewerInterpolate::SetNewValue(), G4VisCommandsViewerSet::SetNewValue(), and G4AttCheck::Standard().

◆ ConvertToDouble()

G4double G4UIcommand::ConvertToDouble ( const char *  st)
static

◆ ConvertToInt()

◆ ConvertToLongInt()

G4long G4UIcommand::ConvertToLongInt ( const char *  st)
static

Definition at line 552 of file G4UIcommand.cc.

553{
554 G4long vl;
555 std::istringstream is(st);
556 is >> vl;
557 return vl;
558}
long G4long
Definition: G4Types.hh:87

Referenced by G4UIcmdWithALongInt::GetNewLongIntValue().

◆ ConvertToString() [1/7]

G4String G4UIcommand::ConvertToString ( G4bool  boolVal)
static

Definition at line 430 of file G4UIcommand.cc.

431{
432 G4String vl = "0";
433 if(boolVal)
434 vl = "1";
435 return vl;
436}

Referenced by G4tgrParameterMgr::AddParameterNumber(), G4tgbRotationMatrix::BuildG4RotMatrix(), G4tgbPlaceParameterisation::CheckNExtraData(), G4tgbVolume::CheckNoSolidParams(), G4tgrUtils::CheckWLsize(), G4UIcmdWithADoubleAndUnit::ConvertToStringWithDefaultUnit(), G4UIcmdWith3VectorAndUnit::ConvertToStringWithDefaultUnit(), G4RichTrajectory::CreateAttValues(), G4SmoothTrajectory::CreateAttValues(), G4Trajectory::CreateAttValues(), G4TheMTRayTracer::CreateBitMap(), G4TrajectoriesModel::CreateCurrentAttValues(), G4UIcmdWith3VectorAndUnit::DoIt(), G4UIcmdWithADoubleAndUnit::DoIt(), G4tgrFileIn::DumpException(), G4tgbGeometryDumper::DumpPVParameterised(), G4tgbGeometryDumper::DumpPVPlacement(), G4tgbGeometryDumper::DumpRotationMatrix(), G4tgbVolume::FindOrConstructG4Solid(), G4MolecularConfiguration::G4MolecularConfiguration(), G4tgrMaterialSimple::GetComponent(), G4ScoringMessenger::GetCurrentValue(), G4EvManMessenger::GetCurrentValue(), G4ParticleGunMessenger::GetCurrentValue(), G4GeometryMessenger::GetCurrentValue(), G4UIcontrolMessenger::GetCurrentValue(), G4DecayTableMessenger::GetCurrentValue(), G4ParticleMessenger::GetCurrentValue(), G4ParticlePropertyMessenger::GetCurrentValue(), G4tgrMessenger::GetCurrentValue(), G4ProductionCutsTableMessenger::GetCurrentValue(), G4SchedulerMessenger::GetCurrentValue(), G4VITSteppingVerbose::GetCurrentValue(), G4MoleculeShootMessenger::GetCurrentValue(), G4ProcessManagerMessenger::GetCurrentValue(), G4ProcessTableMessenger::GetCurrentValue(), G4MatScanMessenger::GetCurrentValue(), G4RunMessenger::GetCurrentValue(), G4UserPhysicsListMessenger::GetCurrentValue(), G4TrackingMessenger::GetCurrentValue(), G4GMocrenMessenger::GetCurrentValue(), G4HepRepMessenger::GetCurrentValue(), G4VisCommandViewerDolly::GetCurrentValue(), G4VisCommandViewerScale::GetCurrentValue(), G4VisCommandViewerZoom::GetCurrentValue(), G4RTMessenger::GetCurrentValue(), G4PolarizationMessenger::GetCurrentValue(), G4DNAChemistryManager::GetCurrentValue(), G4tgrUtils::GetDouble(), G4tgrMaterialSimple::GetFraction(), G4ScoreLogColorMap::GetMapColor(), G4tgrUtils::GetRotationFromDirection(), G4tgrVolume::GetVolume(), G4EnergySplitter::GetVoxelID(), G4MolecularConfiguration::IonizeMolecule(), G4MolecularConfiguration::MoveOneElectron(), G4DNAMolecularReactionTable::PrintTable(), G4MolecularConfiguration::RemoveElectron(), G4GenericMessenger::SetNewValue(), G4VisCommandsViewerSet::SetNewValue(), G4AttCheck::Standard(), and G4TheMTRayTracer::Trace().

◆ ConvertToString() [2/7]

G4String G4UIcommand::ConvertToString ( G4double  doubleValue)
static

Definition at line 457 of file G4UIcommand.cc.

458{
459 std::ostringstream os;
461 {
462 os << std::setprecision(17) << doubleValue;
463 }
464 else
465 {
466 os << doubleValue;
467 }
468 G4String vl = os.str();
469 return vl;
470}
static G4bool DoublePrecisionStr()
Definition: G4UImanager.cc:158

◆ ConvertToString() [3/7]

G4String G4UIcommand::ConvertToString ( G4double  doubleValue,
const char *  unitName 
)
static

Definition at line 473 of file G4UIcommand.cc.

475{
476 G4String unt = unitName;
477 G4double uv = ValueOf(unitName);
478
479 std::ostringstream os;
481 {
482 os << std::setprecision(17) << doubleValue / uv << " " << unitName;
483 }
484 else
485 {
486 os << doubleValue / uv << " " << unitName;
487 }
488 G4String vl = os.str();
489 return vl;
490}

◆ ConvertToString() [4/7]

G4String G4UIcommand::ConvertToString ( G4int  intValue)
static

Definition at line 439 of file G4UIcommand.cc.

440{
441 std::ostringstream os;
442 os << intValue;
443 G4String vl = os.str();
444 return vl;
445}

◆ ConvertToString() [5/7]

G4String G4UIcommand::ConvertToString ( G4long  longValue)
static

Definition at line 448 of file G4UIcommand.cc.

449{
450 std::ostringstream os;
451 os << longValue;
452 G4String vl = os.str();
453 return vl;
454}

◆ ConvertToString() [6/7]

G4String G4UIcommand::ConvertToString ( G4ThreeVector  vec)
static

Definition at line 493 of file G4UIcommand.cc.

494{
495 std::ostringstream os;
497 {
498 os << std::setprecision(17) << vec.x() << " " << vec.y() << " " << vec.z();
499 }
500 else
501 {
502 os << vec.x() << " " << vec.y() << " " << vec.z();
503 }
504 G4String vl = os.str();
505 return vl;
506}
double z() const
double x() const
double y() const

◆ ConvertToString() [7/7]

G4String G4UIcommand::ConvertToString ( G4ThreeVector  vec,
const char *  unitName 
)
static

Definition at line 509 of file G4UIcommand.cc.

510{
511 G4String unt = unitName;
512 G4double uv = ValueOf(unitName);
513
514 std::ostringstream os;
516 {
517 os << std::setprecision(17) << vec.x() / uv << " " << vec.y() / uv << " "
518 << vec.z() / uv << " " << unitName;
519 }
520 else
521 {
522 os << vec.x() / uv << " " << vec.y() / uv << " " << vec.z() / uv << " "
523 << unitName;
524 }
525 G4String vl = os.str();
526 return vl;
527}

◆ DoIt()

G4int G4UIcommand::DoIt ( G4String  parameterList)
virtual

Reimplemented in G4UIcmdWith3VectorAndUnit, and G4UIcmdWithADoubleAndUnit.

Definition at line 135 of file G4UIcommand.cc.

136{
137 G4String correctParameters;
138 G4int n_parameterEntry = parameter.size();
139 if(n_parameterEntry != 0)
140 {
141 G4String aToken;
142 G4String correctToken;
143 G4Tokenizer parameterToken(parameterList);
144 for(G4int i_thParameter = 0; i_thParameter < n_parameterEntry;
145 ++i_thParameter)
146 {
147 if(i_thParameter > 0)
148 {
149 correctParameters.append(" ");
150 }
151 aToken = parameterToken();
152 if(aToken.length() > 0 && aToken(0) == '"')
153 {
154 while(aToken(aToken.length() - 1) != '"' ||
155 (aToken.length() == 1 && aToken(0) == '"'))
156 {
157 G4String additionalToken = parameterToken();
158 if(additionalToken.isNull())
159 {
160 return fParameterUnreadable + i_thParameter;
161 }
162 aToken += " ";
163 aToken += additionalToken;
164 }
165 }
166 else if(i_thParameter == n_parameterEntry - 1 &&
167 parameter[i_thParameter]->GetParameterType() == 's')
168 {
169 G4String anotherToken;
170 while(!((anotherToken = parameterToken()).isNull()))
171 {
172 G4int idxs = anotherToken.index("#");
173 if(idxs == G4int(std::string::npos))
174 {
175 aToken += " ";
176 aToken += anotherToken;
177 }
178 else if(idxs > 0)
179 {
180 aToken += " ";
181 aToken += anotherToken(0, idxs);
182 break;
183 }
184 else
185 {
186 break;
187 }
188 }
189 }
190
191 if(aToken.isNull() || aToken == "!")
192 {
193 if(parameter[i_thParameter]->IsOmittable())
194 {
195 if(parameter[i_thParameter]->GetCurrentAsDefault())
196 {
197 G4Tokenizer cvSt(messenger->GetCurrentValue(this));
198 G4String parVal;
199 for(G4int ii = 0; ii < i_thParameter; ++ii)
200 {
201 parVal = cvSt();
202 if(parVal(0) == '"')
203 {
204 while(parVal(parVal.length() - 1) != '"')
205 {
206 G4String additionalToken = cvSt();
207 if(additionalToken.isNull())
208 {
209 return fParameterUnreadable + i_thParameter;
210 }
211 parVal += " ";
212 parVal += additionalToken;
213 }
214 }
215 }
216 G4String aCVToken = cvSt();
217 if(aCVToken(0) == '"')
218 {
219 while(aCVToken(aCVToken.length() - 1) != '"')
220 {
221 G4String additionalToken = cvSt();
222 if(additionalToken.isNull())
223 {
224 return fParameterUnreadable + i_thParameter;
225 }
226 aCVToken += " ";
227 aCVToken += additionalToken;
228 }
229 // aCVToken.strip(G4String::both,'"');
230 }
231 correctParameters.append(aCVToken);
232 }
233 else
234 {
235 correctParameters.append(
236 parameter[i_thParameter]->GetDefaultValue());
237 }
238 }
239 else
240 {
241 return fParameterUnreadable + i_thParameter;
242 }
243 }
244 else
245 {
246 G4int stat = parameter[i_thParameter]->CheckNewValue(aToken);
247 if(stat)
248 return stat + i_thParameter;
249 correctParameters.append(aToken);
250 }
251 }
252 }
253
254 if(CheckNewValue(correctParameters))
255 {
256 return fParameterOutOfRange + 99;
257 }
258
260 return 0;
261
262 messenger->SetNewValue(this, correctParameters);
263 return 0;
264}
@ fParameterUnreadable
G4String & append(const G4String &)
str_size index(const char *, G4int pos=0) const
G4int CheckNewValue(const char *newValue)
Definition: G4UIcommand.cc:611
G4bool workerThreadOnly
Definition: G4UIcommand.hh:207
virtual G4String GetCurrentValue(G4UIcommand *command)
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
G4bool IsMasterThread()
Definition: G4Threading.cc:124

Referenced by G4UImanager::ApplyCommand(), G4UIcmdWith3VectorAndUnit::DoIt(), and G4UIcmdWithADoubleAndUnit::DoIt().

◆ GetCommandName()

◆ GetCommandPath()

◆ GetCurrentValue()

G4String G4UIcommand::GetCurrentValue ( )

Definition at line 267 of file G4UIcommand.cc.

268{
269 return messenger->GetCurrentValue(this);
270}

Referenced by G4UImanager::GetCurrentValues().

◆ GetFailureDescription()

const G4String & G4UIcommand::GetFailureDescription ( )
inline

Definition at line 190 of file G4UIcommand.hh.

190{return failureDescription;}

Referenced by G4UImanager::ApplyCommand().

◆ GetGuidanceEntries()

std::size_t G4UIcommand::GetGuidanceEntries ( ) const
inline

Definition at line 128 of file G4UIcommand.hh.

129 {
130 return commandGuidance.size();
131 }

Referenced by G4VVisCommand::CopyGuidanceFrom(), G4UIcommandTree::CreateHTML(), and G4GenericMessenger::Command::SetUnit().

◆ GetGuidanceLine()

const G4String & G4UIcommand::GetGuidanceLine ( G4int  i) const
inline

Definition at line 132 of file G4UIcommand.hh.

133 {
134 return commandGuidance[i];
135 }

Referenced by G4VVisCommand::CopyGuidanceFrom(), G4UIcommandTree::CreateHTML(), and G4GenericMessenger::Command::SetUnit().

◆ GetMessenger()

G4UImessenger * G4UIcommand::GetMessenger ( ) const
inline

Definition at line 144 of file G4UIcommand.hh.

144{ return messenger; }

Referenced by G4GenericMessenger::Command::SetUnit().

◆ GetParameter()

G4UIparameter * G4UIcommand::GetParameter ( G4int  i) const
inline

Definition at line 139 of file G4UIcommand.hh.

139{ return parameter[i]; }

Referenced by G4UIcmdWithADoubleAndUnit::ConvertToStringWithBestUnit(), G4UIcmdWith3VectorAndUnit::ConvertToStringWithBestUnit(), G4UIcmdWithADoubleAndUnit::ConvertToStringWithDefaultUnit(), G4UIcmdWith3VectorAndUnit::ConvertToStringWithDefaultUnit(), G4VVisCommand::CopyParametersFrom(), G4UIcommandTree::CreateHTML(), G4UIcmdWith3VectorAndUnit::DoIt(), G4UIcmdWithADoubleAndUnit::DoIt(), G4UImanager::GetCurrentStringValue(), G4UIcmdWithAString::SetCandidates(), G4UIcmdWith3VectorAndUnit::SetDefaultUnit(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcmdWithAString::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcmdWithALongInt::SetDefaultValue(), G4UIcmdWithNucleusLimits::SetDefaultValue(), G4UIcmdWith3Vector::SetDefaultValue(), G4UIcmdWith3VectorAndUnit::SetDefaultValue(), G4UIcmdWithABool::SetParameterName(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWithALongInt::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithNucleusLimits::SetParameterName(), G4UIcmdWith3Vector::SetParameterName(), G4UIcmdWith3VectorAndUnit::SetParameterName(), G4GenericMessenger::Command::SetUnit(), G4UIcmdWith3VectorAndUnit::SetUnitCandidates(), and G4UIcmdWithADoubleAndUnit::SetUnitCandidates().

◆ GetParameterEntries()

◆ GetRange()

const G4String & G4UIcommand::GetRange ( ) const
inline

Definition at line 127 of file G4UIcommand.hh.

127{ return rangeString; }

Referenced by G4UIcommandTree::CreateHTML(), and G4GenericMessenger::Command::SetUnit().

◆ GetStateList()

std::vector< G4ApplicationState > * G4UIcommand::GetStateList ( )
inline

Definition at line 140 of file G4UIcommand.hh.

141 {
142 return &availabelStateList;
143 }

Referenced by G4UIcommandTree::CreateHTML().

◆ GetTitle()

const G4String G4UIcommand::GetTitle ( ) const
inline

Definition at line 165 of file G4UIcommand.hh.

166 {
167 return (commandGuidance.size() == 0)
168 ? G4String("...Title not available...")
169 : commandGuidance[0];
170 }

Referenced by G4UIcommandTree::GetTitle().

◆ IfCommandFailed()

G4int G4UIcommand::IfCommandFailed ( )
inline

Definition at line 189 of file G4UIcommand.hh.

189{ return commandFailureCode; }

Referenced by G4UImanager::ApplyCommand().

◆ IsAvailable()

G4bool G4UIcommand::IsAvailable ( )

Definition at line 328 of file G4UIcommand.cc.

329{
330 G4bool av = false;
331 G4ApplicationState currentState =
333
334 G4int nState = availabelStateList.size();
335 for(G4int i = 0; i < nState; ++i)
336 {
337 if(availabelStateList[i] == currentState)
338 {
339 av = true;
340 break;
341 }
342 }
343
344 return av;
345}
G4ApplicationState
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()

Referenced by G4UImanager::ApplyCommand().

◆ IsWorkerThreadOnly()

G4bool G4UIcommand::IsWorkerThreadOnly ( ) const
inline

Definition at line 177 of file G4UIcommand.hh.

177{ return workerThreadOnly; }

Referenced by G4UIcommandTree::RemoveCommand().

◆ List()

void G4UIcommand::List ( )
virtual

Definition at line 395 of file G4UIcommand.cc.

396{
397 G4cout << G4endl;
398 G4cout << G4endl;
399 if(commandPath(commandPath.length() - 1) != '/')
400 {
401 G4cout << "Command " << commandPath << G4endl;
402 }
404 {
405 G4cout << " ---- available only in worker thread" << G4endl;
406 }
407 G4cout << "Guidance :" << G4endl;
408 G4int n_guidanceEntry = commandGuidance.size();
409 for(G4int i_thGuidance = 0; i_thGuidance < n_guidanceEntry; ++i_thGuidance)
410 {
411 G4cout << commandGuidance[i_thGuidance] << G4endl;
412 }
413 if(!rangeString.isNull())
414 {
415 G4cout << " Range of parameters : " << rangeString << G4endl;
416 }
417 G4int n_parameterEntry = parameter.size();
418 if(n_parameterEntry > 0)
419 {
420 for(G4int i_thParameter = 0; i_thParameter < n_parameterEntry;
421 ++i_thParameter)
422 {
423 parameter[i_thParameter]->List();
424 }
425 }
426 G4cout << G4endl;
427}
G4GLOB_DLL std::ostream G4cout

Referenced by G4UIcommandTree::ListCurrent(), G4UIcommandTree::ListCurrentWithNum(), and G4VBasicShell::TerminalHelp().

◆ operator!=()

G4bool G4UIcommand::operator!= ( const G4UIcommand right) const

Definition at line 129 of file G4UIcommand.cc.

130{
131 return (commandPath != right.GetCommandPath());
132}
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:136

◆ operator==()

G4bool G4UIcommand::operator== ( const G4UIcommand right) const

Definition at line 123 of file G4UIcommand.cc.

124{
125 return (commandPath == right.GetCommandPath());
126}

◆ ResetFailure()

void G4UIcommand::ResetFailure ( )
inline

Definition at line 191 of file G4UIcommand.hh.

192 {
195 }

Referenced by G4UImanager::ApplyCommand(), and G4UIcontrolMessenger::SetNewValue().

◆ SetGuidance()

void G4UIcommand::SetGuidance ( const char *  aGuidance)
inline

Definition at line 156 of file G4UIcommand.hh.

161 {
162 commandGuidance.push_back(G4String(aGuidance));
163 }

Referenced by G4VVisCommand::CopyGuidanceFrom(), G4CascadeParamMessenger::CreateDirectory(), G4UImessenger::CreateDirectory(), G4GenericMessenger::DeclareMethod(), G4GenericMessenger::DeclareMethodWithUnit(), G4GenericMessenger::DeclareProperty(), G4GenericMessenger::DeclarePropertyWithUnit(), G4AdjointSimMessenger::G4AdjointSimMessenger(), G4DecayTableMessenger::G4DecayTableMessenger(), G4DeexParametersMessenger::G4DeexParametersMessenger(), G4DMmessenger::G4DMmessenger(), G4EmExtraParametersMessenger::G4EmExtraParametersMessenger(), G4EmLowEParametersMessenger::G4EmLowEParametersMessenger(), G4EmMessenger::G4EmMessenger(), G4EmParametersMessenger::G4EmParametersMessenger(), G4ErrorMessenger::G4ErrorMessenger(), G4EvManMessenger::G4EvManMessenger(), G4FastSimulationMessenger::G4FastSimulationMessenger(), G4GDMLMessenger::G4GDMLMessenger(), G4GenericMessenger::G4GenericMessenger(), G4GeometryMessenger::G4GeometryMessenger(), G4GlobalMagFieldMessenger::G4GlobalMagFieldMessenger(), G4GMocrenMessenger::G4GMocrenMessenger(), G4HadronicEPTestMessenger::G4HadronicEPTestMessenger(), G4HadronicParametersMessenger::G4HadronicParametersMessenger(), G4INCLXXInterfaceMessenger::G4INCLXXInterfaceMessenger(), G4InteractorMessenger::G4InteractorMessenger(), G4LocalThreadCoutMessenger::G4LocalThreadCoutMessenger(), G4MatScanMessenger::G4MatScanMessenger(), G4ModelCmdActive< M >::G4ModelCmdActive(), G4ModelCmdAddInt< M >::G4ModelCmdAddInt(), G4ModelCmdAddInterval< M >::G4ModelCmdAddInterval(), G4ModelCmdAddIntervalContext< M >::G4ModelCmdAddIntervalContext(), G4ModelCmdAddString< M >::G4ModelCmdAddString(), G4ModelCmdAddValue< M >::G4ModelCmdAddValue(), G4ModelCmdAddValueContext< M >::G4ModelCmdAddValueContext(), G4ModelCmdApplyColour< M >::G4ModelCmdApplyColour(), G4ModelCmdApplyStringColour< M >::G4ModelCmdApplyStringColour(), G4ModelCmdCreateContextDir< M >::G4ModelCmdCreateContextDir(), G4ModelCmdDraw< M >::G4ModelCmdDraw(), G4ModelCmdInvert< M >::G4ModelCmdInvert(), G4ModelCmdReset< M >::G4ModelCmdReset(), G4ModelCmdSetAuxPtsFillStyle< M >::G4ModelCmdSetAuxPtsFillStyle(), G4ModelCmdSetAuxPtsSize< M >::G4ModelCmdSetAuxPtsSize(), G4ModelCmdSetAuxPtsSizeType< M >::G4ModelCmdSetAuxPtsSizeType(), G4ModelCmdSetAuxPtsType< M >::G4ModelCmdSetAuxPtsType(), G4ModelCmdSetAuxPtsVisible< M >::G4ModelCmdSetAuxPtsVisible(), G4ModelCmdSetDrawAuxPts< M >::G4ModelCmdSetDrawAuxPts(), G4ModelCmdSetDrawLine< M >::G4ModelCmdSetDrawLine(), G4ModelCmdSetDrawStepPts< M >::G4ModelCmdSetDrawStepPts(), G4ModelCmdSetLineVisible< M >::G4ModelCmdSetLineVisible(), G4ModelCmdSetStepPtsFillStyle< M >::G4ModelCmdSetStepPtsFillStyle(), G4ModelCmdSetStepPtsSize< M >::G4ModelCmdSetStepPtsSize(), G4ModelCmdSetStepPtsSizeType< M >::G4ModelCmdSetStepPtsSizeType(), G4ModelCmdSetStepPtsType< M >::G4ModelCmdSetStepPtsType(), G4ModelCmdSetStepPtsVisible< M >::G4ModelCmdSetStepPtsVisible(), G4ModelCmdSetString< M >::G4ModelCmdSetString(), G4ModelCmdSetTimeSliceInterval< M >::G4ModelCmdSetTimeSliceInterval(), G4ModelCmdVerbose< M >::G4ModelCmdVerbose(), G4NeutronKillerMessenger::G4NeutronKillerMessenger(), G4NistMessenger::G4NistMessenger(), G4NuclideTableMessenger::G4NuclideTableMessenger(), G4OpticalParametersMessenger::G4OpticalParametersMessenger(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4ParticleHPMessenger::G4ParticleHPMessenger(), G4ParticleMessenger::G4ParticleMessenger(), G4ParticlePropertyMessenger::G4ParticlePropertyMessenger(), G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(), G4PhysListFactoryMessenger::G4PhysListFactoryMessenger(), G4PolarizationMessenger::G4PolarizationMessenger(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4ProcessTableMessenger::G4ProcessTableMessenger(), G4ProductionCutsTableMessenger::G4ProductionCutsTableMessenger(), G4ProfilerMessenger::G4ProfilerMessenger(), G4RadioactivationMessenger::G4RadioactivationMessenger(), G4RadioactiveDecayBaseMessenger::G4RadioactiveDecayBaseMessenger(), G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger(), G4RunMessenger::G4RunMessenger(), G4SchedulerMessenger::G4SchedulerMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4SDmessenger::G4SDmessenger(), G4StackingMessenger::G4StackingMessenger(), G4tgrMessenger::G4tgrMessenger(), G4TrackingMessenger::G4TrackingMessenger(), G4UCNBoundaryProcessMessenger::G4UCNBoundaryProcessMessenger(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UnitsMessenger::G4UnitsMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4VisCommandDrawLogicalVolume::G4VisCommandDrawLogicalVolume(), G4VisCommandDrawTree::G4VisCommandDrawTree(), G4VisCommandDrawView::G4VisCommandDrawView(), G4VisCommandDrawVolume::G4VisCommandDrawVolume(), G4VisCommandGeometrySetColour::G4VisCommandGeometrySetColour(), G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible(), G4VisCommandGeometrySetForceAuxEdgeVisible::G4VisCommandGeometrySetForceAuxEdgeVisible(), G4VisCommandGeometrySetForceCloud::G4VisCommandGeometrySetForceCloud(), G4VisCommandGeometrySetForceLineSegmentsPerCircle::G4VisCommandGeometrySetForceLineSegmentsPerCircle(), G4VisCommandGeometrySetForceSolid::G4VisCommandGeometrySetForceSolid(), G4VisCommandGeometrySetForceWireframe::G4VisCommandGeometrySetForceWireframe(), G4VisCommandGeometrySetLineStyle::G4VisCommandGeometrySetLineStyle(), G4VisCommandGeometrySetLineWidth::G4VisCommandGeometrySetLineWidth(), G4VisCommandGeometrySetVisibility::G4VisCommandGeometrySetVisibility(), G4VisCommandListManagerList< Manager >::G4VisCommandListManagerList(), G4VisCommandListManagerSelect< Manager >::G4VisCommandListManagerSelect(), G4VisCommandManagerMode< Manager >::G4VisCommandManagerMode(), G4VisCommandModelCreate< Factory >::G4VisCommandModelCreate(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandSceneAddGPS::G4VisCommandSceneAddGPS(), G4VisCommandSetArrow3DLineSegmentsPerCircle::G4VisCommandSetArrow3DLineSegmentsPerCircle(), G4VisCommandSetColour::G4VisCommandSetColour(), G4VisCommandSetExtentForField::G4VisCommandSetExtentForField(), G4VisCommandSetLineWidth::G4VisCommandSetLineWidth(), G4VisCommandSetTextColour::G4VisCommandSetTextColour(), G4VisCommandSetTextLayout::G4VisCommandSetTextLayout(), G4VisCommandSetTextSize::G4VisCommandSetTextSize(), G4VisCommandSetTouchable::G4VisCommandSetTouchable(), G4VisCommandSetVolumeForField::G4VisCommandSetVolumeForField(), G4VisCommandSpecify::G4VisCommandSpecify(), G4VisCommandsTouchable::G4VisCommandsTouchable(), G4VisCommandsTouchableSet::G4VisCommandsTouchableSet(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), G4VisCommandViewerCentreOn::G4VisCommandViewerCentreOn(), G4VisCommandViewerDefaultHiddenEdge::G4VisCommandViewerDefaultHiddenEdge(), G4VisCommandViewerDefaultStyle::G4VisCommandViewerDefaultStyle(), GFlashShowerModelMessenger::GFlashShowerModelMessenger(), G4GenericMessenger::SetGuidance(), G4GenericMessenger::Command::SetGuidance(), G4VisCommandModelCreate< Factory >::SetNewValue(), and G4GenericMessenger::Command::SetUnit().

◆ SetParameter()

void G4UIcommand::SetParameter ( G4UIparameter *const  newParameter)
inline

Definition at line 146 of file G4UIcommand.hh.

151 {
152 parameter.push_back(newParameter);
153 newVal.resize(parameter.size());
154 }

Referenced by G4VVisCommand::CopyParametersFrom(), G4GenericMessenger::DeclareMethod(), G4GenericMessenger::DeclareProperty(), G4AdjointSimMessenger::G4AdjointSimMessenger(), G4EmExtraParametersMessenger::G4EmExtraParametersMessenger(), G4EmLowEParametersMessenger::G4EmLowEParametersMessenger(), G4GMocrenMessenger::G4GMocrenMessenger(), G4InteractorMessenger::G4InteractorMessenger(), G4LocalThreadCoutMessenger::G4LocalThreadCoutMessenger(), G4MatScanMessenger::G4MatScanMessenger(), G4ModelCmdApplyColour< M >::G4ModelCmdApplyColour(), G4ModelCmdApplyStringColour< M >::G4ModelCmdApplyStringColour(), G4OpticalParametersMessenger::G4OpticalParametersMessenger(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4PolarizationMessenger::G4PolarizationMessenger(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4ProcessTableMessenger::G4ProcessTableMessenger(), G4RadioactiveDecayBaseMessenger::G4RadioactiveDecayBaseMessenger(), G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger(), G4RunMessenger::G4RunMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4UIcmdWith3Vector::G4UIcmdWith3Vector(), G4UIcmdWith3VectorAndUnit::G4UIcmdWith3VectorAndUnit(), G4UIcmdWithABool::G4UIcmdWithABool(), G4UIcmdWithADouble::G4UIcmdWithADouble(), G4UIcmdWithADoubleAndUnit::G4UIcmdWithADoubleAndUnit(), G4UIcmdWithALongInt::G4UIcmdWithALongInt(), G4UIcmdWithAnInteger::G4UIcmdWithAnInteger(), G4UIcmdWithAString::G4UIcmdWithAString(), G4UIcmdWithNucleusLimits::G4UIcmdWithNucleusLimits(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4VisCommandGeometrySetColour::G4VisCommandGeometrySetColour(), G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible(), G4VisCommandGeometrySetForceAuxEdgeVisible::G4VisCommandGeometrySetForceAuxEdgeVisible(), G4VisCommandGeometrySetForceCloud::G4VisCommandGeometrySetForceCloud(), G4VisCommandGeometrySetForceLineSegmentsPerCircle::G4VisCommandGeometrySetForceLineSegmentsPerCircle(), G4VisCommandGeometrySetForceSolid::G4VisCommandGeometrySetForceSolid(), G4VisCommandGeometrySetForceWireframe::G4VisCommandGeometrySetForceWireframe(), G4VisCommandGeometrySetLineStyle::G4VisCommandGeometrySetLineStyle(), G4VisCommandGeometrySetLineWidth::G4VisCommandGeometrySetLineWidth(), G4VisCommandGeometrySetVisibility::G4VisCommandGeometrySetVisibility(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandSceneAddArrow::G4VisCommandSceneAddArrow(), G4VisCommandSceneAddAxes::G4VisCommandSceneAddAxes(), G4VisCommandSceneAddLine::G4VisCommandSceneAddLine(), G4VisCommandSceneAddLogicalVolume::G4VisCommandSceneAddLogicalVolume(), G4VisCommandSceneAddLogo::G4VisCommandSceneAddLogo(), G4VisCommandSceneAddScale::G4VisCommandSceneAddScale(), G4VisCommandSceneAddText::G4VisCommandSceneAddText(), G4VisCommandSceneAddText2D::G4VisCommandSceneAddText2D(), G4VisCommandSetColour::G4VisCommandSetColour(), G4VisCommandSetExtentForField::G4VisCommandSetExtentForField(), G4VisCommandSetTextColour::G4VisCommandSetTextColour(), G4VisCommandSetTouchable::G4VisCommandSetTouchable(), G4VisCommandSpecify::G4VisCommandSpecify(), G4VisCommandsTouchableSet::G4VisCommandsTouchableSet(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), G4VisCommandViewerAddCutawayPlane::G4VisCommandViewerAddCutawayPlane(), G4VisCommandViewerCentreOn::G4VisCommandViewerCentreOn(), G4VisCommandViewerChangeCutawayPlane::G4VisCommandViewerChangeCutawayPlane(), and G4VisCommandViewerColourByDensity::G4VisCommandViewerColourByDensity().

◆ SetRange()

void G4UIcommand::SetRange ( const char *  rs)
inline

Definition at line 120 of file G4UIcommand.hh.

120{ rangeString = rs; }

Referenced by G4DecayTableMessenger::G4DecayTableMessenger(), G4EmParametersMessenger::G4EmParametersMessenger(), G4EvManMessenger::G4EvManMessenger(), G4GeometryMessenger::G4GeometryMessenger(), G4GlobalMagFieldMessenger::G4GlobalMagFieldMessenger(), G4HadronicEPTestMessenger::G4HadronicEPTestMessenger(), G4HadronicParametersMessenger::G4HadronicParametersMessenger(), G4INCLXXInterfaceMessenger::G4INCLXXInterfaceMessenger(), G4NistMessenger::G4NistMessenger(), G4NuclideTableMessenger::G4NuclideTableMessenger(), G4OpticalParametersMessenger::G4OpticalParametersMessenger(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4ParticleHPMessenger::G4ParticleHPMessenger(), G4ParticleMessenger::G4ParticleMessenger(), G4ParticlePropertyMessenger::G4ParticlePropertyMessenger(), G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(), G4PolarizationMessenger::G4PolarizationMessenger(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4ProcessTableMessenger::G4ProcessTableMessenger(), G4ProductionCutsTableMessenger::G4ProductionCutsTableMessenger(), G4RadioactivationMessenger::G4RadioactivationMessenger(), G4RadioactiveDecayBaseMessenger::G4RadioactiveDecayBaseMessenger(), G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger(), G4RunMessenger::G4RunMessenger(), G4SchedulerMessenger::G4SchedulerMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4StackingMessenger::G4StackingMessenger(), G4tgrMessenger::G4tgrMessenger(), G4TrackingMessenger::G4TrackingMessenger(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4VisCommandSetArrow3DLineSegmentsPerCircle::G4VisCommandSetArrow3DLineSegmentsPerCircle(), G4VisCommandSetLineWidth::G4VisCommandSetLineWidth(), G4VisCommandSetTextSize::G4VisCommandSetTextSize(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), G4GenericMessenger::Command::SetRange(), and G4GenericMessenger::Command::SetUnit().

◆ SetToBeBroadcasted()

◆ SetToBeFlushed()

void G4UIcommand::SetToBeFlushed ( G4bool  val)
inline

Definition at line 174 of file G4UIcommand.hh.

174{ toBeFlushed = val; }
G4bool toBeFlushed
Definition: G4UIcommand.hh:206

Referenced by G4GenericMessenger::Command::SetToBeFlushed().

◆ SetWorkerThreadOnly()

void G4UIcommand::SetWorkerThreadOnly ( G4bool  val = true)
inline

◆ ToBeBroadcasted()

G4bool G4UIcommand::ToBeBroadcasted ( ) const
inline

Definition at line 173 of file G4UIcommand.hh.

173{ return toBeBroadcasted; }

Referenced by G4UIcommandTree::AddNewCommand(), and G4UImanager::ApplyCommand().

◆ ToBeFlushed()

G4bool G4UIcommand::ToBeFlushed ( ) const
inline

Definition at line 175 of file G4UIcommand.hh.

175{ return toBeFlushed; }

◆ UnitsList()

G4String G4UIcommand::UnitsList ( const char *  unitCategory)
static

Definition at line 362 of file G4UIcommand.cc.

363{
364 G4String retStr;
366 std::size_t i;
367 for(i = 0; i < UTbl.size(); ++i)
368 {
369 if(UTbl[i]->GetName() == unitCategory)
370 break;
371 }
372 if(i == UTbl.size())
373 {
374 G4cerr << "Unit category <" << unitCategory << "> is not defined."
375 << G4endl;
376 return retStr;
377 }
378 G4UnitsContainer& UCnt = UTbl[i]->GetUnitsList();
379 retStr = UCnt[0]->GetSymbol();
380 G4int je = UCnt.size();
381 for(G4int j = 1; j < je; ++j)
382 {
383 retStr += " ";
384 retStr += UCnt[j]->GetSymbol();
385 }
386 for(G4int k = 0; k < je; ++k)
387 {
388 retStr += " ";
389 retStr += UCnt[k]->GetName();
390 }
391 return retStr;
392}
std::vector< G4UnitDefinition * > G4UnitsContainer
std::vector< G4UnitsCategory * > G4UnitsTable
Definition: G4UnitsTable.hh:68
static G4UnitsTable & GetUnitsTable()

Referenced by G4MatScanMessenger::G4MatScanMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4UIparameter::SetDefaultUnit(), G4UIcmdWith3VectorAndUnit::SetUnitCategory(), and G4UIcmdWithADoubleAndUnit::SetUnitCategory().

◆ ValueOf()

Member Data Documentation

◆ commandFailureCode

G4int G4UIcommand::commandFailureCode = 0
protected

Definition at line 209 of file G4UIcommand.hh.

Referenced by CommandFailed(), IfCommandFailed(), and ResetFailure().

◆ failureDescription

G4String G4UIcommand::failureDescription = ""
protected

Definition at line 210 of file G4UIcommand.hh.

Referenced by CommandFailed(), GetFailureDescription(), and ResetFailure().

◆ toBeBroadcasted

G4bool G4UIcommand::toBeBroadcasted = false
protected

Definition at line 205 of file G4UIcommand.hh.

Referenced by SetToBeBroadcasted(), and ToBeBroadcasted().

◆ toBeFlushed

G4bool G4UIcommand::toBeFlushed = false
protected

Definition at line 206 of file G4UIcommand.hh.

Referenced by SetToBeFlushed(), and ToBeFlushed().

◆ workerThreadOnly

G4bool G4UIcommand::workerThreadOnly = false
protected

Definition at line 207 of file G4UIcommand.hh.

Referenced by DoIt(), IsWorkerThreadOnly(), List(), and SetWorkerThreadOnly().


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