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 
11 
13 
14 using namespace std;
15 
16 //----------------------------------------------------------------------------------------------------
17 
18 std::ostream &operator<<(std::ostream &s, const TotemVFATInfo &vi) {
19  s << vi.symbolicID << ", hw id=0x" << hex << vi.hwID << dec;
20 
21  return s;
22 }
23 
24 //----------------------------------------------------------------------------------------------------
25 
27  auto it = VFATMapping.find(fp);
28  if (it != VFATMapping.end()) {
29  edm::LogWarning("Totem") << "WARNING in DAQMapping::insert > Overwriting entry at " << fp << ". Previous: "
30  << " " << VFATMapping[fp] << ","
31  << " new: "
32  << " " << vi << ". " << endl;
33  }
34 
35  VFATMapping[fp] = vi;
36 }
37 
38 //----------------------------------------------------------------------------------------------------
40  const TotemFramePosition fp1(fp2.getRawPosition());
41  auto it = VFATMapping.find(fp1);
42  if (it != VFATMapping.end()) {
43  edm::LogWarning("Totem") << "WARNING in DAQMapping::insert > Overwriting T2 entry at " << fp2 << ". Previous: "
44  << " " << VFATMapping[fp1] << ","
45  << " new: "
46  << " " << vi << ". " << endl;
47  }
48 
49  VFATMapping[fp1] = vi;
50 }
51 
52 //----------------------------------------------------------------------------------------------------
53 
56  auto iterator = totemTimingChannelMap.find(hwId);
57  if (iterator != totemTimingChannelMap.end())
58  pair = iterator->second;
59  return pair;
60 }
61 
62 //----------------------------------------------------------------------------------------------------
63 
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 getRawPosition() const
the getters and setters below are deprecated
unsigned int hwID
the hardware ID (16 bit)
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
Log< level::Warning, false > LogWarning
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) ...