49 #ifndef G4TAtomicHitsMap_h 50 #define G4TAtomicHitsMap_h 1 52 #include "G4THitsCollection.hh" 60 #include <type_traits> 76 static_assert(std::is_fundamental<T>::value,
77 "G4TAtomicHitsMap must use fundamental type");
83 typedef typename container_type::iterator
iterator;
117 inline G4int set(
const G4int & key, T& aHit)
const;
154 template <
typename T>
160 template <
typename T>
168 template <
typename T>
178 template <
typename T>
184 template <
typename T>
188 for(
auto itr = rhs.
GetMap()->begin(); itr != rhs.
GetMap()->end(); itr++)
189 add(itr->first, *(itr->second));
194 template <
typename T>
198 for(
auto itr = rhs.
GetMap()->begin(); itr != rhs.
GetMap()->end(); itr++)
199 add(itr->first, *(itr->second));
204 template <
typename T>
216 (*theCollection)[key] = ptr;
223 template <
typename T>
232 (*theCollection)[key] = aHit;
238 template <
typename T>
250 (*theCollection)[key] = hit;
256 template <
typename T>
263 (*theCollection)[key] = aHit;
268 template <
typename T>
278 (*theCollection)[key] = hit;
284 template <
typename T>
288 template <
typename T>
295 template <
typename T>
value_type * operator[](G4int key) const
virtual void DrawAllHits()
std::map< G4int, T * > * GetMap() const
virtual size_t GetSize() const
G4int add(const G4int &key, value_type *&aHit) const
virtual void PrintAllHits()
container_type * GetMap() const
const_iterator find(G4int p) const
const_iterator end() const
G4TAtomicHitsMap< T > & operator+=(const G4TAtomicHitsMap< T > &right) const
const_iterator cend() const
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
virtual G4VHit * GetHit(size_t) const
container_type::const_iterator const_iterator
container_type * theCollection
container_type::iterator iterator
const_iterator cbegin() const
std::map< G4int, mapped_type > container_type
G4int set(const G4int &key, value_type *&aHit) const
G4int operator==(const G4TAtomicHitsMap< T > &right) const
virtual ~G4TAtomicHitsMap()
const_iterator begin() const
#define G4MUTEXDESTROY(mutex)