#include <G4UIbatch.hh>
Definition at line 51 of file G4UIbatch.hh.
◆ G4UIbatch()
G4UIbatch::G4UIbatch |
( |
const char * |
fileName, |
|
|
G4UIsession * |
prevSession = 0 |
|
) |
| |
Definition at line 69 of file G4UIbatch.cc.
75 G4cerr <<
"ERROR: Can not open a macro file <" 76 << fileName <<
">. Set macro path with \"/control/macroPath\" if needed."
static G4UImanager * GetUIpointer()
std::ifstream macroStream
G4UIsession * previousSession
G4GLOB_DLL std::ostream G4cerr
◆ ~G4UIbatch()
G4UIbatch::~G4UIbatch |
( |
| ) |
|
◆ ExecCommand()
Definition at line 166 of file G4UIbatch.cc.
170 G4int rc= UI-> ApplyCommand(command);
176 G4cerr <<
"***** COMMAND NOT FOUND <" 177 << command <<
"> *****" <<
G4endl;
180 G4cerr <<
"***** Illegal application state <" 181 << command <<
"> *****" <<
G4endl;
185 G4cerr <<
"***** Illegal parameter (" << pn <<
") <" 186 << command <<
"> *****" <<
G4endl;
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cerr
◆ GetPreviousSession()
Definition at line 81 of file G4UIbatch.hh.
G4UIsession * previousSession
◆ PauseSessionStart()
void G4UIbatch::PauseSessionStart |
( |
const G4String & |
Prompt | ) |
|
|
virtual |
Reimplemented from G4UIsession.
Definition at line 227 of file G4UIbatch.cc.
230 G4cout <<
"Pause session <" << Prompt <<
"> start." <<
G4endl;
234 G4cout <<
"Pause session <" << Prompt <<
"> Terminate." <<
G4endl;
virtual G4UIsession * SessionStart()
G4GLOB_DLL std::ostream G4cout
◆ ReadCommand()
Definition at line 95 of file G4UIbatch.cc.
100 const char ctrM = 0x0d;
111 while ((nb= cmdline.find(
'\t',nb)) != G4String::npos) {
112 cmdline.replace(nb, 1,
" ");
120 if(!qcontinued && cmdline.size()==0)
continue;
123 if(cmdline[(
size_t)0]==
'#')
return cmdline;
126 std::vector<G4String> tokens;
129 for (
G4int i=0; i<
G4int(tokens.size()); i++) {
131 if(tokens[i][(
size_t)0] ==
'#' )
break;
133 if(tokens[i] ==
'\\' || tokens[i] ==
'_' ) {
136 if( i !=
G4int(tokens.size())-1) {
139 "unexpected character after line continuation character");
143 cmdtotal+= tokens[i];
147 if(qcontinued)
continue;
149 if(cmdtotal.size() != 0)
break;
G4String strip(G4int strip_Type=trailing, char c=' ')
static void Tokenize(const G4String &str, std::vector< G4String > &tokens)
std::string::size_type str_size
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ifstream macroStream
◆ SessionStart()
Reimplemented from G4UIsession.
Definition at line 194 of file G4UIbatch.cc.
202 if(newCommand ==
"exit") {
207 if( newCommand[(
size_t)0] ==
'#') {
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cout
G4int ExecCommand(const G4String &command)
G4UIsession * previousSession
G4GLOB_DLL std::ostream G4cerr
◆ isOpened
◆ macroStream
std::ifstream G4UIbatch::macroStream |
|
private |
◆ previousSession
The documentation for this class was generated from the following files: