CMS 3D CMS Logo

Classes | Typedefs | Enumerations | Functions
CSCDCCFormatStatusDigi.h File Reference
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include <set>
#include <map>
#include <algorithm>
#include <iosfwd>

Go to the source code of this file.

Classes

class  CSCDCCFormatStatusDigi
 CSC Format Status Object. More...
 

Typedefs

typedef int32_t CSCIdType
 
typedef int32_t DCCIdType
 
typedef int16_t DDUIdType
 
typedef uint32_t ExaminerMaskType
 
typedef uint32_t ExaminerStatusType
 

Enumerations

enum  CSCPayloadFlag {
  CFEB1_ACTIVE = 0, CFEB2_ACTIVE = 1, CFEB3_ACTIVE = 2, CFEB4_ACTIVE = 3,
  CFEB5_ACTIVE = 4, ALCT_DAV = 5, TMB_DAV = 6, CFEB1_DAV = 7,
  CFEB2_DAV = 8, CFEB3_DAV = 9, CFEB4_DAV = 10, CFEB5_DAV = 11
}
 
enum  CSCStatusFlag {
  ALCT_FIFO_FULL = 0, TMB_FIFO_FULL = 1, CFEB1_FIFO_FULL = 2, CFEB2_FIFO_FULL = 3,
  CFEB3_FIFO_FULL = 4, CFEB4_FIFO_FULL = 5, CFEB5_FIFO_FULL = 6, ALCT_START_TIMEOUT = 7,
  TMB_START_TIMEOUT = 8, CFEB1_START_TIMEOUT = 9, CFEB2_START_TIMEOUT = 10, CFEB3_START_TIMEOUT = 11,
  CFEB4_START_TIMEOUT = 12, CFEB5_START_TIMEOUT = 13, ALCT_END_TIMEOUT = 14, TMB_END_TIMEOUT = 15,
  CFEB1_END_TIMEOUT = 16, CFEB2_END_TIMEOUT = 17, CFEB3_END_TIMEOUT = 18, CFEB4_END_TIMEOUT = 19,
  CFEB5_END_TIMEOUT = 20, CFEB_ACTIVE_DAV_MISMATCH = 21, B_WORDS_FOUND = 22
}
 
enum  FormatErrorFlag {
  ANY_ERRORS = 0, DDU_TRAILER_MISSING = 1, DDU_HEADER_MISSING = 2, DDU_CRC_ERROR = 3,
  DDU_WORD_COUNT_ERROR = 4, DMB_TRAILER_MISSING = 5, DMB_HEADER_MISSING = 6, ALCT_TRAILER_MISSING = 7,
  ALCT_HEADER_MISSING = 8, ALCT_WORD_COUNT_ERROR = 9, ALCT_CRC_ERROR = 10, ALCT_TRAILER_BIT_ERROR = 11,
  TMB_TRAILER_MISSING = 12, TMB_HEADER_MISSING = 13, TMB_WORD_COUNT_ERROR = 14, TMB_CRC_ERROR = 15,
  CFEB_WORD_COUNT_PER_SAMPLE_ERROR = 16, CFEB_SAMPLE_COUNT_ERROR = 17, CFEB_CRC_ERROR = 18, DDU_EVENT_SIZE_LIMIT_ERROR = 19,
  C_WORDS = 20, ALCT_DAV_ERROR = 21, TMB_DAV_ERROR = 22, CFEB_DAV_ERROR = 23,
  DMB_ACTIVE_ERROR = 24, DCC_TRAILER_MISSING = 25, DCC_HEADER_MISSING = 26, DMB_DAV_VS_DMB_ACTIVE_MISMATCH_ERROR = 27,
  EXTRA_WORDS_BETWEEN_DDU_HEADER_AND_FIRST_DMB_HEADER = 28
}
 

Functions

template<class TKey , class TVal >
std::set< TKey > getKeysList (const std::map< TKey, TVal > &m)
 List of Map keys template. More...
 
template<class TKey , class TVal >
bool nextInMap (uint32_t &it, TKey &key, const std::map< TKey, TVal > &m)
 Map iterator template. More...
 
std::ostream & operator<< (std::ostream &o, const CSCDCCFormatStatusDigi &digi)
 

Typedef Documentation

◆ CSCIdType

typedef int32_t CSCIdType

CSC identifier type

Definition at line 36 of file CSCDCCFormatStatusDigi.h.

◆ DCCIdType

typedef int32_t DCCIdType

DCC identifier type

Definition at line 30 of file CSCDCCFormatStatusDigi.h.

◆ DDUIdType

typedef int16_t DDUIdType

DDU identifier type

Definition at line 33 of file CSCDCCFormatStatusDigi.h.

◆ ExaminerMaskType

typedef uint32_t ExaminerMaskType

Examiner status and mask type

Definition at line 39 of file CSCDCCFormatStatusDigi.h.

◆ ExaminerStatusType

typedef uint32_t ExaminerStatusType

Definition at line 40 of file CSCDCCFormatStatusDigi.h.

