Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProcessTable.cc,v 2.5 1998/09/14 12:02:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ProcessTable.cc,v 1.3 1999/04/14 10:50:45 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -26,13 +26,13 @@ G4ProcessTable::G4ProcessTable():verboseLevel(1)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << "-- G4ProcessTable constructor --" << endl;
|
||||
G4cout << "-- G4ProcessTable constructor --" << endl;
|
||||
}
|
||||
#endif
|
||||
fProcTblVector = new G4ProcTableVector();
|
||||
fProcNameVector = new G4ProcNameVector();
|
||||
tmpTblVector = new G4ProcTableVector();
|
||||
fProcTblMessenger = NULL;
|
||||
fProcTblMessenger = 0;
|
||||
}
|
||||
|
||||
// copy constructor //////////////////////////
|
||||
@@ -40,7 +40,7 @@ G4ProcessTable::G4ProcessTable(const G4ProcessTable &right)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << "-- G4ProcessTable copy constructor --" << endl;
|
||||
G4cout << "-- G4ProcessTable copy constructor --" << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -50,7 +50,7 @@ G4ProcessTable::~G4ProcessTable()
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << "-- G4ProcessTable destructor --" << endl;
|
||||
G4cout << "-- G4ProcessTable destructor --" << endl;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -59,15 +59,15 @@ G4ProcessTable::~G4ProcessTable()
|
||||
delete ((*fProcTblVector)(idxTbl))->GetProcess();
|
||||
}
|
||||
|
||||
if ( tmpTblVector != NULL) {
|
||||
if ( tmpTblVector != 0) {
|
||||
tmpTblVector ->clear();
|
||||
delete tmpTblVector;
|
||||
}
|
||||
if ( fProcTblVector != NULL) {
|
||||
if ( fProcTblVector != 0) {
|
||||
fProcTblVector ->clearAndDestroy();
|
||||
delete fProcTblVector;
|
||||
}
|
||||
if ( fProcNameVector != NULL) {
|
||||
if ( fProcNameVector != 0) {
|
||||
fProcNameVector ->clear();
|
||||
delete fProcNameVector;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ G4ProcessTable::~G4ProcessTable()
|
||||
/////////////////////////
|
||||
G4UImessenger* G4ProcessTable::CreateMessenger()
|
||||
{
|
||||
if (fProcTblMessenger == NULL) {
|
||||
if (fProcTblMessenger == 0) {
|
||||
fProcTblMessenger = new G4ProcessTableMessenger(this);
|
||||
}
|
||||
return fProcTblMessenger;
|
||||
@@ -85,7 +85,7 @@ G4UImessenger* G4ProcessTable::CreateMessenger()
|
||||
/////////////////////////
|
||||
void G4ProcessTable::DeleteMessenger()
|
||||
{
|
||||
if (fProcTblMessenger != NULL) {
|
||||
if (fProcTblMessenger != 0) {
|
||||
delete fProcTblMessenger;
|
||||
}
|
||||
}
|
||||
@@ -96,10 +96,11 @@ G4ProcessTable & G4ProcessTable::operator=(const G4ProcessTable &right)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << "-- G4ProcessTable assignment operator --" << endl;
|
||||
G4cout << "-- G4ProcessTable assignment operator --" << endl;
|
||||
}
|
||||
#endif
|
||||
return *this;
|
||||
if (&right == this) return *this;
|
||||
else return *this;
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
@@ -132,10 +133,10 @@ G4ProcessTable* G4ProcessTable::GetProcessTable()
|
||||
G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
G4ProcessManager* aProcMgr)
|
||||
{
|
||||
if ( (aProcess == NULL) || ( aProcMgr == NULL ) ){
|
||||
if ( (aProcess == 0) || ( aProcMgr == 0 ) ){
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << "G4ProcessTable::Insert : arguments are NULL pointer "<<endl;
|
||||
G4cout << "G4ProcessTable::Insert : arguments are 0 pointer "<<endl;
|
||||
}
|
||||
#endif
|
||||
return -1;
|
||||
@@ -143,10 +144,10 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << "G4ProcessTable::Insert ";
|
||||
G4cerr << " Process[" << aProcess->GetProcessName() << "]";
|
||||
G4cerr << " Particle[" << aProcMgr->GetParticleType()->GetParticleName() << "]";
|
||||
G4cerr << endl;
|
||||
G4cout << "G4ProcessTable::Insert ";
|
||||
G4cout << " Process[" << aProcess->GetProcessName() << "]";
|
||||
G4cout << " Particle[" << aProcMgr->GetParticleType()->GetParticleName() << "]";
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -162,8 +163,7 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
isFoundInTbl = true;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cerr << " This Process has been already registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process has been already registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
//
|
||||
@@ -174,8 +174,7 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
isFound = true;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " This Process Manager has been already registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process Manager has been already registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
@@ -186,8 +185,7 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
anElement->Insert(aProcMgr);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cerr << " This Process Manager is registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process Manager is registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -205,8 +203,7 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cerr << " This Process is registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process is registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -217,10 +214,10 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
|
||||
G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
G4ProcessManager* aProcMgr)
|
||||
{
|
||||
if ( (aProcess == NULL) || ( aProcMgr == NULL ) ){
|
||||
if ( (aProcess == 0) || ( aProcMgr == 0 ) ){
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << "G4ProcessTable::Remove : arguments are NULL pointer "<<endl;
|
||||
G4cout << "G4ProcessTable::Remove : arguments are 0 pointer "<< endl;
|
||||
}
|
||||
#endif
|
||||
return -1;
|
||||
@@ -228,10 +225,9 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << "G4ProcessTable::Remove ";
|
||||
G4cerr << " Process[" << aProcess->GetProcessName() << "]";
|
||||
G4cerr << " Particle[" << aProcMgr->GetParticleType()->GetParticleName() << "]";
|
||||
G4cerr << endl;
|
||||
G4cout << "G4ProcessTable::Remove ";
|
||||
G4cout << " Process[" << aProcess->GetProcessName() << "]";
|
||||
G4cout << " Particle[" << aProcMgr->GetParticleType()->GetParticleName() << "]" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -259,8 +255,7 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
anElement->Remove(aProcMgr);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cerr << " This Process Manager is removed !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process Manager is removed !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -286,8 +281,7 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " This Process is removed !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process is removed !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -295,8 +289,7 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
|
||||
} else {
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0){
|
||||
G4cerr << " This Process is not registered !! ";
|
||||
G4cerr << endl;
|
||||
G4cout << " This Process is not registered !! " << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -324,15 +317,14 @@ G4VProcess* G4ProcessTable::FindProcess(const G4String& processName,
|
||||
}
|
||||
#ifdef G4VERBOSE
|
||||
if (!isFound && verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::FindProcess :" ;
|
||||
G4cerr << " The Process[" << processName << "] is not found ";
|
||||
G4cerr << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cerr << endl;
|
||||
G4cout << " G4ProcessTable::FindProcess :" ;
|
||||
G4cout << " The Process[" << processName << "] is not found ";
|
||||
G4cout << " for " << processManager->GetParticleType()->GetParticleName() << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (isFound) return anElement->GetProcess();
|
||||
else return NULL;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
///////////////
|
||||
@@ -356,9 +348,8 @@ G4ProcessTable::G4ProcTableVector* G4ProcessTable::Find(
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (!isFound && verboseLevel>0){
|
||||
G4cerr << " G4ProcessTable::Find :" ;
|
||||
G4cerr << " The Process[" << processName << "] is not found ";
|
||||
G4cerr << endl;
|
||||
G4cout << " G4ProcessTable::Find :" ;
|
||||
G4cout << " The Process[" << processName << "] is not found " << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -386,9 +377,8 @@ G4ProcessTable::G4ProcTableVector* G4ProcessTable::Find(
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (!isFound && verboseLevel>0){
|
||||
G4cerr << " G4ProcessTable::Find :" ;
|
||||
G4cerr << " The Process[" << anElement->GetProcessName() << "] is not found ";
|
||||
G4cerr << endl;
|
||||
G4cout << " G4ProcessTable::Find :" ;
|
||||
G4cout << " The Process[" << anElement->GetProcessName() << "] is not found " << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -441,8 +431,8 @@ void G4ProcessTable::SetProcessActivation( const G4String& processName,
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cerr << " The Process[" << processName << "] "<< endl;
|
||||
G4cout << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cout << " The Process[" << processName << "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -457,9 +447,9 @@ void G4ProcessTable::SetProcessActivation( const G4String& processName,
|
||||
manager->SetProcessActivation(process, fActive);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cerr << " Index = " << manager->GetProcessIndex(process);
|
||||
G4cerr << endl;
|
||||
G4cout << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cout << " Index = " << manager->GetProcessIndex(process);
|
||||
G4cout << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -474,19 +464,18 @@ void G4ProcessTable::SetProcessActivation(
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cerr << " The Process[" << processName << "] "<< endl;
|
||||
G4cout << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cout << " The Process[" << processName << "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
G4VProcess* process = FindProcess( processName, processManager);
|
||||
if ( process != NULL) {
|
||||
if ( process != 0) {
|
||||
processManager->SetProcessActivation(process, fActive);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cerr << " Index = " << processManager->GetProcessIndex(process);
|
||||
G4cerr << endl;
|
||||
G4cout << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cout << " Index = " << processManager->GetProcessIndex(process) << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -499,8 +488,8 @@ void G4ProcessTable::SetProcessActivation( G4ProcessType processType,
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cerr << " The ProcessType[" << processType << "] "<< endl;
|
||||
G4cout << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cout << " The ProcessType[" << processType << "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -512,7 +501,7 @@ void G4ProcessTable::SetProcessActivation( G4ProcessType processType,
|
||||
G4VProcess* process = anElement->GetProcess();
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " The Process[" << process->GetProcessName()<< "] "<< endl;
|
||||
G4cout << " The Process[" << process->GetProcessName()<< "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
for (G4int idx = 0 ; idx < anElement->Length(); idx++) {
|
||||
@@ -520,9 +509,8 @@ void G4ProcessTable::SetProcessActivation( G4ProcessType processType,
|
||||
manager->SetProcessActivation(process, fActive);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cerr << " Index = " << manager->GetProcessIndex(process);
|
||||
G4cerr << endl;
|
||||
G4cout << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cout << " Index = " << manager->GetProcessIndex(process) << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -537,8 +525,8 @@ void G4ProcessTable::SetProcessActivation(
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cerr << " The ProcessType[" << processType << "] "<< endl;
|
||||
G4cout << " G4ProcessTable::SetProcessActivation:" ;
|
||||
G4cout << " The ProcessType[" << processType << "] "<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -549,10 +537,9 @@ void G4ProcessTable::SetProcessActivation(
|
||||
processManager->SetProcessActivation(process, fActive);
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>1){
|
||||
G4cerr << " The Process[" << process->GetProcessName()<< "] "<< endl;
|
||||
G4cerr << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cerr << " Index = " << idx;
|
||||
G4cerr << endl;
|
||||
G4cout << " The Process[" << process->GetProcessName()<< "] "<< endl;
|
||||
G4cout << " for " << processManager->GetParticleType()->GetParticleName();
|
||||
G4cout << " Index = " << idx << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -573,7 +560,7 @@ void G4ProcessTable::DumpInfo(G4VProcess* process,
|
||||
for (idxTbl =0; idxTbl <fProcTblVector->length(); idxTbl++){
|
||||
anElement = (*fProcTblVector)(idxTbl);
|
||||
if (process == anElement->GetProcess() ){
|
||||
if (particle==NULL) {
|
||||
if (particle==0) {
|
||||
isFoundInTbl = true;
|
||||
break;
|
||||
} else {
|
||||
@@ -593,7 +580,7 @@ void G4ProcessTable::DumpInfo(G4VProcess* process,
|
||||
process->SetVerboseLevel(verboseLevel);
|
||||
process->DumpInfo();
|
||||
process->SetVerboseLevel(tmpVerbose);
|
||||
if (particle==NULL) {
|
||||
if (particle==0) {
|
||||
for (idx=0; idx<anElement->Length(); idx++){
|
||||
manager = anElement->GetProcessManager(idx);
|
||||
G4cout << " for " << manager->GetParticleType()->GetParticleName();
|
||||
|
||||
Reference in New Issue
Block a user