1 #ifndef SimDataFormats_TrackerDigiSimLink_interface_StripCompactDigiSimLinks_h 2 #define SimDataFormats_TrackerDigiSimLink_interface_StripCompactDigiSimLinks_h 6 #include <boost/cstdint.hpp> 7 #include <boost/range.hpp> 16 typedef std::pair<EncodedEventId, unsigned int>
key_type;
24 typedef boost::sub_range<const std::vector<HitRecord> >
Links;
38 Filler() : storage_(), num_keys_(0), num_values_(0) {}
45 typedef std::map<key_type, std::vector<HitRecord> >
Map;
46 const Map &
storage()
const {
return storage_; }
48 unsigned int keySize()
const {
return num_keys_; }
49 unsigned int dataSize()
const {
return num_values_; }
66 inline bool operator<(
const key_type &otherKey)
const {
return key < otherKey; }
67 inline bool operator==(
const key_type &otherKey)
const {
return key == otherKey; }
72 : eventId(track.key.
first),
73 simTrackId(track.key.
second),
TrackRecord(key_type k, unsigned int offset)
boost::sub_range< const std::vector< HitRecord > > Links
Links getLinks(const key_type &key) const
std::pair< EncodedEventId, unsigned int > key_type
RevLink(const TrackRecord &track, const HitRecord &hit)
HitRecord(uint32_t detid, uint16_t first, uint16_t size)
U second(std::pair< T, U > const &p)
const Map & storage() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
bool operator<(const TrackRecord &other) const
unsigned int keySize() const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
std::vector< TrackRecord > trackRecords_
~StripCompactDigiSimLinks()
std::map< key_type, std::vector< HitRecord > > Map
void swap(StripCompactDigiSimLinks &other)
std::map< uint32_t, std::vector< RevLink > > makeReverseMap() const
Make the map in the reverse direction. SLOW! call it only once.
StripCompactDigiSimLinks()
Empty constructor, for ROOT persistence.
Links operator[](const key_type &key) const
bool operator<(const key_type &otherKey) const
bool operator==(const key_type &otherKey) const
std::vector< HitRecord > hitRecords_
unsigned int dataSize() const