CMS 3D CMS Logo

TotemDAQMapping.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of TOTEM offline software.
4 * Authors:
5 * Maciej Wróbel (wroblisko@gmail.com)
6 *
7 ****************************************************************************/
8 
10 
12 
13 using namespace std;
14 
15 //----------------------------------------------------------------------------------------------------
16 
17 std::ostream &operator<<(std::ostream &s, const TotemVFATInfo &vi) {
18  s << vi.symbolicID << ", hw id=0x" << hex << vi.hwID << dec;
19 
20  return s;
21 }
22 
23 //----------------------------------------------------------------------------------------------------
24 
26  auto it = VFATMapping.find(fp);
27  if (it != VFATMapping.end()) {
28  cerr << "WARNING in DAQMapping::insert > Overwriting entry at " << fp << ". Previous: " << endl
29  << " " << VFATMapping[fp] << "," << endl
30  << " new: " << endl
31  << " " << vi << ". " << endl;
32  }
33 
34  VFATMapping[fp] = vi;
35 }
36 
37 //----------------------------------------------------------------------------------------------------
38 
41  auto iterator = totemTimingChannelMap.find(hwId);
42  if (iterator != totemTimingChannelMap.end())
43  pair = iterator->second;
44  return pair;
45 }
46 
47 //----------------------------------------------------------------------------------------------------
48 
TotemSymbID symbolicID
the symbolic id
void insert(const TotemFramePosition &fp, const TotemVFATInfo &vi)
The mapping between FramePosition and VFATInfo.
std::ostream & operator<<(std::ostream &out, const std::tuple< Types... > &value)
Definition: Utilities.h:32
Hw Id mapping for Totem Timing (dynamical mapping in Sampic)
unsigned int hwID
the hardware ID (16 bit)
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
Contains mappind data related to a VFAT.
const TotemTimingPlaneChannelPair getTimingChannel(const uint8_t hwId) const
Given the hardware ID, returns the corresponding Plane, Channel pair (TotemTimingPlaneChannelPair) ...