File indexing completed on 2024-04-06 12:02:11
0001 #ifndef CondFormats_External_ECALDETID_H
0002 #define CondFormats_External_ECALDETID_H
0003
0004 #include <boost/serialization/base_object.hpp>
0005 #include <boost/serialization/nvp.hpp>
0006 #include <boost/serialization/split_free.hpp>
0007
0008
0009 #include <boost/serialization/vector.hpp>
0010 #include <boost/serialization/string.hpp>
0011 #include <boost/serialization/map.hpp>
0012
0013 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0014 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0015 #include "DataFormats/EcalDetId/interface/EcalContainer.h"
0016
0017
0018 #include "CondFormats/External/interface/DetID.h"
0019
0020 namespace boost {
0021 namespace serialization {
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 template <class Archive>
0034 void serialize(Archive& ar, EBDetId& obj, const unsigned int) {
0035 ar& boost::serialization::make_nvp("DetId", boost::serialization::base_object<DetId>(obj));
0036 ;
0037 }
0038
0039
0040 template <class Archive>
0041 void serialize(Archive& ar, EEDetId& obj, const unsigned int) {
0042 ar& boost::serialization::make_nvp("DetId", boost::serialization::base_object<DetId>(obj));
0043 ;
0044 }
0045
0046
0047 template <class Archive, typename DetIdT, typename T>
0048 void save(Archive& ar, const EcalContainer<DetIdT, T>& obj, const unsigned int) {
0049 ar& boost::serialization::make_nvp("m_items", obj.items());
0050 }
0051
0052 template <class Archive, typename DetIdT, typename T>
0053 void load(Archive& ar, EcalContainer<DetIdT, T>& obj, const unsigned int) {
0054
0055 typename EcalContainer<DetIdT, T>::Items m_items;
0056 ar& boost::serialization::make_nvp("m_items", m_items);
0057 obj.setItems(m_items);
0058 }
0059
0060 template <class Archive, typename DetIdT, typename T>
0061 void serialize(Archive& ar, EcalContainer<DetIdT, T>& obj, const unsigned int v) {
0062 split_free(ar, obj, v);
0063 }
0064
0065 }
0066 }
0067
0068 #endif