This is an implementation of G4THitsMap<T> where the underlying type is G4atomic<T>, not just T. More...
#include <Doxymodules_parallel.h>
Public Types | |
typedef G4atomic< T > | value_type |
typedef value_type * | mapped_type |
typedef std::map< G4int, mapped_type > | container_type |
typedef container_type::iterator | iterator |
typedef container_type::const_iterator | const_iterator |
Public Member Functions | |
G4TAtomicHitsMap () | |
G4TAtomicHitsMap (G4String detName, G4String colNam) | |
virtual | ~G4TAtomicHitsMap () |
G4bool | operator== (const G4TAtomicHitsMap< T > &right) const |
G4TAtomicHitsMap< T > & | operator+= (const G4TAtomicHitsMap< T > &right) const |
G4TAtomicHitsMap< T > & | operator+= (const G4THitsMap< T > &right) const |
virtual void | DrawAllHits () |
virtual void | PrintAllHits () |
value_type * | operator[] (G4int key) const |
container_type * | GetMap () const |
G4int | add (const G4int &key, value_type *&aHit) const |
G4int | add (const G4int &key, T &aHit) const |
G4int | set (const G4int &key, value_type *&aHit) const |
G4int | set (const G4int &key, T &aHit) const |
G4int | entries () const |
void | clear () |
virtual G4VHit * | GetHit (size_t) const |
virtual size_t | GetSize () const |
virtual size_t | size () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
iterator | find (G4int p) |
const_iterator | find (G4int p) const |
Private Attributes | |
container_type * | theCollection |
G4Mutex | fMutex |
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 142 of file Doxymodules_parallel.h.
typedef G4atomic<T> G4TAtomicHitsMap< T >::value_type |
Definition at line 76 of file G4TAtomicHitsMap.hh.
typedef value_type* G4TAtomicHitsMap< T >::mapped_type |
Definition at line 77 of file G4TAtomicHitsMap.hh.
typedef std::map<G4int, mapped_type> G4TAtomicHitsMap< T >::container_type |
Definition at line 78 of file G4TAtomicHitsMap.hh.
typedef container_type::iterator G4TAtomicHitsMap< T >::iterator |
Definition at line 79 of file G4TAtomicHitsMap.hh.
typedef container_type::const_iterator G4TAtomicHitsMap< T >::const_iterator |
Definition at line 80 of file G4TAtomicHitsMap.hh.
G4TAtomicHitsMap< T >::G4TAtomicHitsMap | ( | ) |
Definition at line 145 of file G4TAtomicHitsMap.hh.
G4TAtomicHitsMap< T >::G4TAtomicHitsMap | ( | G4String | detName, |
G4String | colNam | ||
) |
Definition at line 150 of file G4TAtomicHitsMap.hh.
|
virtual |
Definition at line 156 of file G4TAtomicHitsMap.hh.
G4bool G4TAtomicHitsMap< T >::operator== | ( | const G4TAtomicHitsMap< T > & | right | ) | const |
Definition at line 165 of file G4TAtomicHitsMap.hh.
G4TAtomicHitsMap< T > & G4TAtomicHitsMap< T >::operator+= | ( | const G4TAtomicHitsMap< T > & | right | ) | const |
Definition at line 171 of file G4TAtomicHitsMap.hh.
G4TAtomicHitsMap< T > & G4TAtomicHitsMap< T >::operator+= | ( | const G4THitsMap< T > & | right | ) | const |
Definition at line 181 of file G4TAtomicHitsMap.hh.
|
virtual |
Definition at line 268 of file G4TAtomicHitsMap.hh.
|
virtual |
Definition at line 272 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 192 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 105 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 212 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 226 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 242 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 253 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 115 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 279 of file G4TAtomicHitsMap.hh.
|
inlinevirtual |
Definition at line 120 of file G4TAtomicHitsMap.hh.
|
inlinevirtual |
Definition at line 121 of file G4TAtomicHitsMap.hh.
|
inlinevirtual |
Definition at line 123 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 126 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 127 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 129 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 130 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 132 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 133 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 135 of file G4TAtomicHitsMap.hh.
|
inline |
Definition at line 136 of file G4TAtomicHitsMap.hh.
|
private |
Definition at line 139 of file G4TAtomicHitsMap.hh.
|
mutableprivate |
Definition at line 140 of file G4TAtomicHitsMap.hh.