Geant4 9.6.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)
 
virtual ~G4UIcommand ()
 
G4int operator== (const G4UIcommand &right) const
 
G4int 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
 
G4int GetGuidanceEntries () const
 
const G4StringGetGuidanceLine (G4int i) const
 
const G4StringGetCommandPath () const
 
const G4StringGetCommandName () const
 
G4int 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
 

Static Public Member Functions

static G4String ConvertToString (G4bool boolVal)
 
static G4String ConvertToString (G4int intValue)
 
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 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 Member Functions

G4int CheckNewValue (const char *newValue)
 

Detailed Description

Definition at line 51 of file G4UIcommand.hh.

Constructor & Destructor Documentation

◆ G4UIcommand() [1/2]

G4UIcommand::G4UIcommand ( )

Definition at line 41 of file G4UIcommand.cc.

42 : messenger(0), bp(0), token(IDENTIFIER), paramERR(0)
43{
44}
@ IDENTIFIER
Definition: G4UItokenNum.hh:39

◆ G4UIcommand() [2/2]

G4UIcommand::G4UIcommand ( const char *  theCommandPath,
G4UImessenger theMessenger 
)

Definition at line 46 of file G4UIcommand.cc.

48:messenger(theMessenger),token(IDENTIFIER),paramERR(0)
49{
50 G4String comStr = theCommandPath;
51 if(!theMessenger)
52 { // this must be a directory
53 if(comStr(comStr.length()-1)!='/')
54 {
55 G4cerr << "G4UIcommand Warning : " << G4endl;
56 G4cerr << " <" << theCommandPath << "> must be a directory." << G4endl;
57 G4cerr << " '/' is appended." << G4endl;
58 comStr += "/";
59 }
60 }
61 G4UIcommandCommonConstructorCode (comStr);
62 G4String nullString;
63 availabelStateList.clear();
64 availabelStateList.push_back(G4State_PreInit);
65 availabelStateList.push_back(G4State_Init);
66 availabelStateList.push_back(G4State_Idle);
67 availabelStateList.push_back(G4State_GeomClosed);
68 availabelStateList.push_back(G4State_EventProc);
69 availabelStateList.push_back(G4State_Abort);
70}
@ G4State_EventProc
@ G4State_Init
@ G4State_Idle
@ G4State_Abort
@ G4State_GeomClosed
@ G4State_PreInit
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr

◆ ~G4UIcommand()

G4UIcommand::~G4UIcommand ( )
virtual

Definition at line 83 of file G4UIcommand.cc.

84{
86 if(fUImanager) fUImanager->RemoveCommand(this);
87
88 G4int n_parameterEntry = parameter.size();
89 for( G4int i_thParameter=0; i_thParameter < n_parameterEntry; i_thParameter++ )
90 { delete parameter[i_thParameter]; }
91 parameter.clear();
92}
int G4int
Definition: G4Types.hh:66
void RemoveCommand(G4UIcommand *aCommand)
Definition: G4UImanager.cc:225
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:51

Member Function Documentation

◆ AvailableForStates() [1/5]

◆ AvailableForStates() [2/5]

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

Definition at line 225 of file G4UIcommand.cc.

227{
228 availabelStateList.clear();
229 availabelStateList.push_back(s1);
230 availabelStateList.push_back(s2);
231}

◆ AvailableForStates() [3/5]

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

Definition at line 233 of file G4UIcommand.cc.

236{
237 availabelStateList.clear();
238 availabelStateList.push_back(s1);
239 availabelStateList.push_back(s2);
240 availabelStateList.push_back(s3);
241}

◆ AvailableForStates() [4/5]

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

Definition at line 243 of file G4UIcommand.cc.

247{
248 availabelStateList.clear();
249 availabelStateList.push_back(s1);
250 availabelStateList.push_back(s2);
251 availabelStateList.push_back(s3);
252 availabelStateList.push_back(s4);
253}

◆ AvailableForStates() [5/5]

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

Definition at line 255 of file G4UIcommand.cc.

260{
261 availabelStateList.clear();
262 availabelStateList.push_back(s1);
263 availabelStateList.push_back(s2);
264 availabelStateList.push_back(s3);
265 availabelStateList.push_back(s4);
266 availabelStateList.push_back(s5);
267}

◆ CategoryOf()

◆ CheckNewValue()

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

Definition at line 473 of file G4UIcommand.cc.

475{
476 yystype result;
477 // if( TypeCheck(newValue) == 0 ) return 1;
478 if( ! rangeString.isNull() )
479 { if( RangeCheck(newValue) == 0 ) return fParameterOutOfRange; }
480 return 0; // succeeded
481}
@ fParameterOutOfRange
G4bool isNull() const

