1 #ifndef ECALDETID_ECALCONTAINER_H 2 #define ECALDETID_ECALCONTAINER_H 17 template<
typename DetId,
typename T>
25 typedef typename std::vector<Item>
Items;
27 typedef typename std::vector<Item>::iterator
iterator;
32 void insert(std::pair<uint32_t, Item>
const &
a) {
33 (*this)[a.first] = a.second;
36 inline const Item &
item(
size_t hashid)
const {
40 inline const Items &
items()
const {
49 return m_items[
id.hashedIndex()];
56 m_items.resize(DetId::kSizeForDenseIndexing);
76 return m_items[
id.hashedIndex()];
79 inline const_iterator
find(uint32_t rawId)
const {
82 return m_items.begin() + ib.hashedIndex();
85 inline const_iterator
begin()
const {
89 inline const_iterator
end()
const {
93 inline size_t size()
const {
103 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__) 106 static const Item s_dummy{};
123 #endif // ECALCONTAINER
const_iterator begin() const
const Item & item(size_t hashid) const
void setItems(const std::vector< Item > &items)
std::vector< Item >::iterator iterator
const Items & items() const
const_iterator end() const
std::vector< Item > m_items
std::vector< Item >::const_iterator const_iterator
const_iterator find(uint32_t rawId) const
Item & operator[](uint32_t rawId)
static const Item & dummy_item()
void checkAndResize(size_t priv_size)
Item const & operator[](uint32_t rawId) const
void insert(std::pair< uint32_t, Item > const &a)
bool isValidId(const DetId id) const
std::vector< Item > Items