38 static const G4bool tcsh_build =
true;
40 static const G4bool tcsh_build =
false;
48 UI-> SetSession(
this);
49 UI-> SetCoutDestination(
this);
71 UI-> SetCoutDestination(0);
96 newCommand =
shell-> GetCommandLineString(msg);
99 if( nC.length() == 0 ) {
100 newCommand = nullString;
102 }
else if( nC(0) ==
'#' ) {
104 newCommand = nullString;
106 }
else if(nC==
"ls" || nC(0,3)==
"ls " ) {
108 newCommand = nullString;
110 }
else if(nC==
"lc" || nC(0,3)==
"lc " ) {
112 newCommand = nullString;
114 }
else if(nC ==
"pwd") {
115 G4cout <<
"Current Command Directory : "
117 newCommand = nullString;
119 }
else if(nC ==
"cwd") {
120 shell-> ShowCurrentDirectory();
121 newCommand = nullString;
123 }
else if(nC ==
"cd" || nC(0,3) ==
"cd ") {
126 newCommand = nullString;
128 }
else if(nC ==
"help" || nC(0,5) ==
"help ") {
130 newCommand = nullString;
132 }
else if(nC(0) ==
'?') {
134 newCommand = nullString;
136 }
else if(nC ==
"hist" || nC ==
"history") {
137 G4int nh= UI-> GetNumberOfHistory();
138 for (
G4int i = 0; i<nh; i++) {
141 newCommand = nullString;
143 }
else if(nC(0) ==
'!') {
147 std::istringstream is(tt);
149 G4int nh= UI-> GetNumberOfHistory();
151 newCommand = UI-> GetPreviousCommand(vl);
154 G4cerr <<
"history " << vl <<
" is not found." <<
G4endl;
155 newCommand = nullString;
158 }
else if( nC.empty() ){
159 newCommand = nullString;
161 }
else if( nC ==
"exit" ){
176 if(
g4MPI-> IsInitMacro() ) {
181 if(
g4MPI-> IsBatchMode() ) {
192 scommand =
g4MPI-> BcastCommand(newCommand);
193 if(scommand ==
"exit") {
207 if(!
g4MPI-> CheckThreadStatus()) {
217 G4cout <<
"Run is still running. Do you abort a run? [y/N]:"
219 G4cin.getline(c,1024);
221 if(yesno ==
"y" || yesno ==
"Y" ||
222 yesno ==
"n" || yesno ==
"N" || yesno ==
"") {
226 if(c[0] ==
'y' || c[0] ==
'Y') {
228 xmessage =
g4MPI-> BcastCommand(
"kill me");
230 xmessage =
g4MPI-> BcastCommand(
"alive");
233 xmessage =
g4MPI-> BcastCommand(
"");
236 if(xmessage ==
"kill me") {
238 runManager-> AbortRun(
true);