test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  if (vi.type == TotemVFATInfo::data)
20  s << "type=data, ";
21  else
22  s << "type= CC, ";
23 
24  s << vi.symbolicID << ", hw id=0x" << hex << vi.hwID << dec;
25 
26  return s;
27 }
28 
29 //----------------------------------------------------------------------------------------------------
30 
32 {
33  auto it = VFATMapping.find(fp);
34  if (it != VFATMapping.end())
35  {
36  cerr << "WARNING in DAQMapping::Insert > Overwriting entry at " << fp << ". Previous: " << endl
37  << " " << VFATMapping[fp] << "," << endl << " new: " << endl << " " << vi << ". " << endl;
38  }
39 
40  VFATMapping[fp] = vi;
41 }
42 
43 //----------------------------------------------------------------------------------------------------
44 
TotemSymbID symbolicID
the symbolic id
ostream & operator<<(std::ostream &o, vector< std::string > const &iValue)
Definition: refresh.cc:45
void insert(const TotemFramePosition &fp, const TotemVFATInfo &vi)
enum TotemVFATInfo::@83 type
is data of coincidence-chip VFAT
The mapping between FramePosition and VFATInfo.
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:96
unsigned int hwID
the hardware ID (16 bit)
Contains mappind data related to a VFAT.