G4ProcessVector Class Reference

#include <G4ProcessVector.hh>


Public Member Functions

 G4ProcessVector ()
 G4ProcessVector (size_t)
 G4ProcessVector (const G4ProcessVector &)
virtual ~G4ProcessVector ()
G4ProcessVectoroperator= (const G4ProcessVector &right)
G4bool operator== (const G4ProcessVector &right) const
G4int entries () const
G4int length () const
G4int size () const
G4int index (G4VProcess *aProcess) const
G4bool contains (G4VProcess *aProcess) const
G4bool insert (G4VProcess *aProcess)
G4bool insertAt (G4int i, G4VProcess *aProcess)
G4VProcessremoveAt (G4int i)
G4VProcessremoveLast ()
void clear ()
G4VProcess *const & operator[] (G4int i) const
G4VProcess *const & operator() (G4int i) const
G4VProcess *& operator[] (G4int i)
G4VProcess *& operator() (G4int i)

Protected Types

typedef std::vector< G4VProcess * > G4ProcVector

Protected Attributes

G4ProcVectorpProcVector


Detailed Description

Definition at line 46 of file G4ProcessVector.hh.


Member Typedef Documentation

typedef std::vector<G4VProcess*> G4ProcessVector::G4ProcVector [protected]

Definition at line 100 of file G4ProcessVector.hh.


Constructor & Destructor Documentation

G4ProcessVector::G4ProcessVector (  ) 

Definition at line 41 of file G4ProcessVector.cc.

References pProcVector.

00042 {
00043   pProcVector = new G4ProcVector();
00044 }

G4ProcessVector::G4ProcessVector ( size_t   )  [explicit]

Definition at line 46 of file G4ProcessVector.cc.

References pProcVector.

00047 {
00048   pProcVector = new G4ProcVector(siz);
00049 }

G4ProcessVector::G4ProcessVector ( const G4ProcessVector  ) 

Definition at line 51 of file G4ProcessVector.cc.

References pProcVector.

00052   :pProcVector(0)
00053 {
00054   pProcVector = new G4ProcVector();
00055   
00056   // copy all contents in  pProcVector
00057   //
00058   G4ProcVector::iterator i;
00059   for (i = right.pProcVector->begin(); i!= right.pProcVector->end(); ++i){
00060     pProcVector->push_back(*i);
00061   }
00062 }

G4ProcessVector::~G4ProcessVector (  )  [virtual]

Definition at line 66 of file G4ProcessVector.cc.

References pProcVector.

00067 {
00068   // delete pProcVector
00069   //
00070   if (pProcVector != 0 ){
00071     pProcVector->clear();
00072     delete pProcVector;
00073   }
00074 }


Member Function Documentation

void G4ProcessVector::clear (  )  [inline]

Definition at line 104 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ProcessManager::~G4ProcessManager().

00105 {
00106   pProcVector->clear();
00107 }

G4bool G4ProcessVector::contains ( G4VProcess aProcess  )  const [inline]

Definition at line 59 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4GlobalFastSimulationManager::ShowSetup().

00060 {
00061   G4ProcVector::iterator it;
00062   for (it=pProcVector->begin();it!=pProcVector->end(); it++) {
00063     if (*(*it)==*aProcess) return true;
00064   }
00065   return false;
00066 }

G4int G4ProcessVector::entries (  )  const [inline]

Definition at line 34 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ProcessManager::AddProcess(), G4ProcessManager::DumpInfo(), G4ProcessManager::EndTracking(), G4ProcessManager::FindInsertPosition(), G4ProcessManager::G4ProcessManager(), G4SteppingManager::GetProcessNumber(), G4ProcessManager::InsertAt(), G4ProcessManager::RemoveAt(), G4ProcessManager::SetProcessOrderingToSecond(), G4ITStepProcessor::SetupGeneralProcessInfo(), and G4ProcessManager::StartTracking().

00035 {
00036   return pProcVector->size();
00037 }

G4int G4ProcessVector::index ( G4VProcess aProcess  )  const [inline]

Definition at line 49 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ProcessManager::GetProcessIndex().

00050 {
00051   G4ProcVector::iterator it;
00052   size_t j=0;
00053   for (it=pProcVector->begin();it!=pProcVector->end(); ++j,it++) {
00054     if (*(*it)==*aProcess) return j;
00055   }
00056   return -1;
00057 }

G4bool G4ProcessVector::insert ( G4VProcess aProcess  )  [inline]

Definition at line 68 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ProcessManager::AddProcess(), and G4ProcessManager::G4ProcessManager().

00069 {
00070   pProcVector->push_back(aProcess);
00071   return true;
00072 }

G4bool G4ProcessVector::insertAt ( G4int  i,
G4VProcess aProcess 
) [inline]

Definition at line 74 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ProcessManager::InsertAt().

00075 {
00076   if ( (i<0) || (i>G4int(pProcVector->size())) ) return false;
00077   if (i==G4int(pProcVector->size())) {
00078     pProcVector->push_back(aProcess);
00079   } else {
00080     G4ProcVector::iterator it=pProcVector->begin();
00081     int j;
00082     for(j=0;j!=i;++j) it++;
00083     pProcVector->insert(it, aProcess);
00084   }
00085   return true;
00086 }

