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) {
157 G4cout <<
" no process at index of " << index;
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);
182 G4int Verbose, index;
183 is >>Verbose >>index;
187 }
else if ( index < theManager->GetProcessListLength()){
188 currentProcess = (*theProcessList)(index);
189 if (currentProcess == 0) {
190 G4cout <<
" no process at index of " << index;
206 if(SetCurrentParticle() == 0) {
211 std::ostringstream os;
213 if( command==verboseCmd ){
216 returnValue = os.str();
G4DLLIMPORT std::ostream G4cout
G4ProcessManager * GetProcessManager() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
virtual G4String GetCurrentValue(G4UIcommand *command)
G4ProcessManagerMessenger(G4ParticleTable *pTable=0)
virtual ~G4ProcessManagerMessenger()
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)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)
G4int ApplyCommand(const char *aCommand)
G4String GetCurrentStringValue(const char *aCommand, G4int parameterNumber=1, G4bool reGet=true)
static G4UImanager * GetUIpointer()
void SetDefaultValue(const char *theDefaultValue)
void SetVerboseLevel(G4int value)
virtual void DumpInfo() const