Geant4  10.02
G4TAtomicHitsCollection< T > Class Template Reference

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. More...

#include <G4TAtomicHitsCollection.hh>

+ Inheritance diagram for G4TAtomicHitsCollection< T >:
+ Collaboration diagram for G4TAtomicHitsCollection< T >:

Additional Inherited Members

- Public Member Functions inherited from G4VHitsCollection
 G4VHitsCollection ()
 
 G4VHitsCollection (G4String detName, G4String colNam)
 
virtual ~G4VHitsCollection ()
 
G4int operator== (const G4VHitsCollection &right) const
 
virtual void DrawAllHits ()
 
virtual void PrintAllHits ()
 
G4String GetName ()
 
G4String GetSDname ()
 
virtual G4VHitGetHit (size_t) const
 
virtual size_t GetSize () const
 
 G4VHitsCollection ()
 
 G4VHitsCollection (G4String detName, G4String colNam)
 
virtual ~G4VHitsCollection ()
 
G4int operator== (const G4VHitsCollection &right) const
 
virtual void DrawAllHits ()
 
virtual void PrintAllHits ()
 
G4String GetName ()
 
G4String GetSDname ()
 
virtual G4VHitGetHit (size_t) const
 
virtual size_t GetSize () const
 
 G4VHitsCollection ()
 
 G4VHitsCollection (G4String detName, G4String colNam)
 
virtual ~G4VHitsCollection ()
 
G4int operator== (const G4VHitsCollection &right) const
 
virtual void DrawAllHits ()
 
virtual void PrintAllHits ()
 
G4String GetName ()
 
G4String GetSDname ()
 
virtual G4VHitGetHit (size_t) const
 
virtual size_t GetSize () const
 
- Protected Attributes inherited from G4VHitsCollection
G4String collectionName
 
G4String SDname
 

Detailed Description

template<class T>
class G4TAtomicHitsCollection< T >

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 86 of file G4TAtomicHitsCollection.hh.


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