G4int G4ProcessVector::length (  )  const [inline]

Definition at line 44 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ProcessTableMessenger::SetNewValue(), and G4ProcessTable::SetProcessActivation().

00045 {
00046   return pProcVector->size();
00047 }

G4VProcess *& G4ProcessVector::operator() ( G4int  i  )  [inline]

Definition at line 124 of file G4ProcessVector.icc.

References pProcVector.

00125 {
00126   return (*pProcVector)[i];
00127 }

G4VProcess *const & G4ProcessVector::operator() ( G4int  i  )  const [inline]

Definition at line 114 of file G4ProcessVector.icc.

References pProcVector.

00115 {
00116   return (*pProcVector)[i];
00117 }

G4ProcessVector & G4ProcessVector::operator= ( const G4ProcessVector right  ) 

Definition at line 78 of file G4ProcessVector.cc.

References pProcVector.

00079 {
00080   if (this != &right){
00081     // delete pProcVector
00082     if (pProcVector != 0 ){
00083       pProcVector->clear();
00084       delete pProcVector;
00085     }
00086     
00087     pProcVector = new G4ProcVector();
00088     
00089     // copy all contents in  pProcVector
00090     //
00091     G4ProcVector::iterator i;
00092     for (i = right.pProcVector->begin(); i!= right.pProcVector->end(); ++i){
00093       pProcVector->push_back(*i);
00094     }
00095   }
00096   return *this;
00097 }

G4bool G4ProcessVector::operator== ( const G4ProcessVector right  )  const [inline]

Definition at line 29 of file G4ProcessVector.icc.

00030 {
00031   return (this == (G4ProcessVector *) &right);
00032 }

G4VProcess *& G4ProcessVector::operator[] ( G4int  i  )  [inline]

Definition at line 119 of file G4ProcessVector.icc.

References pProcVector.

00120 {
00121   return (*pProcVector)[i];
00122 }

G4VProcess *const & G4ProcessVector::operator[] ( G4int  i  )  const [inline]

Definition at line 109 of file G4ProcessVector.icc.

References pProcVector.

00110 {
00111   return (*pProcVector)[i];
00112 }

G4VProcess * G4ProcessVector::removeAt ( G4int  i  )  [inline]

Definition at line 88 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ProcessManager::RemoveAt(), and G4ProcessManager::RemoveProcess().

00089 {
00090   G4ProcVector::iterator it=pProcVector->begin();
00091   for(size_t j=0;j<pProcVector->size() && G4int(j)<i;++j) it++;
00092   G4VProcess* rValue = *it;
00093   pProcVector->erase(it);
00094   return rValue;
00095 }

G4VProcess * G4ProcessVector::removeLast (  )  [inline]

Definition at line 97 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ProcessManager::AddProcess().

00098 {
00099   G4VProcess* rValue = pProcVector->back();
00100   pProcVector->pop_back();
00101   return rValue;
00102 }

G4int G4ProcessVector::size (  )  const [inline]

Definition at line 39 of file G4ProcessVector.icc.

References pProcVector.

Referenced by G4ITStepProcessor::ActiveOnlyITProcess(), G4HadronElasticPhysicsXS::AddXSection(), G4hImpactIonisation::AlongStepDoIt(), G4VUserPhysicsList::BuildPhysicsTable(), G4PhysicsListHelper::CheckParticleList(), HadronPhysicsFTFP_BERT_TRV::ConstructProcess(), G4NeutronCrossSectionXS::ConstructProcess(), G4TheRayTracer::CreateBitMap(), G4HadronicProcess::FillResult(), G4VHadronPhysics::FindCaptureProcess(), G4VHadronPhysics::FindElasticProcess(), G4VHadronPhysics::FindFissionProcess(), G4VHadronPhysics::FindInelasticProcess(), G4PhysListUtil::FindInelasticProcess(), G4ErrorTrackLengthTarget::G4ErrorTrackLengthTarget(), G4WHadronElasticProcess::PostStepDoIt(), G4VEnergyLossProcess::PostStepDoIt(), G4VEmProcess::PostStepDoIt(), G4HadronElasticProcess::PostStepDoIt(), G4VUserPhysicsList::PreparePhysicsTable(), G4PhysicsListHelper::RegisterProcess(), G4VUserPhysicsList::RetrievePhysicsTable(), and G4VUserPhysicsList::StorePhysicsTable().

00040 {
00041   return pProcVector->size();
00042 }


Field Documentation

G4ProcVector* G4ProcessVector::pProcVector [protected]

Definition at line 102 of file G4ProcessVector.hh.

Referenced by clear(), contains(), entries(), G4ProcessVector(), index(), insert(), insertAt(), length(), operator()(), operator=(), operator[](), removeAt(), removeLast(), size(), and ~G4ProcessVector().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:59 2013 for Geant4 by  doxygen 1.4.7