ATLAS Offline Software
TimedHitCollection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HITMANAGEMENT_TIMEDHITCOLLECTION
6 #define HITMANAGEMENT_TIMEDHITCOLLECTION
7 
8 #include <functional>
9 #include <vector>
13 
14 template <class HIT>
16 private:
17  typedef std::vector< TimedHitPtr<HIT> > TimedVector;
18 
19 public:
20  typedef typename TimedVector::const_iterator const_iterator;
21 
24  m_sorted(false) {}
25 
26  TimedHitCollection(unsigned int numberOfHits): m_hits(),
28  m_sorted(false) {
29  m_hits.reserve(numberOfHits);
30  return;
31 }
32 
34  class SortedException {};
35 
36  void
37  insert(const PileUpTimeEventIndex& timeEventIndex, const AtlasHitsVector<HIT>* inputCollection);
39 
40  void
41  insert(float evtTime, const AtlasHitsVector<HIT>* inputCollection);
43 
45  void reserve(unsigned int numberOfHits);
46 
50 
51  //FIXME elementID type std::pair<const_iterator, const_iterator> detectorElement(????) const;
52 
53 
54 private:
55  void sortVector();
58  bool m_sorted;
59 };
60 
61 #include "TimedHitCollection.icc"
62 #endif
63 
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TimedHitCollection::insert
void insert(float evtTime, const AtlasHitsVector< HIT > *inputCollection)
TimedHitCollection.icc
TimedHitCollection::m_currentHit
const_iterator m_currentHit
of current detector element;
Definition: TimedHitCollection.h:57
TimedHitCollection::sortVector
void sortVector()
AtlasHitsVector
Definition: AtlasHitsVector.h:33
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
TimedHitCollection::m_sorted
bool m_sorted
flag the fact that the collection has been sorted
Definition: TimedHitCollection.h:58
TimedHitCollection::nextDetectorElement
bool nextDetectorElement(const_iterator &b, const_iterator &e)
sets an iterator range with the hits of current detector element returns a bool when done
PileUpTimeEventIndex.h
TimedHitPtr.h
TimedHitCollection::m_hits
TimedVector m_hits
Definition: TimedHitCollection.h:56
TimedHitCollection::insert
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
TimedHitCollection::SortedException
thrown by insert
Definition: TimedHitCollection.h:34
TimedHitCollection::reserve
void reserve(unsigned int numberOfHits)
reserve a timed vector numberOfHits in size.
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TimedHitCollection::TimedHitCollection
TimedHitCollection(unsigned int numberOfHits)
Definition: TimedHitCollection.h:26
AtlasHitsVector.h
TimedHitCollection::const_iterator
TimedVector::const_iterator const_iterator
Definition: TimedHitCollection.h:20
TimedHitCollection::TimedVector
std::vector< TimedHitPtr< HIT > > TimedVector
Definition: TimedHitCollection.h:17
PileUpTimeEventIndex
a struct encapsulating the identifier of a pile-up event
Definition: PileUpTimeEventIndex.h:12
TimedHitCollection
Definition: TimedHitCollection.h:15
TimedHitCollection::TimedHitCollection
TimedHitCollection()
Definition: TimedHitCollection.h:22