This is an implementation of G4THitsCollection<T> where the underlying type is G4atomic<T>, not just T. More...
#include <Doxymodules_parallel.h>
Public Types | |
typedef T | base_type |
typedef G4atomic< T > | value_type |
typedef std::deque< value_type * > | container_type |
Public Member Functions | |
G4TAtomicHitsCollection () | |
G4TAtomicHitsCollection (G4String detName, G4String colNam) | |
virtual | ~G4TAtomicHitsCollection () |
G4bool | operator== (const G4TAtomicHitsCollection< T > &right) const |
virtual void | DrawAllHits () |
virtual void | PrintAllHits () |
value_type * | operator[] (size_t i) const |
container_type * | GetVector () const |
G4int | insert (T *aHit) |
G4int | entries () const |
virtual G4VHit * | GetHit (size_t i) const |
virtual size_t | GetSize () const |
Protected Attributes | |
container_type * | theCollection |
G4Mutex | fMutex |
This is an implementation of G4THitsCollection<T> where the underlying type is G4atomic<T>, not just T.
A static assert is provided to ensure that T is fundamental. This class should be used in lieu of G4THitsCollection<T> when memory is a concern. Atomics are thread-safe and generally faster that mutexes (as long as the STL implementation is lock-free) but the synchronization does not come without a cost. If performance is the primary concern, use G4THitsCollection<T> in thread-local instances.
Definition at line 141 of file Doxymodules_parallel.h.
typedef T G4TAtomicHitsCollection< T >::base_type |
Definition at line 88 of file G4TAtomicHitsCollection.hh.
typedef G4atomic<T> G4TAtomicHitsCollection< T >::value_type |
Definition at line 89 of file G4TAtomicHitsCollection.hh.
typedef std::deque<value_type*> G4TAtomicHitsCollection< T >::container_type |
Definition at line 90 of file G4TAtomicHitsCollection.hh.
G4TAtomicHitsCollection< T >::G4TAtomicHitsCollection | ( | ) |
Definition at line 148 of file G4TAtomicHitsCollection.hh.
G4TAtomicHitsCollection< T >::G4TAtomicHitsCollection | ( | G4String | detName, |
G4String | colNam | ||
) |
Definition at line 153 of file G4TAtomicHitsCollection.hh.
|
virtual |
Definition at line 160 of file G4TAtomicHitsCollection.hh.
G4bool G4TAtomicHitsCollection< T >::operator== | ( | const G4TAtomicHitsCollection< T > & | right | ) | const |
Definition at line 169 of file G4TAtomicHitsCollection.hh.
|
virtual |
Definition at line 176 of file G4TAtomicHitsCollection.hh.
|
virtual |
Definition at line 184 of file G4TAtomicHitsCollection.hh.
|
inline |
Definition at line 114 of file G4TAtomicHitsCollection.hh.
|
inline |
Definition at line 116 of file G4TAtomicHitsCollection.hh.
|
inline |
Definition at line 118 of file G4TAtomicHitsCollection.hh.
|
inline |
Definition at line 126 of file G4TAtomicHitsCollection.hh.
|
inlinevirtual |
Definition at line 134 of file G4TAtomicHitsCollection.hh.
|
inlinevirtual |
Definition at line 135 of file G4TAtomicHitsCollection.hh.
|
protected |
Definition at line 142 of file G4TAtomicHitsCollection.hh.
|
protected |
Definition at line 143 of file G4TAtomicHitsCollection.hh.