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;
25 typedef boost::sub_range<const std::vector<HitRecord> >
Links;
39 Filler() : storage_(), num_keys_(0), num_values_(0) {}
46 typedef std::map<key_type, std::vector<HitRecord> >
Map;
47 const Map &
storage()
const {
return storage_; }
49 unsigned int keySize()
const {
return num_keys_; }
50 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), 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
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)
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
const Map & storage() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
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
std::pair< EncodedEventId, unsigned int > key_type
bool operator==(const key_type &otherKey) const
std::vector< HitRecord > hitRecords_
unsigned int dataSize() const