Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ()
 
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
 
void SetToBeBroadcasted (G4bool val)
 
G4bool ToBeBroadcasted () const
 
void SetToBeFlushed (G4bool val)
 
G4bool ToBeFlushed () const
 
void SetWorkerThreadOnly (G4bool val=true)
 
G4bool IsWorkerThreadOnly () 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)
 

Protected Attributes

G4bool toBeBroadcasted
 
G4bool toBeFlushed
 
G4bool workerThreadOnly
 

Detailed Description

Definition at line 51 of file G4UIcommand.hh.

Constructor & Destructor Documentation

G4UIcommand::G4UIcommand ( )

Definition at line 42 of file G4UIcommand.cc.

43  : messenger(0), toBeBroadcasted(false), toBeFlushed(false), workerThreadOnly(false),
44  bp(0), token(IDENTIFIER), paramERR(0)
45 {
46 }
G4bool toBeFlushed
Definition: G4UIcommand.hh:180
G4bool workerThreadOnly
Definition: G4UIcommand.hh:181
G4bool toBeBroadcasted
Definition: G4UIcommand.hh:179
G4UIcommand::G4UIcommand ( const char *  theCommandPath,
G4UImessenger theMessenger,
G4bool  tBB = true 
)

Definition at line 48 of file G4UIcommand.cc.

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

Definition at line 100 of file G4UIcommand.cc.

101 {
102  G4UImanager* fUImanager = G4UImanager::GetUIpointer();
103  if(fUImanager) fUImanager->RemoveCommand(this);
104 
105  G4int n_parameterEntry = parameter.size();
106  for( G4int i_thParameter=0; i_thParameter < n_parameterEntry; i_thParameter++ )
107  { delete parameter[i_thParameter]; }
108  parameter.clear();
109 }
int G4int
Definition: G4Types.hh:78
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
void RemoveCommand(G4UIcommand *aCommand)
Definition: G4UImanager.cc:281

Here is the call graph for this function:

Member Function Documentation

void G4UIcommand::AvailableForStates ( G4ApplicationState  s1)

Definition at line 240 of file G4UIcommand.cc.

241 {
242  availabelStateList.clear();
243  availabelStateList.push_back(s1);
244 }
void G4UIcommand::AvailableForStates ( G4ApplicationState  s1,
G4ApplicationState  s2 
)

Definition at line 246 of file G4UIcommand.cc.

248 {
249  availabelStateList.clear();
250  availabelStateList.push_back(s1);
251  availabelStateList.push_back(s2);
252 }
void G4UIcommand::AvailableForStates ( G4ApplicationState  s1,
G4ApplicationState  s2,
G4ApplicationState  s3 
)

Definition at line 254 of file G4UIcommand.cc.

257 {
258  availabelStateList.clear();
259  availabelStateList.push_back(s1);
260  availabelStateList.push_back(s2);
261  availabelStateList.push_back(s3);
262 }
void G4UIcommand::AvailableForStates ( G4ApplicationState  s1,
G4ApplicationState  s2,
G4ApplicationState  s3,
G4ApplicationState  s4 
)

Definition at line 264 of file G4UIcommand.cc.

268 {
269  availabelStateList.clear();
270  availabelStateList.push_back(s1);
271  availabelStateList.push_back(s2);
272  availabelStateList.push_back(s3);
273  availabelStateList.push_back(s4);
274 }
void G4UIcommand::AvailableForStates ( G4ApplicationState  s1,
G4ApplicationState  s2,
G4ApplicationState  s3,
G4ApplicationState  s4,
G4ApplicationState  s5 
)

Definition at line 276 of file G4UIcommand.cc.

281 {
282  availabelStateList.clear();
283  availabelStateList.push_back(s1);
284  availabelStateList.push_back(s2);
285  availabelStateList.push_back(s3);
286  availabelStateList.push_back(s4);
287  availabelStateList.push_back(s5);
288 }
G4String G4UIcommand::CategoryOf ( const char *  unitName)
static

Definition at line 316 of file G4UIcommand.cc.

317 {
318  return G4UnitDefinition::GetCategory(unitName);
319 }
static G4String GetCategory(const G4String &)

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 508 of file G4UIcommand.cc.

