Geant4 11.1.1
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 Types

enum  CommandType {
  BaseClassCmd , WithoutParameterCmd , WithABoolCmd , WithAnIntegerCmd ,
  WithALongIntCmd , WithADoubleCmd , WithADoubleAndUnitCmd , With3VectorCmd ,
  With3VectorAndUnitCmd , WithAStringCmd , CmdDirectory = -1
}
 

Public Member Functions

 G4UIcommand ()=default
 
 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 ()
 
CommandType GetCommandType () const
 
void SetCommandType (CommandType)
 
void SetDefaultSortFlag (G4bool val)
 

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 (const G4ThreeVector &vec)
 
static G4String ConvertToString (const 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 = ""
 
G4bool ifSort = false
 

Detailed Description

Definition at line 51 of file G4UIcommand.hh.

Member Typedef Documentation

◆ tokenNum

Definition at line 215 of file G4UIcommand.hh.

◆ yystype

Definition at line 214 of file G4UIcommand.hh.

Member Enumeration Documentation

◆ CommandType

Enumerator
BaseClassCmd 
WithoutParameterCmd 
WithABoolCmd 
WithAnIntegerCmd 
WithALongIntCmd 
WithADoubleCmd 
WithADoubleAndUnitCmd 
With3VectorCmd 
With3VectorAndUnitCmd 
WithAStringCmd 
CmdDirectory 

Definition at line 198 of file G4UIcommand.hh.

Constructor & Destructor Documentation

◆ G4UIcommand() [1/2]

G4UIcommand::G4UIcommand ( )
default

◆ G4UIcommand() [2/2]

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

Definition at line 49 of file G4UIcommand.cc.

51 : toBeBroadcasted(tBB)
52 , messenger(theMessenger)
53{
54 G4String comStr = theCommandPath;
55 G4UIcommandCommonConstructorCode(comStr);
56 availabelStateList.clear();
57 availabelStateList.push_back(G4State_PreInit);
58 availabelStateList.push_back(G4State_Init);
59 availabelStateList.push_back(G4State_Idle);
60 availabelStateList.push_back(G4State_GeomClosed);
61 availabelStateList.push_back(G4State_EventProc);
62 availabelStateList.push_back(G4State_Abort);
63}
@ G4State_EventProc
@ G4State_Init
@ G4State_Idle
@ G4State_Abort
@ G4State_GeomClosed
@ G4State_PreInit
G4bool toBeBroadcasted
Definition: G4UIcommand.hh:219

◆ ~G4UIcommand()

G4UIcommand::~G4UIcommand ( )
virtual

Definition at line 116 of file G4UIcommand.cc.

117{
119 if(fUImanager != nullptr)
120 {
121 fUImanager->RemoveCommand(this);
122 }
123
124 std::size_t n_parameterEntry = parameter.size();
125 for(std::size_t i_thParameter = 0; i_thParameter < n_parameterEntry;
126 ++i_thParameter)
127 {
128 delete parameter[i_thParameter];
129 }
130 parameter.clear();
131}
void RemoveCommand(G4UIcommand *aCommand)
Definition: G4UImanager.cc:293
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77

Member Function Documentation

◆ AvailableForStates() [1/5]

void G4UIcommand::AvailableForStates ( G4ApplicationState  s1)

Definition at line 287 of file G4UIcommand.cc.

288{
289 availabelStateList.clear();
290 availabelStateList.push_back(s1);
291}

Referenced by G4AdjointSimMessenger::G4AdjointSimMessenger(), G4DeexParametersMessenger::G4DeexParametersMessenger(), G4EmExtraParametersMessenger::G4EmExtraParametersMessenger(), G4EmLowEParametersMessenger::G4EmLowEParametersMessenger(), G4EmMessenger::G4EmMessenger(), G4EmParametersMessenger::G4EmParametersMessenger(), G4ErrorMessenger::G4ErrorMessenger(), G4EvManMessenger::G4EvManMessenger(), G4FastSimulationMessenger::G4FastSimulationMessenger(), G4FTFTuningsMessenger::G4FTFTuningsMessenger(), 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(), 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 294 of file G4UIcommand.cc.

296{
297 availabelStateList.clear();
298 availabelStateList.push_back(s1);
299 availabelStateList.push_back(s2);
300}

◆ AvailableForStates() [3/5]

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

Definition at line 303 of file G4UIcommand.cc.

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

◆ AvailableForStates() [4/5]

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

Definition at line 314 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}