Referenced by DoIt().

◆ ConvertTo3Vector()

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

Definition at line 441 of file G4UIcommand.cc.

442{
443 G4double vx;
444 G4double vy;
445 G4double vz;
446 std::istringstream is(st);
447 is >> vx >> vy >> vz;
448 return G4ThreeVector(vx,vy,vz);
449}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:64

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

◆ ConvertToBool()

◆ ConvertToDimensioned3Vector()

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

Definition at line 451 of file G4UIcommand.cc.

452{
453 G4double vx;
454 G4double vy;
455 G4double vz;
456 char unts[30];
457 std::istringstream is(st);
458 is >> vx >> vy >> vz >> unts;
459 G4String unt = unts;
460 G4double uv = ValueOf(unt);
461 return G4ThreeVector(vx*uv,vy*uv,vz*uv);
462}
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:288

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

◆ ConvertToDimensionedDouble()

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

Definition at line 429 of file G4UIcommand.cc.

430{
431 G4double vl;
432 char unts[30];
433
434 std::istringstream is(st);
435 is >> vl >> unts;
436 G4String unt = unts;
437
438 return (vl*ValueOf(unt));
439}

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

◆ ConvertToDouble()

◆ ConvertToInt()

G4int G4UIcommand::ConvertToInt ( const char *  st)
static

Definition at line 413 of file G4UIcommand.cc.

414{
415 G4int vl;
416 std::istringstream is(st);
417 is >> vl;
418 return vl;
419}

Referenced by G4UIcmdWithAnInteger::GetNewIntValue(), G4VisCommandsTouchableSet::SetNewValue(), G4VisCommandsViewerSet::SetNewValue(), and G4TrackingMessenger::SetNewValue().

◆ ConvertToString() [1/6]

G4String G4UIcommand::ConvertToString ( G4bool  boolVal)
static

Definition at line 349 of file G4UIcommand.cc.

350{
351 G4String vl = "0";
352 if(boolVal) vl = "1";
353 return vl;
354}

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

◆ ConvertToString() [2/6]

G4String G4UIcommand::ConvertToString ( G4double  doubleValue)
static

Definition at line 364 of file G4UIcommand.cc.

365{
366 std::ostringstream os;
367 os << doubleValue;
368 G4String vl = os.str();
369 return vl;
370}

◆ ConvertToString() [3/6]

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

Definition at line 372 of file G4UIcommand.cc.

373{
374 G4String unt = unitName;
375 G4double uv = ValueOf(unitName);
376
377 std::ostringstream os;
378 os << doubleValue/uv << " " << unitName;
379 G4String vl = os.str();
380 return vl;
381}

◆ ConvertToString() [4/6]

G4String G4UIcommand::ConvertToString ( G4int  intValue)
static

Definition at line 356 of file G4UIcommand.cc.

357{
358 std::ostringstream os;
359 os << intValue;
360 G4String vl = os.str();
361 return vl;
362}

◆ ConvertToString() [5/6]

G4String G4UIcommand::ConvertToString ( G4ThreeVector  vec)
static

Definition at line 383 of file G4UIcommand.cc.

384{
385 std::ostringstream os;
386 os << vec.x() << " " << vec.y() << " " << vec.z();
387 G4String vl = os.str();
388 return vl;
389}
double z() const
double x() const
double y() const

◆ ConvertToString() [6/6]

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

Definition at line 391 of file G4UIcommand.cc.

392{
393 G4String unt = unitName;
394 G4double uv = ValueOf(unitName);
395
396 std::ostringstream os;
397 os << vec.x()/uv << " " << vec.y()/uv << " " << vec.z()/uv
398 << " " << unitName;
399 G4String vl = os.str();
400 return vl;
401}

◆ DoIt()

G4int G4UIcommand::DoIt ( G4String  parameterList)
virtual

Reimplemented in G4UIcmdWith3VectorAndUnit, and G4UIcmdWithADoubleAndUnit.

Definition at line 104 of file G4UIcommand.cc.

