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 {
19  s << vi.symbolicID << ", hw id=0x" << hex << vi.hwID << dec;
20 
21  return s;
22 }
23 
24 //----------------------------------------------------------------------------------------------------
25 
27 {
28  auto it = VFATMapping.find(fp);
29  if (it != VFATMapping.end())
30  {
31  cerr << "WARNING in DAQMapping::insert > Overwriting entry at " << fp << ". Previous: " << endl
32  << " " << VFATMapping[fp] << "," << endl << " new: " << endl << " " << vi << ". " << endl;
33  }
34 
35  VFATMapping[fp] = vi;
36 }
37 
38 //----------------------------------------------------------------------------------------------------
39 
41 {
43  auto iterator = totemTimingChannelMap.find( hwId );
44  if ( iterator != totemTimingChannelMap.end() ) pair = iterator->second;
45  return pair;
46 }
47 
48 //----------------------------------------------------------------------------------------------------
49 
TotemSymbID symbolicID
the symbolic id
void insert(const TotemFramePosition &fp, const TotemVFATInfo &vi)
The mapping between FramePosition and VFATInfo.
const TotemTimingPlaneChannelPair getTimingChannel(const uint8_t hwId) const
Given the hardware ID, returns the corresponding Plane, Channel pair (TotemTimingPlaneChannelPair) ...
std::ostream & operator<<(std::ostream &out, const std::tuple< Types... > &value)
Definition: Utilities.h:38
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
Hw Id mapping for Totem Timing (dynamical mapping in Sampic)
unsigned int hwID
the hardware ID (16 bit)
Contains mappind data related to a VFAT.