Fill histograms.
158 bool isHalfModule =
false;
159 uint32_t DBladder = 0;
170 unsigned int numberOfSeriousErrors = 0;
174 if( isearch != input.
end() ) {
177 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
178 int FedId = di->getFedId();
180 int errorType = di->getType();
181 int TBMType=-1;
int TBMMessage=-1;
int evtSize=-1;
int evtNbr=-1;
int fullType=-1;
182 bool notReset =
true;
188 if(errorType == 32 || errorType == 33 || errorType == 34) {
189 long long errorWord = di->getWord64();
190 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
193 uint32_t errorWord = di->getWord32();
194 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
221 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
222 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
223 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
224 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
225 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
226 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
237 if (T0==1) TBMMessage=0;
238 if (T1==1) TBMMessage=1;
239 if (T2==1) TBMMessage=2;
240 if (T3==1) TBMMessage=3;
241 if (T4==1) TBMMessage=4;
242 if (T5==1) TBMMessage=5;
243 if (T6==1) TBMMessage=6;
244 if (T7==1) TBMMessage=7;
245 if(TBMMessage==5 || TBMMessage==6) notReset=
false;
246 int StateMach_bits = 4;
247 int StateMach_shift = 8;
248 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
249 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
254 case(1) :
case(9) : {
257 case(2) :
case(4) :
case(6) : {
263 default : TBMType = 4;
285 if(errorType == 32 || errorType == 33 || errorType == 34){
286 long long errorWord = di->getWord64();
288 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
290 uint32_t errorWord = di->getWord32();
291 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
318 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
319 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
320 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
321 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
322 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
323 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
334 if (T0==1) TBMMessage=0;
335 if (T1==1) TBMMessage=1;
336 if (T2==1) TBMMessage=2;
337 if (T3==1) TBMMessage=3;
338 if (T4==1) TBMMessage=4;
339 if (T5==1) TBMMessage=5;
340 if (T6==1) TBMMessage=6;
341 if (T7==1) TBMMessage=7;
342 int StateMach_bits = 4;
343 int StateMach_shift = 8;
344 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
345 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
350 case(1) :
case(9) : {
353 case(2) :
case(4) :
case(6) : {
359 default : TBMType = 4;
380 if(bladeon && endcap){
381 if(errorType == 32 || errorType == 33 || errorType == 34){
382 long long errorWord = di->getWord64();
384 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
386 uint32_t errorWord = di->getWord32();
387 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
414 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
415 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
416 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
417 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
418 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
419 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
430 if (T0==1) TBMMessage=0;
431 if (T1==1) TBMMessage=1;
432 if (T2==1) TBMMessage=2;
433 if (T3==1) TBMMessage=3;
434 if (T4==1) TBMMessage=4;
435 if (T5==1) TBMMessage=5;
436 if (T6==1) TBMMessage=6;
437 if (T7==1) TBMMessage=7;
438 int StateMach_bits = 4;
439 int StateMach_shift = 8;
440 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
441 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
446 case(1) :
case(9) : {
449 case(2) :
case(4) :
case(6) : {
455 default : TBMType = 4;
476 if(!(FedId==38&&chanNmbr==7)){
477 if(!(errorType==30) || notReset){
479 static const char chNfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChNErrArray_%d";
480 char chNbuf[
sizeof(chNfmt) + 2*32];
481 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
486 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErrArray_%d";
487 char chLbuf[
sizeof(chLfmt) + 2*32];
488 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
493 numberOfSeriousErrors++;
494 int messageType = 99;
495 if(errorType<30) messageType = errorType-25;
496 else if(errorType>30) messageType = errorType-19;
497 else if(errorType==30 && TBMMessage==0) messageType = errorType-25;
498 else if(errorType==30 && TBMMessage==1) messageType = errorType-24;
499 else if(errorType==30 && (TBMMessage==2 || TBMMessage==3 || TBMMessage==4)) messageType = errorType-23;
500 else if(errorType==30 && TBMMessage==7) messageType = errorType-22;
501 else if(errorType==30 && TBMType==1) messageType = errorType-21;
502 else if(errorType==30 && TBMType==2) messageType = errorType-20;
503 else if(errorType==30 && TBMType==3) messageType = errorType-19;
505 static const char fmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedETypeNErrArray_%d";
506 char buf[
sizeof(fmt) + 2*32];
507 sprintf(buf, fmt, FedId, messageType);
514 std::string currDir = theDMBE->pwd();
515 static const char buf[] =
"Pixel/AdditionalPixelErrors/FED_%d";
516 char feddir[
sizeof(buf)+2];
517 sprintf(feddir,buf,FedId);
520 static const char buf1[] =
"Pixel/AdditionalPixelErrors/FED_%d/NErrors_siPixelDigis_%d";
521 char hname1[
sizeof(buf1)+4];
522 sprintf(hname1,buf1,FedId,FedId);
523 me = theDMBE->get(hname1);
524 if(me) me->
Fill((
int)numberOfSeriousErrors);
525 static const char buf2[] =
"Pixel/AdditionalPixelErrors/FED_%d/TBMMessage_siPixelDigis_%d";
526 char hname2[
sizeof(buf2)+4];
527 sprintf(hname2,buf2,FedId,FedId);
528 me = theDMBE->get(hname2);
529 if(me) me->
Fill((
int)TBMMessage);
530 static const char buf3[] =
"Pixel/AdditionalPixelErrors/FED_%d/TBMType_siPixelDigis_%d";
531 char hname3[
sizeof(buf3)+4];
532 sprintf(hname3,buf3,FedId,FedId);
533 me = theDMBE->get(hname3);
534 if(me) me->
Fill((
int)TBMType);
535 static const char buf4[] =
"Pixel/AdditionalPixelErrors/FED_%d/errorType_siPixelDigis_%d";
536 char hname4[
sizeof(buf4)+4];
537 sprintf(hname4,buf4,FedId,FedId);
538 me = theDMBE->get(hname4);
539 if(me) me->
Fill((
int)errorType);
540 static const char buf5[] =
"Pixel/AdditionalPixelErrors/FED_%d/fullType_siPixelDigis_%d";
541 char hname5[
sizeof(buf5)+4];
542 sprintf(hname5,buf5,FedId,FedId);
543 me = theDMBE->get(hname5);
544 if(me) me->
Fill((
int)fullType);
545 static const char buf6[] =
"Pixel/AdditionalPixelErrors/FED_%d/EvtNbr_siPixelDigis_%d";
546 char hname6[
sizeof(buf6)+4];
547 sprintf(hname6,buf6,FedId,FedId);
548 me = theDMBE->get(hname6);
549 if(me) me->
Fill((
int)evtNbr);
550 static const char buf7[] =
"Pixel/AdditionalPixelErrors/FED_%d/evtSize_siPixelDigis_%d";
551 char hname7[
sizeof(buf7)+4];
552 sprintf(hname7,buf7,FedId,FedId);
553 me = theDMBE->get(hname7);
554 if(me) me->
Fill((
int)evtSize);
555 theDMBE->cd(currDir);
560 return numberOfSeriousErrors;
MonitorElement * meFullType_
iterator find(det_id_type id)
MonitorElement * meFedChLErrArray_[37]
static const int DB6_shift
static const int LINK_bits
MonitorElement * meFedChNErrArray_[37]
static const int DB3_shift
static const int LINK_shift
MonitorElement * meFedETypeNErrArray_[21]
static const uint32_t ADC_mask
static const uint32_t DataBit_mask
static const uint32_t LINK_mask
static const int DB7_shift
bool isHalfModule() const
full or half module
static const int DB5_shift
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static const int DB1_shift
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
static const int DB4_shift
int ladderName() const
ladder id (index in phi)
static const int DB0_shift
static const long long EVTLGT_mask
static const int ADC_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 DB2_shift