Fill histograms.
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/FedChNErrArray_%d";
419 char chNbuf[
sizeof(chNfmt) + 2*32];
420 sprintf(chNbuf, chNfmt, FedId, chanNmbr);
422 if((*meMapFEDs)[
"meFedChNErrArray_"][FedId*37 + chanNmbr]) (*meMapFEDs)[
"meFedChNErrArray_"][FedId*37 + chanNmbr]->Fill((*meMapFEDs)[
"meFedChNErrArray_"][FedId*37 + chanNmbr]->getIntValue()+1);
424 static const char chLfmt[] =
"Pixel/AdditionalPixelErrors/FED_%d/FedChLErrArray_%d";
425 char chLbuf[
sizeof(chLfmt) + 2*32];
426 sprintf(chLbuf, chLfmt, FedId, chanNmbr);
428 if((*meMapFEDs)[
"meFedChLErrArray_"][FedId*37 + chanNmbr]) (*meMapFEDs)[
"meFedChLErrArray_"][FedId*37 + chanNmbr]->Fill(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/FedETypeNErrArray_%d";
443 char buf[
sizeof(
fmt) + 2*32];
444 sprintf(buf, fmt, FedId, messageType);
446 if((*meMapFEDs)[
"meFedETypeNErrArray_"][FedId*21+messageType]) (*meMapFEDs)[
"meFedETypeNErrArray_"][FedId*21+messageType]->Fill((*meMapFEDs)[
"meFedETypeNErrArray_"][FedId*21+messageType]->getIntValue()+1);
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]->Fill((
int)evtNbr);
456 (*meMapFEDs)[
"meEvtSize_"][FedId]->Fill((
int)evtSize);
460 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)
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