Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IVContinuousDiscreteProcess.cc,v 1.6 2001/07/11 10:08:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IVRestDiscreteProcess.cc,v 1.6 2001/07/11 10:08:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcTblElement.cc,v 1.6 2001/07/11 10:08:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessAttribute.cc,v 1.4 2001/07/11 10:08:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManager.cc,v 1.20 2001/09/01 02:22:55 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4ProcessManager.cc,v 1.21 2002/12/04 21:29:49 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -733,13 +733,13 @@ G4VProcess* G4ProcessManager::InActivateProcess(G4int index)
|
||||
{
|
||||
G4ApplicationState currentState
|
||||
= G4StateManager::GetStateManager()->GetCurrentState();
|
||||
if ( (currentState == PreInit) || (currentState == Init) ) {
|
||||
if ( (currentState == G4State_PreInit) || (currentState == G4State_Init) ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>1) {
|
||||
G4cout << "G4ProcessManager::InActivateProcess is not valid in ";
|
||||
if (currentState == PreInit ) {
|
||||
if (currentState == G4State_PreInit ) {
|
||||
G4cout << "PreInit ";
|
||||
} else if (currentState == Init ) {
|
||||
} else if (currentState == G4State_Init ) {
|
||||
G4cout << "Init ";
|
||||
}
|
||||
G4cout << "state !" << G4endl;
|
||||
@@ -808,13 +808,13 @@ G4VProcess* G4ProcessManager::ActivateProcess(G4int index)
|
||||
{
|
||||
G4ApplicationState currentState
|
||||
= G4StateManager::GetStateManager()->GetCurrentState();
|
||||
if ( (currentState == PreInit) || (currentState == Init) ) {
|
||||
if ( (currentState == G4State_PreInit) || (currentState == G4State_Init) ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>1) {
|
||||
G4cout << "G4ProcessManager::ActivateProcess is not valid in ";
|
||||
if (currentState == PreInit ) {
|
||||
if (currentState == G4State_PreInit ) {
|
||||
G4cout << "PreInit ";
|
||||
} else if (currentState == Init ) {
|
||||
} else if (currentState == G4State_Init ) {
|
||||
G4cout << "Init ";
|
||||
}
|
||||
G4cout << "state !" << G4endl;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManagerMessenger.cc,v 1.5 2001/07/11 10:08:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4ProcessManagerMessenger.cc,v 1.6 2002/12/04 21:29:49 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -88,7 +88,7 @@ G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
param = new G4UIparameter("index",'i',true);
|
||||
param->SetDefaultValue(-1);
|
||||
verboseCmd->SetParameter(param);
|
||||
verboseCmd->AvailableForStates(PreInit,Init,Idle,GeomClosed,EventProc);
|
||||
verboseCmd->AvailableForStates(G4State_PreInit,G4State_Init,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
//Commnad /particle/process/Activate
|
||||
activateCmd = new G4UIcmdWithAnInteger("/particle/process/activate",this);
|
||||
@@ -97,7 +97,7 @@ G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
activateCmd->SetParameterName("index", false);
|
||||
activateCmd->SetDefaultValue(0);
|
||||
activateCmd->SetRange("index >=0");
|
||||
activateCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
activateCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
//Commnad /particle/process/inactivate
|
||||
inactivateCmd = new G4UIcmdWithAnInteger("/particle/process/inactivate",this);
|
||||
@@ -106,7 +106,7 @@ G4ProcessManagerMessenger::G4ProcessManagerMessenger(G4ParticleTable* pTable)
|
||||
inactivateCmd->SetParameterName("index", false);
|
||||
inactivateCmd->SetDefaultValue(0);
|
||||
inactivateCmd->SetRange("index >=0");
|
||||
inactivateCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
inactivateCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTable.cc,v 1.8 2001/07/11 10:08:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4ProcessTable.cc,v 1.9 2002/11/28 00:32:25 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -77,14 +77,14 @@ G4ProcessTable::~G4ProcessTable()
|
||||
}
|
||||
|
||||
if ( fProcTblVector != 0) {
|
||||
// G4ProcTableVector::iterator idx;
|
||||
G4ProcTableVector::iterator idx;
|
||||
|
||||
// destruction of processes has moved to G4VUserPhysicsList
|
||||
// for (idx=fProcTblVector->begin(); idx!=fProcTblVector->end(); ++idx) {
|
||||
for (idx=fProcTblVector->begin(); idx!=fProcTblVector->end(); ++idx) {
|
||||
// delete all processes
|
||||
// delete (*idx)->GetProcess();
|
||||
// delete (*idx);
|
||||
//}
|
||||
delete (*idx);
|
||||
}
|
||||
fProcTblVector ->clear();
|
||||
delete fProcTblVector;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTableMessenger.cc,v 1.10 2001/10/11 13:53:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4ProcessTableMessenger.cc,v 1.12 2002/12/04 21:29:49 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -97,20 +97,35 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
verboseCmd->SetParameterName("verbose", true);
|
||||
verboseCmd->SetDefaultValue(1);
|
||||
verboseCmd->SetRange("verbose >=0");
|
||||
verboseCmd->AvailableForStates(PreInit,Init,Idle,GeomClosed,EventProc);
|
||||
verboseCmd->AvailableForStates(G4State_PreInit,G4State_Init,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
//Commnad /particle/process/setVerbose
|
||||
procVerboseCmd = new G4UIcommand("/process/setVerbose",this);
|
||||
procVerboseCmd->SetGuidance("Set verbose level for processes");
|
||||
procVerboseCmd->SetGuidance(" setVerbose level [type or name] ");
|
||||
procVerboseCmd->SetGuidance(" level: verbose level ");
|
||||
procVerboseCmd->SetGuidance(" name : process name ");
|
||||
procVerboseCmd->SetGuidance(" type : process type ");
|
||||
procVerboseCmd->SetGuidance(" [all] for all proceeses ");
|
||||
G4UIparameter* param = new G4UIparameter("verbose",'i',false);
|
||||
procVerboseCmd->SetParameter(param);
|
||||
param = new G4UIparameter("type",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
procVerboseCmd->SetParameter(param);
|
||||
procVerboseCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
//Commnad /particle/process/dump
|
||||
dumpCmd = new G4UIcommand("/process/dump",this);
|
||||
dumpCmd->SetGuidance("Dump process information");
|
||||
dumpCmd->SetGuidance(" dump name [particle]");
|
||||
dumpCmd->SetGuidance(" name: process name or type name");
|
||||
dumpCmd->SetGuidance(" particle: particle name [all: for all particles]");
|
||||
G4UIparameter* param = new G4UIparameter("procName",'s',false);
|
||||
param = new G4UIparameter("procName",'s',false);
|
||||
dumpCmd->SetParameter(param);
|
||||
param = new G4UIparameter("particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
dumpCmd->SetParameter(param);
|
||||
dumpCmd->AvailableForStates(Init,Idle,GeomClosed,EventProc);
|
||||
dumpCmd->AvailableForStates(G4State_Init,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
//Commnad /particle/process/activate
|
||||
activateCmd = new G4UIcommand("/process/activate",this);
|
||||
@@ -123,7 +138,7 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
param = new G4UIparameter("particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
activateCmd->SetParameter(param);
|
||||
activateCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
activateCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
//Commnad /particle/process/inactivate
|
||||
inactivateCmd = new G4UIcommand("/process/inactivate",this);
|
||||
@@ -137,7 +152,7 @@ G4ProcessTableMessenger::G4ProcessTableMessenger(G4ProcessTable* pTable)
|
||||
param = new G4UIparameter("particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
inactivateCmd->SetParameter(param);
|
||||
inactivateCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
inactivateCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
}
|
||||
|
||||
//////////////////
|
||||
@@ -148,6 +163,7 @@ G4ProcessTableMessenger::~G4ProcessTableMessenger()
|
||||
delete verboseCmd;
|
||||
delete dumpCmd;
|
||||
delete listCmd;
|
||||
delete procVerboseCmd;
|
||||
delete thisDirectory;
|
||||
}
|
||||
|
||||
@@ -192,6 +208,50 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
|
||||
delete tmpVector;
|
||||
//Commnad /process/list
|
||||
|
||||
} else if( command==procVerboseCmd ) {
|
||||
//Commnad /process/setVerbose
|
||||
G4Tokenizer next( newValue );
|
||||
|
||||
// check 1st argument
|
||||
G4String tmpS = G4String(next());
|
||||
// inputstream for newValues
|
||||
const char* temp = (const char*)(tmpS);
|
||||
G4std::istrstream is((char*)temp);
|
||||
G4int level;
|
||||
is >>level;
|
||||
|
||||
// check 2nd argument
|
||||
currentProcessTypeName = G4String(next());
|
||||
if (currentProcessTypeName.isNull()) currentProcessTypeName = "all";
|
||||
G4bool isProcName = false;
|
||||
G4bool isAll = false;
|
||||
type = -1;
|
||||
|
||||
if (currentProcessTypeName == "all") {
|
||||
isAll = true;
|
||||
} else {
|
||||
type = GetProcessType(currentProcessTypeName);
|
||||
if (type<0) {
|
||||
isProcName = true;
|
||||
currentProcessName = currentProcessTypeName;
|
||||
currentProcessTypeName = "";
|
||||
}
|
||||
}
|
||||
idx =0;
|
||||
G4ProcessTable::G4ProcNameVector::iterator itr;
|
||||
for (itr=procNameVector->begin(); itr!=procNameVector->end(); ++itr) {
|
||||
idx +=1;
|
||||
tmpVector = theProcessTable->FindProcesses(*itr);
|
||||
G4VProcess* p = (*tmpVector)(0);
|
||||
if ( isAll ||
|
||||
(!isProcName && ( p->GetProcessType() == type) ) ||
|
||||
( isProcName && ( p->GetProcessName()== currentProcessName) ) ){
|
||||
p->SetVerboseLevel(level);
|
||||
}
|
||||
}
|
||||
delete tmpVector;
|
||||
//Commnad /process/setVerbose
|
||||
|
||||
} else if( command==verboseCmd ) {
|
||||
//Commnad /process/verbose
|
||||
theProcessTable->SetVerboseLevel(verboseCmd->GetNewIntValue(newValue));
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessVector.cc,v 1.3 2001/07/11 10:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VContinuousDiscreteProcess.cc,v 1.3 2001/07/11 10:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VContinuousProcess.cc,v 1.3 2001/07/11 10:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VDiscreteProcess.cc,v 1.3 2001/07/11 10:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VProcess.cc,v 1.9 2001/11/07 05:23:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestContinuousDiscreteProcess.cc,v 1.3 2001/07/11 10:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestContinuousProcess.cc,v 1.3 2001/07/11 10:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestDiscreteProcess.cc,v 1.3 2001/07/11 10:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestProcess.cc,v 1.3 2001/07/11 10:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user