106 unsigned int numberOfSeriousErrors = 0;
110 if( isearch != input.
end() ) {
113 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
114 int FedId = di->getFedId();
116 int errorType = di->getType();
117 int TBMType=-1;
int TBMMessage=-1;
int evtSize=-1;
int evtNbr=-1;
int fullType=-1;
118 bool notReset =
true;
124 if(errorType == 32 || errorType == 33 || errorType == 34) {
125 long long errorWord = di->getWord64();
126 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
129 uint32_t errorWord = di->getWord32();
130 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
140 if (NFa==1) fullType = 1; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
141 if (NFb==1) fullType = 2; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
142 if (NFc==1) fullType = 3; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
143 if (NFd==1) fullType = 4; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
144 if (NFe==1) fullType = 5; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
145 if (NF2==1) fullType = 6; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
146 if (L1A==1) fullType = 7; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
157 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
158 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
159 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
160 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
161 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
162 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
173 if (T0==1) TBMMessage=0;
174 if (T1==1) TBMMessage=1;
175 if (T2==1) TBMMessage=2;
176 if (T3==1) TBMMessage=3;
177 if (T4==1) TBMMessage=4;
178 if (T5==1) TBMMessage=5;
179 if (T6==1) TBMMessage=6;
180 if (T7==1) TBMMessage=7;
181 if(TBMMessage==5 || TBMMessage==6) notReset=
false;
182 int StateMach_bits = 4;
183 int StateMach_shift = 8;
184 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
185 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
190 case(1) :
case(9) : {
193 case(2) :
case(4) :
case(6) : {
199 default : TBMType = 4;
221 if(errorType == 32 || errorType == 33 || errorType == 34){
222 long long errorWord = di->getWord64();
224 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
226 uint32_t errorWord = di->getWord32();
227 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
237 if (NFa==1) fullType = 1; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
238 if (NFb==1) fullType = 2; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
239 if (NFc==1) fullType = 3; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
240 if (NFd==1) fullType = 4; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
241 if (NFe==1) fullType = 5; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
242 if (NF2==1) fullType = 6; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
243 if (L1A==1) fullType = 7; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
254 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
255 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
256 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
257 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
258 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
259 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
270 if (T0==1) TBMMessage=0;
271 if (T1==1) TBMMessage=1;
272 if (T2==1) TBMMessage=2;
273 if (T3==1) TBMMessage=3;
274 if (T4==1) TBMMessage=4;
275 if (T5==1) TBMMessage=5;
276 if (T6==1) TBMMessage=6;
277 if (T7==1) TBMMessage=7;
278 int StateMach_bits = 4;
279 int StateMach_shift = 8;
280 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
281 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
286 case(1) :
case(9) : {
289 case(2) :
case(4) :
case(6) : {
295 default : TBMType = 4;
316 if(bladeon && endcap){
317 if(errorType == 32 || errorType == 33 || errorType == 34){
318 long long errorWord = di->getWord64();
320 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
322 uint32_t errorWord = di->getWord32();
323 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
333 if (NFa==1) fullType = 1; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
334 if (NFb==1) fullType = 2; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
335 if (NFc==1) fullType = 3; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
336 if (NFd==1) fullType = 4; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
337 if (NFe==1) fullType = 5; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
338 if (NF2==1) fullType = 6; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
339 if (L1A==1) fullType = 7; ((*meMapFEDs)[
"meFullType_"][
FedId])->
Fill((
int)fullType);
350 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
351 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
352 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
353 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
354 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
355 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
366 if (T0==1) TBMMessage=0;
367 if (T1==1) TBMMessage=1;
368 if (T2==1) TBMMessage=2;
369 if (T3==1) TBMMessage=3;
370 if (T4==1) TBMMessage=4;
371 if (T5==1) TBMMessage=5;
372 if (T6==1) TBMMessage=6;
373 if (T7==1) TBMMessage=7;
374 int StateMach_bits = 4;
375 int StateMach_shift = 8;
376 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
377 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
382 case(1) :
case(9) : {
385 case(2) :
case(4) :
case(6) : {
391 default : TBMType = 4;
413 if(!(errorType==30) || notReset){
415 static const char chNfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChNErr_%d";
416 char chNbuf[
sizeof(chNfmt) + 2*32];
417 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
419 if((*meMapFEDs)[
"meFedChNErr_"][FedId]) (*meMapFEDs)[
"meFedChNErr_"][
FedId]->Fill(chanNmbr);
421 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErr_%d";
422 char chLbuf[
sizeof(chLfmt) + 2*32];
423 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
425 if((*meMapFEDs)[
"meFedChLErr_"][FedId]) (*meMapFEDs)[
"meFedChLErr_"][
FedId]->setBinContent(chanNmbr+1,errorType);
427 numberOfSeriousErrors++;
428 int messageType = 99;
429 if(errorType<30) messageType = errorType-25;
430 else if(errorType>30) messageType = errorType-19;
431 else if(errorType==30 && TBMMessage==0) messageType = errorType-25;
432 else if(errorType==30 && TBMMessage==1) messageType = errorType-24;
433 else if(errorType==30 && (TBMMessage==2 || TBMMessage==3 || TBMMessage==4)) messageType = errorType-23;
434 else if(errorType==30 && TBMMessage==7) messageType = errorType-22;
435 else if(errorType==30 && TBMType==1) messageType = errorType-21;
436 else if(errorType==30 && TBMType==2) messageType = errorType-20;
437 else if(errorType==30 && TBMType==3) messageType = errorType-19;
439 static const char fmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedETypeNErr_%d";
440 char buf[
sizeof(
fmt) + 2*32];
441 sprintf(buf, fmt, FedId, messageType);
443 if((*meMapFEDs)[
"meFedETypeNErr_"][FedId]) (*meMapFEDs)[
"meFedETypeNErr_"][
FedId]->Fill(messageType);
447 (*meMapFEDs)[
"meNErrors_"][
FedId]->Fill((
int)numberOfSeriousErrors);
448 (*meMapFEDs)[
"meTBMMessage_"][
FedId]->Fill((
int)TBMMessage);
449 (*meMapFEDs)[
"meTBMType_"][
FedId]->Fill((
int)TBMType);
450 (*meMapFEDs)[
"meErrorType_"][
FedId]->Fill((
int)errorType);
451 (*meMapFEDs)[
"meFullType_"][
FedId]->Fill((
int)fullType);
452 (*meMapFEDs)[
"meEvtNbr_"][
FedId]->setBinContent(1,(
int)evtNbr);
453 (*meMapFEDs)[
"meEvtSize_"][
FedId]->setBinContent(1,(
int)evtSize);
456 return numberOfSeriousErrors;
460 unsigned int numberOfSeriousErrors = 0;
463 if( isearch != input.
end() ) {
466 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
467 int FedId = di->getFedId();
470 if(FedId==static_cast<int>(
id_)) {
471 errorType = di->getType();
472 ((*meMapFEDs)[
"meErrorType_"][
id_])->
Fill((
int)errorType);
474 int TBMType=-1;
int TBMMessage=-1;
int evtSize=-1;
int fullType=-1;
478 if((errorType == 32)||(errorType == 33)||(errorType == 34)) {
479 long long errorWord = di->getWord64();
488 ((*meMapFEDs)[
"meEvtSize_"][
id_])->setBinContent(1,(
int)evtSize);
493 uint32_t errorWord = di->getWord32();
495 case(25) :
case(39) : {
506 if (NFa==1) fullType = 1; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
507 if (NFb==1) fullType = 2; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
508 if (NFc==1) fullType = 3; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
509 if (NFd==1) fullType = 4; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
510 if (NFe==1) fullType = 5; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
511 if (NF2==1) fullType = 6; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
512 if (L1A==1) fullType = 7; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
523 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
524 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
525 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
526 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
527 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
528 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
539 if(!(FedId==38&&chanNmbr==7)){
540 if (T0==1) { TBMMessage=0; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
541 if (T1==1) { TBMMessage=1; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
542 if (T2==1) { TBMMessage=2; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
543 if (T3==1) { TBMMessage=3; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
544 if (T4==1) { TBMMessage=4; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
545 if (T5==1) { TBMMessage=5; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
546 if (T6==1) { TBMMessage=6; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
547 if (T7==1) { TBMMessage=7; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
549 if(TBMMessage==5 || TBMMessage==6) notReset=
false;
550 int StateMach_bits = 4;
551 int StateMach_shift = 8;
552 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
553 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
558 case(1) :
case(9) : {
561 case(2) :
case(4) :
case(6) : {
567 default : TBMType = 4;
569 if(!(FedId==38&&chanNmbr==7)) ((*meMapFEDs)[
"meTBMType_"][
id_])->
Fill((
int)TBMType);
570 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
574 if(!(FedId==38&&chanNmbr==7))((*meMapFEDs)[
"meEvtNbr_"][
id_])->setBinContent(1,(
int)evtNbr);
575 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
577 case(35) :
case(36) :
case(37) :
case(38) : {
578 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
584 if(!(errorType==30) || notReset){
586 static const char chNfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChNErr_%d";
587 char chNbuf[
sizeof(chNfmt) + 2*32];
588 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
590 if((*meMapFEDs)[
"meFedChNErr_"][
id_]) (*meMapFEDs)[
"meFedChNErr_"][
id_]->Fill(chanNmbr);
592 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErr_%d";
593 char chLbuf[
sizeof(chLfmt) + 2*32];
594 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
596 if((*meMapFEDs)[
"meFedChLErr_"][id_]) (*meMapFEDs)[
"meFedChLErr_"][
id_]->setBinContent(chanNmbr+1,errorType);
598 numberOfSeriousErrors++;
599 int messageType = 99;
600 if(errorType<30) messageType = errorType-25;
601 else if(errorType>30) messageType = errorType-19;
602 else if(errorType==30 && TBMMessage==0) messageType = errorType-25;
603 else if(errorType==30 && TBMMessage==1) messageType = errorType-24;
604 else if(errorType==30 && (TBMMessage==2 || TBMMessage==3 || TBMMessage==4)) messageType = errorType-23;
605 else if(errorType==30 && TBMMessage==7) messageType = errorType-22;
606 else if(errorType==30 && TBMType==1) messageType = errorType-21;
607 else if(errorType==30 && TBMType==2) messageType = errorType-20;
608 else if(errorType==30 && TBMType==3) messageType = errorType-19;
610 static const char fmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedETypeNErr_%d";
611 char buf[
sizeof(
fmt) + 2*32];
612 sprintf(buf, fmt, FedId, messageType);
614 if((*meMapFEDs)[
"meFedETypeNErr_"][id_]) (*meMapFEDs)[
"meFedETypeNErr_"][
id_]->Fill(messageType);
619 if(numberOfSeriousErrors>0) ((*meMapFEDs)[
"meNErrors_"][
id_])->
Fill((
float)numberOfSeriousErrors);
621 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 long long TRLRBGN_mask
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 long long TRLREND_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
~SiPixelRawDataErrorModule()
Destructor.
static const int DataBit_bits
static const int DB1_shift
static const int DCOL_bits
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
iterator end()
Return the off-the-end iterator.
static const int EVTLGT_shift
SiPixelRawDataErrorModule()
Default constructor.
static const int DB4_shift
static const int TRLRBGN_shift
static const int DB0_shift
static const int DCOL_shift
static const long long EVTLGT_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 int EVTLGT_bits
static const int DB2_shift