5 #include "DQM/SiStripMonitorHardware/interface/FEDHistograms.hh"
9 FEDHistograms::FEDHistograms()
13 FEDHistograms::~FEDHistograms()
18 std::ostringstream* pDebugStream
22 getConfigForHistogram(fedEventSize_,
"FedEventSize",iConfig,pDebugStream);
23 getConfigForHistogram(fedMaxEventSizevsTime_,
"FedMaxEventSizevsTime",iConfig,pDebugStream);
25 getConfigForHistogram(dataPresent_,
"DataPresent",iConfig,pDebugStream);
26 getConfigForHistogram(anyFEDErrors_,
"AnyFEDErrors",iConfig,pDebugStream);
27 getConfigForHistogram(anyDAQProblems_,
"AnyDAQProblems",iConfig,pDebugStream);
28 getConfigForHistogram(anyFEProblems_,
"AnyFEProblems",iConfig,pDebugStream);
29 getConfigForHistogram(corruptBuffers_,
"CorruptBuffers",iConfig,pDebugStream);
30 getConfigForHistogram(badChannelStatusBits_,
"BadChannelStatusBits",iConfig,pDebugStream);
31 getConfigForHistogram(badActiveChannelStatusBits_,
"BadActiveChannelStatusBits",iConfig,pDebugStream);
33 getConfigForHistogram(feOverflows_,
"FEOverflows",iConfig,pDebugStream);
34 getConfigForHistogram(feMissing_,
"FEMissing",iConfig,pDebugStream);
35 getConfigForHistogram(badMajorityAddresses_,
"BadMajorityAddresses",iConfig,pDebugStream);
36 getConfigForHistogram(badMajorityInPartition_,
"BadMajorityInPartition",iConfig,pDebugStream);
37 getConfigForHistogram(feMajFracTIB_,
"FeMajFracTIB",iConfig,pDebugStream);
38 getConfigForHistogram(feMajFracTOB_,
"FeMajFracTOB",iConfig,pDebugStream);
39 getConfigForHistogram(feMajFracTECB_,
"FeMajFracTECB",iConfig,pDebugStream);
40 getConfigForHistogram(feMajFracTECF_,
"FeMajFracTECF",iConfig,pDebugStream);
42 getConfigForHistogram(dataMissing_,
"DataMissing",iConfig,pDebugStream);
43 getConfigForHistogram(badIDs_,
"BadIDs",iConfig,pDebugStream);
44 getConfigForHistogram(badDAQPacket_,
"BadDAQPacket",iConfig,pDebugStream);
45 getConfigForHistogram(invalidBuffers_,
"InvalidBuffers",iConfig,pDebugStream);
46 getConfigForHistogram(badDAQCRCs_,
"BadDAQCRCs",iConfig,pDebugStream);
47 getConfigForHistogram(badFEDCRCs_,
"BadFEDCRCs",iConfig,pDebugStream);
49 getConfigForHistogram(feOverflowDetailed_,
"FEOverflowsDetailed",iConfig,pDebugStream);
50 getConfigForHistogram(feMissingDetailed_,
"FEMissingDetailed",iConfig,pDebugStream);
51 getConfigForHistogram(badMajorityAddressDetailed_,
"BadMajorityAddressesDetailed",iConfig,pDebugStream);
52 getConfigForHistogram(badStatusBitsDetailed_,
"BadAPVStatusBitsDetailed",iConfig,pDebugStream);
53 getConfigForHistogram(apvErrorDetailed_,
"APVErrorBitsDetailed",iConfig,pDebugStream);
54 getConfigForHistogram(apvAddressErrorDetailed_,
"APVAddressErrorBitsDetailed",iConfig,pDebugStream);
55 getConfigForHistogram(unlockedDetailed_,
"UnlockedBitsDetailed",iConfig,pDebugStream);
56 getConfigForHistogram(outOfSyncDetailed_,
"OOSBitsDetailed",iConfig,pDebugStream);
58 getConfigForHistogram(nFEDErrors_,
"nFEDErrors",iConfig,pDebugStream);
59 getConfigForHistogram(nFEDDAQProblems_,
"nFEDDAQProblems",iConfig,pDebugStream);
60 getConfigForHistogram(nFEDsWithFEProblems_,
"nFEDsWithFEProblems",iConfig,pDebugStream);
61 getConfigForHistogram(nFEDCorruptBuffers_,
"nFEDCorruptBuffers",iConfig,pDebugStream);
62 getConfigForHistogram(nBadChannelStatusBits_,
"nBadChannelStatusBits",iConfig,pDebugStream);
63 getConfigForHistogram(nBadActiveChannelStatusBits_,
"nBadActiveChannelStatusBits",iConfig,pDebugStream);
64 getConfigForHistogram(nFEDsWithFEOverflows_,
"nFEDsWithFEOverflows",iConfig,pDebugStream);
65 getConfigForHistogram(nFEDsWithMissingFEs_,
"nFEDsWithMissingFEs",iConfig,pDebugStream);
66 getConfigForHistogram(nFEDsWithFEBadMajorityAddresses_,
"nFEDsWithFEBadMajorityAddresses",iConfig,pDebugStream);
68 getConfigForHistogram(nFEDErrorsvsTime_,
"nFEDErrorsvsTime",iConfig,pDebugStream);
69 getConfigForHistogram(nFEDCorruptBuffersvsTime_,
"nFEDCorruptBuffersvsTime",iConfig,pDebugStream);
70 getConfigForHistogram(nFEDsWithFEProblemsvsTime_,
"nFEDsWithFEProblemsvsTime",iConfig,pDebugStream);
72 getConfigForHistogram(nUnconnectedChannels_,
"nUnconnectedChannels",iConfig,pDebugStream);
74 getConfigForHistogram(nTotalBadChannels_,
"nTotalBadChannels",iConfig,pDebugStream);
75 getConfigForHistogram(nTotalBadActiveChannels_,
"nTotalBadActiveChannels",iConfig,pDebugStream);
77 getConfigForHistogram(nTotalBadChannelsvsTime_,
"nTotalBadChannelsvsTime",iConfig,pDebugStream);
78 getConfigForHistogram(nTotalBadActiveChannelsvsTime_,
"nTotalBadActiveChannelsvsTime",iConfig,pDebugStream);
80 getConfigForHistogram(nAPVStatusBit_,
"nAPVStatusBit",iConfig,pDebugStream);
81 getConfigForHistogram(nAPVError_,
"nAPVError",iConfig,pDebugStream);
82 getConfigForHistogram(nAPVAddressError_,
"nAPVAddressError",iConfig,pDebugStream);
83 getConfigForHistogram(nUnlocked_,
"nUnlocked",iConfig,pDebugStream);
84 getConfigForHistogram(nOutOfSync_,
"nOutOfSync",iConfig,pDebugStream);
86 getConfigForHistogram(nAPVStatusBitvsTime_,
"nAPVStatusBitvsTime",iConfig,pDebugStream);
87 getConfigForHistogram(nAPVErrorvsTime_,
"nAPVErrorvsTime",iConfig,pDebugStream);
88 getConfigForHistogram(nAPVAddressErrorvsTime_,
"nAPVAddressErrorvsTime",iConfig,pDebugStream);
89 getConfigForHistogram(nUnlockedvsTime_,
"nUnlockedvsTime",iConfig,pDebugStream);
90 getConfigForHistogram(nOutOfSyncvsTime_,
"nOutOfSyncvsTime",iConfig,pDebugStream);
92 getConfigForHistogram(tkMapConfig_,
"TkHistoMap",iConfig,pDebugStream);
94 getConfigForHistogram(feTimeDiffTIB_,
"FETimeDiffTIB",iConfig,pDebugStream);
95 getConfigForHistogram(feTimeDiffTOB_,
"FETimeDiffTOB",iConfig,pDebugStream);
96 getConfigForHistogram(feTimeDiffTECB_,
"FETimeDiffTECB",iConfig,pDebugStream);
97 getConfigForHistogram(feTimeDiffTECF_,
"FETimeDiffTECF",iConfig,pDebugStream);
99 getConfigForHistogram(feTimeDiffvsDBX_,
"FETimeDiffvsDBX",iConfig,pDebugStream);
101 getConfigForHistogram(apveAddress_,
"ApveAddress",iConfig,pDebugStream);
102 getConfigForHistogram(feMajAddress_,
"FeMajAddress",iConfig,pDebugStream);
104 getConfigForHistogram(medianAPV0_,
"MedianAPV0",iConfig,pDebugStream);
105 getConfigForHistogram(medianAPV1_,
"MedianAPV1",iConfig,pDebugStream);
107 getConfigForHistogram(lumiErrorFraction_,
"ErrorFractionByLumiBlock",iConfig,pDebugStream);
109 getConfigForHistogram(fedIdVsApvId_,
"FedIdVsApvId",iConfig,pDebugStream);
113 void FEDHistograms::fillCountersHistograms(
const FEDErrors::FEDCounters & fedLevelCounters,
114 const FEDErrors::ChannelCounters & chLevelCounters,
115 const unsigned int aMaxSize,
118 fillHistogram(fedMaxEventSizevsTime_,aTime,aMaxSize);
120 fillHistogram(nFEDErrors_,fedLevelCounters.nFEDErrors);
121 fillHistogram(nFEDDAQProblems_,fedLevelCounters.nDAQProblems);
122 fillHistogram(nFEDsWithFEProblems_,fedLevelCounters.nFEDsWithFEProblems);
123 fillHistogram(nFEDCorruptBuffers_,fedLevelCounters.nCorruptBuffers);
124 fillHistogram(nFEDsWithFEOverflows_,fedLevelCounters.nFEDsWithFEOverflows);
125 fillHistogram(nFEDsWithFEBadMajorityAddresses_,fedLevelCounters.nFEDsWithFEBadMajorityAddresses);
126 fillHistogram(nFEDsWithMissingFEs_,fedLevelCounters.nFEDsWithMissingFEs);
127 fillHistogram(nBadChannelStatusBits_,fedLevelCounters.nBadChannels);
128 fillHistogram(nBadActiveChannelStatusBits_,fedLevelCounters.nBadActiveChannels);
130 fillHistogram(nFEDErrorsvsTime_,aTime,fedLevelCounters.nFEDErrors);
131 fillHistogram(nFEDCorruptBuffersvsTime_,aTime,fedLevelCounters.nCorruptBuffers);
132 fillHistogram(nFEDsWithFEProblemsvsTime_,aTime,fedLevelCounters.nFEDsWithFEProblems);
134 fillHistogram(nUnconnectedChannels_,chLevelCounters.nNotConnected);
136 fillHistogram(nTotalBadChannels_,fedLevelCounters.nTotalBadChannels);
137 fillHistogram(nTotalBadActiveChannels_,fedLevelCounters.nTotalBadActiveChannels);
139 fillHistogram(nTotalBadChannelsvsTime_,aTime,fedLevelCounters.nTotalBadChannels);
140 fillHistogram(nTotalBadActiveChannelsvsTime_,aTime,fedLevelCounters.nTotalBadActiveChannels);
142 fillHistogram(nAPVStatusBit_,chLevelCounters.nAPVStatusBit);
143 fillHistogram(nAPVError_,chLevelCounters.nAPVError);
144 fillHistogram(nAPVAddressError_,chLevelCounters.nAPVAddressError);
145 fillHistogram(nUnlocked_,chLevelCounters.nUnlocked);
146 fillHistogram(nOutOfSync_,chLevelCounters.nOutOfSync);
148 fillHistogram(nAPVStatusBitvsTime_,aTime,chLevelCounters.nAPVStatusBit);
149 fillHistogram(nAPVErrorvsTime_,aTime,chLevelCounters.nAPVError);
150 fillHistogram(nAPVAddressErrorvsTime_,aTime,chLevelCounters.nAPVAddressError);
151 fillHistogram(nUnlockedvsTime_,aTime,chLevelCounters.nUnlocked);
152 fillHistogram(nOutOfSyncvsTime_,aTime,chLevelCounters.nOutOfSync);
156 void FEDHistograms::fillFEDHistograms(FEDErrors & aFedErr,
157 const unsigned int aEvtSize,
160 const FEDErrors::FEDLevelErrors & lFedLevelErrors = aFedErr.getFEDLevelErrors();
161 const unsigned int lFedId = aFedErr.fedID();
163 fillHistogram(fedEventSize_,lFedId,aEvtSize);
165 if (lFedLevelErrors.DataPresent) fillHistogram(dataPresent_,lFedId);
167 if (lFedLevelErrors.HasCabledChannels && lFedLevelErrors.DataMissing) fillHistogram(dataMissing_,lFedId);
169 if (lFedLevelErrors.InvalidBuffers) fillHistogram(invalidBuffers_,lFedId);
170 else if (lFedLevelErrors.BadFEDCRCs) fillHistogram(badFEDCRCs_,lFedId);
171 else if (lFedLevelErrors.BadDAQCRCs) fillHistogram(badDAQCRCs_,lFedId);
172 else if (lFedLevelErrors.BadIDs) fillHistogram(badIDs_,lFedId);
173 else if (lFedLevelErrors.BadDAQPacket) fillHistogram(badDAQPacket_,lFedId);
174 else if (lFedLevelErrors.CorruptBuffer) fillHistogram(corruptBuffers_,lFedId);
176 if (aFedErr.anyFEDErrors()) fillHistogram(anyFEDErrors_,lFedId);
177 if (lFedLevelErrors.HasCabledChannels && aFedErr.anyDAQProblems()) fillHistogram(anyDAQProblems_,lFedId);
178 if (aFedErr.anyFEProblems()) fillHistogram(anyFEProblems_,lFedId);
180 if (lFedLevelErrors.FEsOverflow) fillHistogram(feOverflows_,lFedId);
181 if (lFedLevelErrors.FEsMissing) fillHistogram(feMissing_,lFedId);
182 if (lFedLevelErrors.FEsBadMajorityAddress) fillHistogram(badMajorityAddresses_,lFedId);
184 if (lFedLevelErrors.BadChannelStatusBit) fillHistogram(badChannelStatusBits_,lFedId);
185 if (lFedLevelErrors.BadActiveChannelStatusBit) fillHistogram(badActiveChannelStatusBits_,lFedId);
187 std::vector<FEDErrors::FELevelErrors> & lFeVec = aFedErr.getFELevelErrors();
189 for (
unsigned int iFe(0); iFe<lFeVec.size(); iFe++){
190 fillFEHistograms(lFedId,lFeVec[iFe],aFedErr.getEventProperties());
193 std::vector<FEDErrors::ChannelLevelErrors> & lChVec = aFedErr.getChannelLevelErrors();
194 for (
unsigned int iCh(0); iCh < lChVec.size(); iCh++){
195 fillChannelsHistograms(lFedId,lChVec[iCh],lFullDebug);
198 std::vector<FEDErrors::APVLevelErrors> & lAPVVec = aFedErr.getAPVLevelErrors();
199 for (
unsigned int iApv(0); iApv < lAPVVec.size(); iApv++){
200 fillAPVsHistograms(lFedId,lAPVVec[iApv],lFullDebug);
209 void FEDHistograms::fillFEHistograms(
const unsigned int aFedId,
210 const FEDErrors::FELevelErrors & aFeLevelErrors,
const FEDErrors::EventProperties & aEventProp )
212 const unsigned short lFeId = aFeLevelErrors.FeID;
220 if (aFeLevelErrors.Overflow) fillHistogram(feOverflowDetailedMap_[aFedId],lFeId);
221 else if (aFeLevelErrors.Missing) fillHistogram(feMissingDetailedMap_[aFedId],lFeId);
222 else if (aFeLevelErrors.BadMajorityAddress) fillHistogram(badMajorityAddressDetailedMap_[aFedId],lFeId);
225 if (aFeLevelErrors.TimeDifference != 0) {
226 if (aFeLevelErrors.SubDetID == 2 || aFeLevelErrors.SubDetID == 3 || aFeLevelErrors.SubDetID == 4)
227 fillHistogram(feTimeDiffTIB_,aFeLevelErrors.TimeDifference);
228 else if (aFeLevelErrors.SubDetID == 5)
229 fillHistogram(feTimeDiffTOB_,aFeLevelErrors.TimeDifference);
230 else if (aFeLevelErrors.SubDetID == 0)
231 fillHistogram(feTimeDiffTECB_,aFeLevelErrors.TimeDifference);
232 else if (aFeLevelErrors.SubDetID == 1)
233 fillHistogram(feTimeDiffTECF_,aFeLevelErrors.TimeDifference);
234 fillHistogram(feTimeDiffvsDBX_,aEventProp.deltaBX,aFeLevelErrors.TimeDifference < 0 ? aFeLevelErrors.TimeDifference+192 : aFeLevelErrors.TimeDifference );
235 fillHistogram(apveAddress_,aFeLevelErrors.Apve);
236 fillHistogram(feMajAddress_,aFeLevelErrors.FeMaj);
241 void FEDHistograms::fillChannelsHistograms(
const unsigned int aFedId,
242 const FEDErrors::ChannelLevelErrors & aChErr,
245 unsigned int lChId = aChErr.ChannelID;
252 if (aChErr.Unlocked) {
253 fillHistogram(unlockedDetailedMap_[aFedId],lChId);
255 if (aChErr.OutOfSync) {
256 fillHistogram(outOfSyncDetailedMap_[aFedId],lChId);
261 void FEDHistograms::fillAPVsHistograms(
const unsigned int aFedId,
262 const FEDErrors::APVLevelErrors & aAPVErr,
265 unsigned int lChId = aAPVErr.APVID;
273 if (aAPVErr.APVStatusBit) fillHistogram(badStatusBitsDetailedMap_[aFedId],lChId);
274 if (aAPVErr.APVError) fillHistogram(apvErrorDetailedMap_[aFedId],lChId);
275 if (aAPVErr.APVAddressError) fillHistogram(apvAddressErrorDetailedMap_[aFedId],lChId);
278 void FEDHistograms::fillMajorityHistograms(
const unsigned int aPart,
280 const std::vector<unsigned int> & aFedIdVec){
281 if (aPart==0) fillHistogram(feMajFracTIB_,aValue);
282 else if (aPart==1) fillHistogram(feMajFracTOB_,aValue);
283 else if (aPart==2) fillHistogram(feMajFracTECB_,aValue);
284 else if (aPart==3) fillHistogram(feMajFracTECF_,aValue);
286 for (
unsigned int iFed(0); iFed<aFedIdVec.size(); ++iFed){
287 fillHistogram(badMajorityInPartition_,aFedIdVec[iFed]);
292 bool FEDHistograms::feMajHistosEnabled(){
293 return ( feMajFracTIB_.enabled ||
294 feMajFracTOB_.enabled ||
295 feMajFracTECB_.enabled ||
296 feMajFracTECF_.enabled ||
297 badMajorityInPartition_.enabled );
300 void FEDHistograms::fillLumiHistograms(
const FEDErrors::LumiErrors & aLumErr){
301 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
302 lumiErrorFraction_.monitorEle->Reset();
303 for (
unsigned int iD(0); iD<aLumErr.nTotal.size(); iD++){
304 if (aLumErr.nTotal[iD] > 0) fillHistogram(lumiErrorFraction_,iD+1,static_cast<float>(aLumErr.nErrors[iD])/aLumErr.nTotal[iD]);
311 bool FEDHistograms::cmHistosEnabled() {
312 return (medianAPV0_.enabled || medianAPV1_.enabled);
317 if (!aApv1)
return medianAPV0_.monitorEle;
318 else return medianAPV1_.monitorEle;
323 return fedIdVsApvId_.monitorEle;
333 histosBooked_.resize(siStripFedIdMax+1,
false);
334 debugHistosBooked_.resize(siStripFedIdMax+1,
false);
337 bookProfile(ibooker , fedEventSize_,
339 "Average FED buffer Size (B) per Event",
340 siStripFedIdMax-siStripFedIdMin+1,
341 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
345 "<FED buffer Size> (B)"
349 bookHistogram(ibooker , dataPresent_,
"DataPresent",
350 "Number of events where the data from a FED is seen",
351 siStripFedIdMax-siStripFedIdMin+1,
352 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
354 bookHistogram(ibooker , nTotalBadChannels_,
356 "Number of channels with any error",
357 "Total # bad enabled channels");
359 bookHistogram(ibooker , nTotalBadActiveChannels_,
360 "nTotalBadActiveChannels",
361 "Number of active channels with any error",
362 "Total # bad active channels");
364 book2DHistogram(ibooker , fedIdVsApvId_,
366 "Any error per APV per event",
376 bookHistogram(ibooker , nFEDErrors_,
378 "Number of FEDs with errors (FED or FE Level) per event",
381 bookHistogram(ibooker , nFEDDAQProblems_,
383 "Number of FEDs with DAQ problems per event",
386 bookHistogram(ibooker , nFEDsWithFEProblems_,
387 "nFEDsWithFEProblems",
388 "Number of FEDs with FE problems per event",
389 "# FEDs with FE problems");
391 bookHistogram(ibooker , nFEDCorruptBuffers_,
392 "nFEDCorruptBuffers",
393 "Number of FEDs with corrupt buffers per event",
394 "# FEDs with corrupt buffer");
399 bookHistogram(ibooker , dataMissing_,
"DataMissing",
400 "Number of events where the data from a FED with cabled channels is missing",
401 siStripFedIdMax-siStripFedIdMin+1,
402 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
404 bookHistogram(ibooker , anyFEDErrors_,
"AnyFEDErrors",
405 "Number of buffers with any FED error (excluding bad channel status bits, FE problems except overflows) per FED",
406 siStripFedIdMax-siStripFedIdMin+1,
407 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
409 bookHistogram(ibooker , corruptBuffers_,
"CorruptBuffers",
410 "Number of corrupt FED buffers per FED",
411 siStripFedIdMax-siStripFedIdMin+1,
412 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
414 bookHistogram(ibooker , invalidBuffers_,
"InvalidBuffers",
415 "Number of invalid FED buffers per FED",
416 siStripFedIdMax-siStripFedIdMin+1,
417 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
419 bookHistogram(ibooker , anyDAQProblems_,
"AnyDAQProblems",
420 "Number of buffers with any problems flagged in DAQ header (including CRC)",
421 siStripFedIdMax-siStripFedIdMin+1,
422 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
424 bookHistogram(ibooker , badIDs_,
"BadIDs",
425 "Number of buffers with non-SiStrip source IDs in DAQ header",
426 siStripFedIdMax-siStripFedIdMin+1,
427 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
429 bookHistogram(ibooker , badDAQCRCs_,
"BadDAQCRCs",
430 "Number of buffers with bad CRCs from the DAQ",
431 siStripFedIdMax-siStripFedIdMin+1,
432 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
434 bookHistogram(ibooker , badFEDCRCs_,
"BadFEDCRCs",
435 "Number of buffers with bad CRCs from the FED",
436 siStripFedIdMax-siStripFedIdMin+1,
437 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
439 bookHistogram(ibooker , badDAQPacket_,
"BadDAQPacket",
440 "Number of buffers with (non-CRC) problems flagged in DAQ header/trailer",
441 siStripFedIdMax-siStripFedIdMin+1,
442 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
446 bookHistogram(ibooker , nFEDsWithFEOverflows_,
447 "nFEDsWithFEOverflows",
448 "Number FEDs with FE units which overflowed per event",
449 "# FEDs with FE overflows");
451 bookHistogram(ibooker , nFEDsWithFEBadMajorityAddresses_,
452 "nFEDsWithFEBadMajorityAddresses",
453 "Number of FEDs with FE units with a bad majority address per event",
454 "# FEDs with bad address");
456 bookHistogram(ibooker , nFEDsWithMissingFEs_,
457 "nFEDsWithMissingFEs",
458 "Number of FEDs with missing FE unit payloads per event",
459 "# FEDs with missing FEs");
461 bookHistogram(ibooker , feMajFracTIB_,
"FeMajFracTIB",
462 "Fraction of FEs matching majority address in TIB partition",
463 101,0,1.01,
"n(majAddrFE)/n(totFE)");
465 bookHistogram(ibooker , feMajFracTOB_,
"FeMajFracTOB",
466 "Fraction of FEs matching majority address in TOB partition",
467 101,0,1.01,
"n(majAddrFE)/n(totFE)");
469 bookHistogram(ibooker , feMajFracTECB_,
"FeMajFracTECB",
470 "Fraction of FEs matching majority address in TECB partition",
471 101,0,1.01,
"n(majAddrFE)/n(totFE)");
473 bookHistogram(ibooker , feMajFracTECF_,
"FeMajFracTECF",
474 "Fraction of FEs matching majority address in TECF partition",
475 101,0,1.01,
"n(majAddrFE)/n(totFE)");
480 bookHistogram(ibooker , feTimeDiffTIB_,
"FETimeDiffTIB",
481 "(TimeLoc FE - TimeLoc APVe) for TIB/TID, when different",
483 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
485 bookHistogram(ibooker , feTimeDiffTOB_,
"FETimeDiffTOB",
486 "(TimeLoc FE - TimeLoc APVe) for TOB, when different",
488 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
490 bookHistogram(ibooker , feTimeDiffTECB_,
"FETimeDiffTECB",
491 "(TimeLoc FE - TimeLoc APVe) for TECB, when different",
493 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
495 bookHistogram(ibooker , feTimeDiffTECF_,
"FETimeDiffTECF",
496 "(TimeLoc FE - TimeLoc APVe) for TECF, when different",
498 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
500 book2DHistogram( ibooker , feTimeDiffvsDBX_,
"FETimeDiffvsDBX",
501 "(TimeLoc FE - TimeLoc APVe) vs DBX, when different",
504 0,201,
"DeltaBX",
"#Delta_{TimeLoc}(FE-APVe)");
507 bookHistogram(ibooker , apveAddress_,
"ApveAddress",
512 bookHistogram(ibooker , feMajAddress_,
"FeMajAddress",
513 "FE Majority Address",
520 bookHistogram(ibooker , anyFEProblems_,
"AnyFEProblems",
521 "Number of buffers with any FE unit problems",
522 siStripFedIdMax-siStripFedIdMin+1,
523 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
525 bookHistogram(ibooker , feOverflows_,
"FEOverflows",
526 "Number of buffers with one or more FE overflow",
527 siStripFedIdMax-siStripFedIdMin+1,
528 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
530 bookHistogram(ibooker , badMajorityAddresses_,
"BadMajorityAddresses",
531 "Number of buffers with one or more FE with a bad majority APV address",
532 siStripFedIdMax-siStripFedIdMin+1,
533 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
535 bookHistogram(ibooker , badMajorityInPartition_,
"BadMajorityInPartition",
536 "Number of buffers with >=1 FE with FEaddress != majority in partition",
537 siStripFedIdMax-siStripFedIdMin+1,
538 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
540 bookHistogram(ibooker , feMissing_,
"FEMissing",
541 "Number of buffers with one or more FE unit payload missing",
542 siStripFedIdMax-siStripFedIdMin+1,
543 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
548 bookHistogram(ibooker , nBadChannelStatusBits_,
549 "nBadChannelStatusBits",
550 "Number of channels with bad status bits per event",
551 "# bad enabled channels");
553 bookHistogram(ibooker , nBadActiveChannelStatusBits_,
554 "nBadActiveChannelStatusBits",
555 "Number of active channels with bad status bits per event",
556 "# bad active channels");
558 bookHistogram(ibooker , nUnlocked_,
560 "Number of channels Unlocked per event",
561 "# channels unlocked");
563 bookHistogram(ibooker , nOutOfSync_,
565 "Number of channels OutOfSync per event",
566 "# channels out-of-sync");
568 bookHistogram(ibooker , nUnconnectedChannels_,
569 "nUnconnectedChannels",
570 "Number of channels not connected per event",
571 "# unconnected channels");
575 bookHistogram(ibooker , badChannelStatusBits_,
"BadChannelStatusBits",
576 "Number of buffers with one or more enabled channel with bad status bits",
577 siStripFedIdMax-siStripFedIdMin+1,
578 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
580 bookHistogram(ibooker , badActiveChannelStatusBits_,
"BadActiveChannelStatusBits",
581 "Number of buffers with one or more active channel with bad status bits",
582 siStripFedIdMax-siStripFedIdMin+1,
583 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
587 bookHistogram(ibooker , medianAPV0_,
"MedianAPV0",
591 bookHistogram(ibooker , medianAPV1_,
"MedianAPV1",
595 bookHistogram(ibooker , nAPVStatusBit_,
597 "Number of APVs with APVStatusBit error per event",
598 "# APVs with APVStatusBit error");
600 bookHistogram(ibooker , nAPVError_,
602 "Number of APVs with APVError per event",
603 "#APVs with APVError");
605 bookHistogram(ibooker , nAPVAddressError_,
607 "Number of APVs with APVAddressError per event",
608 "#APVs with APVAddressError");
613 bookProfile( ibooker , fedMaxEventSizevsTime_,
614 "FedMaxEventSizevsTime",
615 "Max FED buffer Size (B) per Event vs time",
619 "Max FED buffer Size (B)"
622 bookProfile( ibooker , nTotalBadChannelsvsTime_,
623 "nTotalBadChannelsvsTime",
624 "Number of channels with any error vs time",
628 "Total # bad enabled channels"
632 bookProfile( ibooker , nTotalBadActiveChannelsvsTime_,
633 "nTotalBadActiveChannelsvsTime",
634 "Number of active channels with any error vs time",
638 "Total # bad active channels"
643 bookProfile( ibooker , nFEDErrorsvsTime_,
645 "Number of FEDs with any error vs time",
652 bookProfile( ibooker , nFEDCorruptBuffersvsTime_,
653 "nFEDCorruptBuffersvsTime",
654 "Number of FEDs with corrupt buffer vs time",
663 bookProfile( ibooker , nFEDsWithFEProblemsvsTime_,
664 "nFEDsWithFEProblemsvsTime",
665 "Number of FEDs with any FE error vs time",
669 "# FEDsWithFEProblems"
674 bookProfile( ibooker , nUnlockedvsTime_,
676 "Number of channels Unlocked vs time",
680 "# channels unlocked "
683 bookProfile( ibooker , nOutOfSyncvsTime_,
685 "Number of channels OutOfSync vs time",
689 "# channels out-of-sync"
694 bookProfile( ibooker , nAPVStatusBitvsTime_,
695 "nAPVStatusBitvsTime",
696 "Number of APVs with APVStatusBit error vs time",
700 "# APVs with APVStatusBit error"
703 bookProfile( ibooker , nAPVErrorvsTime_,
705 "Number of APVs with APVError vs time",
709 "# APVs with APVError"
712 bookProfile( ibooker , nAPVAddressErrorvsTime_,
713 "nAPVAddressErrorvsTime",
714 "Number of APVs with APVAddressError vs time",
718 "# APVs with APVAddressError"
723 bookHistogram(ibooker , lumiErrorFraction_,
725 "Fraction of error per lumi section vs subdetector",
730 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
731 lumiErrorFraction_.monitorEle->setLumiFlag();
732 lumiErrorFraction_.monitorEle->setBinLabel(1,
"TECB");
733 lumiErrorFraction_.monitorEle->setBinLabel(2,
"TECF");
734 lumiErrorFraction_.monitorEle->setBinLabel(3,
"TIB");
735 lumiErrorFraction_.monitorEle->setBinLabel(4,
"TIDB");
736 lumiErrorFraction_.monitorEle->setBinLabel(5,
"TIDF");
737 lumiErrorFraction_.monitorEle->setBinLabel(6,
"TOB");
741 if (tkMapConfig_.enabled){
742 tkmapFED_ =
new TkHistoMap(topFolderName,
"TkHMap_FractionOfBadChannels",0.,
true);
754 if (!histosBooked_[fedId]) {
759 std::stringstream fedIdStream;
760 fedIdStream <<
fedId;
763 bookHistogram(ibooker , feOverflowDetailed_,
764 feOverflowDetailedMap_[fedId],
765 "FEOverflowsForFED"+fedIdStream.str(),
766 "FE overflows per FE unit for FED ID "+fedIdStream.str(),
769 bookHistogram(ibooker , badMajorityAddressDetailed_,
770 badMajorityAddressDetailedMap_[fedId],
771 "BadMajorityAddressesForFED"+fedIdStream.str(),
772 "Bad majority APV addresses per FE unit for FED ID "+fedIdStream.str(),
775 bookHistogram(ibooker , feMissingDetailed_,
776 feMissingDetailedMap_[fedId],
777 "FEMissingForFED"+fedIdStream.str(),
778 "Buffers with FE Unit payload missing per FE unit for FED ID "+fedIdStream.str(),
781 bookHistogram(ibooker , badStatusBitsDetailed_,
782 badStatusBitsDetailedMap_[fedId],
783 "BadAPVStatusBitsForFED"+fedIdStream.str(),
784 "Bad apv status bits for FED ID "+fedIdStream.str(),
787 histosBooked_[
fedId] =
true;
789 if (fullDebugMode && !debugHistosBooked_[fedId]) {
792 std::stringstream fedIdStream;
793 fedIdStream <<
fedId;
796 bookHistogram(ibooker , apvErrorDetailed_,
797 apvErrorDetailedMap_[fedId],
798 "APVErrorBitsForFED"+fedIdStream.str(),
799 "APV errors for FED ID "+fedIdStream.str(),
802 bookHistogram(ibooker , apvAddressErrorDetailed_,
803 apvAddressErrorDetailedMap_[fedId],
804 "APVAddressErrorBitsForFED"+fedIdStream.str(),
805 "Wrong APV address errors for FED ID "+fedIdStream.str(),
808 bookHistogram(ibooker , unlockedDetailed_,
809 unlockedDetailedMap_[fedId],
810 "UnlockedBitsForFED"+fedIdStream.str(),
811 "Unlocked channels for FED ID "+fedIdStream.str(),
814 bookHistogram(ibooker , outOfSyncDetailed_,
815 outOfSyncDetailedMap_[fedId],
816 "OOSBitsForFED"+fedIdStream.str(),
817 "Out of sync channels for FED ID "+fedIdStream.str(),
820 debugHistosBooked_[
fedId] =
true;
824 void FEDHistograms::bookAllFEDHistograms(
DQMStore::IBooker & ibooker ,
bool fullDebugMode )
830 for (
unsigned int iFed = siStripFedIdMin; iFed <= siStripFedIdMax; iFed++)
831 bookFEDHistograms(ibooker , iFed, fullDebugMode);
834 bool FEDHistograms::tkHistoMapEnabled(
unsigned int aIndex){
835 return tkMapConfig_.enabled;
838 TkHistoMap * FEDHistograms::tkHistoMapPointer(
unsigned int aIndex){
A container class for generic run and event-related info, information required by the commissioning a...
const std::string & pwd(void)
static const uint16_t FEUNITS_PER_FED
static const uint16_t APVS_PER_FED
void setCurrentFolder(const std::string &fullpath)
Constants and enumerated types for FED/FEC systems.
static const uint16_t FEDCH_PER_FED