Enumeration Type Documentation

◆ CSCPayloadFlag

CSC Payload individual named flags

Enumerator
CFEB1_ACTIVE 
CFEB2_ACTIVE 
CFEB3_ACTIVE 
CFEB4_ACTIVE 
CFEB5_ACTIVE 
ALCT_DAV 
TMB_DAV 
CFEB1_DAV 
CFEB2_DAV 
CFEB3_DAV 
CFEB4_DAV 
CFEB5_DAV 

Definition at line 76 of file CSCDCCFormatStatusDigi.h.

◆ CSCStatusFlag

CSC Status individual named flags

Enumerator
ALCT_FIFO_FULL 
TMB_FIFO_FULL 
CFEB1_FIFO_FULL 
CFEB2_FIFO_FULL 
CFEB3_FIFO_FULL 
CFEB4_FIFO_FULL 
CFEB5_FIFO_FULL 
ALCT_START_TIMEOUT 
TMB_START_TIMEOUT 
CFEB1_START_TIMEOUT 
CFEB2_START_TIMEOUT 
CFEB3_START_TIMEOUT 
CFEB4_START_TIMEOUT 
CFEB5_START_TIMEOUT 
ALCT_END_TIMEOUT 
TMB_END_TIMEOUT 
CFEB1_END_TIMEOUT 
CFEB2_END_TIMEOUT 
CFEB3_END_TIMEOUT 
CFEB4_END_TIMEOUT 
CFEB5_END_TIMEOUT 
CFEB_ACTIVE_DAV_MISMATCH 
B_WORDS_FOUND 

Definition at line 92 of file CSCDCCFormatStatusDigi.h.

92  {
93  ALCT_FIFO_FULL = 0,
94  TMB_FIFO_FULL = 1,
95  CFEB1_FIFO_FULL = 2,
96  CFEB2_FIFO_FULL = 3,
97  CFEB3_FIFO_FULL = 4,
98  CFEB4_FIFO_FULL = 5,
99  CFEB5_FIFO_FULL = 6,
100  ALCT_START_TIMEOUT = 7,
101  TMB_START_TIMEOUT = 8,
103  CFEB2_START_TIMEOUT = 10,
104  CFEB3_START_TIMEOUT = 11,
105  CFEB4_START_TIMEOUT = 12,
106  CFEB5_START_TIMEOUT = 13,
107  ALCT_END_TIMEOUT = 14,
108  TMB_END_TIMEOUT = 15,
109  CFEB1_END_TIMEOUT = 16,
110  CFEB2_END_TIMEOUT = 17,
111  CFEB3_END_TIMEOUT = 18,
112  CFEB4_END_TIMEOUT = 19,
113  CFEB5_END_TIMEOUT = 20,
115  B_WORDS_FOUND = 22
116 };

◆ FormatErrorFlag

Format Error individual named flags

Enumerator
ANY_ERRORS 
DDU_TRAILER_MISSING 
DDU_HEADER_MISSING 
DDU_CRC_ERROR 
DDU_WORD_COUNT_ERROR 
DMB_TRAILER_MISSING 
DMB_HEADER_MISSING 
ALCT_TRAILER_MISSING 
ALCT_HEADER_MISSING 
ALCT_WORD_COUNT_ERROR 
ALCT_CRC_ERROR 
ALCT_TRAILER_BIT_ERROR 
TMB_TRAILER_MISSING 
TMB_HEADER_MISSING 
TMB_WORD_COUNT_ERROR 
TMB_CRC_ERROR 
CFEB_WORD_COUNT_PER_SAMPLE_ERROR 
CFEB_SAMPLE_COUNT_ERROR 
CFEB_CRC_ERROR 
DDU_EVENT_SIZE_LIMIT_ERROR 
C_WORDS 
ALCT_DAV_ERROR 
TMB_DAV_ERROR 
CFEB_DAV_ERROR 
DMB_ACTIVE_ERROR 
DCC_TRAILER_MISSING 
DCC_HEADER_MISSING 
DMB_DAV_VS_DMB_ACTIVE_MISMATCH_ERROR 
EXTRA_WORDS_BETWEEN_DDU_HEADER_AND_FIRST_DMB_HEADER 

Definition at line 43 of file CSCDCCFormatStatusDigi.h.

43  {
44  ANY_ERRORS = 0,
47  DDU_CRC_ERROR = 3,
54  ALCT_CRC_ERROR = 10,
57  TMB_HEADER_MISSING = 13,
59  TMB_CRC_ERROR = 15,
62  CFEB_CRC_ERROR = 18,
64  C_WORDS = 20,
65  ALCT_DAV_ERROR = 21,
66  TMB_DAV_ERROR = 22,
67  CFEB_DAV_ERROR = 23,
68  DMB_ACTIVE_ERROR = 24,
70  DCC_HEADER_MISSING = 26,
73 };

Function Documentation

◆ getKeysList()

template<class TKey , class TVal >
std::set<TKey> getKeysList ( const std::map< TKey, TVal > &  m)

