1 #ifndef CondFormats_HcalObjects_HcalItemColl_h
2 #define CondFormats_HcalObjects_HcalItemColl_h
6 #include "boost/serialization/access.hpp"
7 #include "boost/serialization/version.hpp"
8 #include "boost/serialization/shared_ptr.hpp"
9 #include "boost/serialization/vector.hpp"
19 template<
typename Item>
27 {
data_.push_back(boost::shared_ptr<Item>(ptr.release()));}
34 inline std::size_t
size()
const {
return data_.size();}
38 inline const Item*
get(
const unsigned index)
const
45 inline const Item&
at(
const unsigned index)
const
46 {
return *
data_.at(index);}
51 const std::size_t sz =
data_.size();
52 if (sz != r.
data_.size())
54 for (std::size_t
i=0;
i<sz; ++
i)
61 {
return !(*
this ==
r);}
64 std::vector<boost::shared_ptr<Item> >
data_;
66 friend class boost::serialization::access;
68 template<
class Archive>
77 namespace serialization {
78 template<
typename Item>
81 BOOST_STATIC_CONSTANT(
int,
value = 1);
86 #endif // CondFormats_HcalObjects_HcalItemColl_h
void reserve(const unsigned n)
void serialize(Archive &ar, unsigned)
bool operator!=(const HcalItemColl &r) const
bool operator==(const HcalItemColl &r) const
std::vector< boost::shared_ptr< Item > > data_
const Item & at(const unsigned index) const
void push_back(std::unique_ptr< Item > ptr)