105{
106 G4String correctParameters;
107 G4int n_parameterEntry = parameter.size();
108 if( n_parameterEntry != 0 )
109 {
110 G4String aToken;
111 G4String correctToken;
112 G4Tokenizer parameterToken( parameterList );
113 for( G4int i_thParameter=0; i_thParameter<n_parameterEntry; i_thParameter++ )
114 {
115 if(i_thParameter > 0)
116 {
117 correctParameters.append(" ");
118 }
119 aToken = parameterToken();
120 if( aToken.length()>0 && aToken(0)=='"' )
121 {
122 while( aToken(aToken.length()-1) != '"'
123 || ( aToken.length()==1 && aToken(0)=='"' ))
124 {
125 G4String additionalToken = parameterToken();
126 if( additionalToken.isNull() )
127 { return fParameterUnreadable+i_thParameter; }
128 aToken += " ";
129 aToken += additionalToken;
130 }
131 }
132 else if(i_thParameter==n_parameterEntry-1 && parameter[i_thParameter]->GetParameterType()=='s')
133 {
134 G4String anotherToken;
135 while(!((anotherToken=parameterToken()).isNull()))
136 {
137 G4int idxs = anotherToken.index("#");
138 if(idxs==G4int(std::string::npos))
139 {
140 aToken += " ";
141 aToken += anotherToken;
142 }
143 else if(idxs>0)
144 {
145 aToken += " ";
146 aToken += anotherToken(0,idxs);
147 break;
148 }
149 else
150 { break; }
151 }
152 }
153
154 if( aToken.isNull() || aToken == "!" )
155 {
156 if(parameter[i_thParameter]->IsOmittable())
157 {
158 if(parameter[i_thParameter]->GetCurrentAsDefault())
159 {
160 G4Tokenizer cvSt(messenger->GetCurrentValue(this));
161 G4String parVal;
162 for(G4int ii=0;ii<i_thParameter;ii++)
163 {
164 parVal = cvSt();
165 if (parVal(0)=='"')
166 {
167 while( parVal(parVal.length()-1) != '"' )
168 {
169 G4String additionalToken = cvSt();
170 if( additionalToken.isNull() )
171 { return fParameterUnreadable+i_thParameter; }
172 parVal += " ";
173 parVal += additionalToken;
174 }
175 }
176 }
177 G4String aCVToken = cvSt();
178 if (aCVToken(0)=='"')
179 {
180 while( aCVToken(aCVToken.length()-1) != '"' )
181 {
182 G4String additionalToken = cvSt();
183 if( additionalToken.isNull() )
184 { return fParameterUnreadable+i_thParameter; }
185 aCVToken += " ";
186 aCVToken += additionalToken;
187 }
188 // aCVToken.strip(G4String::both,'"');
189 }
190 correctParameters.append(aCVToken);
191 }
192 else
193 { correctParameters.append(parameter[i_thParameter]->GetDefaultValue()); }
194 }
195 else
196 { return fParameterUnreadable+i_thParameter; }
197 }
198 else
199 {
200 G4int stat = parameter[i_thParameter]->CheckNewValue( aToken );
201 if(stat) return stat+i_thParameter;
202 correctParameters.append(aToken);
203 }
204 }
205 }
206
207 if(CheckNewValue( correctParameters ))
208 { return fParameterOutOfRange+99; }
209
210 messenger->SetNewValue( this, correctParameters );
211 return 0;
212}
@ fParameterUnreadable
G4String & append(const G4String &)
str_size index(const char *, G4int pos=0) const
G4int CheckNewValue(const char *newValue)
Definition: G4UIcommand.cc:474
virtual G4String GetCurrentValue(G4UIcommand *command)
virtual void SetNewValue(G4UIcommand *command, G4String newValue)

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

◆ GetCommandName()

const G4String & G4UIcommand::GetCommandName ( ) const
inline

Definition at line 136 of file G4UIcommand.hh.

137 { return commandName; }

Referenced by G4UIcommandTree::CreateHTML(), G4GenericMessenger::GetCurrentValue(), and G4GenericMessenger::SetNewValue().

◆ GetCommandPath()

◆ GetCurrentValue()

G4String G4UIcommand::GetCurrentValue ( )

Definition at line 214 of file G4UIcommand.cc.

215{
216 return messenger->GetCurrentValue(this);
217}

Referenced by G4UImanager::GetCurrentValues().

◆ GetGuidanceEntries()

G4int G4UIcommand::GetGuidanceEntries ( ) const
inline

Definition at line 130 of file G4UIcommand.hh.

131 { return commandGuidance.size(); }

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

◆ GetGuidanceLine()

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

Definition at line 132 of file G4UIcommand.hh.

133 { return commandGuidance[i]; }

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

◆ GetMessenger()

G4UImessenger * G4UIcommand::GetMessenger ( ) const
inline

Definition at line 144 of file G4UIcommand.hh.

145 { return messenger; }

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

◆ GetParameter()

◆ GetParameterEntries()

G4int G4UIcommand::GetParameterEntries ( ) const
inline

Definition at line 138 of file G4UIcommand.hh.

139 { return parameter.size(); }

