Fill histograms.
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;
iterator find(det_id_type id)
static const int DB6_shift
static const int LINK_bits
static const int DB3_shift
static const int LINK_shift
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)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static const int DB1_shift
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