Import Geant4 10.4.1 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManager.cc 87924 2015-01-21 13:17:25Z gcosmo $
|
||||
// $Id: G4ProcessManager.cc 108536 2018-02-16 09:20:49Z gcosmo $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -1080,10 +1080,6 @@ void G4ProcessManager::CreateGPILvectors()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////
|
||||
void G4ProcessManager::StartTracking(G4Track* aTrack)
|
||||
{
|
||||
@@ -1105,6 +1101,17 @@ void G4ProcessManager::EndTracking()
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
G4VProcess* G4ProcessManager::GetProcess(const G4String& processName) const
|
||||
{
|
||||
for (G4int k=0; k<numberOfProcesses; k++) {
|
||||
G4VProcess* process = (*theProcessList)[k];
|
||||
if (process->GetProcessName() == processName) return process;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
G4VProcess* G4ProcessManager::SetProcessActivation(G4VProcess *aProcess,
|
||||
G4bool fActive )
|
||||
@@ -1215,5 +1222,3 @@ void G4ProcessManager::CheckOrderingParameters(G4VProcess* aProcess) const
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTableMessenger.cc 92125 2015-08-18 14:35:23Z gcosmo $
|
||||
// $Id: G4ProcessTableMessenger.cc 108536 2018-02-16 09:20:49Z gcosmo $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -130,7 +130,7 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
dumpCmd->SetParameter(param);
|
||||
dumpCmd->AvailableForStates(G4State_Init,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
//Commnad /particle/process/activate
|
||||
//Commnad /process/activate
|
||||
activateCmd = new G4UIcommand("/process/activate",this);
|
||||
activateCmd->SetGuidance("Activate processes ");
|
||||
activateCmd->SetGuidance(" Activate name [particle]");
|
||||
@@ -141,9 +141,9 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
param = new G4UIparameter("particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
activateCmd->SetParameter(param);
|
||||
activateCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
activateCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
//Commnad /particle/process/inactivate
|
||||
//Commnad /process/inactivate
|
||||
inactivateCmd = new G4UIcommand("/process/inactivate",this);
|
||||
inactivateCmd->SetGuidance("Inactivate process ");
|
||||
inactivateCmd->SetGuidance("Inactivate processes ");
|
||||
@@ -155,7 +155,7 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
param = new G4UIparameter("particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
inactivateCmd->SetParameter(param);
|
||||
inactivateCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
inactivateCmd->AvailableForStates(G4State_Idle);
|
||||
}
|
||||
|
||||
//////////////////
|
||||
@@ -176,8 +176,8 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
|
||||
G4ProcessTable::G4ProcNameVector* procNameVector
|
||||
= theProcessTable->GetNameList();
|
||||
G4int idx;
|
||||
|
||||
G4int type = -1;
|
||||
G4ExceptionDescription ed;
|
||||
|
||||
if( command == listCmd ){
|
||||
//Commnad /process/list
|
||||
@@ -276,7 +276,9 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
|
||||
type = GetProcessType(currentProcessName);
|
||||
if (type <0 ) {
|
||||
// no processes with specifed name
|
||||
G4cout << " illegal process (or type) name " << G4endl;
|
||||
ed << " illegal process (or type) name ["
|
||||
<< currentProcessName << "]";
|
||||
command->CommandFailed(ed);
|
||||
currentProcessName = "";
|
||||
return;
|
||||
}
|
||||
@@ -299,7 +301,8 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
|
||||
|
||||
if ( !isParticleFound ) {
|
||||
// no particle with specifed name
|
||||
G4cout << " illegal particle name " << G4endl;
|
||||
ed << " illegal particle name [" << currentParticleName << "]";
|
||||
command->CommandFailed(ed);
|
||||
currentParticleName = "";
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user