List of Map keys template.

Parameters
mMap to iterate.
Returns
std::set ok Keys

Definition at line 147 of file CSCDCCFormatStatusDigi.h.

References relativeConstraints::keys, and visualization-live-secondInstance_cfg::m.

Referenced by CSCDCCFormatStatusDigi::getListOfCSCs(), CSCDCCFormatStatusDigi::getListOfCSCsWithErrors(), and CSCDCCFormatStatusDigi::getListOfDDUs().

147  {
148  std::set<TKey> keys;
149  typename std::map<TKey, TVal>::const_iterator itr;
150  for (itr = m.begin(); itr != m.end(); ++itr) {
151  keys.insert(itr->first);
152  }
153  return keys;
154 }

◆ nextInMap()

template<class TKey , class TVal >
bool nextInMap ( uint32_t &  it,
TKey &  key,
const std::map< TKey, TVal > &  m 
)

Map iterator template.

Parameters
itIterator from 0 to ... (auto inc).
keyNext key to return.
mMap to iterate.
Returns
true if key found, false - otherwise

Definition at line 126 of file CSCDCCFormatStatusDigi.h.

References HltBtagPostValidation_cff::c, crabWrapper::key, and visualization-live-secondInstance_cfg::m.

Referenced by CSCDCCFormatStatusDigi::nextCSCWithError(), CSCDCCFormatStatusDigi::nextCSCWithPayload(), and CSCDCCFormatStatusDigi::nextCSCWithStatus().

126  {
127  uint32_t c = 0;
128  typename std::map<TKey, TVal>::const_iterator itr = m.begin();
129  while (itr != m.end()) {
130  if (c == it) {
131  it++;
132  key = itr->first;
133  return true;
134  }
135  itr++;
136  c++;
137  }
138  return false;
139 }

◆ operator<<()

std::ostream& operator<< ( std::ostream &  o,
const CSCDCCFormatStatusDigi digi 
)

Definition at line 99 of file CSCDCCFormatStatusDigi.cc.

References TauDecayModes::dec, CSCDCCFormatStatusDigi::getCSCErrors(), CSCDCCFormatStatusDigi::getCSCMask(), CSCDCCFormatStatusDigi::getCSCPayload(), CSCDCCFormatStatusDigi::getCSCStatus(), CSCDCCFormatStatusDigi::getDCCId(), CSCDCCFormatStatusDigi::getDCCMask(), CSCDCCFormatStatusDigi::getDDUErrors(), CSCDCCFormatStatusDigi::getDDUSummaryErrors(), CSCDCCFormatStatusDigi::getListOfCSCs(), CSCDCCFormatStatusDigi::getListOfDDUs(), and EcalTangentSkim_cfg::o.

99  {
100  o << "CSCDCCFormatStatusDigi: DCC=" << std::dec << digi.getDCCId() << " DCCMask=0x" << std::hex << std::setw(8)
101  << std::setfill('0') << digi.getDCCMask() << " CSCMask=0x" << std::hex << std::setw(8) << std::setfill('0')
102  << digi.getCSCMask() << " DCCErrors=0x" << std::hex << std::setw(8) << std::setfill('0')
103  << digi.getDDUSummaryErrors() << std::dec << "\n";
104  std::set<DDUIdType> ddu_list = digi.getListOfDDUs();
105  for (std::set<DDUIdType>::iterator itr = ddu_list.begin(); itr != ddu_list.end(); ++itr) {
106  o << "DDU_" << std::dec << ((*itr) & 0xFF) << " Errors=0x" << std::hex << std::setw(8) << std::setfill('0')
107  << digi.getDDUErrors(*itr) << "\n";
108  }
109  std::set<CSCIdType> csc_list = digi.getListOfCSCs();
110  for (std::set<CSCIdType>::iterator itr = csc_list.begin(); itr != csc_list.end(); ++itr) {
111  o << "CSC_" << std::dec << (((*itr) >> 4) & 0xFF) << "_" << ((*itr) & 0xF) << " Errors=0x" << std::hex
112  << std::setw(8) << std::setfill('0') << digi.getCSCErrors(*itr) << " Payload=0x" << std::setw(8)
113  << std::setfill('0') << digi.getCSCPayload(*itr) << " Status=0x" << std::setw(8) << std::setfill('0')
114  << digi.getCSCStatus(*itr) << "\n";
115  }
116  return o;
117 }
ExaminerStatusType getDDUErrors(const DDUIdType DDUId) const
std::set< DDUIdType > getListOfDDUs() const
ExaminerMaskType getDCCMask() const
ExaminerMaskType getCSCMask() const
ExaminerStatusType getCSCErrors(const CSCIdType CSCId) const
ExaminerStatusType getCSCStatus(const CSCIdType CSCId) const
std::set< CSCIdType > getListOfCSCs() const
ExaminerStatusType getCSCPayload(const CSCIdType CSCId) const
ExaminerStatusType getDDUSummaryErrors() const