Geant4  10.02
G4TAtomicHitsMap< T > Class Template Reference

This is an implementation of G4THitsMap<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 G4THitsMap<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 G4THitsMap<T> in thread-local instances. More...

#include <G4TAtomicHitsMap.hh>

+ Inheritance diagram for G4TAtomicHitsMap< T >:
+ Collaboration diagram for G4TAtomicHitsMap< 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<typename T>
class G4TAtomicHitsMap< T >

This is an implementation of G4THitsMap<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 G4THitsMap<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 G4THitsMap<T> in thread-local instances.

Definition at line 73 of file G4TAtomicHitsMap.hh.


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