Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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() [1/2]

G4HCofThisEvent::G4HCofThisEvent ( )

Definition at line 34 of file G4HCofThisEvent.cc.

35{
36 HC = new std::vector<G4VHitsCollection*>;
37}

◆ G4HCofThisEvent() [2/2]

G4HCofThisEvent::G4HCofThisEvent ( G4int  cap)

Definition at line 39 of file G4HCofThisEvent.cc.

40{
41 HC = new std::vector<G4VHitsCollection*>;
42 for(G4int i=0;i<cap;i++)
43 {
44 HC->push_back((G4VHitsCollection*)0);
45 }
46}
int G4int
Definition: G4Types.hh:66

◆ ~G4HCofThisEvent()

G4HCofThisEvent::~G4HCofThisEvent ( )

Definition at line 48 of file G4HCofThisEvent.cc.

49{
50 //HC->clearAndDestroy();
51 for(size_t i=0;i<HC->size();i++)
52 { delete (*HC)[i]; }
53 HC->clear();
54 delete HC;
55}

Member Function Documentation

◆ AddHitsCollection()

◆ GetCapacity()

G4int G4HCofThisEvent::GetCapacity ( )
inline

Definition at line 83 of file G4HCofThisEvent.hh.

84 {
85 return HC->size();
86 }

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

◆ GetHC()

G4VHitsCollection * G4HCofThisEvent::GetHC ( G4int  i)
inline

Definition at line 64 of file G4HCofThisEvent.hh.

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

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

◆ GetNumberOfCollections()

G4int G4HCofThisEvent::GetNumberOfCollections ( )
inline

Definition at line 71 of file G4HCofThisEvent.hh.

72 {
73 G4int n = 0;
74 for(size_t i=0;i<HC->size();i++)
75 {
76 if((*HC)[i]) n++;
77 }
78 return n;
79 }

◆ operator delete()

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

Definition at line 102 of file G4HCofThisEvent.hh.

103{
104 anHCoTHAllocator.FreeSingle((G4HCofThisEvent*)anHCoTH);
105}
G4DLLIMPORT G4Allocator< G4HCofThisEvent > anHCoTHAllocator

◆ operator new()

void * G4HCofThisEvent::operator new ( size_t  )
inline

Definition at line 95 of file G4HCofThisEvent.hh.

96{
97 void* anHCoTH;
98 anHCoTH = (void*)anHCoTHAllocator.MallocSingle();
99 return anHCoTH;
100}

The documentation for this class was generated from the following files: