CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions | Friends
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)
 
void print (std::ostream &os, std::string subSystemName) const
 

Public Attributes

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

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

The mapping between FramePosition and VFATInfo.

Definition at line 45 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 62 of file TotemDAQMapping.cc.

62  {
63  TotemTimingPlaneChannelPair pair;
64  auto iterator = totemTimingChannelMap.find(hwId);
65  if (iterator != totemTimingChannelMap.end())
66  pair = iterator->second;
67  return pair;
68 }
std::map< uint8_t, TotemTimingPlaneChannelPair > totemTimingChannelMap

◆ insert() [1/2]

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

Definition at line 34 of file TotemDAQMapping.cc.

References personalPlayback::fp.

Referenced by SequenceTypes.Schedule::_replaceIfHeldDirectly().

34  {
35  auto it = VFATMapping.find(fp);
36  if (it != VFATMapping.end()) {
37  edm::LogWarning("Totem") << "WARNING in DAQMapping::insert > Overwriting entry at " << fp << ". Previous: "
38  << " " << VFATMapping[fp] << ","
39  << " new: "
40  << " " << vi << ". " << endl;
41  }
42 
43  VFATMapping[fp] = vi;
44 }
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 47 of file TotemDAQMapping.cc.

References TotemT2FramePosition::getRawPosition().

Referenced by SequenceTypes.Schedule::_replaceIfHeldDirectly().

47  {
48  const TotemFramePosition fp1(fp2.getRawPosition());
49  auto it = VFATMapping.find(fp1);
50  if (it != VFATMapping.end()) {
51  edm::LogWarning("Totem") << "WARNING in DAQMapping::insert > Overwriting T2 entry at " << fp2 << ". Previous: "
52  << " " << VFATMapping[fp1] << ","
53  << " new: "
54  << " " << vi << ". " << endl;
55  }
56 
57  VFATMapping[fp1] = vi;
58 }
unsigned int getRawPosition() const
the getters and setters below are deprecated
std::map< TotemFramePosition, TotemVFATInfo > VFATMapping
Log< level::Warning, false > LogWarning

◆ print()

void TotemDAQMapping::print ( std::ostream &  os,
std::string  subSystemName 
) const

Definition at line 72 of file TotemDAQMapping.cc.

References TauDecayModes::dec, createfilelist::int, AlCaHLTBitMon_ParallelJobs::p, and hlx_dqm_sourceclient_cfi::subSystemName.

72  {
73  os << "TotemDAQMapping VFAT mapping" << endl;
74  for (auto &p : VFATMapping) {
75  os << " " << p.first << " -> ";
76  p.second.print(os, subSystemName);
77  }
78 
79  if (subSystemName == "TotemTiming" || subSystemName.empty()) {
80  os << "TotemDAQMapping channel mapping" << endl;
81  for (const auto &p : totemTimingChannelMap) {
82  os << " "
83  << " hw id=0x" << hex << (int)p.first << dec << " plane=" << p.second.plane << " channel=" << p.second.channel
84  << endl;
85  }
86  }
87 }
std::map< uint8_t, TotemTimingPlaneChannelPair > totemTimingChannelMap
std::map< TotemFramePosition, TotemVFATInfo > VFATMapping

◆ serialize()

template<class Archive >
void TotemDAQMapping::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 66 of file TotemDAQMapping.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 66 of file TotemDAQMapping.h.

Member Data Documentation

◆ totemTimingChannelMap

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

Definition at line 57 of file TotemDAQMapping.h.

◆ VFATMapping

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

Definition at line 47 of file TotemDAQMapping.h.