Geant4  10.02.p03
G4HCofThisEvent Class Reference

#include <G4HCofThisEvent.hh>

Inheritance diagram for G4HCofThisEvent:
Collaboration diagram for G4HCofThisEvent:

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 ()
 
 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 ()
 
 G4HCofThisEvent ()
 
 G4HCofThisEvent (G4int cap)
 
 ~G4HCofThisEvent ()
 
void * operator 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 ()
 

Private Attributes

std::vector< G4VHitsCollection * > * HC
 

Detailed Description

Constructor & Destructor Documentation

◆ G4HCofThisEvent() [1/7]

G4HCofThisEvent::G4HCofThisEvent ( )

Definition at line 34 of file G4HCofThisEvent.cc.

36  HC = new std::vector<G4VHitsCollection*>;
37 }
G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_
Here is the caller graph for this function:

◆ G4HCofThisEvent() [2/7]

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 }
G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_
int G4int
Definition: G4Types.hh:78

◆ ~G4HCofThisEvent() [1/3]

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 }
G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_

◆ G4HCofThisEvent() [3/7]

G4HCofThisEvent::G4HCofThisEvent ( )

◆ G4HCofThisEvent() [4/7]

G4HCofThisEvent::G4HCofThisEvent ( G4int  cap)

◆ ~G4HCofThisEvent() [2/3]

G4HCofThisEvent::~G4HCofThisEvent ( )

◆ G4HCofThisEvent() [5/7]

G4HCofThisEvent::G4HCofThisEvent ( )

◆ G4HCofThisEvent() [6/7]

G4HCofThisEvent::G4HCofThisEvent ( G4int  cap)

◆ ~G4HCofThisEvent() [3/3]

G4HCofThisEvent::~G4HCofThisEvent ( )

◆ G4HCofThisEvent() [7/7]

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 }
G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_

Member Function Documentation

◆ AddHitsCollection() [1/3]

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

◆ AddHitsCollection() [2/3]

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

◆ AddHitsCollection() [3/3]

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 }
G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_
int G4int
Definition: G4Types.hh:78
Here is the call graph for this function:

◆ GetCapacity() [1/3]

G4int G4HCofThisEvent::GetCapacity ( )
inline

Definition at line 85 of file source/digits_hits/hits/include/G4HCofThisEvent.hh.

86  {
87  return HC->size();
88  }
Here is the call graph for this function:

◆ GetCapacity() [2/3]

G4int G4HCofThisEvent::GetCapacity ( )
inline

Definition at line 102 of file examples/extended/parallel/TopC/ParN04/AnnotatedFiles/G4HCofThisEvent.hh.

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

◆ GetCapacity() [3/3]

G4int G4HCofThisEvent::GetCapacity ( )
inline

Definition at line 102 of file examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4HCofThisEvent.hh.

103  {
104  return HC->size();
105  }
Here is the caller graph for this function:

◆ GetHC() [1/3]

G4VHitsCollection* G4HCofThisEvent::GetHC ( G4int  i)
inline

Definition at line 66 of file source/digits_hits/hits/include/G4HCofThisEvent.hh.

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

◆ GetHC() [2/3]

G4VHitsCollection* G4HCofThisEvent::GetHC ( G4int  i)
inline

Definition at line 83 of file examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4HCofThisEvent.hh.

84  { return (*HC)[i]; }
Here is the caller graph for this function:

◆ GetHC() [3/3]

G4VHitsCollection* G4HCofThisEvent::GetHC ( G4int  i)
inline

◆ GetNumberOfCollections() [1/3]

G4int G4HCofThisEvent::GetNumberOfCollections ( )
inline

Definition at line 73 of file source/digits_hits/hits/include/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
Char_t n[5]

◆ GetNumberOfCollections() [2/3]

G4int G4HCofThisEvent::GetNumberOfCollections ( )
inline

Definition at line 90 of file examples/extended/parallel/TopC/ParN04/AnnotatedFiles/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
Char_t n[5]

◆ GetNumberOfCollections() [3/3]

G4int G4HCofThisEvent::GetNumberOfCollections ( )
inline

Definition at line 90 of file examples/extended/parallel/TopC/ParN02/AnnotatedFiles/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
Char_t n[5]
Here is the caller graph for this function:

◆ operator delete() [1/3]

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

◆ operator delete() [2/3]

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

Definition at line 122 of file examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4HCofThisEvent.hh.

123 {
124  anHCoTHAllocator.FreeSingle((G4HCofThisEvent*)anHCoTH);
125 }
G4DLLIMPORT G4Allocator< G4HCofThisEvent > anHCoTHAllocator

◆ operator delete() [3/3]

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

◆ operator new() [1/3]

void* G4HCofThisEvent::operator new ( size_t  )
inline

◆ operator new() [2/3]

void * G4HCofThisEvent::operator new ( size_t  )
inline

Definition at line 115 of file examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4HCofThisEvent.hh.

116 {
117  void* anHCoTH;
118  anHCoTH = (void*)anHCoTHAllocator.MallocSingle();
119  return anHCoTH;
120 }
G4DLLIMPORT G4Allocator< G4HCofThisEvent > anHCoTHAllocator

◆ operator new() [3/3]

void* G4HCofThisEvent::operator new ( size_t  )
inline

◆ operator=()

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 }
G4ThreadLocal G4Allocator< G4HCofThisEvent > * anHCoTHAllocator_G4MT_TLS_

Member Data Documentation

◆ HC

std::vector< G4VHitsCollection * > * G4HCofThisEvent::HC
private

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