91 std::map<std::string, MonitorElement **> *meMapFEDs,
100 unsigned int numberOfSeriousErrors = 0;
104 if (isearch != input.
end()) {
107 for (di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
108 int FedId = di->getFedId();
110 int errorType = di->getType();
116 bool notReset =
true;
122 if (errorType == 32 || errorType == 33 || errorType == 34) {
123 long long errorWord = di->getWord64();
124 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
128 uint32_t errorWord = di->getWord32();
129 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
143 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
147 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
151 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
155 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
159 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
163 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
167 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
180 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
181 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
182 int localCH = 1 * CH1 + 2 * CH2 + 3 * CH3 + 4 * CH4 + 5 * CH5;
184 chanNmbr = (BLOCK / 2) * 9 + localCH;
186 chanNmbr = ((BLOCK - 1) / 2) * 9 + 4 + localCH;
187 if ((chanNmbr < 1) || (chanNmbr > 36))
216 if (TBMMessage == 5 || TBMMessage == 6)
218 int StateMach_bits = 4;
219 int StateMach_shift = 8;
220 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
221 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
270 if (ladon && barrel) {
271 if (errorType == 32 || errorType == 33 || errorType == 34) {
272 long long errorWord = di->getWord64();
275 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
277 uint32_t errorWord = di->getWord32();
278 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
291 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
295 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
299 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
303 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
307 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
311 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
315 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
328 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
329 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
330 int localCH = 1 * CH1 + 2 * CH2 + 3 * CH3 + 4 * CH4 + 5 * CH5;
332 chanNmbr = (BLOCK / 2) * 9 + localCH;
334 chanNmbr = ((BLOCK - 1) / 2) * 9 + 4 + localCH;
335 if ((chanNmbr < 1) || (chanNmbr > 36))
364 int StateMach_bits = 4;
365 int StateMach_shift = 8;
366 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
367 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
416 if (bladeon && endcap) {
417 if (errorType == 32 || errorType == 33 || errorType == 34) {
418 long long errorWord = di->getWord64();
421 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
423 uint32_t errorWord = di->getWord32();
424 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
437 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
441 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
445 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
449 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
453 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
457 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
461 ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
474 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
475 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
476 int localCH = 1 * CH1 + 2 * CH2 + 3 * CH3 + 4 * CH4 + 5 * CH5;
478 chanNmbr = (BLOCK / 2) * 9 + localCH;
480 chanNmbr = ((BLOCK - 1) / 2) * 9 + 4 + localCH;
481 if ((chanNmbr < 1) || (chanNmbr > 36))
510 int StateMach_bits = 4;
511 int StateMach_shift = 8;
512 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
513 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
564 if (!(errorType == 30) || notReset) {
566 static const char chNfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChNErr_%d";
567 char chNbuf[
sizeof(chNfmt) + 2 * 32];
568 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
570 if ((*meMapFEDs)[
"meFedChNErr_"][FedId])
571 (*meMapFEDs)[
"meFedChNErr_"][FedId]->Fill(chanNmbr);
573 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErr_%d";
574 char chLbuf[
sizeof(chLfmt) + 2 * 32];
575 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
577 if ((*meMapFEDs)[
"meFedChLErr_"][FedId])
578 (*meMapFEDs)[
"meFedChLErr_"][FedId]->setBinContent(chanNmbr + 1, errorType);
580 numberOfSeriousErrors++;
581 int messageType = 99;
583 messageType = errorType - 25;
584 else if (errorType > 30)
585 messageType = errorType - 19;
586 else if (errorType == 30 && TBMMessage == 0)
587 messageType = errorType - 25;
588 else if (errorType == 30 && TBMMessage == 1)
589 messageType = errorType - 24;
590 else if (errorType == 30 && (TBMMessage == 2 || TBMMessage == 3 || TBMMessage == 4))
591 messageType = errorType - 23;
592 else if (errorType == 30 && TBMMessage == 7)
593 messageType = errorType - 22;
594 else if (errorType == 30 && TBMType == 1)
595 messageType = errorType - 21;
596 else if (errorType == 30 && TBMType == 2)
597 messageType = errorType - 20;
598 else if (errorType == 30 && TBMType == 3)
599 messageType = errorType - 19;
600 if (messageType <= 20) {
601 static const char fmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedETypeNErr_%d";
602 char buf[
sizeof(fmt) + 2 * 32];
603 sprintf(buf, fmt, FedId, messageType);
605 if ((*meMapFEDs)[
"meFedETypeNErr_"][FedId])
606 (*meMapFEDs)[
"meFedETypeNErr_"][FedId]->Fill(messageType);
610 (*meMapFEDs)[
"meNErrors_"][FedId]->Fill((
int)numberOfSeriousErrors);
611 (*meMapFEDs)[
"meTBMMessage_"][FedId]->Fill((
int)TBMMessage);
612 (*meMapFEDs)[
"meTBMType_"][FedId]->Fill((
int)TBMType);
613 (*meMapFEDs)[
"meErrorType_"][FedId]->Fill((
int)errorType);
614 (*meMapFEDs)[
"meFullType_"][FedId]->Fill((
int)fullType);
615 (*meMapFEDs)[
"meEvtNbr_"][FedId]->setBinContent(1, (
int)evtNbr);
616 (*meMapFEDs)[
"meEvtSize_"][FedId]->setBinContent(1, (
int)evtSize);
619 return numberOfSeriousErrors;
623 std::map<std::string, MonitorElement **> *meMapFEDs) {
624 unsigned int numberOfSeriousErrors = 0;
627 if (isearch != input.
end()) {
630 for (di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
631 int FedId = di->getFedId();
634 if (FedId == static_cast<int>(
id_)) {
635 errorType = di->getType();
636 ((*meMapFEDs)[
"meErrorType_"][
id_])->
Fill((
int)errorType);
637 bool notReset =
true;
645 if ((errorType == 32) || (errorType == 33) || (errorType == 34)) {
646 long long errorWord = di->getWord64();
658 ((*meMapFEDs)[
"meEvtSize_"][
id_])->setBinContent(1, (
int)evtSize);
665 uint32_t errorWord = di->getWord32();
683 ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
687 ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
691 ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
695 ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
699 ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
703 ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
707 ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
720 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
721 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
722 int localCH = 1 * CH1 + 2 * CH2 + 3 * CH3 + 4 * CH4 + 5 * CH5;
724 chanNmbr = (BLOCK / 2) * 9 + localCH;
726 chanNmbr = ((BLOCK - 1) / 2) * 9 + 4 + localCH;
727 if ((chanNmbr < 1) || (chanNmbr > 36))
740 if (!(FedId == 38 && chanNmbr == 7)) {
743 ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage);
747 ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage);
751 ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage);
755 ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage);
759 ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage);
763 ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage);
767 ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage);
771 ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage);
774 if (TBMMessage == 5 || TBMMessage == 6)
776 int StateMach_bits = 4;
777 int StateMach_shift = 8;
778 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
779 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
803 if (!(FedId == 38 && chanNmbr == 7))
804 ((*meMapFEDs)[
"meTBMType_"][
id_])->
Fill((
int)TBMType);
805 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
810 if (!(FedId == 38 && chanNmbr == 7))
811 ((*meMapFEDs)[
"meEvtNbr_"][
id_])->setBinContent(1, (
int)evtNbr);
812 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
819 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
827 if (!(errorType == 30) || notReset) {
829 static const char chNfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChNErr_%d";
830 char chNbuf[
sizeof(chNfmt) + 2 * 32];
831 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
833 if ((*meMapFEDs)[
"meFedChNErr_"][
id_])
834 (*meMapFEDs)[
"meFedChNErr_"][
id_]->Fill(chanNmbr);
836 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErr_%d";
837 char chLbuf[
sizeof(chLfmt) + 2 * 32];
838 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
840 if ((*meMapFEDs)[
"meFedChLErr_"][id_])
841 (*meMapFEDs)[
"meFedChLErr_"][
id_]->setBinContent(chanNmbr + 1, errorType);
843 numberOfSeriousErrors++;
844 int messageType = 99;
846 messageType = errorType - 25;
847 else if (errorType > 30)
848 messageType = errorType - 19;
849 else if (errorType == 30 && TBMMessage == 0)
850 messageType = errorType - 25;
851 else if (errorType == 30 && TBMMessage == 1)
852 messageType = errorType - 24;
853 else if (errorType == 30 && (TBMMessage == 2 || TBMMessage == 3 || TBMMessage == 4))
854 messageType = errorType - 23;
855 else if (errorType == 30 && TBMMessage == 7)
856 messageType = errorType - 22;
857 else if (errorType == 30 && TBMType == 1)
858 messageType = errorType - 21;
859 else if (errorType == 30 && TBMType == 2)
860 messageType = errorType - 20;
861 else if (errorType == 30 && TBMType == 3)
862 messageType = errorType - 19;
863 if (messageType <= 20) {
864 static const char fmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedETypeNErr_%d";
865 char buf[
sizeof(fmt) + 2 * 32];
866 sprintf(buf, fmt, FedId, messageType);
868 if ((*meMapFEDs)[
"meFedETypeNErr_"][id_])
869 (*meMapFEDs)[
"meFedETypeNErr_"][
id_]->Fill(messageType);
874 if (numberOfSeriousErrors > 0)
875 ((*meMapFEDs)[
"meNErrors_"][
id_])->
Fill((
float)numberOfSeriousErrors);
877 return numberOfSeriousErrors;
iterator find(det_id_type id)
static const int DB6_shift
static const int PXID_bits
static const int LINK_bits
static const int DB3_shift
void book(const edm::ParameterSet &iConfig, DQMStore::IBooker &, int type=0, bool isUpgrade=false)
Book histograms.
static const int ROC_shift
static const int TRLREND_bits
static const int LINK_shift
static const uint32_t DCOL_mask
int fillFED(const edm::DetSetVector< SiPixelRawDataError > &input, std::map< std::string, MonitorElement ** > *meMapFEDs)
Fill FED histograms.
static std::string const input
int fill(const edm::DetSetVector< SiPixelRawDataError > &input, std::map< std::string, MonitorElement ** > *meMapFEDs, bool modon=true, bool ladon=false, bool bladeon=false)
Fill histograms.
static const uint32_t ADC_mask
static const int TRLRBGN_bits
static const uint32_t DataBit_mask
static const uint32_t ROC_mask
static const uint32_t LINK_mask
static const int DB7_shift
static const int DB5_shift
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static const int ADC_bits
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
~SiPixelRawDataErrorModule()
Destructor.
static const int DataBit_bits
static const int DB1_shift
static const int DCOL_bits
iterator end()
Return the off-the-end iterator.
static const int EVTLGT_shift
SiPixelRawDataErrorModule()
Default constructor.
static const unsigned long long EVTLGT_mask
static const int DB4_shift
static const int TRLRBGN_shift
static const int DB0_shift
static const int DCOL_shift
static const unsigned long long TRLRBGN_mask
static const int PXID_shift
static const int ADC_shift
static const int ROC_bits
static const uint32_t PXID_mask
static const int TRLREND_shift
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
static const unsigned long long TRLREND_mask
static const int EVTLGT_bits
static const int DB2_shift