Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DCofThisEvent Class Reference

#include <G4DCofThisEvent.hh>

Public Member Functions

 G4DCofThisEvent ()
 
 G4DCofThisEvent (G4int cap)
 
 ~G4DCofThisEvent ()
 
void * operator new (size_t)
 
void operator delete (void *anDCoTE)
 
void AddDigiCollection (G4int DCID, G4VDigiCollection *aDC)
 
G4VDigiCollectionGetDC (G4int i) const
 
G4int GetNumberOfCollections () const
 
G4int GetCapacity () const
 

Detailed Description

Definition at line 50 of file G4DCofThisEvent.hh.

Constructor & Destructor Documentation

◆ G4DCofThisEvent() [1/2]

G4DCofThisEvent::G4DCofThisEvent ( )

Definition at line 34 of file G4DCofThisEvent.cc.

35{
36 DC = new std::vector<G4VDigiCollection*>;
37}

◆ G4DCofThisEvent() [2/2]

G4DCofThisEvent::G4DCofThisEvent ( G4int  cap)

Definition at line 39 of file G4DCofThisEvent.cc.

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

◆ ~G4DCofThisEvent()

G4DCofThisEvent::~G4DCofThisEvent ( )

Definition at line 48 of file G4DCofThisEvent.cc.

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

Member Function Documentation

◆ AddDigiCollection()

void G4DCofThisEvent::AddDigiCollection ( G4int  DCID,
G4VDigiCollection aDC 
)

Definition at line 57 of file G4DCofThisEvent.cc.

58{
59 if(DCID>=0 && DCID<G4int(DC->size()))
60 { (*DC)[DCID] = aDC; }
61}

Referenced by G4DigiManager::SetDigiCollection().

◆ GetCapacity()

G4int G4DCofThisEvent::GetCapacity ( ) const
inline

Definition at line 84 of file G4DCofThisEvent.hh.

85 {
86 return DC->size();
87 }

Referenced by G4Event::Draw().

◆ GetDC()

G4VDigiCollection * G4DCofThisEvent::GetDC ( G4int  i) const
inline

Definition at line 65 of file G4DCofThisEvent.hh.

66 { return (*DC)[i]; }

Referenced by G4Event::Draw(), and G4DigiManager::GetDigiCollection().

◆ GetNumberOfCollections()

G4int G4DCofThisEvent::GetNumberOfCollections ( ) const
inline

Definition at line 72 of file G4DCofThisEvent.hh.

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

◆ operator delete()

void G4DCofThisEvent::operator delete ( void *  anDCoTE)
inline

Definition at line 103 of file G4DCofThisEvent.hh.

104{
105 anDCoTHAllocator.FreeSingle((G4DCofThisEvent*)anDCoTH);
106}
G4DLLIMPORT G4Allocator< G4DCofThisEvent > anDCoTHAllocator

◆ operator new()

void * G4DCofThisEvent::operator new ( size_t  )
inline

Definition at line 96 of file G4DCofThisEvent.hh.

97{
98 void* anDCoTH;
99 anDCoTH = (void*)anDCoTHAllocator.MallocSingle();
100 return anDCoTH;
101}

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