Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4DCofThisEvent Class Reference

#include <G4DCofThisEvent.hh>

Public Member Functions

 G4DCofThisEvent ()
 
 G4DCofThisEvent (G4int cap)
 
 ~G4DCofThisEvent ()
 
voidoperator 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.

References anDCoTHAllocator_G4MT_TLS_.

36  DC = new std::vector<G4VDigiCollection*>;
37 }
G4ThreadLocal G4Allocator< G4DCofThisEvent > * anDCoTHAllocator_G4MT_TLS_
G4DCofThisEvent::G4DCofThisEvent ( G4int  cap)

Definition at line 39 of file G4DCofThisEvent.cc.

References anDCoTHAllocator_G4MT_TLS_.

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

Definition at line 48 of file G4DCofThisEvent.cc.

References anDCoTHAllocator_G4MT_TLS_.

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

Member Function Documentation

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

Definition at line 57 of file G4DCofThisEvent.cc.

References anDCoTHAllocator_G4MT_TLS_.

Referenced by G4DigiManager::SetDigiCollection().

59  if(DCID>=0 && DCID<G4int(DC->size()))
60  { (*DC)[DCID] = aDC; }
61 }
G4ThreadLocal G4Allocator< G4DCofThisEvent > * anDCoTHAllocator_G4MT_TLS_
int G4int
Definition: G4Types.hh:78
G4int G4DCofThisEvent::GetCapacity ( ) const
inline

Definition at line 84 of file G4DCofThisEvent.hh.

Referenced by G4Event::Draw().

85  {
86  return DC->size();
87  }
G4VDigiCollection* G4DCofThisEvent::GetDC ( G4int  i) const
inline

Definition at line 65 of file G4DCofThisEvent.hh.

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

66  { return (*DC)[i]; }
G4int G4DCofThisEvent::GetNumberOfCollections ( ) const
inline

Definition at line 72 of file G4DCofThisEvent.hh.

References n.

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  }
int G4int
Definition: G4Types.hh:78
const G4int n
void G4DCofThisEvent::operator delete ( void anDCoTE)
inline

Definition at line 103 of file G4DCofThisEvent.hh.

References anDCoTHAllocator_G4MT_TLS_, and G4Allocator< Type >::FreeSingle().

105  anDCoTHAllocator.FreeSingle((G4DCofThisEvent*)anDCoTH);
106 }
void FreeSingle(Type *anElement)
Definition: G4Allocator.hh:201
G4DLLIMPORT G4ThreadLocal G4Allocator< G4DCofThisEvent > * anDCoTHAllocator_G4MT_TLS_
void * G4DCofThisEvent::operator new ( size_t  )
inline

Definition at line 96 of file G4DCofThisEvent.hh.

References anDCoTHAllocator_G4MT_TLS_, and G4Allocator< Type >::MallocSingle().

98  void* anDCoTH;
99  anDCoTH = (void*)anDCoTHAllocator.MallocSingle();
100  return anDCoTH;
101 }
Type * MallocSingle()
Definition: G4Allocator.hh:191
G4DLLIMPORT G4ThreadLocal G4Allocator< G4DCofThisEvent > * anDCoTHAllocator_G4MT_TLS_

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