Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HCofThisEvent Class Reference

#include <G4HCofThisEvent.hh>

Inheritance diagram for G4HCofThisEvent:

Public Member Functions

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

Detailed Description

Definition at line 64 of file G4HCofThisEvent.hh.

Constructor & Destructor Documentation

G4HCofThisEvent::G4HCofThisEvent ( )

Definition at line 34 of file G4HCofThisEvent.cc.

36  HC = new std::vector<G4VHitsCollection*>;
37 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_
G4HCofThisEvent::G4HCofThisEvent ( G4int  cap)

Definition at line 39 of file G4HCofThisEvent.cc.

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

Definition at line 48 of file G4HCofThisEvent.cc.

50  //HC->clearAndDestroy();
51  for(size_t i=0;i<HC->size();i++)
52  { delete (*HC)[i]; }
53  HC->clear();
54  delete HC;
55 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_
G4HCofThisEvent::G4HCofThisEvent ( )
G4HCofThisEvent::G4HCofThisEvent ( G4int  cap)
G4HCofThisEvent::~G4HCofThisEvent ( )
G4HCofThisEvent::G4HCofThisEvent ( )
G4HCofThisEvent::G4HCofThisEvent ( G4int  cap)
G4HCofThisEvent::~G4HCofThisEvent ( )
G4HCofThisEvent::G4HCofThisEvent ( const G4HCofThisEvent rhs)

Definition at line 67 of file G4HCofThisEvent.cc.

68 {
70  HC = new std::vector<G4VHitsCollection*>(rhs.HC->size());
71  for ( unsigned int i = 0 ; i<rhs.HC->size() ; ++i)
72  *(HC->at(i)) = *(rhs.HC->at(i));
73 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_

Member Function Documentation

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

Definition at line 57 of file G4HCofThisEvent.cc.

59  if(HCID>=0 && HCID<G4int(HC->size()))
60  {
61  aHC->SetColID(HCID);
62  (*HC)[HCID] = aHC;
63  }
64 }
void SetColID(G4int i)
G4DLLIMPORT G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_
int G4int
Definition: G4Types.hh:78

Here is the call graph for this function:

G4int G4HCofThisEvent::GetCapacity ( )
inline

Definition at line 85 of file G4HCofThisEvent.hh.

86  {
87  return HC->size();
88  }
G4int G4HCofThisEvent::GetCapacity ( )
inline

Definition at line 102 of file G4HCofThisEvent.hh.

103  {
104  return HC->size();
105  }
G4int G4HCofThisEvent::GetCapacity ( )
inline

Definition at line 102 of file G4HCofThisEvent.hh.

103  {
104  return HC->size();
105  }

Here is the caller graph for this function:

G4VHitsCollection* G4HCofThisEvent::GetHC ( G4int  i)
inline

Definition at line 66 of file G4HCofThisEvent.hh.

67  { return (*HC)[i]; }
G4VHitsCollection* G4HCofThisEvent::GetHC ( G4int  i)
inline

Definition at line 83 of file G4HCofThisEvent.hh.

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

Here is the caller graph for this function:

G4VHitsCollection* G4HCofThisEvent::GetHC ( G4int  i)
inline

Definition at line 83 of file G4HCofThisEvent.hh.

84  { return (*HC)[i]; }
G4int G4HCofThisEvent::GetNumberOfCollections ( )
inline

Definition at line 73 of file G4HCofThisEvent.hh.

74  {
75  G4int n = 0;
76  for(size_t i=0;i<HC->size();i++)
77  {
78  if((*HC)[i]) n++;
79  }
80  return n;
81  }
int G4int
Definition: G4Types.hh:78
const G4int n
G4int G4HCofThisEvent::GetNumberOfCollections ( )
inline

Definition at line 90 of file G4HCofThisEvent.hh.

91  {
92  G4int n = 0;
93  for(size_t i=0;i<HC->size();i++)
94  {
95  if((*HC)[i]) n++;
96  }
97  return n;
98  }
int G4int
Definition: G4Types.hh:78
const G4int n
G4int G4HCofThisEvent::GetNumberOfCollections ( )
inline

Definition at line 90 of file G4HCofThisEvent.hh.

91  {
92  G4int n = 0;
93  for(size_t i=0;i<HC->size();i++)
94  {
95  if((*HC)[i]) n++;
96  }
97  return n;
98  }
int G4int
Definition: G4Types.hh:78
const G4int n

Here is the caller graph for this function:

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

Definition at line 122 of file G4HCofThisEvent.hh.

123 {
124  anHCoTHAllocator.FreeSingle((G4HCofThisEvent*)anHCoTH);
125 }
G4DLLIMPORT G4Allocator< G4HCofThisEvent > anHCoTHAllocator
void G4HCofThisEvent::operator delete ( void anHCoTE)
inline
void* G4HCofThisEvent::operator new ( size_t  )
inline
void * G4HCofThisEvent::operator new ( size_t  )
inline

Definition at line 115 of file G4HCofThisEvent.hh.

116 {
117  void* anHCoTH;
118  anHCoTH = (void*)anHCoTHAllocator.MallocSingle();
119  return anHCoTH;
120 }
G4DLLIMPORT G4Allocator< G4HCofThisEvent > anHCoTHAllocator
void* G4HCofThisEvent::operator new ( size_t  )
inline
G4HCofThisEvent & G4HCofThisEvent::operator= ( const G4HCofThisEvent rhs)

Definition at line 75 of file G4HCofThisEvent.cc.

76 {
77  if ( this == &rhs ) return *this;
79  for ( std::vector<G4VHitsCollection*>::const_iterator it = HC->begin() ;
80  it != HC->end() ; ++it )
81  {
82  delete *it;
83  }
84  HC->resize(rhs.HC->size());
85  for ( unsigned int i = 0 ; i<rhs.HC->size() ; ++i)
86  *(HC->at(i)) = *(rhs.HC->at(i));
87  return *this;
88 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_

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