56 G4cin.ignore(30,
'\n');
66 G4cin.getline(temp, 100);
85 if(command(0,11) ==
"/mpi/beamOn") {
86 g4MPI-> ExecuteBeamOnThread(command);
88 }
else if(command(0,12) ==
"/mpi/.beamOn") {
92 G4cout <<
"G4MPIsession:: beamOn is still running." <<
G4endl;
96 returnVal = UI-> ApplyCommand(command);
99 returnVal = UI-> ApplyCommand(command);
102 G4int paramIndex = returnVal % 100;
105 G4int commandStatus = returnVal - paramIndex;
112 switch(commandStatus) {
116 G4cerr <<
"command <" << UI-> SolveAlias(command)
117 <<
"> not found" <<
G4endl;
120 G4cerr <<
"illegal application state -- command refused" <<
G4endl;
126 G4cerr <<
"Parameter is out of candidate list (index "
127 << paramIndex <<
")" <<
G4endl;
129 << cmd->
GetParameter(paramIndex)-> GetParameterCandidates()
133 G4cerr <<
"Parameter is wrong type and/or is not omittable (index "
134 << paramIndex <<
")" <<
G4endl;
140 G4cerr <<
"command refused (" << commandStatus <<
")" <<
G4endl;
154 if(iarg != G4String::npos) {
155 strarg = acommand(iarg, acommand.size()-iarg);
156 acommand = acommand(0,iarg);
160 while( (idx = acommand.find(
"//")) != G4String::npos) {
161 G4String command1 = acommand(0,idx+1);
162 G4String command2 = acommand(idx+2, acommand.size()-idx-2);
163 acommand = command1 + command2;
187 if(acommand(0,11) ==
"/mpi/beamOn") {
188 if(
g4MPI-> IsBatchMode()) {
189 acommand =
"/mpi/.beamOn";
190 if(command.length() > 11) {
191 acommand += command.substr(11);
197 if(acommand(0,11) ==
"/run/beamOn") {
202 for (
str_size idx = 10; idx < command.size(); idx++) {
203 if(command[idx] ==
' ' || command[idx] ==
'\011') {
209 strarg += command[idx];
214 if(
g4MPI-> IsBatchMode()) {
215 acommand =
"/mpi/.beamOn ";
216 if(command.length() > 11) acommand += strarg;
219 G4cout <<
"/run/beamOn is overridden by /mpi/.beamOn" <<
G4endl;
221 acommand =
"/mpi/beamOn ";
222 if(command.length() > 11) acommand += strarg;
227 if(acommand(0,16) ==
"/control/execute") {
229 G4cout <<
"/control/execute is overridden by /mpi/execute"
232 acommand.
replace(0, 16,
"/mpi/execute ");