◆ AvailableForStates() [5/5]

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

Definition at line 327 of file G4UIcommand.cc.

332{
333 availabelStateList.clear();
334 availabelStateList.push_back(s1);
335 availabelStateList.push_back(s2);
336 availabelStateList.push_back(s3);
337 availabelStateList.push_back(s4);
338 availabelStateList.push_back(s5);
339}

◆ CategoryOf()

◆ CheckNewValue()

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

Definition at line 629 of file G4UIcommand.cc.

630{
631 yystype result;
632 // if( TypeCheck(newValue) == 0 ) return 1;
633 if(!rangeString.empty())
634 {
635 if(RangeCheck(newValue) == 0)
636 {
638 }
639 }
640 return 0; // succeeded
641}
@ fParameterOutOfRange
yystype { tokenNum type{ tokenNum::NONE } yystype
Definition: G4UItokenNum.hh:67

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:223
G4String failureDescription
Definition: G4UIcommand.hh:224

◆ CommandFailed() [2/2]

◆ ConvertTo3Vector()

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

Definition at line 601 of file G4UIcommand.cc.

602{
603 G4double vx;
604 G4double vy;
605 G4double vz;
606 std::istringstream is(st);
607 is >> vx >> vy >> vz;
608 return G4ThreeVector(vx, vy, vz);
609}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83

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

◆ ConvertToBool()

G4bool G4UIcommand::ConvertToBool ( const char *  st)
static

Definition at line 549 of file G4UIcommand.cc.

550{
552 G4bool vl = false;
553 if(v == "Y" || v == "YES" || v == "1" || v == "T" || v == "TRUE")
554 {
555 vl = true;
556 }
557 return vl;
558}
bool G4bool
Definition: G4Types.hh:86
G4String to_upper_copy(G4String str)
Return uppercase copy of string.

Referenced by G4UIcmdWithABool::GetNewBoolValue(), G4OpticalParametersMessenger::SetNewValue(), G4OpenGLViewerMessenger::SetNewValue(), G4ToolsSGOffscreenViewer::Messenger::SetNewValue(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::Messenger::SetNewValue(), G4InteractorMessenger::SetNewValue(), G4VisCommandAbortReviewKeptEvents::SetNewValue(), G4VisCommandAbortReviewPlots::SetNewValue(), G4VisCommandDrawOnlyToBeKeptEvents::SetNewValue(), G4VisCommandEnable::SetNewValue(), G4VisCommandGeometrySetDaughtersInvisible::SetNewValue(), G4VisCommandGeometrySetForceAuxEdgeVisible::SetNewValue(), G4VisCommandGeometrySetForceCloud::SetNewValue(), G4VisCommandGeometrySetForceSolid::SetNewValue(), G4VisCommandGeometrySetForceWireframe::SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValue(), G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSetVolumeForField::SetNewValue(), G4VisCommandsTouchableSet::SetNewValue(), G4VisCommandViewerDefaultHiddenEdge::SetNewValue(), G4VisCommandsViewerSet::SetNewValue(), G4HnMessenger::SetNewValue(), and G4NtupleMessenger::SetNewValue().

◆ ConvertToDimensioned3Vector()

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

Definition at line 612 of file G4UIcommand.cc.

613{
614 G4double vx;
615 G4double vy;
616 G4double vz;
617 char unts[30];
618 std::istringstream is(st);
619 is >> vx >> vy >> vz >> unts;
620 G4String unt = unts;
621 G4double uv = ValueOf(unt);
622 return G4ThreeVector(vx * uv, vy * uv, vz * uv);
623}
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:362

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

◆ ConvertToDimensionedDouble()

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

Definition at line 588 of file G4UIcommand.cc.

589{
590 G4double vl;
591 char unts[30];
592
593 std::istringstream is(st);
594 is >> vl >> unts;
595 G4String unt = unts;
596
597 return (vl * ValueOf(unt));
598}

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

◆ ConvertToDouble()

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

Definition at line 579 of file G4UIcommand.cc.

580{
581 G4double vl;
582 std::istringstream is(st);
583 is >> vl;
584 return vl;
585}

Referenced by G4UIcmdWith3VectorAndUnit::DoIt(), G4UIcmdWithADoubleAndUnit::DoIt(), G4UIcmdWithADouble::GetNewDoubleValue(), G4VisCommandsTouchableSet::SetNewValue(), and G4VisCommandsViewerSet::SetNewValue().

◆ ConvertToInt()

◆ ConvertToLongInt()

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

Definition at line 570 of file G4UIcommand.cc.

571{
572 G4long vl;
573 std::istringstream is(st);
574 is >> vl;
575 return vl;
576}
long G4long
Definition: G4Types.hh:87

Referenced by G4UIcmdWithALongInt::GetNewLongIntValue().

◆ ConvertToString() [1/7]

G4String G4UIcommand::ConvertToString ( const G4ThreeVector vec)
static

Definition at line 511 of file G4UIcommand.cc.

512{
513 std::ostringstream os;
515 {
516 os << std::setprecision(17) << vec.x() << " " << vec.y() << " " << vec.z();
517 }
518 else
519 {
520 os << vec.x() << " " << vec.y() << " " << vec.z();
521 }
522 G4String vl = os.str();
523 return vl;
524}
double z() const
double x() const
double y() const
static G4bool DoublePrecisionStr()
Definition: G4UImanager.cc:160

◆ ConvertToString() [2/7]

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

Definition at line 527 of file G4UIcommand.cc.

529{
530 G4String unt = unitName;
531 G4double uv = ValueOf(unitName);
532
533 std::ostringstream os;
535 {
536 os << std::setprecision(17) << vec.x() / uv << " " << vec.y() / uv << " "
537 << vec.z() / uv << " " << unitName;
538 }
539 else
540 {
541 os << vec.x() / uv << " " << vec.y() / uv << " " << vec.z() / uv << " "
542 << unitName;
543 }
544 G4String vl = os.str();
545 return vl;
546}

◆ ConvertToString() [3/7]

G4String G4UIcommand::ConvertToString ( G4bool  boolVal)
static

Definition at line 446 of file G4UIcommand.cc.

447{
448 G4String vl = "0";
449 if(boolVal)
450 {
451 vl = "1";
452 }
453 return vl;
454}

Referenced by G4tgrParameterMgr::AddParameterNumber(), G4tgbRotationMatrix::BuildG4RotMatrix(), G4tgbPlaceParameterisation::CheckNExtraData(), G4tgbVolume::CheckNoSolidParams(), G4tgrUtils::CheckWLsize(), G4UIcmdWith3VectorAndUnit::ConvertToStringWithDefaultUnit(), G4UIcmdWithADoubleAndUnit::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(), G4tgrSolidMultiUnion::G4tgrSolidMultiUnion(), G4tgrMaterialSimple::GetComponent(), G4GeometryMessenger::GetCurrentValue(), G4DecayTableMessenger::GetCurrentValue(), G4ParticleMessenger::GetCurrentValue(), G4ParticlePropertyMessenger::GetCurrentValue(), G4tgrMessenger::GetCurrentValue(), G4PersistencyCenterMessenger::GetCurrentValue(), G4ProductionCutsTableMessenger::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(), G4ScoringMessenger::GetCurrentValue(), G4EvManMessenger::GetCurrentValue(), G4ParticleGunMessenger::GetCurrentValue(), G4UIcontrolMessenger::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(), G4VisCommandsViewerSet::SetNewValue(), G4GenericMessenger::SetNewValue(), G4AttCheck::Standard(), G4EmTableUtil::StoreMscTable(), and G4TheMTRayTracer::Trace().

◆ ConvertToString() [4/7]

G4String G4UIcommand::ConvertToString ( G4double  doubleValue)
static

Definition at line 475 of file G4UIcommand.cc.

476{
477 std::ostringstream os;
479 {
480 os << std::setprecision(17) << doubleValue;
481 }
482 else
483 {
484 os << doubleValue;
485 }
486 G4String vl = os.str();
487 return vl;
488}

◆ ConvertToString() [5/7]

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

Definition at line 491 of file G4UIcommand.cc.

493{
494 G4String unt = unitName;
495 G4double uv = ValueOf(unitName);
496
497 std::ostringstream os;
499 {
500 os << std::setprecision(17) << doubleValue / uv << " " << unitName;
501 }
502 else
503 {
504 os << doubleValue / uv << " " << unitName;
505 }
506 G4String vl = os.str();
507 return vl;
508}

◆ ConvertToString() [6/7]

G4String G4UIcommand::ConvertToString ( G4int  intValue)
static

Definition at line 457 of file G4UIcommand.cc.

458{
459 std::ostringstream os;
460 os << intValue;
461 G4String vl = os.str();
462 return vl;
463}

◆ ConvertToString() [7/7]

G4String G4UIcommand::ConvertToString ( G4long  longValue)
static

Definition at line 466 of file G4UIcommand.cc.

467{
468 std::ostringstream os;
469 os << longValue;
470 G4String vl = os.str();
471 return vl;
472}

◆ DoIt()

G4int G4UIcommand::DoIt ( G4String  parameterList)
virtual

Reimplemented in G4UIcmdWith3VectorAndUnit, and G4UIcmdWithADoubleAndUnit.

Definition at line 146 of file G4UIcommand.cc.

147{
148 G4String correctParameters;
149 std::size_t n_parameterEntry = parameter.size();
150 if(n_parameterEntry != 0)
151 {
152 G4String aToken;
153 G4String correctToken;
154 G4Tokenizer parameterToken(parameterList);
155 for(std::size_t i_thParameter = 0; i_thParameter < n_parameterEntry;
156 ++i_thParameter)
157 {
158 if(i_thParameter > 0)
159 {
160 correctParameters.append(" ");
161 }
162 aToken = parameterToken();
163 if(aToken.length() > 0 && aToken[0] == '"')
164 {
165 while(aToken.back() != '"' ||
166 (aToken.length() == 1 && aToken[0] == '"'))
167 {
168 G4String additionalToken = parameterToken();
169 if(additionalToken.empty())
170 {
171 return G4int(fParameterUnreadable + i_thParameter);
172 }
173 aToken += " ";
174 aToken += additionalToken;
175 }
176 }
177 else if(i_thParameter == n_parameterEntry - 1 &&
178 parameter[i_thParameter]->GetParameterType() == 's')
179 {
180 G4String anotherToken;
181 while(!((anotherToken = parameterToken()).empty()))
182 {
183 std::size_t idxs = anotherToken.find("#");
184 if(idxs == std::string::npos)
185 {
186 aToken += " ";
187 aToken += anotherToken;
188 }
189 else if(idxs > 0)
190 {
191 aToken += " ";
192 aToken += anotherToken.substr(0, idxs);
193 break;
194 }
195 else
196 {
197 break;
198 }
199 }
200 }
201
202 if(aToken.empty() || aToken == "!")
203 {
204 if(parameter[i_thParameter]->IsOmittable())
205 {
206 if(parameter[i_thParameter]->GetCurrentAsDefault())
207 {
208 G4Tokenizer cvSt(messenger->GetCurrentValue(this));
209 G4String parVal;
210 for(std::size_t ii = 0; ii < i_thParameter; ++ii)
211 {
212 parVal = cvSt();
213 if(parVal[0] == '"')
214 {
215 while(parVal.back() != '"')
216 {
217 G4String additionalToken = cvSt();
218 if(additionalToken.empty())
219 {
220 return G4int(fParameterUnreadable + i_thParameter);
221 }
222 parVal += " ";
223 parVal += additionalToken;
224 }
225 }
226 }
227 G4String aCVToken = cvSt();
228 if(aCVToken[0] == '"')
229 {
230 while(aCVToken.back() != '"')
231 {
232 G4String additionalToken = cvSt();
233 if(additionalToken.empty())
234 {
235 return G4int(fParameterUnreadable + i_thParameter);
236 }
237 aCVToken += " ";
238 aCVToken += additionalToken;
239 }
240 }
241 correctParameters.append(aCVToken);
242 }
243 else
244 {
245 correctParameters.append(
246 parameter[i_thParameter]->GetDefaultValue());
247 }
248 }
249 else
250 {
251 return G4int(fParameterUnreadable + i_thParameter);
252 }
253 }
254 else
255 {
256 G4int stat = parameter[i_thParameter]->CheckNewValue(aToken);
257 if(stat != 0)
258 {
259 return stat + G4int(i_thParameter);
260 }
261 correctParameters.append(aToken);
262 }
263 }
264 }
265
266 if(CheckNewValue(correctParameters) != 0)
267 {
268 return fParameterOutOfRange + 99;
269 }
270
272 {
273 return 0;
274 }
275
276 messenger->SetNewValue(this, correctParameters);
277 return 0;
278}
@ fParameterUnreadable
G4int CheckNewValue(const char *newValue)
Definition: G4UIcommand.cc:629
G4bool workerThreadOnly
Definition: G4UIcommand.hh:221
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()

◆ GetCommandType()

CommandType G4UIcommand::GetCommandType ( ) const
inline

Definition at line 204 of file G4UIcommand.hh.

205 { return commandType; }

◆ GetCurrentValue()

G4String G4UIcommand::GetCurrentValue ( )

Definition at line 281 of file G4UIcommand.cc.

282{
283 return messenger->GetCurrentValue(this);
284}

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

◆ GetGuidanceLine()

◆ GetMessenger()

G4UImessenger * G4UIcommand::GetMessenger ( ) const
inline

Definition at line 145 of file G4UIcommand.hh.

145{ return messenger; }

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

◆ GetParameter()

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

Definition at line 140 of file G4UIcommand.hh.

140{ return parameter[i]; }

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

◆ GetParameterEntries()

◆ GetRange()

const G4String & G4UIcommand::GetRange ( ) const
inline

Definition at line 128 of file G4UIcommand.hh.

128{ return rangeString; }

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

◆ GetStateList()

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

Definition at line 141 of file G4UIcommand.hh.

142 {
143 return &availabelStateList;
144 }

Referenced by G4UIcommandTree::CreateHTML().

◆ GetTitle()

const G4String G4UIcommand::GetTitle ( ) const
inline

Definition at line 166 of file G4UIcommand.hh.

167 {
168 return (commandGuidance.empty()) ? 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 342 of file G4UIcommand.cc.

343{
344 G4bool av = false;
345 G4ApplicationState currentState =
347
348 std::size_t nState = availabelStateList.size();
349 for(std::size_t i = 0; i < nState; ++i)
350 {
351 if(availabelStateList[i] == currentState)
352 {
353 av = true;
354 break;
355 }
356 }
357
358 return av;
359}
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 411 of file G4UIcommand.cc.

412{
413 G4cout << G4endl;
414 G4cout << G4endl;
415 if(commandPath.back() != '/')
416 {
417 G4cout << "Command " << commandPath << G4endl;
418 }
420 {
421 G4cout << " ---- available only in worker thread" << G4endl;
422 }
423 G4cout << "Guidance :" << G4endl;
424 std::size_t n_guidanceEntry = commandGuidance.size();
425 for(std::size_t i_thGuidance = 0; i_thGuidance < n_guidanceEntry; ++i_thGuidance)
426 {
427 G4cout << commandGuidance[i_thGuidance] << G4endl;
428 }
429 if(!rangeString.empty())
430 {
431 G4cout << " Range of parameters : " << rangeString << G4endl;
432 }
433 std::size_t n_parameterEntry = parameter.size();
434 if(n_parameterEntry > 0)
435 {
436 for(std::size_t i_thParameter = 0; i_thParameter < n_parameterEntry;
437 ++i_thParameter)
438 {
439 parameter[i_thParameter]->List();
440 }
441 }
442 G4cout << G4endl;
443}
#define G4endl
Definition: G4ios.hh:57
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 140 of file G4UIcommand.cc.

141{
142 return (commandPath != right.GetCommandPath());
143}
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:137

◆ operator==()

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

Definition at line 134 of file G4UIcommand.cc.

135{
136 return (commandPath == right.GetCommandPath());
137}

◆ ResetFailure()

void G4UIcommand::ResetFailure ( )
inline

Definition at line 191 of file G4UIcommand.hh.

192 {
195 }

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

◆ SetCommandType()

void G4UIcommand::SetCommandType ( CommandType  typ)

Definition at line 89 of file G4UIcommand.cc.

90{
91 if(messenger==nullptr)
92 { // this must be a directory
93 if(typ != CmdDirectory)
94 {
96 ed << "A UI command <" << commandPath
97 << "> is defined without vaild messenger.";
98 G4Exception("G4UIcommand::SetCommandType","UI2031",
100 }
101 else if(commandPath.back() != '/')
102 {
104 ed << "G4UIcommand Warning : \n"
105 << " <" << commandPath << "> must be a directory."
106 << " '/' is appended.";
107 G4Exception("G4UIcommand::SetCommandType","UI2032",
108 JustWarning,ed);
109 commandPath += "/";
110 }
111 }
112 commandType = typ;
113}
@ JustWarning
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

Referenced by G4UIcmdWith3Vector::G4UIcmdWith3Vector(), G4UIcmdWith3VectorAndUnit::G4UIcmdWith3VectorAndUnit(), G4UIcmdWithABool::G4UIcmdWithABool(), G4UIcmdWithADouble::G4UIcmdWithADouble(), G4UIcmdWithADoubleAndUnit::G4UIcmdWithADoubleAndUnit(), G4UIcmdWithALongInt::G4UIcmdWithALongInt(), G4UIcmdWithAnInteger::G4UIcmdWithAnInteger(), G4UIcmdWithAString::G4UIcmdWithAString(), G4UIcmdWithoutParameter::G4UIcmdWithoutParameter(), and G4UIdirectory::G4UIdirectory().

◆ SetDefaultSortFlag()

void G4UIcommand::SetDefaultSortFlag ( G4bool  val)
inline

Definition at line 208 of file G4UIcommand.hh.

209 { ifSort = val; }
G4bool ifSort
Definition: G4UIcommand.hh:226

Referenced by G4UIcommandTree::AddNewCommand().

◆ SetGuidance()

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

Definition at line 157 of file G4UIcommand.hh.

162 {
163 commandGuidance.emplace_back(aGuidance);
164 }

Referenced by G4VVisCommand::CopyGuidanceFrom(), G4CascadeParamMessenger::CreateDirectory(), G4UImessenger::CreateDirectory(), 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(), G4FTFTuningsMessenger::G4FTFTuningsMessenger(), 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(), G4RadioactiveDecayMessenger::G4RadioactiveDecayMessenger(), G4RunMessenger::G4RunMessenger(), 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 147 of file G4UIcommand.hh.

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

Referenced by G4VVisCommand::CopyParametersFrom(), 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(), 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(), G4VisCommandSceneAddPlotter::G4VisCommandSceneAddPlotter(), 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 121 of file G4UIcommand.hh.

121{ rangeString = rs; }

Referenced by G4DecayTableMessenger::G4DecayTableMessenger(), G4EmParametersMessenger::G4EmParametersMessenger(), G4EvManMessenger::G4EvManMessenger(), G4FTFTuningsMessenger::G4FTFTuningsMessenger(), 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(), G4RadioactiveDecayMessenger::G4RadioactiveDecayMessenger(), G4RunMessenger::G4RunMessenger(), 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:220

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 376 of file G4UIcommand.cc.

377{
378 G4String retStr;
380 std::size_t i;
381 for(i = 0; i < UTbl.size(); ++i)
382 {
383 if(UTbl[i]->GetName() == unitCategory)
384 {
385 break;
386 }
387 }
388 if(i == UTbl.size())
389 {
390 G4cerr << "Unit category <" << unitCategory << "> is not defined."
391 << G4endl;
392 return retStr;
393 }
394 G4UnitsContainer& UCnt = UTbl[i]->GetUnitsList();
395 retStr = UCnt[0]->GetSymbol();
396 std::size_t je = UCnt.size();
397 for(std::size_t j = 1; j < je; ++j)
398 {
399 retStr += " ";
400 retStr += UCnt[j]->GetSymbol();
401 }
402 for(std::size_t k = 0; k < je; ++k)
403 {
404 retStr += " ";
405 retStr += UCnt[k]->GetName();
406 }
407 return retStr;
408}
std::vector< G4UnitDefinition * > G4UnitsContainer
std::vector< G4UnitsCategory * > G4UnitsTable
Definition: G4UnitsTable.hh:68
G4GLOB_DLL std::ostream G4cerr
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 223 of file G4UIcommand.hh.

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

◆ failureDescription

G4String G4UIcommand::failureDescription = ""
protected

Definition at line 224 of file G4UIcommand.hh.

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

◆ ifSort

G4bool G4UIcommand::ifSort = false
protected

Definition at line 226 of file G4UIcommand.hh.

Referenced by G4UIdirectory::IfSort(), SetDefaultSortFlag(), and G4UIdirectory::Sort().

◆ toBeBroadcasted

G4bool G4UIcommand::toBeBroadcasted = false
protected

Definition at line 219 of file G4UIcommand.hh.

Referenced by SetToBeBroadcasted(), and ToBeBroadcasted().

◆ toBeFlushed

G4bool G4UIcommand::toBeFlushed = false
protected

Definition at line 220 of file G4UIcommand.hh.

Referenced by SetToBeFlushed(), and ToBeFlushed().

◆ workerThreadOnly

G4bool G4UIcommand::workerThreadOnly = false
protected

Definition at line 221 of file G4UIcommand.hh.

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


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