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.

76  {
77  CFEB1_ACTIVE = 0,
78  CFEB2_ACTIVE = 1,
79  CFEB3_ACTIVE = 2,
80  CFEB4_ACTIVE = 3,
81  CFEB5_ACTIVE = 4,
82  ALCT_DAV = 5,
83  TMB_DAV = 6,
84  CFEB1_DAV = 7,
85  CFEB2_DAV = 8,
86  CFEB3_DAV = 9,
87  CFEB4_DAV = 10,
88  CFEB5_DAV = 11
89 };

◆ 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.

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.

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 }

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

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

◆ 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.

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 }

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

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

◆ operator<<()

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

Definition at line 99 of file CSCDCCFormatStatusDigi.cc.

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 }

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.

DCC_HEADER_MISSING
Definition: CSCDCCFormatStatusDigi.h:70
CSCDCCFormatStatusDigi::getListOfCSCs
std::set< CSCIdType > getListOfCSCs() const
Definition: CSCDCCFormatStatusDigi.h:285
ALCT_TRAILER_MISSING
Definition: CSCDCCFormatStatusDigi.h:51
EXTRA_WORDS_BETWEEN_DDU_HEADER_AND_FIRST_DMB_HEADER
Definition: CSCDCCFormatStatusDigi.h:72
CFEB3_START_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:104
DCC_TRAILER_MISSING
Definition: CSCDCCFormatStatusDigi.h:69
DDU_WORD_COUNT_ERROR
Definition: CSCDCCFormatStatusDigi.h:48
TMB_START_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:101
CFEB4_FIFO_FULL
Definition: CSCDCCFormatStatusDigi.h:98
ALCT_HEADER_MISSING
Definition: CSCDCCFormatStatusDigi.h:52
CSCDCCFormatStatusDigi::getCSCErrors
ExaminerStatusType getCSCErrors(const CSCIdType CSCId) const
Definition: CSCDCCFormatStatusDigi.h:343
CFEB3_FIFO_FULL
Definition: CSCDCCFormatStatusDigi.h:97
DDU_EVENT_SIZE_LIMIT_ERROR
Definition: CSCDCCFormatStatusDigi.h:63
CFEB1_START_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:102
TMB_CRC_ERROR
Definition: CSCDCCFormatStatusDigi.h:59
CFEB_DAV_ERROR
Definition: CSCDCCFormatStatusDigi.h:67
ALCT_END_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:107
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
CSCDCCFormatStatusDigi::getDDUSummaryErrors
ExaminerStatusType getDDUSummaryErrors() const
Definition: CSCDCCFormatStatusDigi.h:333
CFEB1_ACTIVE
Definition: CSCDCCFormatStatusDigi.h:77
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
CFEB5_FIFO_FULL
Definition: CSCDCCFormatStatusDigi.h:99
CFEB1_FIFO_FULL
Definition: CSCDCCFormatStatusDigi.h:95
ALCT_DAV_ERROR
Definition: CSCDCCFormatStatusDigi.h:65
TMB_END_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:108
CFEB_ACTIVE_DAV_MISMATCH
Definition: CSCDCCFormatStatusDigi.h:114
CFEB4_START_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:105
CSCDCCFormatStatusDigi::getDDUErrors
ExaminerStatusType getDDUErrors(const DDUIdType DDUId) const
Definition: CSCDCCFormatStatusDigi.h:335
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
ALCT_DAV
Definition: CSCDCCFormatStatusDigi.h:82
CFEB2_DAV
Definition: CSCDCCFormatStatusDigi.h:85
CFEB5_DAV
Definition: CSCDCCFormatStatusDigi.h:88
CFEB2_START_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:103
CFEB4_END_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:112
CFEB3_DAV
Definition: CSCDCCFormatStatusDigi.h:86
DDU_TRAILER_MISSING
Definition: CSCDCCFormatStatusDigi.h:45
CFEB3_ACTIVE
Definition: CSCDCCFormatStatusDigi.h:79
TMB_DAV
Definition: CSCDCCFormatStatusDigi.h:83
DMB_TRAILER_MISSING
Definition: CSCDCCFormatStatusDigi.h:49
CFEB5_ACTIVE
Definition: CSCDCCFormatStatusDigi.h:81
CFEB1_DAV
Definition: CSCDCCFormatStatusDigi.h:84
TMB_WORD_COUNT_ERROR
Definition: CSCDCCFormatStatusDigi.h:58
CFEB4_DAV
Definition: CSCDCCFormatStatusDigi.h:87
CFEB2_FIFO_FULL
Definition: CSCDCCFormatStatusDigi.h:96
CFEB_WORD_COUNT_PER_SAMPLE_ERROR
Definition: CSCDCCFormatStatusDigi.h:60
ALCT_CRC_ERROR
Definition: CSCDCCFormatStatusDigi.h:54
CSCDCCFormatStatusDigi::getCSCPayload
ExaminerStatusType getCSCPayload(const CSCIdType CSCId) const
Definition: CSCDCCFormatStatusDigi.h:355
DMB_HEADER_MISSING
Definition: CSCDCCFormatStatusDigi.h:50
CSCDCCFormatStatusDigi::getDCCMask
ExaminerMaskType getDCCMask() const
Definition: CSCDCCFormatStatusDigi.h:387
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:29
DMB_ACTIVE_ERROR
Definition: CSCDCCFormatStatusDigi.h:68
CFEB5_END_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:113
CSCDCCFormatStatusDigi::getCSCMask
ExaminerMaskType getCSCMask() const
Definition: CSCDCCFormatStatusDigi.h:392
TMB_TRAILER_MISSING
Definition: CSCDCCFormatStatusDigi.h:56
DDU_HEADER_MISSING
Definition: CSCDCCFormatStatusDigi.h:46
CFEB4_ACTIVE
Definition: CSCDCCFormatStatusDigi.h:80
ALCT_TRAILER_BIT_ERROR
Definition: CSCDCCFormatStatusDigi.h:55
ALCT_FIFO_FULL
Definition: CSCDCCFormatStatusDigi.h:93
TMB_HEADER_MISSING
Definition: CSCDCCFormatStatusDigi.h:57
ANY_ERRORS
Definition: CSCDCCFormatStatusDigi.h:44
DMB_DAV_VS_DMB_ACTIVE_MISMATCH_ERROR
Definition: CSCDCCFormatStatusDigi.h:71
B_WORDS_FOUND
Definition: CSCDCCFormatStatusDigi.h:115
CFEB3_END_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:111
CFEB1_END_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:109
C_WORDS
Definition: CSCDCCFormatStatusDigi.h:64
CFEB2_ACTIVE
Definition: CSCDCCFormatStatusDigi.h:78
CFEB_CRC_ERROR
Definition: CSCDCCFormatStatusDigi.h:62
CFEB_SAMPLE_COUNT_ERROR
Definition: CSCDCCFormatStatusDigi.h:61
ALCT_START_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:100
crabWrapper.key
key
Definition: crabWrapper.py:19
DDU_CRC_ERROR
Definition: CSCDCCFormatStatusDigi.h:47
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
CFEB5_START_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:106
CSCDCCFormatStatusDigi::getListOfDDUs
std::set< DDUIdType > getListOfDDUs() const
Definition: CSCDCCFormatStatusDigi.h:283
ALCT_WORD_COUNT_ERROR
Definition: CSCDCCFormatStatusDigi.h:53
TMB_DAV_ERROR
Definition: CSCDCCFormatStatusDigi.h:66
CFEB2_END_TIMEOUT
Definition: CSCDCCFormatStatusDigi.h:110
CSCDCCFormatStatusDigi::getCSCStatus
ExaminerStatusType getCSCStatus(const CSCIdType CSCId) const
Definition: CSCDCCFormatStatusDigi.h:367
CSCDCCFormatStatusDigi::getDCCId
DCCIdType getDCCId() const
Definition: CSCDCCFormatStatusDigi.h:382
TMB_FIFO_FULL
Definition: CSCDCCFormatStatusDigi.h:94