1 #ifndef CSCDCCExaminer_h
2 #define CSCDCCExaminer_h
30 std::map<DDUIdType,ExaminerStatusType>
bDDU_ERR;
31 std::map<DDUIdType,ExaminerStatusType>
bDDU_WRN;
35 class buffer :
public std::streambuf{};
48 stream = str.rdbuf(); tie(&str);
53 return (*(std::ostream*)
this)<<
name<<val;
100 inline int scanbuf(
const uint16_t* &buf, int32_t length, uint16_t sig, uint16_t mask=0xFFFF);
140 std::map<DDUIdType,std::map<CSCIdType,const uint16_t*> >
dmbBuffers;
142 std::map<DDUIdType,std::map<CSCIdType,uint32_t> >
dmbOffsets;
144 std::map<DDUIdType,std::map<CSCIdType,uint32_t> >
dmbSize;
151 int32_t
check(
const uint16_t* &buffer, int32_t length);
175 std::map<CSCIdType,ExaminerStatusType>::const_iterator item =
bCHAMB_PAYLOAD.find(chamber);
176 if( item !=
bCHAMB_PAYLOAD.end() )
return item->second;
else return 0;
180 std::map<CSCIdType,ExaminerStatusType>::const_iterator item =
bCHAMB_STATUS.find(chamber);
181 if( item !=
bCHAMB_STATUS.end() )
return item->second;
else return 0;
185 std::map<CSCIdType,ExaminerStatusType>::const_iterator item =
bCHAMB_ERR.find(chamber);
192 if( item !=
bCHAMB_ERR.end() )
return item->second;
else return 0;
196 std::map<CSCIdType,ExaminerStatusType>::const_iterator item =
bCHAMB_WRN.find(chamber);
197 if( item !=
bCHAMB_WRN.end() )
return item->second;
else return 0;
201 std::map<DDUIdType,ExaminerStatusType>::const_iterator item =
bDDU_ERR.find(dduSourceID);
202 if( item !=
bDDU_ERR.end() )
return item->second;
else return 0;
205 std::map<DDUIdType,ExaminerStatusType>::const_iterator item =
bDDU_WRN.find(dduSourceID);
206 if( item !=
bDDU_WRN.end() )
return item->second;
else return 0;
209 std::vector<DDUIdType> DDUs;
210 std::map<DDUIdType,ExaminerStatusType>::const_iterator item =
bDDU_ERR.begin();
211 while( item !=
bDDU_ERR.end() ){ DDUs.push_back(item->first); item++; }
225 void crcTMB (
bool enable);
239 std::map<DDUIdType,std::map<CSCIdType,uint32_t> >
DMB_size(
void)
const {
return dmbSize; }
uint32_t DDU_WordsSinceLastHeader
const uint16_t * buffer_start
void crcCFEB(bool enable)
const char * errorName(int num) const
uint32_t CFEB_SampleWordCount
bool warning(int num) const
std::map< CSCIdType, ExaminerStatusType > bCHAMB_ERR
std::set< CSCIdType > fCHAMB_ERR[29]
std::ostream & operator<<(const T &val)
std::vector< DDUIdType > listOfDDUs(void) const
int scanbuf(const uint16_t *&buf, int32_t length, uint16_t sig, uint16_t mask=0xFFFF)
void modeDDU(bool enable)
uint32_t ALCT_WordsSinceLastHeader
ExaminerStatusType bSUM_WARNING
ExaminerStatusType errorsForChamber(CSCIdType chamber) const
ExaminerStatusType statusForChamber(CSCIdType chamber) const
std::map< DDUIdType, uint32_t > dduSize
uint32_t DDU_WordsSinceLastTrailer
DDUIdType dduSourceID(void)
void redirect(std::ostream &str)
ExaminerStatusType errors(void) const
void crcALCT(bool enable)
const char * errName(int num) const
uint32_t ALCT_WordsExpected
std::map< CSCIdType, uint32_t > cntCHAMB_Trailers
std::vector< const char * > sERROR
std::map< DDUIdType, std::map< CSCIdType, const uint16_t * > > DMB_block(void) const
std::set< CSCIdType > chambersWithError(int num) const
ExaminerStatusType warnings(void) const
uint32_t TMB_Firmware_Revision
std::map< CSCIdType, ExaminerStatusType > bCHAMB_PAYLOAD
std::map< CSCIdType, uint32_t > cntCHAMB_Headers
std::set< CSCIdType > chambersWithWarning(int num) const
uint32_t nWG_round_up
check zero suppression mode
std::map< DDUIdType, std::map< CSCIdType, uint32_t > > DMB_ptrOffsets(void) const
std::map< CSCIdType, ExaminerStatusType > errorsDetailed(void) const
std::map< DDUIdType, std::map< CSCIdType, uint32_t > > dmbOffsets
std::vector< const char * > sDMBExpectedPayload
std::vector< const char * > sWARNING_
ExaminerStatusType payloadForChamber(CSCIdType chamber) const
std::set< CSCIdType > fCHAMB_WRN[5]
uint32_t DDU_WordMismatch_Occurrences
std::map< DDUIdType, ExaminerStatusType > bDDU_ERR
uint32_t CFEB_SampleCount
ExaminerStatusType bSUM_ERROR
const char * statusName(int num) const
std::map< DDUIdType, std::map< CSCIdType, uint32_t > > DMB_size(void) const
std::map< DDUIdType, uint32_t > DDU_ptrOffsets(void) const
ExaminerStatusType errorsForDDU(DDUIdType dduSourceID) const
uint32_t TMB_WordsExpected
std::map< CSCIdType, ExaminerStatusType > statusDetailed(void) const
std::map< DDUIdType, uint32_t > DDU_size(void) const
std::map< DDUIdType, const uint16_t * > DDU_block(void) const
uint32_t CFEB_BSampleCount
ExaminerMaskType getMask() const
std::map< CSCIdType, ExaminerStatusType > bCHAMB_WRN
uint32_t TMB_WordsSinceLastHeader
to decode if zero suppression enabled
std::map< CSCIdType, ExaminerStatusType > warningsDetailed(void) const
void sign(const char *nm)
ExaminerStatusType bERROR
CSCDCCExaminer(ExaminerMaskType mask=0x1)
ExaminerStatusType warningsForDDU(DDUIdType dduSourceID) const
void checkTriggerHeadersAndTrailers()
const char * warningName(int num) const
std::vector< const char * > sWARNING
const char * payloadName(int num) const
std::map< DDUIdType, std::map< CSCIdType, const uint16_t * > > dmbBuffers
ExaminerStatusType warningsForChamber(CSCIdType chamber) const
uint32_t ALCT_WordsSinceLastHeaderZeroSuppressed
void sign(std::string nm)
std::map< CSCIdType, ExaminerStatusType > bCHAMB_STATUS
int32_t check(const uint16_t *&buffer, int32_t length)
const char * wrnName(int num) const
std::map< CSCIdType, ExaminerStatusType > payloadDetailed(void) const
ExaminerMaskType examinerMask
std::map< DDUIdType, const uint16_t * > dduBuffers
void checkDAVs()
checks DAV_ALCT, DAV_TMB, and DAV_CFEB
ExaminerStatusType bWARNING
std::map< DDUIdType, std::map< CSCIdType, uint32_t > > dmbSize
std::map< DDUIdType, ExaminerStatusType > errorsDetailedDDU(void) const
std::vector< const char * > sDMBEventStaus
std::map< DDUIdType, uint32_t > dduOffsets
bool error(int num) const
OStream(std::ostream &str)
void setMask(ExaminerMaskType mask)
std::vector< const char * > sERROR_
std::map< DDUIdType, ExaminerStatusType > bDDU_WRN