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::G4DCofThisEvent (  ) 

Definition at line 34 of file G4DCofThisEvent.cc.

00035 {
00036   DC = new std::vector<G4VDigiCollection*>;
00037 }

G4DCofThisEvent::G4DCofThisEvent ( G4int  cap  ) 

Definition at line 39 of file G4DCofThisEvent.cc.

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

G4DCofThisEvent::~G4DCofThisEvent (  ) 

Definition at line 48 of file G4DCofThisEvent.cc.

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


Member Function Documentation

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

Definition at line 57 of file G4DCofThisEvent.cc.

Referenced by G4DigiManager::SetDigiCollection().

00058 {
00059   if(DCID>=0 && DCID<G4int(DC->size()))
00060   { (*DC)[DCID] = aDC; }
00061 }

G4int G4DCofThisEvent::GetCapacity (  )  const [inline]

Definition at line 84 of file G4DCofThisEvent.hh.

Referenced by G4Event::Draw().

00085       {
00086         return DC->size();
00087       }

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

Definition at line 65 of file G4DCofThisEvent.hh.

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

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

G4int G4DCofThisEvent::GetNumberOfCollections (  )  const [inline]

Definition at line 72 of file G4DCofThisEvent.hh.

References CLHEP::detail::n.

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

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

Definition at line 103 of file G4DCofThisEvent.hh.

References anDCoTHAllocator.

00104 {
00105   anDCoTHAllocator.FreeSingle((G4DCofThisEvent*)anDCoTH);
00106 }

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

Definition at line 96 of file G4DCofThisEvent.hh.

References anDCoTHAllocator.

00097 {
00098   void* anDCoTH;
00099   anDCoTH = (void*)anDCoTHAllocator.MallocSingle();
00100   return anDCoTH;
00101 }


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