107 unsigned int numberOfSeriousErrors = 0;
111 if( isearch != input.
end() ) {
114 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
115 int FedId = di->getFedId();
117 int errorType = di->getType();
118 int TBMType=-1;
int TBMMessage=-1;
int evtSize=-1;
int evtNbr=-1;
int fullType=-1;
125 if(errorType == 32 || errorType == 33 || errorType == 34) {
126 long long errorWord = di->getWord64();
127 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
130 uint32_t errorWord = di->getWord32();
131 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
141 if (NFa==1) fullType = 1; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
142 if (NFb==1) fullType = 2; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
143 if (NFc==1) fullType = 3; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
144 if (NFd==1) fullType = 4; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
145 if (NFe==1) fullType = 5; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
146 if (NF2==1) fullType = 6; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
147 if (L1A==1) fullType = 7; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
158 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
159 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
160 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
161 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
162 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
163 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
174 if (T0==1) TBMMessage=0;
175 if (T1==1) TBMMessage=1;
176 if (T2==1) TBMMessage=2;
177 if (T3==1) TBMMessage=3;
178 if (T4==1) TBMMessage=4;
179 if (T5==1) TBMMessage=5;
180 if (T6==1) TBMMessage=6;
181 if (T7==1) TBMMessage=7;
183 int StateMach_bits = 4;
184 int StateMach_shift = 8;
185 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
186 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
191 case(1) :
case(9) : {
194 case(2) :
case(4) :
case(6) : {
200 default : TBMType = 4;
222 if(errorType == 32 || errorType == 33 || errorType == 34){
223 long long errorWord = di->getWord64();
225 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
227 uint32_t errorWord = di->getWord32();
228 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
238 if (NFa==1) fullType = 1; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
239 if (NFb==1) fullType = 2; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
240 if (NFc==1) fullType = 3; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
241 if (NFd==1) fullType = 4; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
242 if (NFe==1) fullType = 5; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
243 if (NF2==1) fullType = 6; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
244 if (L1A==1) fullType = 7; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
255 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
256 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
257 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
258 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
259 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
260 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
271 if (T0==1) TBMMessage=0;
272 if (T1==1) TBMMessage=1;
273 if (T2==1) TBMMessage=2;
274 if (T3==1) TBMMessage=3;
275 if (T4==1) TBMMessage=4;
276 if (T5==1) TBMMessage=5;
277 if (T6==1) TBMMessage=6;
278 if (T7==1) TBMMessage=7;
279 int StateMach_bits = 4;
280 int StateMach_shift = 8;
281 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
282 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
287 case(1) :
case(9) : {
290 case(2) :
case(4) :
case(6) : {
296 default : TBMType = 4;
317 if(bladeon && endcap){
318 if(errorType == 32 || errorType == 33 || errorType == 34){
319 long long errorWord = di->getWord64();
321 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
323 uint32_t errorWord = di->getWord32();
324 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
334 if (NFa==1) fullType = 1; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
335 if (NFb==1) fullType = 2; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
336 if (NFc==1) fullType = 3; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
337 if (NFd==1) fullType = 4; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
338 if (NFe==1) fullType = 5; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
339 if (NF2==1) fullType = 6; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
340 if (L1A==1) fullType = 7; ((*meMapFEDs)[
"meFullType_"][FedId])->
Fill((
int)fullType);
351 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
352 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
353 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
354 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
355 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
356 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
367 if (T0==1) TBMMessage=0;
368 if (T1==1) TBMMessage=1;
369 if (T2==1) TBMMessage=2;
370 if (T3==1) TBMMessage=3;
371 if (T4==1) TBMMessage=4;
372 if (T5==1) TBMMessage=5;
373 if (T6==1) TBMMessage=6;
374 if (T7==1) TBMMessage=7;
375 int StateMach_bits = 4;
376 int StateMach_shift = 8;
377 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
378 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
383 case(1) :
case(9) : {
386 case(2) :
case(4) :
case(6) : {
392 default : TBMType = 4;
413 if(!(FedId==38&&chanNmbr==7)){
414 if(errorType==29 || (errorType==30 && TBMType==1)){
418 static const char chNfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChNErr_%d";
419 char chNbuf[
sizeof(chNfmt) + 2*32];
420 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
422 if((*meMapFEDs)[
"meFedChNErr_"][FedId]) (*meMapFEDs)[
"meFedChNErr_"][FedId]->Fill(chanNmbr);
424 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErr_%d";
425 char chLbuf[
sizeof(chLfmt) + 2*32];
426 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
428 if((*meMapFEDs)[
"meFedChLErr_"][FedId]) (*meMapFEDs)[
"meFedChLErr_"][FedId]->setBinContent(chanNmbr+1,errorType);
430 numberOfSeriousErrors++;
431 int messageType = 99;
432 if(errorType<30) messageType = errorType-25;
433 else if(errorType>30) messageType = errorType-19;
434 else if(errorType==30 && TBMMessage==0) messageType = errorType-25;
435 else if(errorType==30 && TBMMessage==1) messageType = errorType-24;
436 else if(errorType==30 && (TBMMessage==2 || TBMMessage==3 || TBMMessage==4)) messageType = errorType-23;
437 else if(errorType==30 && TBMMessage==7) messageType = errorType-22;
438 else if(errorType==30 && TBMType==1) messageType = errorType-21;
439 else if(errorType==30 && TBMType==2) messageType = errorType-20;
440 else if(errorType==30 && TBMType==3) messageType = errorType-19;
442 static const char fmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedETypeNErr_%d";
443 char buf[
sizeof(
fmt) + 2*32];
444 sprintf(buf, fmt, FedId, messageType);
446 if((*meMapFEDs)[
"meFedETypeNErr_"][FedId]) (*meMapFEDs)[
"meFedETypeNErr_"][FedId]->Fill(messageType);
450 (*meMapFEDs)[
"meNErrors_"][FedId]->Fill((
int)numberOfSeriousErrors);
451 (*meMapFEDs)[
"meTBMMessage_"][FedId]->Fill((
int)TBMMessage);
452 (*meMapFEDs)[
"meTBMType_"][FedId]->Fill((
int)TBMType);
453 (*meMapFEDs)[
"meErrorType_"][FedId]->Fill((
int)errorType);
454 (*meMapFEDs)[
"meFullType_"][FedId]->Fill((
int)fullType);
455 (*meMapFEDs)[
"meEvtNbr_"][FedId]->setBinContent(1,(
int)evtNbr);
456 (*meMapFEDs)[
"meEvtSize_"][FedId]->setBinContent(1,(
int)evtSize);
460 return numberOfSeriousErrors;
465 unsigned int numberOfSeriousErrors = 0;
468 if( isearch != input.
end() ) {
471 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
472 int FedId = di->getFedId();
475 if(FedId==static_cast<int>(
id_)) {
476 errorType = di->getType();
477 ((*meMapFEDs)[
"meErrorType_"][
id_])->
Fill((
int)errorType);
479 int TBMType=-1;
int TBMMessage=-1;
int evtSize=-1;
int fullType=-1;
483 if((errorType == 32)||(errorType == 33)||(errorType == 34)) {
484 long long errorWord = di->getWord64();
493 if(!(FedId==38&&chanNmbr==7)) ((*meMapFEDs)[
"meEvtSize_"][
id_])->setBinContent(1,(
int)evtSize);
498 uint32_t errorWord = di->getWord32();
500 case(25) :
case(39) : {
511 if (NFa==1) fullType = 1; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
512 if (NFb==1) fullType = 2; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
513 if (NFc==1) fullType = 3; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
514 if (NFd==1) fullType = 4; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
515 if (NFe==1) fullType = 5; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
516 if (NF2==1) fullType = 6; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
517 if (L1A==1) fullType = 7; ((*meMapFEDs)[
"meFullType_"][
id_])->
Fill((
int)fullType);
528 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
529 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
530 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
531 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
532 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
533 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
544 if(!(FedId==38&&chanNmbr==7)){
545 if (T0==1) { TBMMessage=0; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
546 if (T1==1) { TBMMessage=1; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
547 if (T2==1) { TBMMessage=2; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
548 if (T3==1) { TBMMessage=3; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
549 if (T4==1) { TBMMessage=4; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
550 if (T5==1) { TBMMessage=5; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
551 if (T6==1) { TBMMessage=6; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
552 if (T7==1) { TBMMessage=7; ((*meMapFEDs)[
"meTBMMessage_"][
id_])->
Fill((
int)TBMMessage); }
555 int StateMach_bits = 4;
556 int StateMach_shift = 8;
557 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
558 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
563 case(1) :
case(9) : {
566 case(2) :
case(4) :
case(6) : {
572 default : TBMType = 4;
574 if(!(FedId==38&&chanNmbr==7)) ((*meMapFEDs)[
"meTBMType_"][
id_])->
Fill((
int)TBMType);
575 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
579 if(!(FedId==38&&chanNmbr==7))((*meMapFEDs)[
"meEvtNbr_"][
id_])->setBinContent(1,(
int)evtNbr);
580 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
582 case(35) :
case(36) :
case(37) :
case(38) : {
583 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
590 if(errorType==29 || (errorType==30 && TBMType==1)){
591 if(!(FedId==38&&chanNmbr==7)){
594 static const char chNfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChNErr_%d";
595 char chNbuf[
sizeof(chNfmt) + 2*32];
596 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
598 if((*meMapFEDs)[
"meFedChNErr_"][
id_]) (*meMapFEDs)[
"meFedChNErr_"][
id_]->Fill(chanNmbr);
600 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErr_%d";
601 char chLbuf[
sizeof(chLfmt) + 2*32];
602 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
604 if((*meMapFEDs)[
"meFedChLErr_"][id_]) (*meMapFEDs)[
"meFedChLErr_"][
id_]->setBinContent(chanNmbr+1,errorType);
606 numberOfSeriousErrors++;
607 int messageType = 99;
608 if(errorType<30) messageType = errorType-25;
609 else if(errorType>30) messageType = errorType-19;
610 else if(errorType==30 && TBMMessage==0) messageType = errorType-25;
611 else if(errorType==30 && TBMMessage==1) messageType = errorType-24;
612 else if(errorType==30 && (TBMMessage==2 || TBMMessage==3 || TBMMessage==4)) messageType = errorType-23;
613 else if(errorType==30 && TBMMessage==7) messageType = errorType-22;
614 else if(errorType==30 && TBMType==1) messageType = errorType-21;
615 else if(errorType==30 && TBMType==2) messageType = errorType-20;
616 else if(errorType==30 && TBMType==3) messageType = errorType-19;
618 static const char fmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedETypeNErr_%d";
619 char buf[
sizeof(
fmt) + 2*32];
620 sprintf(buf, fmt, FedId, messageType);
622 if((*meMapFEDs)[
"meFedETypeNErr_"][id_]) (*meMapFEDs)[
"meFedETypeNErr_"][
id_]->Fill(messageType);
628 if(numberOfSeriousErrors>0) ((*meMapFEDs)[
"meNErrors_"][
id_])->
Fill((
float)numberOfSeriousErrors);
633 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