File indexing completed on 2024-09-07 04:35:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef CondFormats_PPSObjects_TotemDAQMapping
0011 #define CondFormats_PPSObjects_TotemDAQMapping
0012
0013 #include "CondFormats/PPSObjects/interface/TotemFramePosition.h"
0014 #include "CondFormats/PPSObjects/interface/TotemSymbId.h"
0015 #include "CondFormats/PPSObjects/interface/TotemT2FramePosition.h"
0016 #include "CondFormats/Serialization/interface/Serializable.h"
0017 #include <map>
0018 #include <cstdint>
0019
0020
0021
0022
0023
0024
0025 class TotemVFATInfo {
0026 public:
0027
0028 TotemSymbID symbolicID;
0029
0030
0031 unsigned int hwID;
0032
0033 friend std::ostream& operator<<(std::ostream& s, const TotemVFATInfo& fp);
0034
0035 void print(std::ostream& os, std::string subSystemName) const;
0036
0037 COND_SERIALIZABLE;
0038 };
0039
0040
0041
0042
0043
0044
0045 class TotemDAQMapping {
0046 public:
0047 std::map<TotemFramePosition, TotemVFATInfo> VFATMapping;
0048
0049
0050 struct TotemTimingPlaneChannelPair {
0051 int plane;
0052 int channel;
0053
0054 TotemTimingPlaneChannelPair(const int& plane = -1, const int& channel = -1) : plane(plane), channel(channel) {}
0055 COND_SERIALIZABLE;
0056 };
0057 std::map<uint8_t, TotemTimingPlaneChannelPair> totemTimingChannelMap;
0058
0059 void insert(const TotemFramePosition& fp, const TotemVFATInfo& vi);
0060 void insert(const TotemT2FramePosition& fp2, const TotemVFATInfo& vi);
0061 void print(std::ostream& os, std::string subSystemName) const;
0062
0063
0064 const TotemTimingPlaneChannelPair getTimingChannel(const uint8_t hwId) const;
0065
0066 COND_SERIALIZABLE;
0067 };
0068
0069 std::ostream& operator<<(std::ostream& os, TotemDAQMapping mapping);
0070
0071 #endif