ATLAS Offline Software
Loading...
Searching...
No Matches
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
14template <class HIT>
16private:
17 typedef std::vector< TimedHitPtr<HIT> > TimedVector;
18
19public:
20 typedef typename TimedVector::const_iterator const_iterator;
21
23 m_currentHit(m_hits.begin()),
24 m_sorted(false) {}
25
26 TimedHitCollection(unsigned int numberOfHits): m_hits(),
27 m_currentHit(m_hits.begin()),
28 m_sorted(false) {
29 m_hits.reserve(numberOfHits);
30 return;
31}
32
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
54private:
55 void sortVector();
58 bool m_sorted;
59};
60
62#endif
63
void reserve(unsigned int numberOfHits)
reserve a timed vector numberOfHits in size.
void insert(float evtTime, const AtlasHitsVector< HIT > *inputCollection)
const_iterator m_currentHit
std::vector< TimedHitPtr< TRTUncompressedHit > > TimedVector
bool nextDetectorElement(const_iterator &b, const_iterator &e)
sets an iterator range with the hits of current detector element returns a bool when done
TimedHitCollection(unsigned int numberOfHits)
TimedVector::const_iterator const_iterator
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
a struct encapsulating the identifier of a pile-up event