File indexing completed on 2023-03-17 10:46:55
0001 #ifndef CondFormats_External_HLTPRESCALETABLE_H
0002 #define CondFormats_External_HLTPRESCALETABLE_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/HLTReco/interface/HLTPrescaleTable.h"
0014
0015 namespace boost {
0016 namespace serialization {
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 template <class Archive>
0029 void save(Archive& ar, const trigger::HLTPrescaleTable& obj, const unsigned int) {
0030 auto set = obj.set();
0031 auto lab = obj.labels();
0032 auto tab = obj.table();
0033 ar& boost::serialization::make_nvp("set_", set);
0034 ar& boost::serialization::make_nvp("labels_", lab);
0035 ar& boost::serialization::make_nvp("table_", tab);
0036 }
0037
0038 template <class Archive>
0039 void load(Archive& ar, trigger::HLTPrescaleTable& obj, const unsigned int) {
0040
0041 unsigned int set_;
0042 std::vector<std::string> labels_;
0043 std::map<std::string, std::vector<unsigned int> > table_;
0044
0045 ar& boost::serialization::make_nvp("set_", set_);
0046 ar& boost::serialization::make_nvp("labels_", labels_);
0047 ar& boost::serialization::make_nvp("table_", table_);
0048 trigger::HLTPrescaleTable tmp(set_, labels_, table_);
0049 obj = tmp;
0050 }
0051
0052 template <class Archive>
0053 void serialize(Archive& ar, trigger::HLTPrescaleTable& obj, const unsigned int v) {
0054 split_free(ar, obj, v);
0055 }
0056
0057 }
0058 }
0059
0060 #endif