50   controlDirectory->
SetGuidance(
"UI control commands.");
 
   53   macroPathCommand->
SetGuidance(
"Set macro search path"  
   54                                 "with colon-separated list.");
 
   58   ExecuteCommand->
SetGuidance(
"Execute a macro file.");
 
   62   loopCommand = 
new G4UIcommand(
"/control/loop",
this);
 
   63   loopCommand->
SetGuidance(
"Execute a macro file more than once.");
 
   64   loopCommand->
SetGuidance(
"Loop counter can be used as an aliased variable.");
 
   78   foreachCommand = 
new G4UIcommand(
"/control/foreach",
this);
 
   79   foreachCommand->
SetGuidance(
"Execute a macro file more than once.");
 
   80   foreachCommand->
SetGuidance(
"Loop counter can be used as an aliased variable.");
 
   81   foreachCommand->
SetGuidance(
"Values must be separated by a space.");
 
   91   suppressAbortionCommand->
SetGuidance(
"Suppress the program abortion caused by G4Exception.");
 
   92   suppressAbortionCommand->
SetGuidance(
"Suppression level = 0 : no suppression");
 
   93   suppressAbortionCommand->
SetGuidance(
"                  = 1 : suppress during EventProc state");
 
   94   suppressAbortionCommand->
SetGuidance(
"                  = 2 : full suppression, i.e. no abortion by G4Exception");
 
   95   suppressAbortionCommand->
SetGuidance(
"When abortion is suppressed, you will get error messages issued by G4Exception,");
 
   96   suppressAbortionCommand->
SetGuidance(
"and there is NO guarantee for the correct result after the G4Exception error message.");
 
   98   suppressAbortionCommand->
SetRange(
"level >= 0 && level <= 2");
 
  102   verboseCommand->
SetGuidance(
"Applied command will also be shown on screen.");
 
  103   verboseCommand->
SetGuidance(
"This command is useful with MACRO file.");
 
  105   verboseCommand->
SetGuidance(
"  1 : only the valid commands are shown.");
 
  106   verboseCommand->
SetGuidance(
"  2 : comment lines are also shown (default).");
 
  108   verboseCommand->
SetRange(
"switch >= 0 && switch <=2");
 
  111   doublePrecCommand = 
new G4UIcmdWithABool(
"/control/useDoublePrecision",
this);
 
  112   doublePrecCommand->
SetGuidance(
"Use double precision for printing out the current parameter value(s).");
 
  117   historyCommand->
SetGuidance(
"Store command history to a file.");
 
  118   historyCommand->
SetGuidance(
"Defaul file name is G4history.macro.");
 
  122   stopStoreHistoryCommand 
 
  124   stopStoreHistoryCommand->
SetGuidance(
"Stop saving history file.");
 
  126   aliasCommand = 
new G4UIcommand(
"/control/alias",
this);
 
  128   aliasCommand->
SetGuidance(
"String can be aliased by this command.");
 
  129   aliasCommand->
SetGuidance(
"The string may contain one or more spaces,");
 
  130   aliasCommand->
SetGuidance(
"the string must be enclosed by double quotes (\").");
 
  131   aliasCommand->
SetGuidance(
"To use an alias, enclose the alias name with");
 
  132   aliasCommand->
SetGuidance(
"parenthis \"{\" and \"}\".");
 
  146   getEnvCmd->
SetGuidance(
"Get a shell environment variable and define it as an alias.");
 
  148   getValCmd = 
new G4UIcommand(
"/control/getVal",
this);
 
  149   getValCmd->
SetGuidance(
"Get the current value of the UI command and define it as an alias.");
 
  150   getValCmd->
SetGuidance(
"Command is ignored if the UI command does not support GetCurrentValue().");
 
  151   getValCmd->
SetGuidance(
" Syntax : <alias_name> <UI_command> <iIdx>");
 
  161   echoCmd->
SetGuidance(
"Display the aliased value.");
 
  164   shellCommand->
SetGuidance(
"Execute a (Unix) SHELL command.");
 
  167   ManualCommand->
SetGuidance(
"Display all of sub-directories and commands.");
 
  168   ManualCommand->
SetGuidance(
"Directory path should be given by FULL-PATH.");
 
  174   HTMLCommand->
SetGuidance(
"Generate HTML files for all of sub-directories and commands.");
 
  175   HTMLCommand->
SetGuidance(
"Directory path should be given by FULL-PATH.");
 
  181   maxStoredHistCommand->
SetGuidance(
"Set maximum number of stored UI commands.");
 
  186   ifCommand->
SetGuidance(
"Execute a macro file if the expression is true.");
 
  187   ifCommand->
SetGuidance(
" Syntax : <double> <comp> <double> <macro_file>");
 
  199   doifCommand = 
new G4UIcommand(
"/control/doif",
this);
 
  200   doifCommand->
SetGuidance(
"Execute a UI command if the expression is true.");
 
  201   doifCommand->
SetGuidance(
" Syntax : <double> <comp> <double> <UI_command>");
 
  214   addCommand->
