117 lines
3.6 KiB
Plaintext
117 lines
3.6 KiB
Plaintext
//
|
|
// ********************************************************************
|
|
// * License and Disclaimer *
|
|
// * *
|
|
// * The Geant4 software is copyright of the Copyright Holders of *
|
|
// * the Geant4 Collaboration. It is provided under the terms and *
|
|
// * conditions of the Geant4 Software License, included in the file *
|
|
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
|
// * include a list of copyright holders. *
|
|
// * *
|
|
// * 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. Please see the license in the file LICENSE and URL above *
|
|
// * for the full disclaimer and the limitation of liability. *
|
|
// * *
|
|
// * This code implementation is the result of the scientific and *
|
|
// * technical work of the GEANT4 collaboration. *
|
|
// * By using, copying, modifying or distributing the software (or *
|
|
// * any work based on the software) you agree to acknowledge its *
|
|
// * use in resulting scientific publications, and indicate your *
|
|
// * acceptance of all terms of the Geant4 Software license. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
// $Id: G4ProcTblElement.icc,v 1.8 2006/06/29 21:07:22 gunter Exp $
|
|
// GEANT4 tag $Name: geant4-08-02 $
|
|
//
|
|
//
|
|
// ------------------------------------------------------------
|
|
// 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();
|
|
}
|