CMS 3D CMS Logo

Classes | Typedefs | Enumerations | Functions

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DataFormats/CSCDigi/interface/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.
template<class TKey , class TVal >
bool nextInMap (uint32_t &it, TKey &key, const std::map< TKey, TVal > &m)
 Map iterator template.
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.

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.


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().

{
  std::set<TKey> keys;
  typename std::map<TKey, TVal>::const_iterator itr;
  for (itr  = m.begin(); itr != m.end(); ++itr) {
     keys.insert(itr->first);
  }
  return keys;
}
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 trackerHits::c.

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

                                                                     { 
  uint32_t c = 0;
  typename std::map<TKey, TVal>::const_iterator itr = m.begin();
  while (itr != m.end()) {
    if (c == it) {
      it++;
      key = itr->first;
      return true;
    }
    itr++;
    c++;
  }
  return false;
}
std::ostream& operator<< ( std::ostream &  o,
const CSCDCCFormatStatusDigi digi 
)

Definition at line 77 of file CSCDCCFormatStatusDigi.cc.

References CSCDCCFormatStatusDigi::getCSCErrors(), CSCDCCFormatStatusDigi::getCSCMask(), CSCDCCFormatStatusDigi::getCSCStatus(), CSCDCCFormatStatusDigi::getDCCId(), CSCDCCFormatStatusDigi::getDCCMask(), CSCDCCFormatStatusDigi::getDDUErrors(), CSCDCCFormatStatusDigi::getDDUSummaryErrors(), CSCDCCFormatStatusDigi::getListOfCSCs(), CSCDCCFormatStatusDigi::getListOfDDUs(), and python::connectstrParser::o.

                                                                            {
   o << "CSCDCCFormatStatusDigi: DCC=" << std::dec << digi.getDCCId() 
        << " DCCMask=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getDCCMask()
        << " CSCMask=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getCSCMask()
        << " DCCErrors=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getDDUSummaryErrors() 
        << std::dec << "\n";
   std::set<DDUIdType> ddu_list = digi.getListOfDDUs();
   for (std::set<DDUIdType>::iterator itr=ddu_list.begin(); itr != ddu_list.end(); ++itr) {
        o << "DDU_" << std::dec << ((*itr)&0xFF) 
        << " Errors=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getDDUErrors(*itr) << "\n"; 
   }
   std::set<CSCIdType> csc_list = digi.getListOfCSCs();
   for (std::set<CSCIdType>::iterator itr=csc_list.begin(); itr != csc_list.end(); ++itr) {
        
        o << "CSC_" << std::dec << (((*itr)>>4)&0xFF) << "_" << ((*itr)&0xF) 
                << " Errors=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getCSCErrors(*itr) 
                << " Payload=0x" << std::setw(8) << std::setfill('0') << digi. getCSCPayload(*itr) 
                << " Status=0x" << std::setw(8) << std::setfill('0') << digi.getCSCStatus(*itr) << "\n";
   }
  return o;
}