CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes
TotemDAQMapping Class Reference

The mapping between FramePosition and VFATInfo. More...

#include <TotemDAQMapping.h>

Classes

struct  TotemTimingPlaneChannelPair
 Hw Id mapping for Totem Timing (dynamical mapping in Sampic) More...
 

Public Member Functions

const TotemTimingPlaneChannelPair getTimingChannel (const uint8_t hwId) const
 Given the hardware ID, returns the corresponding Plane, Channel pair (TotemTimingPlaneChannelPair) More...
 
void insert (const TotemFramePosition &fp, const TotemVFATInfo &vi)
 
void insert (const TotemT2FramePosition &fp2, const TotemVFATInfo &vi)
 

Public Attributes

std::map< uint8_t, TotemTimingPlaneChannelPairtotemTimingChannelMap
 
std::map< TotemFramePosition, TotemVFATInfoVFATMapping
 

Detailed Description

The mapping between FramePosition and VFATInfo.

Definition at line 42 of file TotemDAQMapping.h.

Member Function Documentation

◆ getTimingChannel()

const TotemDAQMapping::TotemTimingPlaneChannelPair TotemDAQMapping::getTimingChannel ( const uint8_t  hwId) const

Given the hardware ID, returns the corresponding Plane, Channel pair (TotemTimingPlaneChannelPair)

Definition at line 54 of file TotemDAQMapping.cc.

54  {
55  TotemTimingPlaneChannelPair pair;
56  auto iterator = totemTimingChannelMap.find(hwId);
57  if (iterator != totemTimingChannelMap.end())
58  pair = iterator->second;
59  return pair;
60 }
std::map< uint8_t, TotemTimingPlaneChannelPair > totemTimingChannelMap

◆ insert() [1/2]

void TotemDAQMapping::insert ( const TotemFramePosition fp,
const TotemVFATInfo vi 
)

Definition at line 26 of file TotemDAQMapping.cc.

References personalPlayback::fp.

Referenced by SequenceTypes.Schedule::_replaceIfHeldDirectly().

26  {
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 }
std::map< TotemFramePosition, TotemVFATInfo > VFATMapping
Log< level::Warning, false > LogWarning

◆ insert() [2/2]

void TotemDAQMapping::insert ( const TotemT2FramePosition fp2,
const TotemVFATInfo vi 
)

Definition at line 39 of file TotemDAQMapping.cc.

References TotemT2FramePosition::getRawPosition().

Referenced by SequenceTypes.Schedule::_replaceIfHeldDirectly().

39  {
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 }
unsigned int getRawPosition() const
the getters and setters below are deprecated
std::map< TotemFramePosition, TotemVFATInfo > VFATMapping
Log< level::Warning, false > LogWarning

Member Data Documentation

◆ totemTimingChannelMap

std::map<uint8_t, TotemTimingPlaneChannelPair> TotemDAQMapping::totemTimingChannelMap

Definition at line 53 of file TotemDAQMapping.h.

◆ VFATMapping

std::map<TotemFramePosition, TotemVFATInfo> TotemDAQMapping::VFATMapping

Definition at line 44 of file TotemDAQMapping.h.