File indexing completed on 2024-04-06 12:02:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef CondFormats_PPSObjects_PPSTimingCalibrationLUT_h
0012 #define CondFormats_PPSObjects_PPSTimingCalibrationLUT_h
0013
0014 #include "CondFormats/Serialization/interface/Serializable.h"
0015
0016 #include <map>
0017 #include <vector>
0018
0019 class PPSTimingCalibrationLUT {
0020 public:
0021
0022 struct Key {
0023 int sector, station, plane, channel;
0024
0025
0026 bool operator<(const Key& rhs) const;
0027 friend std::ostream& operator<<(std::ostream& os, const Key& key);
0028
0029 COND_SERIALIZABLE;
0030 };
0031
0032
0033 using BinMap = std::map<Key, std::vector<double> >;
0034
0035 PPSTimingCalibrationLUT() = default;
0036 PPSTimingCalibrationLUT(const BinMap& binMap) : binMap_(binMap) {}
0037 ~PPSTimingCalibrationLUT() = default;
0038
0039 std::vector<double> bins(int key1, int key2, int key3, int key4) const;
0040
0041 friend std::ostream& operator<<(std::ostream& os, const PPSTimingCalibrationLUT& data);
0042
0043 private:
0044 BinMap binMap_;
0045
0046 COND_SERIALIZABLE;
0047 };
0048
0049 #endif