114 lines
3.4 KiB
Plaintext
114 lines
3.4 KiB
Plaintext
//
|
|
// ********************************************************************
|
|
// * DISCLAIMER *
|
|
// * *
|
|
// * The following disclaimer summarizes all the specific disclaimers *
|
|
// * of contributors to this software. The specific disclaimers,which *
|
|
// * govern, are listed with their locations in: *
|
|
// * http://cern.ch/geant4/license *
|
|
// * *
|
|
// * Neither the authors of this software system, nor their employing *
|
|
// * institutes,nor the agencies providing financial support for this *
|
|
// * work make any representation or warranty, express or implied, *
|
|
// * regarding this software system or assume any liability for its *
|
|
// * use. *
|
|
// * *
|
|
// * This code implementation is the intellectual property of the *
|
|
// * GEANT4 collaboration. *
|
|
// * By copying, distributing or modifying the Program (or any work *
|
|
// * based on the Program) you indicate your acceptance of this *
|
|
// * statement, and all its terms. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
// $Id: G4ProcTblElement.icc,v 1.7 2001/07/11 10:08:17 gunter Exp $
|
|
// GEANT4 tag $Name: geant4-05-01 $
|
|
//
|
|
//
|
|
// ------------------------------------------------------------
|
|
// GEANT 4 class header file
|
|
//
|
|
// History: first implementation, based on object model of
|
|
// 4th Aug 1998, H.Kurashige
|
|
// ------------------------------------------------------------
|
|
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
|
|
|
|
/////////////
|
|
inline
|
|
G4bool G4ProcTblElement::Contains(const G4ProcessManager* pManager) const
|
|
{
|
|
G4ProcMgrVector::iterator i;
|
|
for (i = pProcMgrVector->begin(); i!= pProcMgrVector->end(); ++i) {
|
|
if (*i==pManager) return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
//////////////////////////
|
|
inline
|
|
G4int G4ProcTblElement::GetIndex(const G4ProcessManager* pManager) const
|
|
{
|
|
G4int index = 0;
|
|
G4ProcMgrVector::iterator i;
|
|
for (i = pProcMgrVector->begin(); i!= pProcMgrVector->end(); ++i) {
|
|
if (*i==pManager) return index;
|
|
index +=1;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
|
|
//////////////////////////
|
|
inline
|
|
G4int G4ProcTblElement::Length() const
|
|
{
|
|
return pProcMgrVector->size();
|
|
}
|
|
|
|
//////////////////////////
|
|
inline
|
|
G4ProcessManager* G4ProcTblElement::GetProcessManager(G4int index) const
|
|
{
|
|
if ((index < G4int(pProcMgrVector->size())) && (index>=0)){
|
|
return (*pProcMgrVector)[index];
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
//////////////////////////
|
|
inline
|
|
G4VProcess* G4ProcTblElement::GetProcess() const
|
|
{
|
|
return pProcess;
|
|
}
|
|
|
|
|
|
//////////////////////////
|
|
inline
|
|
void G4ProcTblElement::Insert(G4ProcessManager* aProcMgr)
|
|
{
|
|
pProcMgrVector->push_back(aProcMgr);
|
|
}
|
|
|
|
//////////////////////////
|
|
inline
|
|
void G4ProcTblElement::Remove(G4ProcessManager* aProcMgr)
|
|
{
|
|
G4ProcMgrVector::iterator i;
|
|
for (i = pProcMgrVector->begin(); i!= pProcMgrVector->end(); ++i) {
|
|
if (*i==aProcMgr){
|
|
pProcMgrVector->erase(i);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
//////////////////////////
|
|
inline
|
|
const G4String& G4ProcTblElement::GetProcessName() const
|
|
{
|
|
return pProcess->GetProcessName();
|
|
}
|