SetGuidance(
"Define a new alias as the sum of two values.");
 
  215   addCommand->
SetGuidance(
" Syntax : <new_alias> <value1> <value2>");
 
  216   addCommand->
SetGuidance(
" <new_alias> may be an already existing alias. If it is the case,");
 
  217   addCommand->
SetGuidance(
" aliased value is alternated.");
 
  226   subtractCommand = 
new G4UIcommand(
"/control/subtract",
this);
 
  227   subtractCommand->
SetGuidance(
"Define a new alias as the subtraction of two values.");
 
  228   subtractCommand->
SetGuidance(
" Syntax : <new_alias> <value1> <value2>");
 
  229   subtractCommand->
SetGuidance(
" <new_alias> may be an already existing alias. If it is the case,");
 
  230   subtractCommand->
SetGuidance(
" aliased value is alternated.");
 
  239   multiplyCommand = 
new G4UIcommand(
"/control/multiply",
this);
 
  240   multiplyCommand->
SetGuidance(
"Define a new alias as the multiplification of two values.");
 
  241   multiplyCommand->
SetGuidance(
" Syntax : <new_alias> <value1> <value2>");
 
  242   multiplyCommand->
SetGuidance(
" <new_alias> may be an already existing alias. If it is the case,");
 
  243   multiplyCommand->
SetGuidance(
" aliased value is alternated.");
 
  252   divideCommand = 
new G4UIcommand(
"/control/divide",
this);
 
  253   divideCommand->
SetGuidance(
"Define a new alias as the division of two values.");
 
  254   divideCommand->
SetGuidance(
" Syntax : <new_alias> <value1> <value2>");
 
  255   divideCommand->
SetGuidance(
" <new_alias> may be an already existing alias. If it is the case,");
 
  256   divideCommand->
SetGuidance(
" aliased value is alternated.");
 
  266   remainderCommand = 
new G4UIcommand(
"/control/remainder",
this);
 
  267   remainderCommand->
SetGuidance(
"Define a new alias as the remainder of two values.");
 
  268   remainderCommand->
SetGuidance(
" Syntax : <new_alias> <value1> <value2>");
 
  269   remainderCommand->
SetGuidance(
" <new_alias> may be an already existing alias. If it is the case,");
 
  270   remainderCommand->
SetGuidance(
" aliased value is alternated.");
 
  280   strifCommand = 
new G4UIcommand(
"/control/strif",
this);
 
  281   strifCommand->
SetGuidance(
"Execute a macro file if the expression is true.");
 
  282   strifCommand->
SetGuidance(
" Syntax : <string> <comp> <string> <macro_file>");
 
  294   strdoifCommand = 
new G4UIcommand(
"/control/strdoif",
this);
 
  295   strdoifCommand->
SetGuidance(
"Execute a UI command if the expression is true.");
 
  296   strdoifCommand->
SetGuidance(
" Syntax : <string> <comp> <string> <UI_command>");
 
  309   ifBatchCommand->
SetGuidance(
"Execute a macro file if program is running in batch mode.");
 
  314   ifInteractiveCommand->
SetGuidance(
"Execute a macro file if program is running in interactive mode.");
 
  319   doifBatchCommand->
SetGuidance(
"Execute a UI command if program is running in batch mode.");
 
  324   doifInteractiveCommand->
