CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

CSCDCCFormatStatusDigi Class Reference

CSC Format Status Object. More...

#include <CSCDCCFormatStatusDigi.h>

List of all members.

Public Member Functions

 CSCDCCFormatStatusDigi (const DCCIdType DCCId_, const ExaminerMaskType fDCC_MASK_, const ExaminerMaskType fCSC_MASK_, const ExaminerStatusType fDDU_SUMMARY_ERRORS_, const std::map< DDUIdType, ExaminerStatusType > mDDU_ERRORS_, const std::map< CSCIdType, ExaminerStatusType > mCSC_ERRORS_, const std::map< CSCIdType, ExaminerStatusType > mCSC_PAYLOADS_, const std::map< CSCIdType, ExaminerStatusType > mCSC_STATUS_)
 Constructor.
 CSCDCCFormatStatusDigi (const DCCIdType DCCId_)
 CSCDCCFormatStatusDigi ()
 Default constructor.
bool getCSCErrorFlag (const CSCIdType CSCId, const FormatErrorFlag flag) const
bool getCSCErrorFlag (const uint16_t crateId, const uint16_t dmbId, const FormatErrorFlag flag) const
ExaminerStatusType getCSCErrors (const CSCIdType CSCId) const
ExaminerStatusType getCSCErrors (const uint16_t crateId, const uint16_t dmbId) const
ExaminerMaskType getCSCMask () const
ExaminerStatusType getCSCPayload (const uint16_t crateId, const uint16_t dmbId) const
ExaminerStatusType getCSCPayload (const CSCIdType CSCId) const
bool getCSCPayloadFlag (const uint16_t crateId, const uint16_t dmbId, const CSCPayloadFlag flag) const
bool getCSCPayloadFlag (const CSCIdType CSCId, const CSCPayloadFlag flag) const
ExaminerStatusType getCSCStatus (const CSCIdType CSCId) const
ExaminerStatusType getCSCStatus (const uint16_t crateId, const uint16_t dmbId) const
bool getCSCStatusFlag (const uint16_t crateId, const uint16_t dmbId, const CSCStatusFlag flag) const
bool getCSCStatusFlag (const CSCIdType CSCId, const CSCStatusFlag flag) const
DCCIdType getDCCId () const
ExaminerMaskType getDCCMask () const
bool getDDUErrorFlag (const DDUIdType DDUId, const FormatErrorFlag flag) const
ExaminerStatusType getDDUErrors (const DDUIdType DDUId) const
ExaminerStatusType getDDUSummaryErrors () const
bool getDDUSummaryFlag (const FormatErrorFlag flag) const
std::set< CSCIdTypegetListOfCSCs () const
std::set< CSCIdTypegetListOfCSCsWithErrors () const
std::set< DDUIdTypegetListOfDDUs () const
bool nextCSCWithError (uint32_t &iterator, CSCIdType &CSCId) const
 CSC with error iteration procedure. Usage: unsigned int i = 0; CSCIdType cscId; while (c.nextCSCWithError(i, cscId)) { // do stuff }.
bool nextCSCWithPayload (uint32_t &iterator, CSCIdType &CSCId) const
 CSC with payload iteration procedure.
bool nextCSCWithStatus (uint32_t &iterator, CSCIdType &CSCId) const
 CSC with status iteration procedure.
void print () const
 Debug.
void setDCCExaminerInfo (const ExaminerMaskType fDCC_MASK_, const ExaminerMaskType fCSC_MASK_, const ExaminerStatusType fDDU_SUMMARY_ERRORS_, const std::map< DDUIdType, ExaminerStatusType > mDDU_ERRORS_, const std::map< CSCIdType, ExaminerStatusType > mCSC_ERRORS_, const std::map< CSCIdType, ExaminerStatusType > mCSC_PAYLOADS_, const std::map< CSCIdType, ExaminerStatusType > mCSC_STATUS_)
 Fill internal data structures using Examiner object.

Protected Member Functions

void init ()
 Init internal data stuctures.
CSCIdType makeCSCId (const uint16_t crateId, const uint16_t dmbId) const
 Make CSCIdType from Crate and DMB IDs.

Private Attributes

DCCIdType DCCId
ExaminerMaskType fCSC_MASK
ExaminerMaskType fDCC_MASK
ExaminerStatusType fDDU_SUMMARY_ERRORS
std::map< CSCIdType,
ExaminerStatusType
mCSC_ERRORS
std::map< CSCIdType,
ExaminerStatusType
mCSC_PAYLOADS
std::map< CSCIdType,
ExaminerStatusType
mCSC_STATUS
std::map< DDUIdType,
ExaminerStatusType
mDDU_ERRORS

Detailed Description

CSC Format Status Object.

Definition at line 164 of file CSCDCCFormatStatusDigi.h.


Constructor & Destructor Documentation

CSCDCCFormatStatusDigi::CSCDCCFormatStatusDigi ( const DCCIdType  DCCId_,
const ExaminerMaskType  fDCC_MASK_,
const ExaminerMaskType  fCSC_MASK_,
const ExaminerStatusType  fDDU_SUMMARY_ERRORS_,
const std::map< DDUIdType, ExaminerStatusType mDDU_ERRORS_,
const std::map< CSCIdType, ExaminerStatusType mCSC_ERRORS_,
const std::map< CSCIdType, ExaminerStatusType mCSC_PAYLOADS_,
const std::map< CSCIdType, ExaminerStatusType mCSC_STATUS_ 
) [inline]

Constructor.

Parameters:
fDCC_MASK_DCC Examiner mask used (for information purposes).
fCSC_MASK_Examiner mask per chamber
fDDU_SUMMARY_ERRORS_Cumulative DDUs errors status
mDDU_ERRORS_List of errors per DDU
mCSC_ERRORS_List of errors per CSC
mCSC_PAYLOADS_List of payloads per CSC
mCSC_STATUS_List of statuses per CSC

Definition at line 219 of file CSCDCCFormatStatusDigi.h.

References init(), and setDCCExaminerInfo().

                                                                                  : DCCId(DCCId_) 
    {
      init();
      setDCCExaminerInfo(fDCC_MASK_, fCSC_MASK_, fDDU_SUMMARY_ERRORS_, mDDU_ERRORS_, mCSC_ERRORS_, mCSC_PAYLOADS_, mCSC_STATUS_);
    }
CSCDCCFormatStatusDigi::CSCDCCFormatStatusDigi ( const DCCIdType  DCCId_) [inline]

Definition at line 233 of file CSCDCCFormatStatusDigi.h.

References init().

: DCCId(DCCId_) {init();}
CSCDCCFormatStatusDigi::CSCDCCFormatStatusDigi ( ) [inline]

Default constructor.

Definition at line 237 of file CSCDCCFormatStatusDigi.h.

References init().

: DCCId(0) {init();}

Member Function Documentation

bool CSCDCCFormatStatusDigi::getCSCErrorFlag ( const CSCIdType  CSCId,
const FormatErrorFlag  flag 
) const [inline]

Definition at line 401 of file CSCDCCFormatStatusDigi.h.

References getCSCErrors().

    { return ( (getCSCErrors(CSCId) & ExaminerStatusType(0x1<<flag) ) != 0); }
bool CSCDCCFormatStatusDigi::getCSCErrorFlag ( const uint16_t  crateId,
const uint16_t  dmbId,
const FormatErrorFlag  flag 
) const [inline]

Definition at line 404 of file CSCDCCFormatStatusDigi.h.

References getCSCErrors().

    { return ( (getCSCErrors(crateId, dmbId) & ExaminerStatusType(0x1<<flag) ) != 0); }
ExaminerStatusType CSCDCCFormatStatusDigi::getCSCErrors ( const CSCIdType  CSCId) const [inline]

Definition at line 350 of file CSCDCCFormatStatusDigi.h.

References mCSC_ERRORS.

Referenced by getCSCErrorFlag(), operator<<(), print(), and cscdqm::EventProcessor::processExaminer().

                                                               {
    std::map<CSCIdType,ExaminerStatusType>::const_iterator item = mCSC_ERRORS.find(CSCId);
    if( item != mCSC_ERRORS.end() ) return item->second; else return 0;
  } 
ExaminerStatusType CSCDCCFormatStatusDigi::getCSCErrors ( const uint16_t  crateId,
const uint16_t  dmbId 
) const [inline]

Definition at line 355 of file CSCDCCFormatStatusDigi.h.

References getCSCErrors(), and makeCSCId().

Referenced by getCSCErrors().

    { return getCSCErrors( makeCSCId(crateId, dmbId) ); }
ExaminerMaskType CSCDCCFormatStatusDigi::getCSCMask ( ) const [inline]

Return CSC level Errors Mask

Definition at line 390 of file CSCDCCFormatStatusDigi.h.

References fCSC_MASK.

Referenced by operator<<(), and print().

{ return fCSC_MASK; }
ExaminerStatusType CSCDCCFormatStatusDigi::getCSCPayload ( const CSCIdType  CSCId) const [inline]

Definition at line 359 of file CSCDCCFormatStatusDigi.h.

References mCSC_PAYLOADS.

Referenced by getCSCPayloadFlag(), print(), and cscdqm::EventProcessor::processExaminer().

                                                                {
    std::map<CSCIdType,ExaminerStatusType>::const_iterator item = mCSC_PAYLOADS.find(CSCId);
    if( item != mCSC_PAYLOADS.end() ) return item->second; else return 0;
  }
ExaminerStatusType CSCDCCFormatStatusDigi::getCSCPayload ( const uint16_t  crateId,
const uint16_t  dmbId 
) const [inline]

Definition at line 364 of file CSCDCCFormatStatusDigi.h.

References getCSCPayload(), and makeCSCId().

Referenced by getCSCPayload().

    { return getCSCPayload( makeCSCId(crateId, dmbId) ); }
bool CSCDCCFormatStatusDigi::getCSCPayloadFlag ( const CSCIdType  CSCId,
const CSCPayloadFlag  flag 
) const [inline]

Definition at line 407 of file CSCDCCFormatStatusDigi.h.

References getCSCPayload().

    { return ( (getCSCPayload(CSCId) & ExaminerStatusType(0x1<<flag) ) != 0); }
bool CSCDCCFormatStatusDigi::getCSCPayloadFlag ( const uint16_t  crateId,
const uint16_t  dmbId,
const CSCPayloadFlag  flag 
) const [inline]

Definition at line 410 of file CSCDCCFormatStatusDigi.h.

References getCSCPayload().

    { return ( (getCSCPayload(crateId,dmbId) & ExaminerStatusType(0x1<<flag) ) != 0); }
ExaminerStatusType CSCDCCFormatStatusDigi::getCSCStatus ( const uint16_t  crateId,
const uint16_t  dmbId 
) const [inline]

Definition at line 373 of file CSCDCCFormatStatusDigi.h.

References getCSCStatus(), and makeCSCId().

Referenced by getCSCStatus().

    { return getCSCStatus( makeCSCId(crateId, dmbId) ); }
ExaminerStatusType CSCDCCFormatStatusDigi::getCSCStatus ( const CSCIdType  CSCId) const [inline]

Definition at line 368 of file CSCDCCFormatStatusDigi.h.

References mCSC_STATUS.

Referenced by getCSCStatusFlag(), operator<<(), print(), and cscdqm::EventProcessor::processExaminer().

                                                               {
    std::map<CSCIdType,ExaminerStatusType>::const_iterator item = mCSC_STATUS.find(CSCId);
    if( item != mCSC_STATUS.end() ) return item->second; else return 0;
  }
bool CSCDCCFormatStatusDigi::getCSCStatusFlag ( const uint16_t  crateId,
const uint16_t  dmbId,
const CSCStatusFlag  flag 
) const [inline]

Definition at line 416 of file CSCDCCFormatStatusDigi.h.

References getCSCStatus().

    { return ( (getCSCStatus(crateId, dmbId) & ExaminerStatusType(0x1<<flag) ) != 0); }
bool CSCDCCFormatStatusDigi::getCSCStatusFlag ( const CSCIdType  CSCId,
const CSCStatusFlag  flag 
) const [inline]

Definition at line 413 of file CSCDCCFormatStatusDigi.h.

References getCSCStatus().

    { return ( (getCSCStatus(CSCId) & ExaminerStatusType(0x1<<flag) ) != 0); }
DCCIdType CSCDCCFormatStatusDigi::getDCCId ( ) const [inline]

Definition at line 380 of file CSCDCCFormatStatusDigi.h.

References DCCId.

Referenced by operator<<(), and print().

{ return DCCId; }
ExaminerMaskType CSCDCCFormatStatusDigi::getDCCMask ( ) const [inline]

Return DCC/DDU level Errors Mask

Definition at line 385 of file CSCDCCFormatStatusDigi.h.

References fDCC_MASK.

Referenced by operator<<(), and print().

{ return fDCC_MASK; }
bool CSCDCCFormatStatusDigi::getDDUErrorFlag ( const DDUIdType  DDUId,
const FormatErrorFlag  flag 
) const [inline]

Definition at line 398 of file CSCDCCFormatStatusDigi.h.

References getDDUErrors().

    { return ( (getDDUErrors(DDUId) & ExaminerStatusType(0x1<<flag) ) != 0); }
ExaminerStatusType CSCDCCFormatStatusDigi::getDDUErrors ( const DDUIdType  DDUId) const [inline]

Definition at line 344 of file CSCDCCFormatStatusDigi.h.

References mDDU_ERRORS.

Referenced by getDDUErrorFlag(), operator<<(), print(), and cscdqm::EventProcessor::processExaminer().

                                                               {
    std::map<DDUIdType,ExaminerStatusType>::const_iterator item = mDDU_ERRORS.find(DDUId);
    if( item != mDDU_ERRORS.end() ) return item->second; else return 0;
  }
ExaminerStatusType CSCDCCFormatStatusDigi::getDDUSummaryErrors ( ) const [inline]

Getters for complete mask by using internal identifiers. Mostly to be used by examiner and old/current code. Return DCC/DDU level Error Status

Definition at line 342 of file CSCDCCFormatStatusDigi.h.

References fDDU_SUMMARY_ERRORS.

Referenced by operator<<(), print(), and cscdqm::EventProcessor::processExaminer().

{ return fDDU_SUMMARY_ERRORS; }
bool CSCDCCFormatStatusDigi::getDDUSummaryFlag ( const FormatErrorFlag  flag) const [inline]

Flag Getters for individual named masks.

Definition at line 396 of file CSCDCCFormatStatusDigi.h.

References fDDU_SUMMARY_ERRORS.

    { return ( (fDDU_SUMMARY_ERRORS & ExaminerStatusType(0x1<<flag) ) != 0); }
std::set<CSCIdType> CSCDCCFormatStatusDigi::getListOfCSCs ( ) const [inline]

Definition at line 285 of file CSCDCCFormatStatusDigi.h.

References getKeysList(), and mCSC_PAYLOADS.

Referenced by operator<<(), and print().

                                          {
    return getKeysList(mCSC_PAYLOADS);
  }
std::set<CSCIdType> CSCDCCFormatStatusDigi::getListOfCSCsWithErrors ( ) const [inline]

Definition at line 289 of file CSCDCCFormatStatusDigi.h.

References getKeysList(), and mCSC_ERRORS.

                                                    {
    return getKeysList(mCSC_ERRORS);
  }
std::set<DDUIdType> CSCDCCFormatStatusDigi::getListOfDDUs ( ) const [inline]

Get lists of DDUs and CSCs Loop iterators for CSCs

Definition at line 281 of file CSCDCCFormatStatusDigi.h.

References getKeysList(), and mDDU_ERRORS.

Referenced by operator<<(), print(), and cscdqm::EventProcessor::processExaminer().

                                          {
    return getKeysList(mDDU_ERRORS);
  }
void CSCDCCFormatStatusDigi::init ( void  ) [inline, protected]

Init internal data stuctures.

Definition at line 197 of file CSCDCCFormatStatusDigi.h.

References fCSC_MASK, fDCC_MASK, fDDU_SUMMARY_ERRORS, mCSC_ERRORS, mCSC_PAYLOADS, mCSC_STATUS, and mDDU_ERRORS.

Referenced by CSCDCCFormatStatusDigi().

              {
    fDDU_SUMMARY_ERRORS = 0;
    fCSC_MASK = 0;
    fDCC_MASK = 0;
    mDDU_ERRORS.clear();
    mCSC_ERRORS.clear();
    mCSC_PAYLOADS.clear();
    mCSC_STATUS.clear();
  }
CSCIdType CSCDCCFormatStatusDigi::makeCSCId ( const uint16_t  crateId,
const uint16_t  dmbId 
) const [inline, protected]

Make CSCIdType from Crate and DMB IDs.

Definition at line 193 of file CSCDCCFormatStatusDigi.h.

Referenced by getCSCErrors(), getCSCPayload(), and getCSCStatus().

    { return ( (CSCIdType(crateId&0xFF)<<4) | (dmbId&0xF) ); }
bool CSCDCCFormatStatusDigi::nextCSCWithError ( uint32_t &  iterator,
CSCIdType CSCId 
) const [inline]

CSC with error iteration procedure. Usage: unsigned int i = 0; CSCIdType cscId; while (c.nextCSCWithError(i, cscId)) { // do stuff }.

Parameters:
iteratorInteger iterator (incremented automatically)
CSCIdCSC id to return
Returns:
true if CSC id found and returned, false - otherwise

Definition at line 306 of file CSCDCCFormatStatusDigi.h.

References mCSC_ERRORS, and nextInMap().

Referenced by cscdqm::EventProcessor::processExaminer().

                                                                    {
    return nextInMap(iterator, CSCId, mCSC_ERRORS);
  }
bool CSCDCCFormatStatusDigi::nextCSCWithPayload ( uint32_t &  iterator,
CSCIdType CSCId 
) const [inline]

CSC with payload iteration procedure.

See also:
bool nextCSCWithError(uint32_t&, CSCIdType&) const
Parameters:
iteratorInteger iterator (incremented automatically)
CSCIdCSC id to return
Returns:
true if CSC id found and returned, false - otherwise

Definition at line 328 of file CSCDCCFormatStatusDigi.h.

References mCSC_PAYLOADS, and nextInMap().

Referenced by cscdqm::EventProcessor::processExaminer().

                                                                      {
    return nextInMap(iterator, CSCId, mCSC_PAYLOADS);
  }
bool CSCDCCFormatStatusDigi::nextCSCWithStatus ( uint32_t &  iterator,
CSCIdType CSCId 
) const [inline]

CSC with status iteration procedure.

See also:
bool nextCSCWithError(uint32_t&, CSCIdType&) const
Parameters:
iteratorInteger iterator (incremented automatically)
CSCIdCSC id to return
Returns:
true if CSC id found and returned, false - otherwise

Definition at line 317 of file CSCDCCFormatStatusDigi.h.

References mCSC_STATUS, and nextInMap().

Referenced by cscdqm::EventProcessor::processExaminer().

                                                                     {
    return nextInMap(iterator, CSCId, mCSC_STATUS);
  }
void CSCDCCFormatStatusDigi::print ( void  ) const

Debug.

Definition at line 54 of file CSCDCCFormatStatusDigi.cc.

References gather_cfg::cout, getCSCErrors(), getCSCMask(), getCSCPayload(), getCSCStatus(), getDCCId(), getDCCMask(), getDDUErrors(), getDDUSummaryErrors(), getListOfCSCs(), and getListOfDDUs().

                                         {

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

}
void CSCDCCFormatStatusDigi::setDCCExaminerInfo ( const ExaminerMaskType  fDCC_MASK_,
const ExaminerMaskType  fCSC_MASK_,
const ExaminerStatusType  fDDU_SUMMARY_ERRORS_,
const std::map< DDUIdType, ExaminerStatusType mDDU_ERRORS_,
const std::map< CSCIdType, ExaminerStatusType mCSC_ERRORS_,
const std::map< CSCIdType, ExaminerStatusType mCSC_PAYLOADS_,
const std::map< CSCIdType, ExaminerStatusType mCSC_STATUS_ 
)

Fill internal data structures using Examiner object.

setExaminerInfo

Parameters:
fDCC_MASK_DCC Examiner mask used (for information purposes).
fCSC_MASK_Examiner mask per chamber
fDDU_SUMMARY_ERRORS_Cumulative DDUs errors status
mDDU_ERRORS_List of errors per DDU
mCSC_ERRORS_List of errors per CSC
mCSC_PAYLOADS_List of payloads per CSC
mCSC_STATUS_List of statuses per CSC

Definition at line 35 of file CSCDCCFormatStatusDigi.cc.

References fCSC_MASK, fDCC_MASK, fDDU_SUMMARY_ERRORS, mCSC_ERRORS, mCSC_PAYLOADS, mCSC_STATUS, and mDDU_ERRORS.

Referenced by CSCDCCFormatStatusDigi().

{
  fDCC_MASK = fDCC_MASK_;
  fCSC_MASK = fCSC_MASK_;
  fDDU_SUMMARY_ERRORS = fDDU_SUMMARY_ERRORS_;
  mDDU_ERRORS = mDDU_ERRORS_;
  mCSC_ERRORS = mCSC_ERRORS_;
  mCSC_PAYLOADS = mCSC_PAYLOADS_;
  mCSC_STATUS = mCSC_STATUS_;
}

Member Data Documentation

FED/DCC Id

Definition at line 180 of file CSCDCCFormatStatusDigi.h.

Referenced by getDCCId().

CSC Examiner mask used

Definition at line 177 of file CSCDCCFormatStatusDigi.h.

Referenced by getCSCMask(), init(), and setDCCExaminerInfo().

Internal mask storage variables and containers. DCC Examiner mask used

Definition at line 174 of file CSCDCCFormatStatusDigi.h.

Referenced by getDCCMask(), init(), and setDCCExaminerInfo().

DCC Level summary errors

Definition at line 183 of file CSCDCCFormatStatusDigi.h.

Referenced by getDDUSummaryErrors(), getDDUSummaryFlag(), init(), and setDCCExaminerInfo().

Definition at line 185 of file CSCDCCFormatStatusDigi.h.

Referenced by getDDUErrors(), getListOfDDUs(), init(), and setDCCExaminerInfo().