G4HCofThisEvent Class Reference

#include <G4HCofThisEvent.hh>


Public Member Functions

 G4HCofThisEvent ()
 G4HCofThisEvent (G4int cap)
 ~G4HCofThisEvent ()
void * operator new (size_t)
void operator delete (void *anHCoTE)
void AddHitsCollection (G4int HCID, G4VHitsCollection *aHC)
G4VHitsCollectionGetHC (G4int i)
G4int GetNumberOfCollections ()
G4int GetCapacity ()


Detailed Description

Definition at line 49 of file G4HCofThisEvent.hh.


Constructor & Destructor Documentation

G4HCofThisEvent::G4HCofThisEvent (  ) 

Definition at line 34 of file G4HCofThisEvent.cc.

00035 {
00036   HC = new std::vector<G4VHitsCollection*>;
00037 }

G4HCofThisEvent::G4HCofThisEvent ( G4int  cap  ) 

Definition at line 39 of file G4HCofThisEvent.cc.

00040 {
00041   HC = new std::vector<G4VHitsCollection*>;
00042   for(G4int i=0;i<cap;i++)
00043   {
00044     HC->push_back((G4VHitsCollection*)0);
00045   }
00046 }

G4HCofThisEvent::~G4HCofThisEvent (  ) 

Definition at line 48 of file G4HCofThisEvent.cc.

00049 {
00050   //HC->clearAndDestroy();
00051   for(size_t i=0;i<HC->size();i++)
00052   { delete (*HC)[i]; }
00053   HC->clear();
00054   delete HC;
00055 }


Member Function Documentation

void G4HCofThisEvent::AddHitsCollection ( G4int  HCID,
G4VHitsCollection aHC 
)

Definition at line 57 of file G4HCofThisEvent.cc.

Referenced by G4PSTrackLength::Initialize(), G4PSTrackCounter::Initialize(), G4PSTermination::Initialize(), G4PSSphereSurfaceFlux::Initialize(), G4PSSphereSurfaceCurrent::Initialize(), G4PSPopulation::Initialize(), G4PSPassageTrackLength::Initialize(), G4PSPassageCellFlux::Initialize(), G4PSPassageCellCurrent::Initialize(), G4PSNofStep::Initialize(), G4PSNofSecondary::Initialize(), G4PSNofCollision::Initialize(), G4PSMinKinEAtGeneration::Initialize(), G4PSFlatSurfaceFlux::Initialize(), G4PSFlatSurfaceCurrent::Initialize(), G4PSEnergyDeposit::Initialize(), G4PSDoseDeposit::Initialize(), G4PSCylinderSurfaceFlux::Initialize(), G4PSCylinderSurfaceCurrent::Initialize(), G4PSCellFlux::Initialize(), and G4PSCellCharge::Initialize().

00058 {
00059   if(HCID>=0 && HCID<G4int(HC->size()))
00060   { (*HC)[HCID] = aHC; }
00061 }

G4int G4HCofThisEvent::GetCapacity (  )  [inline]

Definition at line 83 of file G4HCofThisEvent.hh.

Referenced by G4Event::Draw(), and G4RunManager::UpdateScoring().

00084       {
00085         return HC->size();
00086       }

G4VHitsCollection* G4HCofThisEvent::GetHC ( G4int  i  )  [inline]

Definition at line 64 of file G4HCofThisEvent.hh.

Referenced by G4Event::Draw(), G4DigiManager::GetHitsCollection(), and G4RunManager::UpdateScoring().

00065       { return (*HC)[i]; }

G4int G4HCofThisEvent::GetNumberOfCollections (  )  [inline]

Definition at line 71 of file G4HCofThisEvent.hh.

References CLHEP::detail::n.

00072       {
00073         G4int n = 0;
00074         for(size_t i=0;i<HC->size();i++)
00075         {
00076           if((*HC)[i]) n++;
00077         }
00078         return n;
00079       }

void G4HCofThisEvent::operator delete ( void *  anHCoTE  )  [inline]

Definition at line 102 of file G4HCofThisEvent.hh.

References anHCoTHAllocator.

00103 {
00104   anHCoTHAllocator.FreeSingle((G4HCofThisEvent*)anHCoTH);
00105 }

void * G4HCofThisEvent::operator new ( size_t   )  [inline]

Definition at line 95 of file G4HCofThisEvent.hh.

References anHCoTHAllocator.

00096 {
00097   void* anHCoTH;
00098   anHCoTH = (void*)anHCoTHAllocator.MallocSingle();
00099   return anHCoTH;
00100 }


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