509 {
510  yystype result;
511  // if( TypeCheck(newValue) == 0 ) return 1;
512  if( ! rangeString.isNull() )
513  { if( RangeCheck(newValue) == 0 ) return fParameterOutOfRange; }
514  return 0; // succeeded
515 }
G4double G4ParticleHPJENDLHEData::G4double result
G4bool isNull() const

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 475 of file G4UIcommand.cc.

476 {
477  G4double vx;
478  G4double vy;
479  G4double vz;
480  std::istringstream is(st);
481  is >> vx >> vy >> vz;
482  return G4ThreeVector(vx,vy,vz);
483 }
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

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

Definition at line 437 of file G4UIcommand.cc.

438 {
439  G4String v = st;
440  v.toUpper();
441  G4bool vl = false;
442  if( v=="Y" || v=="YES" || v=="1" || v=="T" || v=="TRUE" )
443  { vl = true; }
444  return vl;
445 }
void toUpper()
bool G4bool
Definition: G4Types.hh:79
tuple v
Definition: test.py:18

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 485 of file G4UIcommand.cc.

486 {
487  G4double vx;
488  G4double vy;
489  G4double vz;
490  char unts[30];
491  std::istringstream is(st);
492  is >> vx >> vy >> vz >> unts;
493  G4String unt = unts;
494  G4double uv = ValueOf(unt);
495  return G4ThreeVector(vx*uv,vy*uv,vz*uv);
496 }
CLHEP::Hep3Vector G4ThreeVector
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:309
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 463 of file G4UIcommand.cc.

464 {
465  G4double vl;
466  char unts[30];
467 
468  std::istringstream is(st);
469  is >> vl >> unts;
470  G4String unt = unts;
471 
472  return (vl*ValueOf(unt));
473 }
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:309
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 455 of file G4UIcommand.cc.

456 {
457  G4double vl;
458  std::istringstream is(st);
459  is >> vl;
460  return vl;
461 }
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

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

Definition at line 447 of file G4UIcommand.cc.

448 {
449  G4int vl;
450  std::istringstream is(st);
451  is >> vl;
452  return vl;
453 }
int G4int
Definition: G4Types.hh:78

Here is the caller graph for this function:

G4String G4UIcommand::ConvertToString ( G4bool  boolVal)
static

Definition at line 372 of file G4UIcommand.cc.

373 {
374  G4String vl = "0";
375  if(boolVal) vl = "1";
376  return vl;
377 }
G4String G4UIcommand::ConvertToString ( G4int  intValue)
static

Definition at line 379 of file G4UIcommand.cc.

380 {
381  std::ostringstream os;
382  os << intValue;
383  G4String vl = os.str();
384  return vl;
385 }
G4String G4UIcommand::ConvertToString ( G4double  doubleValue)
static

Definition at line 387 of file G4UIcommand.cc.

388 {
389  std::ostringstream os;
391  { os << std::setprecision(17) << doubleValue; }
392  else
393  { os << doubleValue; }
394  G4String vl = os.str();
395  return vl;
396 }
static G4bool DoublePrecisionStr()
Definition: G4UImanager.hh:301

Here is the call graph for this function:

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

Definition at line 398 of file G4UIcommand.cc.

399 {
400  G4String unt = unitName;
401  G4double uv = ValueOf(unitName);
402 
403  std::ostringstream os;
405  { os << std::setprecision(17) << doubleValue/uv << " " << unitName; }
406  else
407  { os << doubleValue/uv << " " << unitName; }
408  G4String vl = os.str();
409  return vl;
410 }
static G4bool DoublePrecisionStr()
Definition: G4UImanager.hh:301
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:309
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4String G4UIcommand::ConvertToString ( G4ThreeVector  vec)
static

Definition at line 412 of file G4UIcommand.cc.

413 {
414  std::ostringstream os;
416  { os << std::setprecision(17) << vec.x() << " " << vec.y() << " " << vec.z(); }
417  else
418  { os << vec.x() << " " << vec.y() << " " << vec.z(); }
419  G4String vl = os.str();
420  return vl;
421 }
double x() const
double z() const
static G4bool DoublePrecisionStr()
Definition: G4UImanager.hh:301
double y() const

Here is the call graph for this function:

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

Definition at line 423 of file G4UIcommand.cc.