SetGuidance(
"Execute a UI command if program is running in interactive mode.");
 
  332   delete macroPathCommand;
 
  333   delete ExecuteCommand;
 
  334   delete suppressAbortionCommand;
 
  335   delete verboseCommand;
 
  336   delete doublePrecCommand;
 
  337   delete historyCommand;
 
  338   delete stopStoreHistoryCommand;
 
  339   delete ManualCommand;
 
  341   delete unaliasCommand;
 
  342   delete listAliasCommand;
 
  348   delete foreachCommand; 
 
  350   delete maxStoredHistCommand;
 
  354   delete subtractCommand;
 
  355   delete multiplyCommand;
 
  356   delete divideCommand;
 
  357   delete remainderCommand;
 
  359   delete strdoifCommand;
 
  360   delete ifBatchCommand;
 
  361   delete ifInteractiveCommand;
 
  362   delete doifBatchCommand;
 
  363   delete doifInteractiveCommand;
 
  365   delete controlDirectory;
 
  372   if( command == macroPathCommand) {
 
  373     UI-> SetMacroSearchPath(newValue);
 
  374     UI-> ParseMacroSearchPath();
 
  376   if(command==ExecuteCommand)
 
  378     UI-> ExecuteMacroFile(UI-> FindMacroPath(newValue));
 
  380   if(command==suppressAbortionCommand)
 
  384   if(command==verboseCommand)
 
  388   if(command==doublePrecCommand)
 
  392   if(command==historyCommand)
 
  396   if(command==stopStoreHistoryCommand)
 
  400   if(command==ManualCommand)
 
  404   if(command==aliasCommand)
 
  408   if(command==unaliasCommand)
 
  412   if(command==listAliasCommand)
 
  416   if(command==getEnvCmd)
 
  423       st += getenv(newValue);
 
  427     { 
G4cerr << 
"<" << newValue << 
"> is not defined as a shell variable. Command ignored." << 
G4endl; }
 
  429   if(command==getValCmd)
 
  443         for(
G4int i = 0;i<=idx;i++)
 
  444         { theValue = nextVal(); }
 
  447       st += aliName + 
" " + theValue;
 
  453   if(command==shellCommand)
 
  457   if(command==loopCommand)
 
  461   if(command==foreachCommand)
 
  465   if(command==HTMLCommand)
 
  469   if(command==maxStoredHistCommand)
 
  473   if(command==ifCommand)
 
  481     if(comp==
">") x = (l>r);
 
  482     else if(comp==
">=") x = (l>=r);
 
  483     else if(comp==
"<") x = (l<r);
 
  484     else if(comp==
"<=") x = (l<=r);
 
  485     else if(comp==
"==") x = (l==r);
 
  486     else if(comp==
"!=") x = (l!=r);
 
  489   if(command==doifCommand)
 
  498     while(!((ca=next()).isNull()))
 
  506       if(
c1(c1.length()-1)==
'"')
 
  507       { strippedValue = 
c1(1,c1.length()-2); }
 
  509       { strippedValue = 
c1(1,c1.length()-1); }
 
  514     if(comp==
">") x = (l>r);
 
  515     else if(comp==
">=") x = (l>=r);
 
  516     else if(comp==
"<") x = (l<r);
 
  517     else if(comp==
"<=") x = (l<=r);
 
  518     else if(comp==
"==") x = (l==r);
 
  519     else if(comp==
"!=") x = (l!=r);
 
  522   if(command==addCommand)
 
  534   if(command==subtractCommand)
 
  546   if(command==multiplyCommand)
 
  558   if(command==divideCommand)
 
  570   if(command==remainderCommand)
 
  582   if(command==strifCommand)
 
  590     if(comp==
"==") { x = (l==r); }
 
  591     else if(comp==
"!=") { x = (l!=r); }
 
  594   if(command==strdoifCommand)
 
  603     while(!((ca=next()).isNull()))
 
  611       if(
c1(c1.length()-1)==
'"')
 
  612       { strippedValue = 
c1(1,c1.length()-2); }
 
  614       { strippedValue = 
c1(1,c1.length()-1); }
 
  619     if(comp==
"==") { x = (l==r); }
 
  620     else if(comp==
"!=") { x = (l!=r); }
 
  623   if(command==ifBatchCommand)
 
  627   if(command==ifInteractiveCommand)
 
  631   if(command==doifBatchCommand)
 
  635   if(command==doifInteractiveCommand)
 
  646   if( command == macroPathCommand ) {
 
  647     currentValue = UI-> GetMacroSearchPath();
 
  649   if(command==verboseCommand)
 
  653   if(command==doublePrecCommand)
 
  657   if(command==suppressAbortionCommand)
 
  661   if(command==maxStoredHistCommand)
 
void ForeachS(const char *valueList)
 
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
 
void ExecuteMacroFile(const char *fileName)
 
void SetParameter(G4UIparameter *const newParameter)
 
void RemoveAlias(const char *aliasName)
 
void SetAlias(const char *aliasLine)
 
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
 
static G4int GetNewIntValue(const char *paramString)
 
void SetParameterRange(const char *theRange)
 
void SetParameterCandidates(const char *theString)
 
void SetNewValue(G4UIcommand *command, G4String newValue)
 
void SetToBeBroadcasted(G4bool val)
 
void SetDefaultValue(const char *theDefaultValue)
 
static G4String ConvertToString(G4bool boolVal)
 
G4int GetVerboseLevel() const 
 
static G4bool GetNewBoolValue(const char *paramString)
 
void SetVerboseLevel(G4int val)
 
void SetDefaultValue(G4bool defVal)
 
static G4UImanager * GetUIpointer()
 
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
 
void SetSuppressAbortion(G4int i)
 
static G4StateManager * GetStateManager()
 
G4GLOB_DLL std::ostream G4cout
 
void SetRange(const char *rs)
 
void SetGuidance(const char *aGuidance)
 
G4String DtoS(G4double a)
 
G4String GetCurrentValues(const char *aCommand)
 
void SetMaxHistSize(G4int mx)
 
static G4bool DoublePrecisionStr()
 
void ListCommands(const char *direc)
 
G4String GetCurrentValue(G4UIcommand *command)
 
void SetDefaultValue(const char *defVal)
 
G4double StoD(G4String s)
 
G4String SolveAlias(const char *aCmd)
 
void LoopS(const char *valueList)
 
void SetDefaultValue(G4int defVal)
 
static void UseDoublePrecisionStr(G4bool val)
 
void CreateHTML(const char *dir="/")
 
void StoreHistory(const char *fileName="G4history.macro")
 
G4String FindMacroPath(const G4String &fname) const 
 
G4int ApplyCommand(const char *aCommand)
 
G4GLOB_DLL std::ostream G4cerr
 
G4int GetMaxHistSize() const