57 G4cin.ignore(30,
'\n');
67 G4cin.getline(temp, 100);
86 if( command(0,11) ==
"/mpi/beamOn" ) {
87 g4mpi_-> ExecuteBeamOnThread(command);
89 }
else if( command(0,12) ==
"/mpi/.beamOn" ) {
93 G4cout <<
"G4MPIsession:: beamOn is still running." <<
G4endl;
97 returnVal = UI-> ApplyCommand(command);
100 returnVal = UI-> ApplyCommand(command);
103 G4int paramIndex = returnVal % 100;
106 G4int commandStatus = returnVal - paramIndex;
113 switch( commandStatus ) {
117 G4cerr <<
"command <" << UI-> SolveAlias(command)
118 <<
"> not found" <<
G4endl;
121 G4cerr <<
"illegal application state -- command refused" <<
G4endl;
127 G4cerr <<
"Parameter is out of candidate list (index "
128 << paramIndex <<
")" <<
G4endl;
130 << cmd->
GetParameter(paramIndex)-> GetParameterCandidates()
134 G4cerr <<
"Parameter is wrong type and/or is not omittable (index "
135 << paramIndex <<
")" <<
G4endl;
141 G4cerr <<
"command refused (" << commandStatus <<
")" <<
G4endl;
155 if( iarg != G4String::npos ) {
156 strarg = acommand(iarg, acommand.size()-iarg);
157 acommand = acommand(0,iarg);
161 while( (idx = acommand.find(
"//")) != G4String::npos) {
162 G4String command1 = acommand(0,idx+1);
163 G4String command2 = acommand(idx+2, acommand.size()-idx-2);
164 acommand = command1 + command2;
190 if( acommand(0,11) ==
"/mpi/beamOn" ) {
191 #ifdef G4MULTITHREADED
192 acommand =
"/mpi/.beamOn";
193 if(command.length() > 11) {
194 acommand += command.substr(11);
197 if(
g4mpi_-> IsBatchMode()) {
198 acommand =
"/mpi/.beamOn";
199 if(command.length() > 11) {
200 acommand += command.substr(11);
207 if( acommand(0,11) ==
"/run/beamOn" ) {
213 if( command[
idx] ==
' ' || command[
idx] ==
'\011' ) {
219 strarg += command[
idx];
224 if(
g4mpi_-> IsBatchMode() ) {
225 acommand =
"/mpi/.beamOn ";
226 if( command.length() > 11 ) acommand += strarg;
228 #ifdef G4MULTITHREADED
230 G4cout <<
"/run/beamOn is overridden by /mpi/.beamOn" <<
G4endl;
232 acommand =
"/mpi/.beamOn ";
233 if( command.length() > 11 ) acommand += strarg;
236 G4cout <<
"/run/beamOn is overridden by /mpi/beamOn" <<
G4endl;
238 acommand =
"/mpi/beamOn ";
239 if( command.length() > 11 ) acommand += strarg;
245 if( acommand(0,16) ==
"/control/execute" ) {
247 G4cout <<
"/control/execute is overridden by /mpi/execute"
250 acommand.
replace(0, 16,
"/mpi/execute ");