424 {
425  G4String unt = unitName;
426  G4double uv = ValueOf(unitName);
427 
428  std::ostringstream os;
430  { os << std::setprecision(17) << vec.x()/uv << " " << vec.y()/uv << " " << vec.z()/uv << " " << unitName; }
431  else
432  { os << vec.x()/uv << " " << vec.y()/uv << " " << vec.z()/uv << " " << unitName; }
433  G4String vl = os.str();
434  return vl;
435 }
double x() const
double z() const
static G4bool DoublePrecisionStr()
Definition: G4UImanager.hh:301
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:309
double y() const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4int G4UIcommand::DoIt ( G4String  parameterList)
virtual

Reimplemented in G4UIcmdWith3VectorAndUnit, and G4UIcmdWithADoubleAndUnit.

Definition at line 123 of file G4UIcommand.cc.

124 {
125  G4String correctParameters;
126  G4int n_parameterEntry = parameter.size();
127  if( n_parameterEntry != 0 )
128  {
129  G4String aToken;
130  G4String correctToken;
131  G4Tokenizer parameterToken( parameterList );
132  for( G4int i_thParameter=0; i_thParameter<n_parameterEntry; i_thParameter++ )
133  {
134  if(i_thParameter > 0)
135  {
136  correctParameters.append(" ");
137  }
138  aToken = parameterToken();
139  if( aToken.length()>0 && aToken(0)=='"' )
140  {
141  while( aToken(aToken.length()-1) != '"'
142  || ( aToken.length()==1 && aToken(0)=='"' ))
143  {
144  G4String additionalToken = parameterToken();
145  if( additionalToken.isNull() )
146  { return fParameterUnreadable+i_thParameter; }
147  aToken += " ";
148  aToken += additionalToken;
149  }
150  }
151  else if(i_thParameter==n_parameterEntry-1 && parameter[i_thParameter]->GetParameterType()=='s')
152  {
153  G4String anotherToken;
154  while(!((anotherToken=parameterToken()).isNull()))
155  {
156  G4int idxs = anotherToken.index("#");
157  if(idxs==G4int(std::string::npos))
158  {
159  aToken += " ";
160  aToken += anotherToken;
161  }
162  else if(idxs>0)
163  {
164  aToken += " ";
165  aToken += anotherToken(0,idxs);
166  break;
167  }
168  else
169  { break; }
170  }
171  }
172 
173  if( aToken.isNull() || aToken == "!" )
174  {
175  if(parameter[i_thParameter]->IsOmittable())
176  {
177  if(parameter[i_thParameter]->GetCurrentAsDefault())
178  {
179  G4Tokenizer cvSt(messenger->GetCurrentValue(this));
180  G4String parVal;
181  for(G4int ii=0;ii<i_thParameter;ii++)
182  {
183  parVal = cvSt();
184  if (parVal(0)=='"')
185  {
186  while( parVal(parVal.length()-1) != '"' )
187  {
188  G4String additionalToken = cvSt();
189  if( additionalToken.isNull() )
190  { return fParameterUnreadable+i_thParameter; }
191  parVal += " ";
192  parVal += additionalToken;
193  }
194  }
195  }
196  G4String aCVToken = cvSt();
197  if (aCVToken(0)=='"')
198  {
199  while( aCVToken(aCVToken.length()-1) != '"' )
200  {
201  G4String additionalToken = cvSt();
202  if( additionalToken.isNull() )
203  { return fParameterUnreadable+i_thParameter; }
204  aCVToken += " ";
205  aCVToken += additionalToken;
206  }
207  // aCVToken.strip(G4String::both,'"');
208  }
209  correctParameters.append(aCVToken);
210  }
211  else
212  { correctParameters.append(parameter[i_thParameter]->GetDefaultValue()); }
213  }
214  else
215  { return fParameterUnreadable+i_thParameter; }
216  }
217  else
218  {
219  G4int stat = parameter[i_thParameter]->CheckNewValue( aToken );
220  if(stat) return stat+i_thParameter;
221  correctParameters.append(aToken);
222  }
223  }
224  }
225 
226  if(CheckNewValue( correctParameters ))
227  { return fParameterOutOfRange+99; }
228 
230 
231  messenger->SetNewValue( this, correctParameters );
232  return 0;
233 }
virtual G4String GetCurrentValue(G4UIcommand *command)
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
int G4int
Definition: G4Types.hh:78
G4bool workerThreadOnly
Definition: G4UIcommand.hh:181
G4int CheckNewValue(const char *newValue)
Definition: G4UIcommand.cc:508
str_size index(const char *, G4int pos=0) const
G4String & append(const G4String &)
G4bool IsMasterThread()
Definition: G4Threading.cc:146
G4bool isNull() const

