Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4THitsMap.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4THitsMap.hh 103976 2017-05-05 12:22:53Z gcosmo $
28 //
29 #ifndef G4THitsMap_h
30 #define G4THitsMap_h 1
31 
32 #include "G4THitsCollection.hh"
33 #include "globals.hh"
34 
35 #include <map>
36 #include <unordered_map>
37 
38 class G4StatDouble;
39 
40 // class description:
41 //
42 // This is a template class of hits map and parametrized by
43 // The concrete class of G4VHit. This is a uniform collection for
44 // a particular concrete hit class objects.
45 // An intermediate layer class G4HitsMap appeared in this
46 // header file is used just for G4Allocator, because G4Allocator
47 // cannot be instansiated with a template class. Thus G4HitsMap
48 // class MUST NOT be directly used by the user.
49 
50 template <typename T, typename Map_t = std::map<G4int, T*> >
52 {
53 private:
54  typedef std::multimap<G4int, T*> mmap_t;
55  typedef std::pair<G4int, T*> pair_t;
56  typedef std::unordered_multimap<G4int, T*> uommap_t;
57 
58  #define is_same_t(_Tp, _Up) std::is_same<_Tp, _Up>::value
59  #define is_multimap_t(_Mp) std::is_same<_Mp, mmap_t>::value
60  #define is_uommap_t(_Mp) std::is_same<_Mp, uommap_t>::value
61  #define is_mmap_t(_Mp) (is_multimap_t(_Mp) || is_uommap_t(_Mp))
62  #define is_fundamental_t(_Tp) std::is_fundamental<_Tp>::value
63 
64  template <bool _Bp, typename _Tp = void>
65  using enable_if_t = typename std::enable_if<_Bp, _Tp>::type;
66 
67  // ensure fundamental types are initialized to zero
68  template <typename U = T, enable_if_t<is_fundamental_t(U), int> = 0>
69  T* allocate() const
70  { return new T(0.); }
71  // non-fundamental types should set values to appropriate values
72  // and avoid issues such as:
73  // G4StatDouble stat(0.); stat += 1.0; gives n == 2;
74  template <typename U = T, enable_if_t<! is_fundamental_t(U), int> = 0>
75  T* allocate() const
76  { return new T(); }
77 
78 public:
80  typedef T value_type;
81  typedef Map_t map_type;
82  typedef typename map_type::iterator iterator;
83  typedef typename map_type::const_iterator const_iterator;
84 
85 public: // with description
86  // generic constructor
87  G4VTHitsMap();
88  // det + collection description constructor
89  G4VTHitsMap(G4String detName, G4String colNam);
90  // destructor
91  virtual ~G4VTHitsMap();
92  // equivalence operator
94 
95  //------------------------------------------------------------------------//
96  // Generic operator += where add(...) overloads handle various
97  // U and MapU_t types
98  //------------------------------------------------------------------------//
99  template <typename U, typename MapU_t>
101  {
102  MapU_t* aHitsMap = right.GetMap();
103  for(auto itr = aHitsMap->begin(); itr != aHitsMap->end(); itr++)
104  add<U, map_type>(itr->first, *(itr->second));
105  return (this_type&)(*this);
106  }
107  //------------------------------------------------------------------------//
108 
109 public: // with description
110  virtual void DrawAllHits();
111  virtual void PrintAllHits();
112  // These two methods invokes Draw() and Print() methods of all of
113  // hit objects stored in this map, respectively.
114 
115 public: // with description
116  // Returns a pointer to a concrete hit object.
117  inline Map_t* GetMap() const
118  { return (Map_t*)theCollection; }
119  // Overwrite a hit object. Total number of hit objects stored in this
120  // map is returned.
121  inline G4int entries() const
122  { return ((Map_t*)theCollection)->size(); }
123  // Returns the number of hit objects stored in this map
124  inline void clear();
125 
126  iterator begin() { return GetMap()->begin(); }
127  iterator end() { return GetMap()->end(); }
128  const_iterator begin() const { return GetMap()->begin(); }
129  const_iterator end() const { return GetMap()->end(); }
130  const_iterator cbegin() const { return GetMap()->cbegin(); }
131  const_iterator cend() const { return GetMap()->cend(); }
132 
133 public:
134  virtual G4VHit* GetHit(size_t) const {return 0;}
135  virtual size_t GetSize() const
136  { return ((Map_t*)theCollection)->size(); }
137 
138 public:
139  //------------------------------------------------------------------------//
140  // Add/Insert a hit object. Total number of hit objects stored in this
141  // map is returned.
142  //------------------------------------------------------------------------//
143  // Standard map overload for same type
144  //------------------------------------------------------------------------//
145  // here we don't use allocate() since instances like G4Colour() == white
146  // and += adds to white (not correct)
147  template <typename U = T,
148  typename MapU_t = Map_t,
149  enable_if_t<is_same_t(U, T) && ! is_mmap_t(MapU_t), int> = 0>
150  G4int add(const G4int& key, U*& aHit) const
151  {
152  map_type* theHitsMap = GetMap();
153  if(theHitsMap->find(key) == theHitsMap->end())
154  theHitsMap->insert(pair_t(key, new T(*aHit)));
155  else
156  *theHitsMap->find(key)->second += *aHit;
157  return theHitsMap->size();
158  }
159  //------------------------------------------------------------------------//
160  // Multimap overload for same type T
161  //------------------------------------------------------------------------//
162  template <typename U = T,
163  typename MapU_t = Map_t,
164  enable_if_t<(is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
165  G4int add(const G4int& key, U*& aHit) const
166  {
167  map_type* theHitsMap = GetMap();
168  theHitsMap->insert(pair_t(key, aHit));
169  return theHitsMap->size();
170  }
171  //------------------------------------------------------------------------//
172  // Multimap overload for different types
173  // assumes type T has overload of += operator for U
174  //------------------------------------------------------------------------//
175  template <typename U = T,
176  typename MapU_t = Map_t,
177  enable_if_t<(!is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
178  G4int add(const G4int& key, U*& aHit) const
179  {
180  map_type* theHitsMap = GetMap();
181  T* hit = allocate();
182  *hit += *aHit;
183  theHitsMap->insert(pair_t(key, hit));
184  return theHitsMap->size();
185  }
186 
187 public:
188  //------------------------------------------------------------------------//
189  // Standard map overload for same type
190  // assumes type T has overload of += operator for U
191  //------------------------------------------------------------------------//
192  // here we don't use allocate() since instances like G4Colour() == white
193  // and += adds to white (not correct)
194  template <typename U = T,
195  typename MapU_t = Map_t,
196  enable_if_t<(is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
197  G4int add(const G4int& key, U& aHit) const
198  {
199  map_type* theHitsMap = GetMap();
200  if(theHitsMap->find(key) == theHitsMap->end())
201  theHitsMap->insert(pair_t(key, new T(aHit)));
202  else
203  *theHitsMap->find(key)->second += aHit;
204  return theHitsMap->size();
205  }
206  //------------------------------------------------------------------------//
207  // Standard map overload for different type
208  // assumes type T has overload of += operator for U
209  //------------------------------------------------------------------------//
210  template <typename U = T,
211  typename MapU_t = Map_t,
212  enable_if_t<(! is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
213  G4int add(const G4int& key, U& aHit) const
214  {
215  map_type* theHitsMap = GetMap();
216  if(theHitsMap->find(key) == theHitsMap->end())
217  theHitsMap->insert(pair_t(key, allocate()));
218  *theHitsMap->find(key)->second += aHit;
219  return theHitsMap->size();
220  }
221  //------------------------------------------------------------------------//
222  // Multimap overload for same type T
223  //------------------------------------------------------------------------//
224  template <typename U = T,
225  typename MapU_t = Map_t,
226  enable_if_t<(is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
227  G4int add(const G4int& key, U& aHit) const
228  {
229  map_type* theHitsMap = GetMap();
230  theHitsMap->insert(pair_t(key, new T(aHit)));
231  return theHitsMap->size();
232  }
233  //------------------------------------------------------------------------//
234  // Multimap overload for different types
235  // assumes type T has overload of += operator for U
236  //------------------------------------------------------------------------//
237  template <typename U = T,
238  typename MapU_t = Map_t,
239  enable_if_t<(!is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
240  G4int add(const G4int& key, U& aHit) const
241  {
242  map_type* theHitsMap = GetMap();
243  T* hit = allocate();
244  *hit += aHit;
245  theHitsMap->insert(pair_t(key, hit));
246  return theHitsMap->size();
247  }
248  //------------------------------------------------------------------------//
249 
250 public:
251  //------------------------------------------------------------------------//
252  // Set a hit object. Total number of hit objects stored in this
253  // map is returned.
254  //------------------------------------------------------------------------//
255  // Standard overload for same type T
256  //------------------------------------------------------------------------//
257  template <typename U = T,
258  typename MapU_t = Map_t,
259  enable_if_t<(is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
260  inline G4int set(const G4int& key, U*& aHit) const
261  {
262  map_type* theHitsMap = GetMap();
263  if(theHitsMap->find(key) != theHitsMap->end())
264  delete theHitsMap->find(key)->second;
265  theHitsMap->find(key)->second = aHit;
266  return theHitsMap->size();
267  }
268  //------------------------------------------------------------------------//
269  // Multimap overload for same type T
270  //------------------------------------------------------------------------//
271  template <typename U = T,
272  typename MapU_t = Map_t,
273  enable_if_t<(is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
274  inline G4int set(const G4int& key, U*& aHit) const
275  {
276  map_type* theHitsMap = GetMap();
277  if(theHitsMap->find(key) != theHitsMap->end())
278  theHitsMap->insert(pair_t(key, aHit));
279  else
280  {
281  delete theHitsMap->find(key)->second;
282  theHitsMap->find(key)->second = aHit;
283  }
284  return theHitsMap->size();
285  }
286  //------------------------------------------------------------------------//
287  // Standard map overload for different types
288  //------------------------------------------------------------------------//
289  template <typename U = T,
290  typename MapU_t = Map_t,
291  enable_if_t<(!is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
292  inline G4int set(const G4int & key, U*& aHit) const
293  {
294  map_type* theHitsMap = GetMap();
295  T* hit = nullptr;
296  if(theHitsMap->find(key) == theHitsMap->end())
297  theHitsMap->insert(std::make_pair(key, hit = allocate()));
298  else
299  hit = theHitsMap->find(key)->second;
300  *hit += *aHit;
301  return theHitsMap->size();
302  }
303  //------------------------------------------------------------------------//
304  // Multimap overload for different types
305  //------------------------------------------------------------------------//
306  template <typename U = T,
307  typename MapU_t = Map_t,
308  enable_if_t<(!is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
309  inline G4int set(const G4int& key, U*& aHit) const
310  {
311  map_type* theHitsMap = GetMap();
312  T* hit = allocate();
313  *hit += *aHit;
314  if(theHitsMap->find(key) != theHitsMap->end())
315  theHitsMap->insert(pair_t(key, hit));
316  else
317  {
318  delete theHitsMap->find(key)->second;
319  theHitsMap->find(key)->second = hit;
320  }
321  return theHitsMap->size();
322  }
323  //------------------------------------------------------------------------//
324 
325 public:
326  //------------------------------------------------------------------------//
327  // Set a hit object. Total number of hit objects stored in this
328  // map is returned.
329  //------------------------------------------------------------------------//
330  // Standard overload for same type T
331  //------------------------------------------------------------------------//
332  template <typename U = T,
333  typename MapU_t = Map_t,
334  enable_if_t<(is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
335  inline G4int set(const G4int& key, U& aHit) const
336  {
337  map_type* theHitsMap = GetMap();
338  T* hit = nullptr;
339  if(theHitsMap->find(key) != theHitsMap->end())
340  hit = theHitsMap->find(key)->second;
341  else
342  theHitsMap->insert(pair_t(key, hit = allocate()));
343  *hit = aHit;
344  return theHitsMap->size();
345  }
346  //------------------------------------------------------------------------//
347  // Multimap overload for same type T
348  //------------------------------------------------------------------------//
349  template <typename U = T,
350  typename MapU_t = Map_t,
351  enable_if_t<(is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
352  inline G4int set(const G4int& key, U& aHit) const
353  {
354  map_type* theHitsMap = GetMap();
355  if(theHitsMap->find(key) != theHitsMap->end())
356  *theHitsMap->find(key)->second = aHit;
357  else
358  theHitsMap->insert(pair_t(key, new T(aHit)));
359  return theHitsMap->size();
360  }
361  //------------------------------------------------------------------------//
362  // Standard map overload for different types
363  //------------------------------------------------------------------------//
364  template <typename U = T,
365  typename MapU_t = Map_t,
366  enable_if_t<(!is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
367  inline G4int set(const G4int & key, U& aHit) const
368  {
369  map_type* theHitsMap = GetMap();
370  T* hit = nullptr;
371  if(theHitsMap->find(key) == theHitsMap->end())
372  theHitsMap->insert(std::make_pair(key, hit = allocate()));
373  else
374  hit = theHitsMap->find(key)->second;
375  *hit += aHit;
376  return theHitsMap->size();
377  }
378  //------------------------------------------------------------------------//
379  // Multimap overload for different types
380  //------------------------------------------------------------------------//
381  template <typename U = T,
382  typename MapU_t = Map_t,
383  enable_if_t<(!is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
384  inline G4int set(const G4int& key, U& aHit) const
385  {
386  map_type* theHitsMap = GetMap();
387  T* hit = allocate();
388  *hit += aHit;
389  if(theHitsMap->find(key) != theHitsMap->end())
390  *theHitsMap->find(key)->second = *hit;
391  else
392  theHitsMap->insert(pair_t(key, hit));
393  return theHitsMap->size();
394  }
395  //------------------------------------------------------------------------//
396 
397 public:
398  //------------------------------------------------------------------------//
399  // Enable bracket operator. Return pointer to data indexed by key or
400  // last occurring instance of pointer to data index by key in the
401  // case of a multimap
402  //------------------------------------------------------------------------//
403  template <typename MapU_t = Map_t,
404  enable_if_t<! is_mmap_t(MapU_t), int> = 0>
405  T* operator[](G4int key) const
406  {
407  map_type* theHitsMap = GetMap();
408  if(theHitsMap->find(key) != theHitsMap->end())
409  return theHitsMap->find(key)->second;
410  return nullptr;
411  }
412  //------------------------------------------------------------------------//
413  template <typename MapU_t = Map_t,
414  enable_if_t<is_mmap_t(MapU_t), int> = 0>
415  T* operator[](G4int key) const
416  {
417 #ifdef G4VERBOSE
418  static bool _first = true;
419  if(_first)
420  {
421  _first = false;
422  G4Exception("G4THitsMap operator[]", "calling [] on multimap",
423  JustWarning, "Returning the last matching entry");
424  }
425 #endif
426  map_type* theHitsMap = GetMap();
427  iterator itr = theHitsMap->find(key);
428  if(itr != theHitsMap->end())
429  {
430  std::advance(itr, theHitsMap->count(key)-1);
431  return itr->second;
432  }
433  return nullptr;
434  }
435  //------------------------------------------------------------------------//
436 
437  #undef is_same_t
438  #undef is_multimap_t
439  #undef is_uommap_t
440  #undef is_mmap_t
441  #undef is_fundamental_t
442 };
443 
444 //============================================================================//
445 
446 template <typename T, typename Map_t>
448 {
449  theCollection = (void*)new Map_t;
450 }
451 
452 //============================================================================//
453 
454 template <typename T, typename Map_t>
456  : G4HitsCollection(detName,colNam)
457 {
458  theCollection = (void*)new Map_t;
459 }
460 
461 //============================================================================//
462 
463 template <typename T, typename Map_t>
465 {
466  map_type* theHitsMap = GetMap();
467  for(iterator itr = theHitsMap->begin(); itr != theHitsMap->end(); itr++)
468  delete itr->second;
469  delete theHitsMap;
470 }
471 
472 //============================================================================//
473 
474 template <typename T, typename Map_t>
476 {
477  return (collectionName==right.collectionName);
478 }
479 
480 //============================================================================//
481 
482 template <typename T, typename Map_t>
484 {;}
485 
486 //============================================================================//
487 
488 template <typename T, typename Map_t>
490 {
491  G4cout << "G4THitsMap " << SDname << " / " << collectionName << " --- "
492  << entries() << " entries" << G4endl;
493  /*----- commented out for the use-case where <T> cannot be initialized
494  to be zero or does not support += operator.
495  Map_t * theHitsMap = GetMap();
496  typename Map_t::iterator itr = theHitsMap->begin();
497  T sum = 0.;
498  for(; itr != theHitsMap->end(); itr++) {
499  G4cout << " " << itr->first << " : "
500  << *(itr->second) << G4endl;
501  sum += *(itr->second);
502  }
503  G4cout << " Total : " << sum << G4endl;
504  ----------------------------------------------------------------------*/
505 }
506 
507 //============================================================================//
508 
509 template <typename T, typename Map_t>
511 {
512  Map_t * theHitsMap = GetMap();
513  for(iterator itr = theHitsMap->begin(); itr != theHitsMap->end(); itr++)
514  delete itr->second;
515  theHitsMap->clear();
516 }
517 
518 //============================================================================//
519 // //
520 // //
521 // Helpers for different map types //
522 // //
523 // //
524 //============================================================================//
525 
526 template <typename _Tp>
527 class G4THitsMap : public G4VTHitsMap<_Tp, std::map<G4int, _Tp*>>
528 {
529 public:
531 
532 public:
534  G4THitsMap(G4String detName,G4String colName)
535  : parent_type(detName, colName) { }
536 
537  using parent_type::operator +=;
538  using parent_type::operator ==;
539  using parent_type::operator [];
542  using parent_type::GetMap;
543  using parent_type::entries;
544  using parent_type::clear;
545  using parent_type::begin;
546  using parent_type::end;
547  using parent_type::cbegin;
548  using parent_type::cend;
549  using parent_type::GetHit;
550  using parent_type::GetSize;
551  using parent_type::add;
552  using parent_type::set;
553 };
554 
555 //============================================================================//
556 
557 template <typename _Tp>
558 class G4THitsMultiMap : public G4VTHitsMap<_Tp, std::multimap<G4int, _Tp*>>
559 {
560 public:
562 
563 public:
566  : parent_type(detName, colName) { }
567 
568  using parent_type::operator +=;
569  using parent_type::operator ==;
570  using parent_type::operator [];
573  using parent_type::GetMap;
574  using parent_type::entries;
575  using parent_type::clear;
576  using parent_type::begin;
577  using parent_type::end;
578  using parent_type::cbegin;
579  using parent_type::cend;
580  using parent_type::GetHit;
581  using parent_type::GetSize;
582  using parent_type::add;
583  using parent_type::set;
584 };
585 
586 //============================================================================//
587 
588 template <typename _Tp>
590  : public G4VTHitsMap<_Tp, std::unordered_map<G4int, _Tp*>>
591 {
592 public:
594 
595 public:
598  : parent_type(detName, colName) { }
599 
600  using parent_type::operator +=;
601  using parent_type::operator ==;
602  using parent_type::operator [];
605  using parent_type::GetMap;
606  using parent_type::entries;
607  using parent_type::clear;
608  using parent_type::begin;
609  using parent_type::end;
610  using parent_type::cbegin;
611  using parent_type::cend;
612  using parent_type::GetHit;
613  using parent_type::GetSize;
614  using parent_type::add;
615  using parent_type::set;
616 };
617 
618 //============================================================================//
619 
620 template <typename _Tp>
622  : public G4VTHitsMap<_Tp, std::unordered_multimap<G4int, _Tp*>>
623 {
624 public:
626 
627 public:
630  : parent_type(detName, colName) { }
631 
632  using parent_type::operator +=;
633  using parent_type::operator ==;
634  using parent_type::operator [];
637  using parent_type::GetMap;
638  using parent_type::entries;
639  using parent_type::clear;
640  using parent_type::begin;
641  using parent_type::end;
642  using parent_type::cbegin;
643  using parent_type::cend;
644  using parent_type::GetHit;
645  using parent_type::GetSize;
646  using parent_type::add;
647  using parent_type::set;
648 };
649 
650 //============================================================================//
651 
652 #endif
std::multimap< G4int, T * > mmap_t
Definition: G4THitsMap.hh:54
typename std::enable_if< _Bp, _Tp >::type enable_if_t
Definition: G4THitsMap.hh:65
const_iterator begin() const
Definition: G4THitsMap.hh:128
virtual ~G4VTHitsMap()
Definition: G4THitsMap.hh:464
G4VTHitsMap< T, Map_t > this_type
Definition: G4THitsMap.hh:79
G4VTHitsMap< _Tp, std::multimap< G4int, _Tp * > > parent_type
Definition: G4THitsMap.hh:561
G4int add(const G4int &key, U *&aHit) const
Definition: G4THitsMap.hh:150
#define G4endl
Definition: G4ios.hh:61
G4VTHitsMap< _Tp, std::map< G4int, _Tp * > > parent_type
Definition: G4THitsMap.hh:530
Definition: G4VHit.hh:48
const_iterator cbegin() const
Definition: G4THitsMap.hh:130
T * operator[](G4int key) const
Definition: G4THitsMap.hh:405
virtual void PrintAllHits()
Definition: G4THitsMap.hh:489
const_iterator cend() const
Definition: G4THitsMap.hh:131
iterator begin()
Definition: G4THitsMap.hh:126
void clear()
Definition: G4THitsMap.hh:510
G4int add(const G4int &key, U &aHit) const
Definition: G4THitsMap.hh:197
G4VTHitsMap< _Tp, std::unordered_map< G4int, _Tp * > > parent_type
Definition: G4THitsMap.hh:593
T * allocate() const
Definition: G4THitsMap.hh:69
this_type & operator+=(const G4VTHitsMap< U, MapU_t > &right) const
Definition: G4THitsMap.hh:100
map_type::const_iterator const_iterator
Definition: G4THitsMap.hh:83
G4VTHitsMap< _Tp, std::unordered_multimap< G4int, _Tp * > > parent_type
Definition: G4THitsMap.hh:625
G4int operator==(const G4VTHitsMap< T, Map_t > &right) const
Definition: G4THitsMap.hh:475
virtual G4VHit * GetHit(size_t) const
Definition: G4THitsMap.hh:134
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
virtual void DrawAllHits()
Definition: G4THitsMap.hh:483
Map_t map_type
Definition: G4THitsMap.hh:81
int G4int
Definition: G4Types.hh:78
virtual size_t GetSize() const
Definition: G4THitsMap.hh:135
G4THitsMap(G4String detName, G4String colName)
Definition: G4THitsMap.hh:534
G4int set(const G4int &key, U &aHit) const
Definition: G4THitsMap.hh:335
iterator end()
Definition: G4THitsMap.hh:127
std::unordered_multimap< G4int, T * > uommap_t
Definition: G4THitsMap.hh:56
G4int set(const G4int &key, U *&aHit) const
Definition: G4THitsMap.hh:260
G4GLOB_DLL std::ostream G4cout
std::pair< G4int, T * > pair_t
Definition: G4THitsMap.hh:55
G4THitsUnorderedMap(G4String detName, G4String colName)
Definition: G4THitsMap.hh:597
const_iterator end() const
Definition: G4THitsMap.hh:129
G4THitsUnorderedMultiMap(G4String detName, G4String colName)
Definition: G4THitsMap.hh:629
map_type::iterator iterator
Definition: G4THitsMap.hh:82
G4int entries() const
Definition: G4THitsMap.hh:121
Map_t * GetMap() const
Definition: G4THitsMap.hh:117
G4THitsMultiMap(G4String detName, G4String colName)
Definition: G4THitsMap.hh:565