63 :theParticleTable(pTable),
73 thisDirectory->
SetGuidance(
"Process Manager control commands.");
77 dumpCmd->
SetGuidance(
"dump process manager or process information");
79 dumpCmd->
SetGuidance(
" process index: -1 for process manager");
84 verboseCmd =
new G4UIcommand(
"/particle/process/verbose",
this);
85 verboseCmd->
SetGuidance(
"Set Verbose Level for Process or Process Manager");
86 verboseCmd->
SetGuidance(
" Verbose [Verbose] [process index]");
87 verboseCmd->
SetGuidance(
" process index: -1 for process manager");
99 activateCmd->
SetGuidance(
" Activate [process index]");
108 inactivateCmd->
SetGuidance(
" inactivate [process index]");
111 inactivateCmd->
SetRange(
"index >=0");
119 delete inactivateCmd;
122 delete thisDirectory;
131 currentParticle = theParticleTable->
FindParticle(particleName);
132 if (currentParticle == 0) {
134 G4cout <<
"G4ProcessManagerMessenger::SetCurrentParticle() ";
140 return currentParticle;
145 if (SetCurrentParticle()==0) {
146 G4cout <<
"Particle is not selected yet !! Command ignored." <<
G4endl;
149 if( command == dumpCmd ){
154 }
else if ( index < theManager->GetProcessListLength()){
155 currentProcess = (*theProcessList)(
index);
156 if (currentProcess == 0) {
167 }
else if( command==activateCmd ) {
172 }
else if( command==inactivateCmd ) {
177 }
else if( command==verboseCmd ) {
180 const char* temp = (
const char*)(newValue);
181 std::istringstream is((
char*)temp);
183 is >>Verbose >>
index;
187 }
else if ( index < theManager->GetProcessListLength()){
188 currentProcess = (*theProcessList)(
index);
189 if (currentProcess == 0) {
206 if(SetCurrentParticle() == 0) {
211 std::ostringstream os;
213 if( command==verboseCmd ){
216 returnValue = os.str();
void SetParameter(G4UIparameter *const newParameter)
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4String GetCurrentStringValue(const char *aCommand, G4int parameterNumber=1, G4bool reGet=true)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(const char *theDefaultValue)
void SetVerboseLevel(G4int value)
G4int GetVerboseLevel() const
G4ProcessManager * GetProcessManager() const
G4VProcess * SetProcessActivation(G4VProcess *aProcess, G4bool fActive)
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cout
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
G4ProcessManagerMessenger(G4ParticleTable *pTable=0)
static G4ParticleTable * GetParticleTable()
virtual ~G4ProcessManagerMessenger()
virtual G4String GetCurrentValue(G4UIcommand *command)
virtual void DumpInfo() const
void SetDefaultValue(G4int defVal)
void SetVerboseLevel(G4int value)
G4int ApplyCommand(const char *aCommand)
G4ProcessVector * GetProcessList() const