File indexing completed on 2021-02-14 12:51:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "FWCore/Utilities/interface/typelookup.h"
0010
0011 #include "CondFormats/PPSObjects/interface/TotemDAQMapping.h"
0012
0013 using namespace std;
0014
0015
0016
0017 std::ostream &operator<<(std::ostream &s, const TotemVFATInfo &vi) {
0018 s << vi.symbolicID << ", hw id=0x" << hex << vi.hwID << dec;
0019
0020 return s;
0021 }
0022
0023
0024
0025 void TotemDAQMapping::insert(const TotemFramePosition &fp, const TotemVFATInfo &vi) {
0026 auto it = VFATMapping.find(fp);
0027 if (it != VFATMapping.end()) {
0028 cerr << "WARNING in DAQMapping::insert > Overwriting entry at " << fp << ". Previous: " << endl
0029 << " " << VFATMapping[fp] << "," << endl
0030 << " new: " << endl
0031 << " " << vi << ". " << endl;
0032 }
0033
0034 VFATMapping[fp] = vi;
0035 }
0036
0037
0038
0039 const TotemDAQMapping::TotemTimingPlaneChannelPair TotemDAQMapping::getTimingChannel(const uint8_t hwId) const {
0040 TotemTimingPlaneChannelPair pair;
0041 auto iterator = totemTimingChannelMap.find(hwId);
0042 if (iterator != totemTimingChannelMap.end())
0043 pair = iterator->second;
0044 return pair;
0045 }
0046
0047
0048
0049 TYPELOOKUP_DATA_REG(TotemDAQMapping);