Referenced by G4UIcommandTree::CreateHTML(), G4UImanager::GetCurrentStringValue(), and G4InteractorMessenger::SetNewValue().

◆ GetRange()

const G4String & G4UIcommand::GetRange ( ) const
inline

Definition at line 128 of file G4UIcommand.hh.

129 { return rangeString; };

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

◆ GetStateList()

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

Definition at line 142 of file G4UIcommand.hh.

143 { return &availabelStateList; }

Referenced by G4UIcommandTree::CreateHTML().

◆ GetTitle()

const G4String G4UIcommand::GetTitle ( ) const
inline

Definition at line 165 of file G4UIcommand.hh.

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

Referenced by G4UIcommandTree::GetTitle().

◆ IsAvailable()

G4bool G4UIcommand::IsAvailable ( )

Definition at line 269 of file G4UIcommand.cc.

270{
271 G4bool av = false;
272 G4ApplicationState currentState
274
275 G4int nState = availabelStateList.size();
276 for(G4int i=0;i<nState;i++)
277 {
278 if(availabelStateList[i]==currentState)
279 {
280 av = true;
281 break;
282 }
283 }
284
285 return av;
286}
G4ApplicationState
G4ApplicationState GetCurrentState() const
static G4StateManager * GetStateManager()

Referenced by G4UImanager::ApplyCommand().

◆ List()

void G4UIcommand::List ( )
virtual

Definition at line 328 of file G4UIcommand.cc.

329{
330 G4cout << G4endl;
331 G4cout << G4endl;
332 if(commandPath(commandPath.length()-1)!='/')
333 { G4cout << "Command " << commandPath << G4endl; }
334 G4cout << "Guidance :" << G4endl;
335 G4int n_guidanceEntry = commandGuidance.size();
336 for( G4int i_thGuidance=0; i_thGuidance < n_guidanceEntry; i_thGuidance++ )
337 { G4cout << commandGuidance[i_thGuidance] << G4endl; }
338 if( ! rangeString.isNull() )
339 { G4cout << " Range of parameters : " << rangeString << G4endl; }
340 G4int n_parameterEntry = parameter.size();
341 if( n_parameterEntry > 0 )
342 {
343 for( G4int i_thParameter=0; i_thParameter<n_parameterEntry; i_thParameter++ )
344 { parameter[i_thParameter]->List(); }
345 }
346 G4cout << G4endl;
347}
G4DLLIMPORT std::ostream G4cout

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

◆ operator!=()

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

Definition at line 99 of file G4UIcommand.cc.

100{
101 return ( commandPath != right.GetCommandPath() );
102}
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:134

◆ operator==()

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

Definition at line 94 of file G4UIcommand.cc.

95{
96 return ( commandPath == right.GetCommandPath() );
97}

◆ SetGuidance()

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

Definition at line 156 of file G4UIcommand.hh.

157 {
158 commandGuidance.push_back( G4String( aGuidance ) );
159 }