Here is the call graph for this function:

Here is the caller graph for this function:

const G4String& G4UIcommand::GetCommandName ( ) const
inline

Definition at line 141 of file G4UIcommand.hh.

142  { return commandName; }

Here is the caller graph for this function:

const G4String& G4UIcommand::GetCommandPath ( ) const
inline

Definition at line 139 of file G4UIcommand.hh.

140  { return commandPath; }

Here is the caller graph for this function:

G4String G4UIcommand::GetCurrentValue ( )

Definition at line 235 of file G4UIcommand.cc.

236 {
237  return messenger->GetCurrentValue(this);
238 }
virtual G4String GetCurrentValue(G4UIcommand *command)

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4UIcommand::GetGuidanceEntries ( ) const
inline

Definition at line 135 of file G4UIcommand.hh.

136  { return commandGuidance.size(); }

Here is the caller graph for this function:

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

Definition at line 137 of file G4UIcommand.hh.

138  { return commandGuidance[i]; }

Here is the caller graph for this function:

G4UImessenger* G4UIcommand::GetMessenger ( ) const
inline

Definition at line 149 of file G4UIcommand.hh.

150  { return messenger; }

Here is the caller graph for this function:

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

Definition at line 145 of file G4UIcommand.hh.

146  { return parameter[i]; }

Here is the caller graph for this function:

G4int G4UIcommand::GetParameterEntries ( ) const
inline

Definition at line 143 of file G4UIcommand.hh.

144  { return parameter.size(); }

Here is the caller graph for this function:

const G4String& G4UIcommand::GetRange ( ) const
inline

Definition at line 133 of file G4UIcommand.hh.

134  { return rangeString; };

Here is the caller graph for this function:

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

Definition at line 147 of file G4UIcommand.hh.

148  { return &availabelStateList; }

Here is the caller graph for this function:

const G4String G4UIcommand::GetTitle ( ) const
inline

Definition at line 170 of file G4UIcommand.hh.

171  {
172  if(commandGuidance.size() == 0)
173  { return G4String("...Title not available..."); }
174  else
175  { return commandGuidance[0]; }
176  }

Here is the caller graph for this function:

G4bool G4UIcommand::IsAvailable ( )

Definition at line 290 of file G4UIcommand.cc.

291 {
292  G4bool av = false;
293  G4ApplicationState currentState
295 
296  G4int nState = availabelStateList.size();
297  for(G4int i=0;i<nState;i++)
298  {
299  if(availabelStateList[i]==currentState)
300  {
301  av = true;
302  break;
303  }
304  }
305 
306  return av;
307 }
int G4int
Definition: G4Types.hh:78
static G4StateManager * GetStateManager()
bool G4bool
Definition: G4Types.hh:79
G4ApplicationState GetCurrentState() const
G4ApplicationState

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4UIcommand::IsWorkerThreadOnly ( ) const
inline

Definition at line 194 of file G4UIcommand.hh.

195  { return workerThreadOnly; }
G4bool workerThreadOnly
Definition: G4UIcommand.hh:181

Here is the caller graph for this function:

void G4UIcommand::List ( )
virtual

Definition at line 349 of file G4UIcommand.cc.

