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

typedef int32_t CSCIdType

CSC identifier type

Definition at line 39 of file CSCDCCFormatStatusDigi.h.

typedef int32_t DCCIdType

DCC identifier type

Definition at line 33 of file CSCDCCFormatStatusDigi.h.

typedef int16_t DDUIdType

DDU identifier type

Definition at line 36 of file CSCDCCFormatStatusDigi.h.

typedef uint32_t ExaminerMaskType

Examiner status and mask type

Definition at line 42 of file CSCDCCFormatStatusDigi.h.

typedef uint32_t ExaminerStatusType

Definition at line 43 of file CSCDCCFormatStatusDigi.h.

Enumeration Type Documentation

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 79 of file CSCDCCFormatStatusDigi.h.

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 95 of file CSCDCCFormatStatusDigi.h.

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

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 46 of file CSCDCCFormatStatusDigi.h.

46  {
47  ANY_ERRORS = 0,
50  DDU_CRC_ERROR = 3,
57  ALCT_CRC_ERROR = 10,
60  TMB_HEADER_MISSING = 13,
62  TMB_CRC_ERROR = 15,
65  CFEB_CRC_ERROR = 18,
67  C_WORDS = 20,
68  ALCT_DAV_ERROR = 21,
69  TMB_DAV_ERROR = 22,
70  CFEB_DAV_ERROR = 23,
71  DMB_ACTIVE_ERROR = 24,
73  DCC_HEADER_MISSING = 26,
76 };

Function Documentation

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 150 of file CSCDCCFormatStatusDigi.h.

References relativeConstraints::keys.

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

151 {
152  std::set<TKey> keys;
153  typename std::map<TKey, TVal>::const_iterator itr;
154  for (itr = m.begin(); itr != m.end(); ++itr) {
155  keys.insert(itr->first);
156  }
157  return keys;
158 }
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 129 of file CSCDCCFormatStatusDigi.h.

References EnergyCorrector::c.

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

129  {
130  uint32_t c = 0;
131  typename std::map<TKey, TVal>::const_iterator itr = m.begin();
132  while (itr != m.end()) {
133  if (c == it) {
134  it++;
135  key = itr->first;
136  return true;
137  }
138  itr++;
139  c++;
140  }
141  return false;
142 }
std::ostream& operator<< ( std::ostream &  o,
const CSCDCCFormatStatusDigi digi 
)

Definition at line 105 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 connectstrParser::o.

Referenced by CSCDCCFormatStatusDigi::getCSCStatusFlag().

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