1 #ifndef CondFormats_External_CLHEP_H 2 #define CondFormats_External_CLHEP_H 4 #include <boost/serialization/base_object.hpp> 5 #include <boost/serialization/nvp.hpp> 6 #include <boost/serialization/split_free.hpp> 9 #include <boost/serialization/vector.hpp> 10 #include <boost/serialization/string.hpp> 11 #include <boost/serialization/map.hpp> 13 #include "CLHEP/Vector/EulerAngles.h" 14 #include "CLHEP/Vector/ThreeVector.h" 17 namespace serialization {
29 template <
class Archive>
30 void save(Archive& ar,
const CLHEP::Hep3Vector&
obj,
const unsigned int) {
34 ar& BOOST_SERIALIZATION_NVP(
dx);
35 ar& BOOST_SERIALIZATION_NVP(
dy);
36 ar& BOOST_SERIALIZATION_NVP(
dz);
39 template <
class Archive>
40 void load(Archive& ar, CLHEP::Hep3Vector&
obj,
const unsigned int) {
44 ar& BOOST_SERIALIZATION_NVP(
dx);
45 ar& BOOST_SERIALIZATION_NVP(
dy);
46 ar& BOOST_SERIALIZATION_NVP(
dz);
50 template <
class Archive>
51 void serialize(Archive& ar, CLHEP::Hep3Vector&
obj,
const unsigned int v) {
52 split_free(ar,
obj,
v);
56 template <
class Archive>
57 void save(Archive& ar,
const CLHEP::HepEulerAngles&
obj,
const unsigned int) {
58 auto phi_ =
obj.phi();
59 auto theta_ =
obj.theta();
60 auto psi_ =
obj.psi();
61 ar& BOOST_SERIALIZATION_NVP(phi_);
62 ar& BOOST_SERIALIZATION_NVP(theta_);
63 ar& BOOST_SERIALIZATION_NVP(psi_);
66 template <
class Archive>
67 void load(Archive& ar, CLHEP::HepEulerAngles&
obj,
const unsigned int) {
68 decltype(
obj.phi()) phi_;
69 decltype(
obj.theta()) theta_;
70 decltype(
obj.psi()) psi_;
71 ar& BOOST_SERIALIZATION_NVP(phi_);
72 ar& BOOST_SERIALIZATION_NVP(theta_);
73 ar& BOOST_SERIALIZATION_NVP(psi_);
74 obj.set(phi_, theta_, psi_);
77 template <
class Archive>
78 void serialize(Archive& ar, CLHEP::HepEulerAngles&
obj,
const unsigned int v) {
79 split_free(ar,
obj,
v);
void serialize(Archive &ar, CLHEP::Hep3Vector &obj, const unsigned int v)
void load(Archive &ar, CLHEP::Hep3Vector &obj, const unsigned int)
void save(Archive &ar, const CLHEP::Hep3Vector &obj, const unsigned int)