Import Geant4 10.4.1 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManagerMessenger.cc 92125 2015-08-18 14:35:23Z gcosmo $
|
||||
// $Id: G4ProcessManagerMessenger.cc 108536 2018-02-16 09:20:49Z gcosmo $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -100,7 +100,7 @@ G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
activateCmd->SetParameterName("index", false);
|
||||
activateCmd->SetDefaultValue(0);
|
||||
activateCmd->SetRange("index >=0");
|
||||
activateCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
activateCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
//Commnad /particle/process/inactivate
|
||||
inactivateCmd = new G4UIcmdWithAnInteger("/particle/process/inactivate",this);
|
||||
@@ -109,7 +109,7 @@ G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
inactivateCmd->SetParameterName("index", false);
|
||||
inactivateCmd->SetDefaultValue(0);
|
||||
inactivateCmd->SetRange("index >=0");
|
||||
inactivateCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
inactivateCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
}
|
||||
|
||||
@@ -142,8 +142,10 @@ G4ParticleDefinition* G4ProcessManagerMessenger::SetCurrentParticle()
|
||||
|
||||
void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
if (SetCurrentParticle()==0) {
|
||||
G4cout << "Particle is not selected yet !! Command ignored." << G4endl;
|
||||
ed << "Particle is not selected yet !! Command ignored.";
|
||||
command->CommandFailed(ed);
|
||||
return;
|
||||
}
|
||||
if( command == dumpCmd ){
|
||||
@@ -154,13 +156,15 @@ void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
} else if ( index < theManager->GetProcessListLength()){
|
||||
currentProcess = (*theProcessList)(index);
|
||||
if (currentProcess == 0) {
|
||||
G4cout << " no process at index of " << index;
|
||||
G4cout << "in the Process Vector" << G4endl;
|
||||
ed << " no process at index of " << index
|
||||
<< " in the Process Vector";
|
||||
command->CommandFailed(ed);
|
||||
} else {
|
||||
currentProcess->DumpInfo();
|
||||
}
|
||||
} else {
|
||||
G4cout << " illegal index !!! " << G4endl;
|
||||
ed << " illegal index !!! ";
|
||||
command->CommandFailed(ed);
|
||||
currentProcess = 0;
|
||||
}
|
||||
|
||||
@@ -187,13 +191,15 @@ void G4ProcessManagerMessenger::SetNewValue(G4UIcommand * command,G4String newVa
|
||||
} else if ( index < theManager->GetProcessListLength()){
|
||||
currentProcess = (*theProcessList)(index);
|
||||
if (currentProcess == 0) {
|
||||
G4cout << " no process at index of " << index;
|
||||
G4cout << "in the Process Vector" << G4endl;
|
||||
ed << " no process at index of " << index
|
||||
<< " in the Process Vector";
|
||||
command->CommandFailed(ed);
|
||||
} else {
|
||||
currentProcess->SetVerboseLevel(Verbose);
|
||||
}
|
||||
} else {
|
||||
G4cout << " illegal index !!! " << G4endl;
|
||||
ed << " illegal index !!! ";
|
||||
command->CommandFailed(ed);
|
||||
currentProcess = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user