350 {
351  G4cout << G4endl;
352  G4cout << G4endl;
353  if(commandPath(commandPath.length()-1)!='/')
354  { G4cout << "Command " << commandPath << G4endl; }
355  if(workerThreadOnly)
356  { G4cout << " ---- available only in worker thread" << G4endl; }
357  G4cout << "Guidance :" << G4endl;
358  G4int n_guidanceEntry = commandGuidance.size();
359  for( G4int i_thGuidance=0; i_thGuidance < n_guidanceEntry; i_thGuidance++ )
360  { G4cout << commandGuidance[i_thGuidance] << G4endl; }
361  if( ! rangeString.isNull() )
362  { G4cout << " Range of parameters : " << rangeString << G4endl; }
363  G4int n_parameterEntry = parameter.size();
364  if( n_parameterEntry > 0 )
365  {
366  for( G4int i_thParameter=0; i_thParameter<n_parameterEntry; i_thParameter++ )
367  { parameter[i_thParameter]->List(); }
368  }
369  G4cout << G4endl;
370 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4bool workerThreadOnly
Definition: G4UIcommand.hh:181
#define G4endl
Definition: G4ios.hh:61
G4bool isNull() const

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 116 of file G4UIcommand.cc.

117 {
118  return ( commandPath != right.GetCommandPath() );
119 }
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:139

Here is the call graph for this function:

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

Definition at line 111 of file G4UIcommand.cc.

112 {
113  return ( commandPath == right.GetCommandPath() );
114 }
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:139

Here is the call graph for this function:

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

Definition at line 161 of file G4UIcommand.hh.

162  {
163  commandGuidance.push_back( G4String( aGuidance ) );
164  }
void G4UIcommand::SetParameter ( G4UIparameter *const  newParameter)
inline

Definition at line 152 of file G4UIcommand.hh.

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

Here is the caller graph for this function:

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

Definition at line 125 of file G4UIcommand.hh.

126  { rangeString = rs; }
void G4UIcommand::SetToBeBroadcasted ( G4bool  val)
inline

Definition at line 184 of file G4UIcommand.hh.

185  { toBeBroadcasted = val; }
G4bool toBeBroadcasted
Definition: G4UIcommand.hh:179

Here is the caller graph for this function:

void G4UIcommand::SetToBeFlushed ( G4bool  val)
inline

Definition at line 188 of file G4UIcommand.hh.

189  { toBeFlushed = val; }
G4bool toBeFlushed
Definition: G4UIcommand.hh:180

Here is the caller graph for this function:

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

Definition at line 192 of file G4UIcommand.hh.

193  { workerThreadOnly = val; }
G4bool workerThreadOnly
Definition: G4UIcommand.hh:181

Here is the caller graph for this function:

G4bool G4UIcommand::ToBeBroadcasted ( ) const
inline

Definition at line 186 of file G4UIcommand.hh.

187  { return toBeBroadcasted; }
G4bool toBeBroadcasted
Definition: G4UIcommand.hh:179

Here is the caller graph for this function:

G4bool G4UIcommand::ToBeFlushed ( ) const
inline

Definition at line 190 of file G4UIcommand.hh.

191  { return toBeFlushed; }
G4bool toBeFlushed
Definition: G4UIcommand.hh:180
G4String G4UIcommand::UnitsList ( const char *  unitCategory)
static

Definition at line 321 of file G4UIcommand.cc.

322 {
323  G4String retStr;
325  size_t i;
326  for(i=0;i<UTbl.size();i++)
327  { if(UTbl[i]->GetName()==unitCategory) break; }
328  if(i==UTbl.size())
329  {
330  G4cerr << "Unit category <" << unitCategory << "> is not defined." << G4endl;
331  return retStr;
332  }
333  G4UnitsContainer& UCnt = UTbl[i]->GetUnitsList();
334  retStr = UCnt[0]->GetSymbol();
335  G4int je = UCnt.size();
336  for(G4int j=1;j<je;j++)
337  {
338  retStr += " ";
339  retStr += UCnt[j]->GetSymbol();
340  }
341  for(G4int k=0;k<je;k++)
342  {
343  retStr += " ";
344  retStr += UCnt[k]->GetName();
345  }
346  return retStr;
347 }
std::vector< G4UnitsCategory * > G4UnitsTable
Definition: G4UnitsTable.hh:60
int G4int
Definition: G4Types.hh:78
static G4UnitsTable & GetUnitsTable()
#define G4endl
Definition: G4ios.hh:61
std::vector< G4UnitDefinition * > G4UnitsContainer
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4UIcommand::ValueOf ( const char *  unitName)
static

Definition at line 309 of file G4UIcommand.cc.

310 {
311  G4double value = 0.;
312  value = G4UnitDefinition::GetValueOf(unitName);
313  return value;
314 }
static G4double GetValueOf(const G4String &)
const XML_Char int const XML_Char * value
Definition: expat.h:331
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

G4bool G4UIcommand::toBeBroadcasted
protected

Definition at line 179 of file G4UIcommand.hh.

G4bool G4UIcommand::toBeFlushed
protected

Definition at line 180 of file G4UIcommand.hh.

G4bool G4UIcommand::workerThreadOnly
protected

Definition at line 181 of file G4UIcommand.hh.


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