1 #ifndef CondFormats_HcalObjects_HcalItemCollById_h 2 #define CondFormats_HcalObjects_HcalItemCollById_h 26 template <
typename Item>
37 const unsigned detIdTransformCode,
38 std::unique_ptr<Item> defaultItem)
43 "In HcalItemCollById constructor:" 44 " invalid lookup table");
51 "In HcalItemCollById constructor:" 52 " collection and lookup table are inconsistent");
63 inline std::size_t
size()
const {
return coll_.size(); }
78 if (index <
coll_.size())
79 return coll_.get(index);
93 throw cms::Exception(
"In HcalItemCollById::at: invalid detector id");
123 friend class boost::serialization::access;
125 template <
class Archive>
133 namespace serialization {
134 template <
typename Item>
136 BOOST_STATIC_CONSTANT(
int,
value = 1);
141 #endif // CondFormats_HcalObjects_HcalItemCollById_h unsigned getIndex(const HcalDetId &id) const
HcalItemColl< Item > coll_
void serialize(Archive &ar, unsigned)
unsigned largestIndex() const
const Item * getByIndex(const unsigned index) const
const Item * getDefault() const
const Item & at(const HcalDetId &id) const
HcalItemCollById(const HcalItemColl< Item > &coll, const HcalIndexLookup &indexLookupTable, const unsigned detIdTransformCode, std::unique_ptr< Item > defaultItem)
bool isEqual(const AbsHcalAlgoData &other) const override
std::shared_ptr< Item > default_
unsigned find(unsigned detId) const
void setDefault(std::unique_ptr< Item > f)
static const unsigned InvalidIndex
~HcalItemCollById() override