#include <G4VMPIsession.hh>
Definition at line 38 of file G4VMPIsession.hh.
◆ G4VMPIsession()
G4VMPIsession::G4VMPIsession |
( |
| ) |
|
◆ ~G4VMPIsession()
G4VMPIsession::~G4VMPIsession |
( |
| ) |
|
◆ BypassCommand()
Definition at line 173 of file G4VMPIsession.cc.
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" ) {
212 for (
str_size idx = 10; idx < command.size(); idx++ ) {
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 ");
std::string::size_type str_size
G4String & replace(unsigned int, unsigned int, const char *, unsigned int)
G4GLOB_DLL std::ostream G4cout
◆ ExecCommand()
Definition at line 76 of file G4VMPIsession.cc.
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;
G4UIcommand * FindCommand(const char *commandName) const
G4UIparameter * GetParameter(G4int i) const
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cout
G4String BypassCommand(const G4String &command) const
G4GLOB_DLL std::ostream G4cerr
◆ ExitHelp()
void G4VMPIsession::ExitHelp |
( |
| ) |
const |
|
protectedvirtual |
◆ GetHelpChoice()
◆ PauseSessionStart()
void G4VMPIsession::PauseSessionStart |
( |
const G4String & |
msg | ) |
|
|
virtual |
◆ ReceiveG4cerr()
G4int G4VMPIsession::ReceiveG4cerr |
( |
const G4String & |
cerrString | ) |
|
|
virtual |
◆ ReceiveG4cout()
G4int G4VMPIsession::ReceiveG4cout |
( |
const G4String & |
coutString | ) |
|
|
virtual |
◆ TruncateCommand()
Definition at line 148 of file G4VMPIsession.cc.
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;
std::string::size_type str_size
◆ g4mpi_
◆ is_master_
G4bool G4VMPIsession::is_master_ |
|
protected |
◆ is_slave_
G4bool G4VMPIsession::is_slave_ |
|
protected |
◆ rank_
G4int G4VMPIsession::rank_ |
|
protected |
The documentation for this class was generated from the following files: