51 : theParticleTable(pTable)
53 if ( theParticleTable ==
nullptr)
58 thisDirectory->
SetGuidance(
"Process Manager control commands.");
62 dumpCmd->
SetGuidance(
"dump process manager or process information");
64 dumpCmd->
SetGuidance(
" process index: -1 for process manager");
69 verboseCmd =
new G4UIcommand(
"/particle/process/verbose",
this);
70 verboseCmd->
SetGuidance(
"Set Verbose Level for Process or Process Manager");
71 verboseCmd->
SetGuidance(
" Verbose [Verbose] [process index]");
72 verboseCmd->
SetGuidance(
" process index: -1 for process manager");
84 activateCmd->
SetGuidance(
" Activate [process index]");
93 inactivateCmd->
SetGuidance(
" inactivate [process index]");
96 inactivateCmd->
SetRange(
"index >=0");
104 delete inactivateCmd;
107 delete thisDirectory;
115 if (currentParticle ==
nullptr)
117 theManager =
nullptr;
118 G4cout <<
"G4ProcessManagerMessenger::SetCurrentParticle() - not selected";
125 return currentParticle;
132 if (SetCurrentParticle() ==
nullptr)
134 ed <<
"Particle is not selected yet !! Command ignored.";
138 if( command == dumpCmd )
146 else if ( index < theManager->GetProcessListLength())
148 currentProcess = (*theProcessList)(index);
149 if (currentProcess ==
nullptr)
151 ed <<
" no process at index of " << index
152 <<
" in the Process Vector";
162 ed <<
" illegal index !!! ";
164 currentProcess =
nullptr;
168 else if( command==activateCmd )
175 else if( command==inactivateCmd )
182 else if( command==verboseCmd )
186 const char* temp = (
const char*)(newValue);
187 std::istringstream is((
char*)temp);
188 G4int Verbose, index;
189 is >>Verbose >>index;
195 else if ( index < theManager->GetProcessListLength())
197 currentProcess = (*theProcessList)(index);
198 if (currentProcess ==
nullptr)
200 ed <<
" no process at index of " << index
201 <<
" in the Process Vector";
211 ed <<
" illegal index !!! ";
213 currentProcess =
nullptr;
221 if(SetCurrentParticle() ==
nullptr)
return "";
223 if( command==verboseCmd )
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
static G4ParticleTable * GetParticleTable()
const G4ParticleDefinition * GetSelectedParticle() const
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
virtual G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4ProcessManagerMessenger()
G4ProcessManagerMessenger(G4ParticleTable *pTable=nullptr)
G4VProcess * SetProcessActivation(G4VProcess *aProcess, G4bool fActive)
void SetVerboseLevel(G4int value)
G4ProcessVector * GetProcessList() const
G4int GetVerboseLevel() const
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(G4int defVal)
static G4String ConvertToString(G4bool boolVal)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)
G4int ApplyCommand(const char *aCommand)
static G4UImanager * GetUIpointer()
void SetDefaultValue(const char *theDefaultValue)
void SetVerboseLevel(G4int value)
virtual void DumpInfo() const