CMS 3D CMS Logo

DetID.h
Go to the documentation of this file.
1 #ifndef CondFormats_External_DETID_H
2 #define CondFormats_External_DETID_H
3 
4 #include <boost/serialization/base_object.hpp>
5 #include <boost/serialization/nvp.hpp>
6 #include <boost/serialization/split_free.hpp>
7 
8 // std::vector used in DataFormats/EcalDetId/interface/EcalContainer.h
9 #include <boost/serialization/vector.hpp>
10 #include <boost/serialization/string.hpp>
11 #include <boost/serialization/map.hpp>
12 
14 
15 namespace boost {
16  namespace serialization {
17 
18  /*
19  * Note regarding object tracking: all autos used here
20  * must resolve to untracked types, since we use local
21  * variables in the stack which could end up with the same
22  * address. For the moment, all types resolved by auto here
23  * are primitive types, which are untracked by default
24  * by Boost Serialization.
25  */
26 
27  // DataFormats/DetId/interface/DetId.h
28  template <class Archive>
29  void save(Archive& ar, const DetId& obj, const unsigned int) {
30  auto id_ = obj.rawId();
31  ar& BOOST_SERIALIZATION_NVP(id_);
32  }
33 
34  template <class Archive>
35  void load(Archive& ar, DetId& obj, const unsigned int) {
36  decltype(obj.rawId()) id_;
37  ar& BOOST_SERIALIZATION_NVP(id_);
38  obj = DetId(id_);
39  }
40 
41  template <class Archive>
42  void serialize(Archive& ar, DetId& obj, const unsigned int v) {
43  split_free(ar, obj, v);
44  }
45 
46  } // namespace serialization
47 } // namespace boost
48 
49 #endif
findQualityFiles.v
v
Definition: findQualityFiles.py:179
boost
Definition: CLHEP.h:16
DetId
Definition: DetId.h:17
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
boost::serialization::load
void load(Archive &ar, CLHEP::Hep3Vector &obj, const unsigned int)
Definition: CLHEP.h:40
boost::serialization::save
void save(Archive &ar, const CLHEP::Hep3Vector &obj, const unsigned int)
Definition: CLHEP.h:30
boost::serialization::serialize
void serialize(Archive &ar, CLHEP::Hep3Vector &obj, const unsigned int v)
Definition: CLHEP.h:51
DetId.h