Referenced by G4QMessenger::Add(), G4CascadeParamMessenger::CreateDirectory(), G4GenericMessenger::DeclareMethod(), G4GenericMessenger::DeclareProperty(), G4AdjointSimMessenger::G4AdjointSimMessenger(), G4AnalysisMessenger::G4AnalysisMessenger(), G4DecayTableMessenger::G4DecayTableMessenger(), G4DMmessenger::G4DMmessenger(), G4EmMessenger::G4EmMessenger(), G4EmQMessenger::G4EmQMessenger(), G4EnergyLossMessenger::G4EnergyLossMessenger(), G4ErrorMessenger::G4ErrorMessenger(), G4EvManMessenger::G4EvManMessenger(), G4FastSimulationMessenger::G4FastSimulationMessenger(), G4GDMLMessenger::G4GDMLMessenger(), G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger(), G4GenericMessenger::G4GenericMessenger(), G4GeometryMessenger::G4GeometryMessenger(), G4GMocrenMessenger::G4GMocrenMessenger(), G4HadronicEPTestMessenger::G4HadronicEPTestMessenger(), G4INCLXXInterfaceMessenger::G4INCLXXInterfaceMessenger(), G4InteractorMessenger::G4InteractorMessenger(), 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(), G4OpticalPhysicsMessenger::G4OpticalPhysicsMessenger(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4ParticleMessenger::G4ParticleMessenger(), G4ParticlePropertyMessenger::G4ParticlePropertyMessenger(), G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(), G4PolarizationMessenger::G4PolarizationMessenger(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4ProcessTableMessenger::G4ProcessTableMessenger(), G4ProductionCutsTableMessenger::G4ProductionCutsTableMessenger(), G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger(), G4RunMessenger::G4RunMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4SDmessenger::G4SDmessenger(), G4StackingMessenger::G4StackingMessenger(), G4tgrMessenger::G4tgrMessenger(), G4TrackingMessenger::G4TrackingMessenger(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UnitsMessenger::G4UnitsMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4VisCommandDrawTree::G4VisCommandDrawTree(), G4VisCommandDrawView::G4VisCommandDrawView(), G4VisCommandDrawVolume::G4VisCommandDrawVolume(), G4VisCommandGeometrySetColour::G4VisCommandGeometrySetColour(), G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible(), G4VisCommandGeometrySetForceAuxEdgeVisible::G4VisCommandGeometrySetForceAuxEdgeVisible(), 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(), G4VisCommandSetColour::G4VisCommandSetColour(), G4VisCommandSetLineWidth::G4VisCommandSetLineWidth(), G4VisCommandSetTextColour::G4VisCommandSetTextColour(), G4VisCommandSetTextLayout::G4VisCommandSetTextLayout(), G4VisCommandSetTouchable::G4VisCommandSetTouchable(), G4VisCommandSpecify::G4VisCommandSpecify(), G4VisCommandsTouchableSet::G4VisCommandsTouchableSet(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), G4VisCommandViewerDefaultHiddenEdge::G4VisCommandViewerDefaultHiddenEdge(), G4VisCommandViewerDefaultStyle::G4VisCommandViewerDefaultStyle(), GFlashShowerModelMessenger::GFlashShowerModelMessenger(), G4GenericMessenger::Command::SetGuidance(), G4GenericMessenger::SetGuidance(), G4VisCommandModelCreate< Factory >::SetNewValue(), and G4GenericMessenger::Command::SetUnit().

◆ SetParameter()

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

Definition at line 147 of file G4UIcommand.hh.

148 {
149 parameter.push_back( newParameter );
150 newVal.resize( parameter.size() );
151 }

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

◆ SetRange()

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

Definition at line 120 of file G4UIcommand.hh.

121 { rangeString = rs; }

Referenced by G4QMessenger::Add(), G4AnalysisMessenger::G4AnalysisMessenger(), G4DecayTableMessenger::G4DecayTableMessenger(), G4EnergyLossMessenger::G4EnergyLossMessenger(), G4EvManMessenger::G4EvManMessenger(), G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger(), G4GeometryMessenger::G4GeometryMessenger(), G4HadronicEPTestMessenger::G4HadronicEPTestMessenger(), G4INCLXXInterfaceMessenger::G4INCLXXInterfaceMessenger(), G4NistMessenger::G4NistMessenger(), G4OpticalPhysicsMessenger::G4OpticalPhysicsMessenger(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4ParticleMessenger::G4ParticleMessenger(), G4ParticlePropertyMessenger::G4ParticlePropertyMessenger(), G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(), G4PolarizationMessenger::G4PolarizationMessenger(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4ProcessTableMessenger::G4ProcessTableMessenger(), G4ProductionCutsTableMessenger::G4ProductionCutsTableMessenger(), G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger(), G4RunMessenger::G4RunMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4StackingMessenger::G4StackingMessenger(), G4tgrMessenger::G4tgrMessenger(), G4TrackingMessenger::G4TrackingMessenger(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4VisCommandSetLineWidth::G4VisCommandSetLineWidth(), G4GenericMessenger::Command::SetRange(), and G4GenericMessenger::Command::SetUnit().

◆ UnitsList()

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

Definition at line 300 of file G4UIcommand.cc.

301{
302 G4String retStr;
304 size_t i;
305 for(i=0;i<UTbl.size();i++)
306 { if(UTbl[i]->GetName()==unitCategory) break; }
307 if(i==UTbl.size())
308 {
309 G4cerr << "Unit category <" << unitCategory << "> is not defined." << G4endl;
310 return retStr;
311 }
312 G4UnitsContainer& UCnt = UTbl[i]->GetUnitsList();
313 retStr = UCnt[0]->GetSymbol();
314 G4int je = UCnt.size();
315 for(G4int j=1;j<je;j++)
316 {
317 retStr += " ";
318 retStr += UCnt[j]->GetSymbol();
319 }
320 for(G4int k=0;k<je;k++)
321 {
322 retStr += " ";
323 retStr += UCnt[k]->GetName();
324 }
325 return retStr;
326}
std::vector< G4UnitsCategory * > G4UnitsTable
Definition: G4UnitsTable.hh:60
std::vector< G4UnitDefinition * > G4UnitsContainer
static G4UnitsTable & GetUnitsTable()

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

◆ ValueOf()


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