Fill histograms.
162 unsigned int numberOfSeriousErrors = 0;
166 if( isearch != input.
end() ) {
169 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
170 int FedId = di->getFedId();
172 int errorType = di->getType();
173 int TBMType=-1;
int TBMMessage=-1;
int evtSize=-1;
int evtNbr=-1;
int fullType=-1;
180 if(errorType == 32 || errorType == 33 || errorType == 34) {
181 long long errorWord = di->getWord64();
182 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
185 uint32_t errorWord = di->getWord32();
186 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
213 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
214 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
215 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
216 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
217 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
218 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
229 if (T0==1) TBMMessage=0;
230 if (T1==1) TBMMessage=1;
231 if (T2==1) TBMMessage=2;
232 if (T3==1) TBMMessage=3;
233 if (T4==1) TBMMessage=4;
234 if (T5==1) TBMMessage=5;
235 if (T6==1) TBMMessage=6;
236 if (T7==1) TBMMessage=7;
238 int StateMach_bits = 4;
239 int StateMach_shift = 8;
240 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
241 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
246 case(1) :
case(9) : {
249 case(2) :
case(4) :
case(6) : {
255 default : TBMType = 4;
277 if(errorType == 32 || errorType == 33 || errorType == 34){
278 long long errorWord = di->getWord64();
280 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
282 uint32_t errorWord = di->getWord32();
283 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
310 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
311 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
312 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
313 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
314 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
315 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
326 if (T0==1) TBMMessage=0;
327 if (T1==1) TBMMessage=1;
328 if (T2==1) TBMMessage=2;
329 if (T3==1) TBMMessage=3;
330 if (T4==1) TBMMessage=4;
331 if (T5==1) TBMMessage=5;
332 if (T6==1) TBMMessage=6;
333 if (T7==1) TBMMessage=7;
334 int StateMach_bits = 4;
335 int StateMach_shift = 8;
336 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
337 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
342 case(1) :
case(9) : {
345 case(2) :
case(4) :
case(6) : {
351 default : TBMType = 4;
372 if(bladeon && endcap){
373 if(errorType == 32 || errorType == 33 || errorType == 34){
374 long long errorWord = di->getWord64();
376 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
378 uint32_t errorWord = di->getWord32();
379 chanNmbr = (errorWord >>
LINK_shift) & LINK_mask;
406 uint32_t BLOCK_mask = ~(~uint32_t(0) << BLOCK_bits);
407 int BLOCK = (errorWord >> BLOCK_shift) & BLOCK_mask;
408 int localCH = 1*CH1+2*CH2+3*CH3+4*CH4+5*CH5;
409 if (BLOCK%2==0) chanNmbr=(BLOCK/2)*9+localCH;
410 else chanNmbr = ((BLOCK-1)/2)*9+4+localCH;
411 if ((chanNmbr<1)||(chanNmbr>36)) chanNmbr=0;
422 if (T0==1) TBMMessage=0;
423 if (T1==1) TBMMessage=1;
424 if (T2==1) TBMMessage=2;
425 if (T3==1) TBMMessage=3;
426 if (T4==1) TBMMessage=4;
427 if (T5==1) TBMMessage=5;
428 if (T6==1) TBMMessage=6;
429 if (T7==1) TBMMessage=7;
430 int StateMach_bits = 4;
431 int StateMach_shift = 8;
432 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
433 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
438 case(1) :
case(9) : {
441 case(2) :
case(4) :
case(6) : {
447 default : TBMType = 4;
468 if(!(FedId==38&&chanNmbr==7)){
469 if(errorType==29 || (errorType==30 && TBMType==1)){
473 static const char chNfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChNErrArray_%d";
474 char chNbuf[
sizeof(chNfmt) + 2*32];
475 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
480 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErrArray_%d";
481 char chLbuf[
sizeof(chLfmt) + 2*32];
482 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
487 numberOfSeriousErrors++;
488 int messageType = 99;
489 if(errorType<30) messageType = errorType-25;
490 else if(errorType>30) messageType = errorType-19;
491 else if(errorType==30 && TBMMessage==0) messageType = errorType-25;
492 else if(errorType==30 && TBMMessage==1) messageType = errorType-24;
493 else if(errorType==30 && (TBMMessage==2 || TBMMessage==3 || TBMMessage==4)) messageType = errorType-23;
494 else if(errorType==30 && TBMMessage==7) messageType = errorType-22;
495 else if(errorType==30 && TBMType==1) messageType = errorType-21;
496 else if(errorType==30 && TBMType==2) messageType = errorType-20;
497 else if(errorType==30 && TBMType==3) messageType = errorType-19;
499 static const char fmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedETypeNErrArray_%d";
500 char buf[
sizeof(
fmt) + 2*32];
501 sprintf(buf, fmt, FedId, messageType);
508 std::string currDir = theDMBE->pwd();
509 static const char buf[] =
"Pixel/AdditionalPixelErrors/FED_%d";
510 char feddir[
sizeof(buf)+2];
511 sprintf(feddir,buf,FedId);
514 static const char buf1[] =
"Pixel/AdditionalPixelErrors/FED_%d/NErrors_siPixelDigis_%d";
515 char hname1[
sizeof(buf1)+4];
516 sprintf(hname1,buf1,FedId,FedId);
517 me = theDMBE->get(hname1);
518 if(me) me->
Fill((
int)numberOfSeriousErrors);
519 static const char buf2[] =
"Pixel/AdditionalPixelErrors/FED_%d/TBMMessage_siPixelDigis_%d";
520 char hname2[
sizeof(buf2)+4];
521 sprintf(hname2,buf2,FedId,FedId);
522 me = theDMBE->get(hname2);
523 if(me) me->
Fill((
int)TBMMessage);
524 static const char buf3[] =
"Pixel/AdditionalPixelErrors/FED_%d/TBMType_siPixelDigis_%d";
525 char hname3[
sizeof(buf3)+4];
526 sprintf(hname3,buf3,FedId,FedId);
527 me = theDMBE->get(hname3);
528 if(me) me->
Fill((
int)TBMType);
529 static const char buf4[] =
"Pixel/AdditionalPixelErrors/FED_%d/errorType_siPixelDigis_%d";
530 char hname4[
sizeof(buf4)+4];
531 sprintf(hname4,buf4,FedId,FedId);
532 me = theDMBE->get(hname4);
533 if(me) me->
Fill((
int)errorType);
534 static const char buf5[] =
"Pixel/AdditionalPixelErrors/FED_%d/fullType_siPixelDigis_%d";
535 char hname5[
sizeof(buf5)+4];
536 sprintf(hname5,buf5,FedId,FedId);
537 me = theDMBE->get(hname5);
538 if(me) me->
Fill((
int)fullType);
539 static const char buf6[] =
"Pixel/AdditionalPixelErrors/FED_%d/EvtNbr_siPixelDigis_%d";
540 char hname6[
sizeof(buf6)+4];
541 sprintf(hname6,buf6,FedId,FedId);
542 me = theDMBE->get(hname6);
543 if(me) me->
Fill((
int)evtNbr);
544 static const char buf7[] =
"Pixel/AdditionalPixelErrors/FED_%d/evtSize_siPixelDigis_%d";
545 char hname7[
sizeof(buf7)+4];
546 sprintf(hname7,buf7,FedId,FedId);
547 me = theDMBE->get(hname7);
548 if(me) me->
Fill((
int)evtSize);
549 theDMBE->cd(currDir);
554 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
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
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