#include <G4THitsCollection.hh>
Inheritance diagram for G4THitsCollection< T >:
Public Member Functions | |
G4THitsCollection () | |
G4THitsCollection (G4String detName, G4String colNam) | |
virtual | ~G4THitsCollection () |
G4int | operator== (const G4THitsCollection< T > &right) const |
void * | operator new (size_t) |
void | operator delete (void *anHC) |
virtual void | DrawAllHits () |
virtual void | PrintAllHits () |
T * | operator[] (size_t i) const |
std::vector< T * > * | GetVector () const |
G4int | insert (T *aHit) |
G4int | entries () const |
virtual G4VHit * | GetHit (size_t i) const |
virtual size_t | GetSize () const |
Definition at line 67 of file G4THitsCollection.hh.
G4THitsCollection< T >::G4THitsCollection | ( | ) |
Definition at line 130 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00131 { 00132 std::vector<T*> * theHitsCollection 00133 = new std::vector<T*>; 00134 theCollection = (void*)theHitsCollection; 00135 }
G4THitsCollection< T >::G4THitsCollection | ( | G4String | detName, | |
G4String | colNam | |||
) |
Definition at line 137 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00138 : G4HitsCollection(detName,colNam) 00139 { 00140 std::vector<T*> * theHitsCollection 00141 = new std::vector<T*>; 00142 theCollection = (void*)theHitsCollection; 00143 }
G4THitsCollection< T >::~G4THitsCollection | ( | ) | [virtual] |
Definition at line 145 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00146 { 00147 std::vector<T*> * theHitsCollection 00148 = (std::vector<T*>*)theCollection; 00149 //theHitsCollection->clearAndDestroy(); 00150 for(size_t i=0;i<theHitsCollection->size();i++) 00151 { delete (*theHitsCollection)[i]; } 00152 theHitsCollection->clear(); 00153 delete theHitsCollection; 00154 }
void G4THitsCollection< T >::DrawAllHits | ( | ) | [virtual] |
Reimplemented from G4VHitsCollection.
Definition at line 159 of file G4THitsCollection.hh.
References CLHEP::detail::n, and G4HitsCollection::theCollection.
00160 { 00161 std::vector<T*> * theHitsCollection 00162 = (std::vector<T*>*)theCollection; 00163 size_t n = theHitsCollection->size(); 00164 for(size_t i=0;i<n;i++) 00165 { (*theHitsCollection)[i]->Draw(); } 00166 }
G4int G4THitsCollection< T >::entries | ( | ) | const [inline] |
Definition at line 102 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00103 { 00104 std::vector<T*>*theHitsCollection 00105 = (std::vector<T*>*)theCollection; 00106 return theHitsCollection->size(); 00107 }
virtual G4VHit* G4THitsCollection< T >::GetHit | ( | size_t | i | ) | const [inline, virtual] |
Reimplemented from G4VHitsCollection.
Definition at line 111 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00112 { return (*((std::vector<T*>*)theCollection))[i]; }
virtual size_t G4THitsCollection< T >::GetSize | ( | ) | const [inline, virtual] |
Reimplemented from G4VHitsCollection.
Definition at line 113 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00114 { return ((std::vector<T*>*)theCollection)->size(); }
std::vector<T*>* G4THitsCollection< T >::GetVector | ( | ) | const [inline] |
Definition at line 90 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00091 { return (std::vector<T*>*)theCollection; }
G4int G4THitsCollection< T >::insert | ( | T * | aHit | ) | [inline] |
Definition at line 93 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00094 { 00095 std::vector<T*>*theHitsCollection 00096 = (std::vector<T*>*)theCollection; 00097 theHitsCollection->push_back(aHit); 00098 return theHitsCollection->size(); 00099 }
void G4THitsCollection< T >::operator delete | ( | void * | anHC | ) | [inline] |
Definition at line 125 of file G4THitsCollection.hh.
References anHCAllocator.
00126 { 00127 anHCAllocator.FreeSingle((G4HitsCollection*)anHC); 00128 }
void * G4THitsCollection< T >::operator new | ( | size_t | ) | [inline] |
Definition at line 118 of file G4THitsCollection.hh.
References anHCAllocator.
00119 { 00120 void* anHC; 00121 anHC = (void*)anHCAllocator.MallocSingle(); 00122 return anHC; 00123 }
G4int G4THitsCollection< T >::operator== | ( | const G4THitsCollection< T > & | right | ) | const |
Definition at line 156 of file G4THitsCollection.hh.
References G4VHitsCollection::collectionName.
00157 { return (collectionName==right.collectionName); }
T* G4THitsCollection< T >::operator[] | ( | size_t | i | ) | const [inline] |
Definition at line 87 of file G4THitsCollection.hh.
References G4HitsCollection::theCollection.
00088 { return (*((std::vector<T*>*)theCollection))[i]; }
void G4THitsCollection< T >::PrintAllHits | ( | ) | [virtual] |
Reimplemented from G4VHitsCollection.
Definition at line 168 of file G4THitsCollection.hh.
References CLHEP::detail::n, and G4HitsCollection::theCollection.
00169 { 00170 std::vector<T*> * theHitsCollection 00171 = (std::vector<T*>*)theCollection; 00172 size_t n = theHitsCollection->size(); 00173 for(size_t i=0;i<n;i++) 00174 { (*theHitsCollection)[i]->Print(); } 00175 }