CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDCCFormatStatusDigi.cc
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: CSCDCCFormatStatusDigi.h
5  *
6  * Description: CSC DCC Format error, status and payload flags for a single DCC
7  *
8  * Version: 1.0
9  * Created: 02/12/2009 03:22:34 PM
10  * Revision: none
11  * Compiler: gcc
12  *
13  * Author: Valdas Rapsevicius (VR), valdas.rapsevicius@cern.ch,
14  * Victor Barashko (VB), victor.barashko@cern.ch
15  * Company: CERN, CH
16  *
17  * =====================================================================================
18  */
19 
21 
22 #include <iostream>
23 #include <iomanip>
24 
36  const ExaminerMaskType fCSC_MASK_,
37  const ExaminerStatusType fDDU_SUMMARY_ERRORS_,
38  const std::map<DDUIdType, ExaminerStatusType> mDDU_ERRORS_,
39  const std::map<CSCIdType, ExaminerStatusType> mCSC_ERRORS_,
40  const std::map<CSCIdType, ExaminerStatusType> mCSC_PAYLOADS_,
41  const std::map<CSCIdType, ExaminerStatusType> mCSC_STATUS_)
42 {
43  fDCC_MASK = fDCC_MASK_;
44  fCSC_MASK = fCSC_MASK_;
45  fDDU_SUMMARY_ERRORS = fDDU_SUMMARY_ERRORS_;
46  mDDU_ERRORS = mDDU_ERRORS_;
47  mCSC_ERRORS = mCSC_ERRORS_;
48  mCSC_PAYLOADS = mCSC_PAYLOADS_;
49  mCSC_STATUS = mCSC_STATUS_;
50 }
51 
52 
55 
56  std::cout << "CSCDCCFormatStatusDigi: DCC=" << std::dec << getDCCId()
57  << " DCCMask=0x" << std::hex << std::setw(8) << std::setfill('0') << getDCCMask()
58  << " CSCMask=0x" << std::hex << std::setw(8) << std::setfill('0') << getCSCMask()
59  << " DCCErrors=0x" << std::hex << std::setw(8) << std::setfill('0') << getDDUSummaryErrors()
60  << std::dec << "\n";
61  std::set<DDUIdType> ddu_list = getListOfDDUs();
62  for (std::set<DDUIdType>::iterator itr=ddu_list.begin(); itr != ddu_list.end(); ++itr) {
63  std::cout << "DDU_" << std::dec << ((*itr)&0xFF)
64  << " Errors=0x" << std::hex << std::setw(8) << std::setfill('0') << getDDUErrors(*itr) << "\n";
65  }
66  std::set<CSCIdType> csc_list = getListOfCSCs();
67  for (std::set<CSCIdType>::iterator itr=csc_list.begin(); itr != csc_list.end(); ++itr) {
68 
69  std::cout << "CSC_" << std::dec << (((*itr)>>4)&0xFF) << "_" << ((*itr)&0xF)
70  << " Errors=0x" << std::hex << std::setw(8) << std::setfill('0') << getCSCErrors(*itr)
71  << " Payload=0x" << std::setw(8) << std::setfill('0') << getCSCPayload(*itr)
72  << " Status=0x" << std::setw(8) << std::setfill('0') << getCSCStatus(*itr) << "\n";
73  }
74 
75 }
76 
77 std::ostream & operator<<(std::ostream & o, const CSCDCCFormatStatusDigi& digi) {
78  o << "CSCDCCFormatStatusDigi: DCC=" << std::dec << digi.getDCCId()
79  << " DCCMask=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getDCCMask()
80  << " CSCMask=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getCSCMask()
81  << " DCCErrors=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getDDUSummaryErrors()
82  << std::dec << "\n";
83  std::set<DDUIdType> ddu_list = digi.getListOfDDUs();
84  for (std::set<DDUIdType>::iterator itr=ddu_list.begin(); itr != ddu_list.end(); ++itr) {
85  o << "DDU_" << std::dec << ((*itr)&0xFF)
86  << " Errors=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getDDUErrors(*itr) << "\n";
87  }
88  std::set<CSCIdType> csc_list = digi.getListOfCSCs();
89  for (std::set<CSCIdType>::iterator itr=csc_list.begin(); itr != csc_list.end(); ++itr) {
90 
91  o << "CSC_" << std::dec << (((*itr)>>4)&0xFF) << "_" << ((*itr)&0xF)
92  << " Errors=0x" << std::hex << std::setw(8) << std::setfill('0') << digi.getCSCErrors(*itr)
93  << " Payload=0x" << std::setw(8) << std::setfill('0') << digi. getCSCPayload(*itr)
94  << " Status=0x" << std::setw(8) << std::setfill('0') << digi.getCSCStatus(*itr) << "\n";
95  }
96  return o;
97 }
98 
void print() const
Debug.
ExaminerMaskType getDCCMask() const
ExaminerStatusType getDDUSummaryErrors() const
std::set< DDUIdType > getListOfDDUs() const
ExaminerStatusType getCSCStatus(const CSCIdType CSCId) const
ExaminerStatusType getCSCErrors(const CSCIdType CSCId) const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
ExaminerStatusType getDDUErrors(const DDUIdType DDUId) const
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.
std::map< CSCIdType, ExaminerStatusType > mCSC_ERRORS
ExaminerStatusType fDDU_SUMMARY_ERRORS
ExaminerStatusType getCSCPayload(const CSCIdType CSCId) const
uint32_t ExaminerStatusType
std::map< CSCIdType, ExaminerStatusType > mCSC_STATUS
std::map< DDUIdType, ExaminerStatusType > mDDU_ERRORS
CSC Format Status Object.
std::map< CSCIdType, ExaminerStatusType > mCSC_PAYLOADS
tuple cout
Definition: gather_cfg.py:121
uint32_t ExaminerMaskType
std::set< CSCIdType > getListOfCSCs() const
ExaminerMaskType getCSCMask() const