5 #include "DQM/SiStripMonitorHardware/interface/FEDHistograms.hh"
9 FEDHistograms::FEDHistograms()
15 FEDHistograms::~FEDHistograms()
20 std::ostringstream* pDebugStream
24 getConfigForHistogram(fedEventSize_,
"FedEventSize",iConfig,pDebugStream);
25 getConfigForHistogram(fedMaxEventSizevsTime_,
"FedMaxEventSizevsTime",iConfig,pDebugStream);
27 getConfigForHistogram(dataPresent_,
"DataPresent",iConfig,pDebugStream);
28 getConfigForHistogram(anyFEDErrors_,
"AnyFEDErrors",iConfig,pDebugStream);
29 getConfigForHistogram(anyDAQProblems_,
"AnyDAQProblems",iConfig,pDebugStream);
30 getConfigForHistogram(anyFEProblems_,
"AnyFEProblems",iConfig,pDebugStream);
31 getConfigForHistogram(corruptBuffers_,
"CorruptBuffers",iConfig,pDebugStream);
32 getConfigForHistogram(badChannelStatusBits_,
"BadChannelStatusBits",iConfig,pDebugStream);
33 getConfigForHistogram(badActiveChannelStatusBits_,
"BadActiveChannelStatusBits",iConfig,pDebugStream);
35 getConfigForHistogram(feOverflows_,
"FEOverflows",iConfig,pDebugStream);
36 getConfigForHistogram(feMissing_,
"FEMissing",iConfig,pDebugStream);
37 getConfigForHistogram(badMajorityAddresses_,
"BadMajorityAddresses",iConfig,pDebugStream);
38 getConfigForHistogram(badMajorityInPartition_,
"BadMajorityInPartition",iConfig,pDebugStream);
39 getConfigForHistogram(feMajFracTIB_,
"FeMajFracTIB",iConfig,pDebugStream);
40 getConfigForHistogram(feMajFracTOB_,
"FeMajFracTOB",iConfig,pDebugStream);
41 getConfigForHistogram(feMajFracTECB_,
"FeMajFracTECB",iConfig,pDebugStream);
42 getConfigForHistogram(feMajFracTECF_,
"FeMajFracTECF",iConfig,pDebugStream);
44 getConfigForHistogram(dataMissing_,
"DataMissing",iConfig,pDebugStream);
45 getConfigForHistogram(badIDs_,
"BadIDs",iConfig,pDebugStream);
46 getConfigForHistogram(badDAQPacket_,
"BadDAQPacket",iConfig,pDebugStream);
47 getConfigForHistogram(invalidBuffers_,
"InvalidBuffers",iConfig,pDebugStream);
48 getConfigForHistogram(badDAQCRCs_,
"BadDAQCRCs",iConfig,pDebugStream);
49 getConfigForHistogram(badFEDCRCs_,
"BadFEDCRCs",iConfig,pDebugStream);
51 getConfigForHistogram(feOverflowDetailed_,
"FEOverflowsDetailed",iConfig,pDebugStream);
52 getConfigForHistogram(feMissingDetailed_,
"FEMissingDetailed",iConfig,pDebugStream);
53 getConfigForHistogram(badMajorityAddressDetailed_,
"BadMajorityAddressesDetailed",iConfig,pDebugStream);
54 getConfigForHistogram(badStatusBitsDetailed_,
"BadAPVStatusBitsDetailed",iConfig,pDebugStream);
55 getConfigForHistogram(apvErrorDetailed_,
"APVErrorBitsDetailed",iConfig,pDebugStream);
56 getConfigForHistogram(apvAddressErrorDetailed_,
"APVAddressErrorBitsDetailed",iConfig,pDebugStream);
57 getConfigForHistogram(unlockedDetailed_,
"UnlockedBitsDetailed",iConfig,pDebugStream);
58 getConfigForHistogram(outOfSyncDetailed_,
"OOSBitsDetailed",iConfig,pDebugStream);
60 getConfigForHistogram(nFEDErrors_,
"nFEDErrors",iConfig,pDebugStream);
61 getConfigForHistogram(nFEDDAQProblems_,
"nFEDDAQProblems",iConfig,pDebugStream);
62 getConfigForHistogram(nFEDsWithFEProblems_,
"nFEDsWithFEProblems",iConfig,pDebugStream);
63 getConfigForHistogram(nFEDCorruptBuffers_,
"nFEDCorruptBuffers",iConfig,pDebugStream);
64 getConfigForHistogram(nBadChannelStatusBits_,
"nBadChannelStatusBits",iConfig,pDebugStream);
65 getConfigForHistogram(nBadActiveChannelStatusBits_,
"nBadActiveChannelStatusBits",iConfig,pDebugStream);
66 getConfigForHistogram(nFEDsWithFEOverflows_,
"nFEDsWithFEOverflows",iConfig,pDebugStream);
67 getConfigForHistogram(nFEDsWithMissingFEs_,
"nFEDsWithMissingFEs",iConfig,pDebugStream);
68 getConfigForHistogram(nFEDsWithFEBadMajorityAddresses_,
"nFEDsWithFEBadMajorityAddresses",iConfig,pDebugStream);
70 getConfigForHistogram(nFEDErrorsvsTime_,
"nFEDErrorsvsTime",iConfig,pDebugStream);
71 getConfigForHistogram(nFEDCorruptBuffersvsTime_,
"nFEDCorruptBuffersvsTime",iConfig,pDebugStream);
72 getConfigForHistogram(nFEDsWithFEProblemsvsTime_,
"nFEDsWithFEProblemsvsTime",iConfig,pDebugStream);
74 getConfigForHistogram(nUnconnectedChannels_,
"nUnconnectedChannels",iConfig,pDebugStream);
76 getConfigForHistogram(nTotalBadChannels_,
"nTotalBadChannels",iConfig,pDebugStream);
77 getConfigForHistogram(nTotalBadActiveChannels_,
"nTotalBadActiveChannels",iConfig,pDebugStream);
79 getConfigForHistogram(nTotalBadChannelsvsTime_,
"nTotalBadChannelsvsTime",iConfig,pDebugStream);
80 getConfigForHistogram(nTotalBadActiveChannelsvsTime_,
"nTotalBadActiveChannelsvsTime",iConfig,pDebugStream);
82 getConfigForHistogram(nAPVStatusBit_,
"nAPVStatusBit",iConfig,pDebugStream);
83 getConfigForHistogram(nAPVError_,
"nAPVError",iConfig,pDebugStream);
84 getConfigForHistogram(nAPVAddressError_,
"nAPVAddressError",iConfig,pDebugStream);
85 getConfigForHistogram(nUnlocked_,
"nUnlocked",iConfig,pDebugStream);
86 getConfigForHistogram(nOutOfSync_,
"nOutOfSync",iConfig,pDebugStream);
88 getConfigForHistogram(nAPVStatusBitvsTime_,
"nAPVStatusBitvsTime",iConfig,pDebugStream);
89 getConfigForHistogram(nAPVErrorvsTime_,
"nAPVErrorvsTime",iConfig,pDebugStream);
90 getConfigForHistogram(nAPVAddressErrorvsTime_,
"nAPVAddressErrorvsTime",iConfig,pDebugStream);
91 getConfigForHistogram(nUnlockedvsTime_,
"nUnlockedvsTime",iConfig,pDebugStream);
92 getConfigForHistogram(nOutOfSyncvsTime_,
"nOutOfSyncvsTime",iConfig,pDebugStream);
94 getConfigForHistogram(tkMapConfig_,
"TkHistoMap",iConfig,pDebugStream);
96 getConfigForHistogram(feTimeDiffTIB_,
"FETimeDiffTIB",iConfig,pDebugStream);
97 getConfigForHistogram(feTimeDiffTOB_,
"FETimeDiffTOB",iConfig,pDebugStream);
98 getConfigForHistogram(feTimeDiffTECB_,
"FETimeDiffTECB",iConfig,pDebugStream);
99 getConfigForHistogram(feTimeDiffTECF_,
"FETimeDiffTECF",iConfig,pDebugStream);
101 getConfigForHistogram(feTimeDiffvsDBX_,
"FETimeDiffvsDBX",iConfig,pDebugStream);
103 getConfigForHistogram(apveAddress_,
"ApveAddress",iConfig,pDebugStream);
104 getConfigForHistogram(feMajAddress_,
"FeMajAddress",iConfig,pDebugStream);
106 getConfigForHistogram(medianAPV0_,
"MedianAPV0",iConfig,pDebugStream);
107 getConfigForHistogram(medianAPV1_,
"MedianAPV1",iConfig,pDebugStream);
109 getConfigForHistogram(lumiErrorFraction_,
"ErrorFractionByLumiBlock",iConfig,pDebugStream);
111 getConfigForHistogram(fedIdVsApvId_,
"FedIdVsApvId",iConfig,pDebugStream);
115 void FEDHistograms::fillCountersHistograms(
const FEDErrors::FEDCounters & fedLevelCounters,
116 const FEDErrors::ChannelCounters & chLevelCounters,
117 const unsigned int aMaxSize,
120 fillHistogram(fedMaxEventSizevsTime_,aTime,aMaxSize);
122 fillHistogram(nFEDErrors_,fedLevelCounters.nFEDErrors);
123 fillHistogram(nFEDDAQProblems_,fedLevelCounters.nDAQProblems);
124 fillHistogram(nFEDsWithFEProblems_,fedLevelCounters.nFEDsWithFEProblems);
125 fillHistogram(nFEDCorruptBuffers_,fedLevelCounters.nCorruptBuffers);
126 fillHistogram(nFEDsWithFEOverflows_,fedLevelCounters.nFEDsWithFEOverflows);
127 fillHistogram(nFEDsWithFEBadMajorityAddresses_,fedLevelCounters.nFEDsWithFEBadMajorityAddresses);
128 fillHistogram(nFEDsWithMissingFEs_,fedLevelCounters.nFEDsWithMissingFEs);
129 fillHistogram(nBadChannelStatusBits_,fedLevelCounters.nBadChannels);
130 fillHistogram(nBadActiveChannelStatusBits_,fedLevelCounters.nBadActiveChannels);
132 fillHistogram(nFEDErrorsvsTime_,aTime,fedLevelCounters.nFEDErrors);
133 fillHistogram(nFEDCorruptBuffersvsTime_,aTime,fedLevelCounters.nCorruptBuffers);
134 fillHistogram(nFEDsWithFEProblemsvsTime_,aTime,fedLevelCounters.nFEDsWithFEProblems);
136 fillHistogram(nUnconnectedChannels_,chLevelCounters.nNotConnected);
138 fillHistogram(nTotalBadChannels_,fedLevelCounters.nTotalBadChannels);
139 fillHistogram(nTotalBadActiveChannels_,fedLevelCounters.nTotalBadActiveChannels);
141 fillHistogram(nTotalBadChannelsvsTime_,aTime,fedLevelCounters.nTotalBadChannels);
142 fillHistogram(nTotalBadActiveChannelsvsTime_,aTime,fedLevelCounters.nTotalBadActiveChannels);
144 fillHistogram(nAPVStatusBit_,chLevelCounters.nAPVStatusBit);
145 fillHistogram(nAPVError_,chLevelCounters.nAPVError);
146 fillHistogram(nAPVAddressError_,chLevelCounters.nAPVAddressError);
147 fillHistogram(nUnlocked_,chLevelCounters.nUnlocked);
148 fillHistogram(nOutOfSync_,chLevelCounters.nOutOfSync);
150 fillHistogram(nAPVStatusBitvsTime_,aTime,chLevelCounters.nAPVStatusBit);
151 fillHistogram(nAPVErrorvsTime_,aTime,chLevelCounters.nAPVError);
152 fillHistogram(nAPVAddressErrorvsTime_,aTime,chLevelCounters.nAPVAddressError);
153 fillHistogram(nUnlockedvsTime_,aTime,chLevelCounters.nUnlocked);
154 fillHistogram(nOutOfSyncvsTime_,aTime,chLevelCounters.nOutOfSync);
158 void FEDHistograms::fillFEDHistograms(FEDErrors & aFedErr,
159 const unsigned int aEvtSize,
162 const FEDErrors::FEDLevelErrors & lFedLevelErrors = aFedErr.getFEDLevelErrors();
163 const unsigned int lFedId = aFedErr.fedID();
165 fillHistogram(fedEventSize_,lFedId,aEvtSize);
167 if (lFedLevelErrors.DataPresent) fillHistogram(dataPresent_,lFedId);
169 if (lFedLevelErrors.HasCabledChannels && lFedLevelErrors.DataMissing) fillHistogram(dataMissing_,lFedId);
171 if (lFedLevelErrors.InvalidBuffers) fillHistogram(invalidBuffers_,lFedId);
172 else if (lFedLevelErrors.BadFEDCRCs) fillHistogram(badFEDCRCs_,lFedId);
173 else if (lFedLevelErrors.BadDAQCRCs) fillHistogram(badDAQCRCs_,lFedId);
174 else if (lFedLevelErrors.BadIDs) fillHistogram(badIDs_,lFedId);
175 else if (lFedLevelErrors.BadDAQPacket) fillHistogram(badDAQPacket_,lFedId);
176 else if (lFedLevelErrors.CorruptBuffer) fillHistogram(corruptBuffers_,lFedId);
178 if (aFedErr.anyFEDErrors()) fillHistogram(anyFEDErrors_,lFedId);
179 if (lFedLevelErrors.HasCabledChannels && aFedErr.anyDAQProblems()) fillHistogram(anyDAQProblems_,lFedId);
180 if (aFedErr.anyFEProblems()) fillHistogram(anyFEProblems_,lFedId);
182 if (lFedLevelErrors.FEsOverflow) fillHistogram(feOverflows_,lFedId);
183 if (lFedLevelErrors.FEsMissing) fillHistogram(feMissing_,lFedId);
184 if (lFedLevelErrors.FEsBadMajorityAddress) fillHistogram(badMajorityAddresses_,lFedId);
186 if (lFedLevelErrors.BadChannelStatusBit) fillHistogram(badChannelStatusBits_,lFedId);
187 if (lFedLevelErrors.BadActiveChannelStatusBit) fillHistogram(badActiveChannelStatusBits_,lFedId);
189 std::vector<FEDErrors::FELevelErrors> & lFeVec = aFedErr.getFELevelErrors();
191 for (
unsigned int iFe(0); iFe<lFeVec.size(); iFe++){
192 fillFEHistograms(lFedId,lFeVec[iFe],aFedErr.getEventProperties());
195 std::vector<FEDErrors::ChannelLevelErrors> & lChVec = aFedErr.getChannelLevelErrors();
196 for (
unsigned int iCh(0); iCh < lChVec.size(); iCh++){
197 fillChannelsHistograms(lFedId,lChVec[iCh],lFullDebug);
200 std::vector<FEDErrors::APVLevelErrors> & lAPVVec = aFedErr.getAPVLevelErrors();
201 for (
unsigned int iApv(0); iApv < lAPVVec.size(); iApv++){
202 fillAPVsHistograms(lFedId,lAPVVec[iApv],lFullDebug);
211 void FEDHistograms::fillFEHistograms(
const unsigned int aFedId,
212 const FEDErrors::FELevelErrors & aFeLevelErrors,
const FEDErrors::EventProperties & aEventProp )
214 const unsigned short lFeId = aFeLevelErrors.FeID;
215 if ( (feOverflowDetailed_.enabled && aFeLevelErrors.Overflow) ||
216 (badMajorityAddressDetailed_.enabled && aFeLevelErrors.BadMajorityAddress) ||
217 (feMissingDetailed_.enabled && aFeLevelErrors.Missing)
218 ) bookFEDHistograms(aFedId);
219 if (aFeLevelErrors.Overflow) fillHistogram(feOverflowDetailedMap_[aFedId],lFeId);
220 else if (aFeLevelErrors.Missing) fillHistogram(feMissingDetailedMap_[aFedId],lFeId);
221 else if (aFeLevelErrors.BadMajorityAddress) fillHistogram(badMajorityAddressDetailedMap_[aFedId],lFeId);
224 if (aFeLevelErrors.TimeDifference != 0) {
225 if (aFeLevelErrors.SubDetID == 2 || aFeLevelErrors.SubDetID == 3 || aFeLevelErrors.SubDetID == 4)
226 fillHistogram(feTimeDiffTIB_,aFeLevelErrors.TimeDifference);
227 else if (aFeLevelErrors.SubDetID == 5)
228 fillHistogram(feTimeDiffTOB_,aFeLevelErrors.TimeDifference);
229 else if (aFeLevelErrors.SubDetID == 0)
230 fillHistogram(feTimeDiffTECB_,aFeLevelErrors.TimeDifference);
231 else if (aFeLevelErrors.SubDetID == 1)
232 fillHistogram(feTimeDiffTECF_,aFeLevelErrors.TimeDifference);
233 fillHistogram(feTimeDiffvsDBX_,aEventProp.deltaBX,aFeLevelErrors.TimeDifference < 0 ? aFeLevelErrors.TimeDifference+192 : aFeLevelErrors.TimeDifference );
234 fillHistogram(apveAddress_,aFeLevelErrors.Apve);
235 fillHistogram(feMajAddress_,aFeLevelErrors.FeMaj);
240 void FEDHistograms::fillChannelsHistograms(
const unsigned int aFedId,
241 const FEDErrors::ChannelLevelErrors & aChErr,
244 unsigned int lChId = aChErr.ChannelID;
246 if ( (unlockedDetailed_.enabled && aChErr.Unlocked) ||
247 (outOfSyncDetailed_.enabled && aChErr.OutOfSync)
248 ) bookFEDHistograms(aFedId,fullDebug);
250 if (aChErr.Unlocked) {
251 fillHistogram(unlockedDetailedMap_[aFedId],lChId);
253 if (aChErr.OutOfSync) {
254 fillHistogram(outOfSyncDetailedMap_[aFedId],lChId);
259 void FEDHistograms::fillAPVsHistograms(
const unsigned int aFedId,
260 const FEDErrors::APVLevelErrors & aAPVErr,
263 unsigned int lChId = aAPVErr.APVID;
265 if ( (badStatusBitsDetailed_.enabled && aAPVErr.APVStatusBit) ||
266 (apvErrorDetailed_.enabled && aAPVErr.APVError) ||
267 (apvAddressErrorDetailed_.enabled && aAPVErr.APVAddressError)
268 ) bookFEDHistograms(aFedId,fullDebug);
270 if (aAPVErr.APVStatusBit) fillHistogram(badStatusBitsDetailedMap_[aFedId],lChId);
271 if (aAPVErr.APVError) fillHistogram(apvErrorDetailedMap_[aFedId],lChId);
272 if (aAPVErr.APVAddressError) fillHistogram(apvAddressErrorDetailedMap_[aFedId],lChId);
275 void FEDHistograms::fillMajorityHistograms(
const unsigned int aPart,
277 const std::vector<unsigned int> & aFedIdVec){
278 if (aPart==0) fillHistogram(feMajFracTIB_,aValue);
279 else if (aPart==1) fillHistogram(feMajFracTOB_,aValue);
280 else if (aPart==2) fillHistogram(feMajFracTECB_,aValue);
281 else if (aPart==3) fillHistogram(feMajFracTECF_,aValue);
283 for (
unsigned int iFed(0); iFed<aFedIdVec.size(); ++iFed){
284 fillHistogram(badMajorityInPartition_,aFedIdVec[iFed]);
289 bool FEDHistograms::feMajHistosEnabled(){
290 return ( feMajFracTIB_.enabled ||
291 feMajFracTOB_.enabled ||
292 feMajFracTECB_.enabled ||
293 feMajFracTECF_.enabled ||
294 badMajorityInPartition_.enabled );
297 void FEDHistograms::fillLumiHistograms(
const FEDErrors::LumiErrors & aLumErr){
298 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
299 lumiErrorFraction_.monitorEle->Reset();
300 for (
unsigned int iD(0); iD<aLumErr.nTotal.size(); iD++){
301 if (aLumErr.nTotal[iD] > 0) fillHistogram(lumiErrorFraction_,iD+1,static_cast<float>(aLumErr.nErrors[iD])/aLumErr.nTotal[iD]);
308 bool FEDHistograms::cmHistosEnabled() {
309 return (medianAPV0_.enabled || medianAPV1_.enabled);
314 if (!aApv1)
return medianAPV0_.monitorEle;
315 else return medianAPV1_.monitorEle;
320 return fedIdVsApvId_.monitorEle;
333 histosBooked_.resize(siStripFedIdMax+1,
false);
334 debugHistosBooked_.resize(siStripFedIdMax+1,
false);
337 bookProfile(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(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(nTotalBadChannels_,
356 "Number of channels with any error",
357 "Total # bad enabled channels");
359 bookHistogram(nTotalBadActiveChannels_,
360 "nTotalBadActiveChannels",
361 "Number of active channels with any error",
362 "Total # bad active channels");
364 book2DHistogram(fedIdVsApvId_,
366 "Any error per APV per event",
381 dqm_->setCurrentFolder(lBaseDir+
"/FED");
383 bookHistogram(nFEDErrors_,
385 "Number of FEDs with errors (FED or FE Level) per event",
388 bookHistogram(nFEDDAQProblems_,
390 "Number of FEDs with DAQ problems per event",
393 bookHistogram(nFEDsWithFEProblems_,
394 "nFEDsWithFEProblems",
395 "Number of FEDs with FE problems per event",
396 "# FEDs with FE problems");
398 bookHistogram(nFEDCorruptBuffers_,
399 "nFEDCorruptBuffers",
400 "Number of FEDs with corrupt buffers per event",
401 "# FEDs with corrupt buffer");
404 dqm_->setCurrentFolder(lBaseDir+
"/FED/VsId");
406 bookHistogram(dataMissing_,
"DataMissing",
407 "Number of events where the data from a FED with cabled channels is missing",
408 siStripFedIdMax-siStripFedIdMin+1,
409 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
411 bookHistogram(anyFEDErrors_,
"AnyFEDErrors",
412 "Number of buffers with any FED error (excluding bad channel status bits, FE problems except overflows) per FED",
413 siStripFedIdMax-siStripFedIdMin+1,
414 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
416 bookHistogram(corruptBuffers_,
"CorruptBuffers",
417 "Number of corrupt FED buffers per FED",
418 siStripFedIdMax-siStripFedIdMin+1,
419 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
421 bookHistogram(invalidBuffers_,
"InvalidBuffers",
422 "Number of invalid FED buffers per FED",
423 siStripFedIdMax-siStripFedIdMin+1,
424 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
426 bookHistogram(anyDAQProblems_,
"AnyDAQProblems",
427 "Number of buffers with any problems flagged in DAQ header (including CRC)",
428 siStripFedIdMax-siStripFedIdMin+1,
429 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
431 bookHistogram(badIDs_,
"BadIDs",
432 "Number of buffers with non-SiStrip source IDs in DAQ header",
433 siStripFedIdMax-siStripFedIdMin+1,
434 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
436 bookHistogram(badDAQCRCs_,
"BadDAQCRCs",
437 "Number of buffers with bad CRCs from the DAQ",
438 siStripFedIdMax-siStripFedIdMin+1,
439 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
441 bookHistogram(badFEDCRCs_,
"BadFEDCRCs",
442 "Number of buffers with bad CRCs from the FED",
443 siStripFedIdMax-siStripFedIdMin+1,
444 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
446 bookHistogram(badDAQPacket_,
"BadDAQPacket",
447 "Number of buffers with (non-CRC) problems flagged in DAQ header/trailer",
448 siStripFedIdMax-siStripFedIdMin+1,
449 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
451 dqm_->setCurrentFolder(lBaseDir+
"/FE");
453 bookHistogram(nFEDsWithFEOverflows_,
454 "nFEDsWithFEOverflows",
455 "Number FEDs with FE units which overflowed per event",
456 "# FEDs with FE overflows");
458 bookHistogram(nFEDsWithFEBadMajorityAddresses_,
459 "nFEDsWithFEBadMajorityAddresses",
460 "Number of FEDs with FE units with a bad majority address per event",
461 "# FEDs with bad address");
463 bookHistogram(nFEDsWithMissingFEs_,
464 "nFEDsWithMissingFEs",
465 "Number of FEDs with missing FE unit payloads per event",
466 "# FEDs with missing FEs");
468 bookHistogram(feMajFracTIB_,
"FeMajFracTIB",
469 "Fraction of FEs matching majority address in TIB partition",
470 101,0,1.01,
"n(majAddrFE)/n(totFE)");
472 bookHistogram(feMajFracTOB_,
"FeMajFracTOB",
473 "Fraction of FEs matching majority address in TOB partition",
474 101,0,1.01,
"n(majAddrFE)/n(totFE)");
476 bookHistogram(feMajFracTECB_,
"FeMajFracTECB",
477 "Fraction of FEs matching majority address in TECB partition",
478 101,0,1.01,
"n(majAddrFE)/n(totFE)");
480 bookHistogram(feMajFracTECF_,
"FeMajFracTECF",
481 "Fraction of FEs matching majority address in TECF partition",
482 101,0,1.01,
"n(majAddrFE)/n(totFE)");
485 dqm_->setCurrentFolder(lBaseDir+
"/FE/APVe");
487 bookHistogram(feTimeDiffTIB_,
"FETimeDiffTIB",
488 "(TimeLoc FE - TimeLoc APVe) for TIB/TID, when different",
490 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
492 bookHistogram(feTimeDiffTOB_,
"FETimeDiffTOB",
493 "(TimeLoc FE - TimeLoc APVe) for TOB, when different",
495 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
497 bookHistogram(feTimeDiffTECB_,
"FETimeDiffTECB",
498 "(TimeLoc FE - TimeLoc APVe) for TECB, when different",
500 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
502 bookHistogram(feTimeDiffTECF_,
"FETimeDiffTECF",
503 "(TimeLoc FE - TimeLoc APVe) for TECF, when different",
505 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
507 book2DHistogram(feTimeDiffvsDBX_,
"FETimeDiffvsDBX",
508 "(TimeLoc FE - TimeLoc APVe) vs DBX, when different",
511 0,201,
"DeltaBX",
"#Delta_{TimeLoc}(FE-APVe)");
514 bookHistogram(apveAddress_,
"ApveAddress",
519 bookHistogram(feMajAddress_,
"FeMajAddress",
520 "FE Majority Address",
525 dqm_->setCurrentFolder(lBaseDir+
"/FE/VsId");
527 bookHistogram(anyFEProblems_,
"AnyFEProblems",
528 "Number of buffers with any FE unit problems",
529 siStripFedIdMax-siStripFedIdMin+1,
530 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
532 bookHistogram(feOverflows_,
"FEOverflows",
533 "Number of buffers with one or more FE overflow",
534 siStripFedIdMax-siStripFedIdMin+1,
535 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
537 bookHistogram(badMajorityAddresses_,
"BadMajorityAddresses",
538 "Number of buffers with one or more FE with a bad majority APV address",
539 siStripFedIdMax-siStripFedIdMin+1,
540 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
542 bookHistogram(badMajorityInPartition_,
"BadMajorityInPartition",
543 "Number of buffers with >=1 FE with FEaddress != majority in partition",
544 siStripFedIdMax-siStripFedIdMin+1,
545 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
547 bookHistogram(feMissing_,
"FEMissing",
548 "Number of buffers with one or more FE unit payload missing",
549 siStripFedIdMax-siStripFedIdMin+1,
550 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
553 dqm_->setCurrentFolder(lBaseDir+
"/Fiber");
555 bookHistogram(nBadChannelStatusBits_,
556 "nBadChannelStatusBits",
557 "Number of channels with bad status bits per event",
558 "# bad enabled channels");
560 bookHistogram(nBadActiveChannelStatusBits_,
561 "nBadActiveChannelStatusBits",
562 "Number of active channels with bad status bits per event",
563 "# bad active channels");
565 bookHistogram(nUnlocked_,
567 "Number of channels Unlocked per event",
568 "# channels unlocked");
570 bookHistogram(nOutOfSync_,
572 "Number of channels OutOfSync per event",
573 "# channels out-of-sync");
575 bookHistogram(nUnconnectedChannels_,
576 "nUnconnectedChannels",
577 "Number of channels not connected per event",
578 "# unconnected channels");
580 dqm_->setCurrentFolder(lBaseDir+
"/Fiber/VsId");
582 bookHistogram(badChannelStatusBits_,
"BadChannelStatusBits",
583 "Number of buffers with one or more enabled channel with bad status bits",
584 siStripFedIdMax-siStripFedIdMin+1,
585 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
587 bookHistogram(badActiveChannelStatusBits_,
"BadActiveChannelStatusBits",
588 "Number of buffers with one or more active channel with bad status bits",
589 siStripFedIdMax-siStripFedIdMin+1,
590 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
592 dqm_->setCurrentFolder(lBaseDir+
"/APV");
594 bookHistogram(medianAPV0_,
"MedianAPV0",
598 bookHistogram(medianAPV1_,
"MedianAPV1",
602 bookHistogram(nAPVStatusBit_,
604 "Number of APVs with APVStatusBit error per event",
605 "# APVs with APVStatusBit error");
607 bookHistogram(nAPVError_,
609 "Number of APVs with APVError per event",
610 "#APVs with APVError");
612 bookHistogram(nAPVAddressError_,
614 "Number of APVs with APVAddressError per event",
615 "#APVs with APVAddressError");
618 dqm_->setCurrentFolder(lBaseDir+
"/Trends");
620 bookProfile(fedMaxEventSizevsTime_,
621 "FedMaxEventSizevsTime",
622 "Max FED buffer Size (B) per Event vs time",
626 "Max FED buffer Size (B)"
629 bookProfile(nTotalBadChannelsvsTime_,
630 "nTotalBadChannelsvsTime",
631 "Number of channels with any error vs time",
635 "Total # bad enabled channels"
639 bookProfile(nTotalBadActiveChannelsvsTime_,
640 "nTotalBadActiveChannelsvsTime",
641 "Number of active channels with any error vs time",
645 "Total # bad active channels"
648 dqm_->setCurrentFolder(lBaseDir+
"/Trends/FED");
650 bookProfile(nFEDErrorsvsTime_,
652 "Number of FEDs with any error vs time",
659 bookProfile(nFEDCorruptBuffersvsTime_,
660 "nFEDCorruptBuffersvsTime",
661 "Number of FEDs with corrupt buffer vs time",
668 dqm_->setCurrentFolder(lBaseDir+
"/Trends/FE");
670 bookProfile(nFEDsWithFEProblemsvsTime_,
671 "nFEDsWithFEProblemsvsTime",
672 "Number of FEDs with any FE error vs time",
676 "# FEDsWithFEProblems"
679 dqm_->setCurrentFolder(lBaseDir+
"/Trends/Fiber");
681 bookProfile(nUnlockedvsTime_,
683 "Number of channels Unlocked vs time",
687 "# channels unlocked "
690 bookProfile(nOutOfSyncvsTime_,
692 "Number of channels OutOfSync vs time",
696 "# channels out-of-sync"
699 dqm_->setCurrentFolder(lBaseDir+
"/Trends/APV");
701 bookProfile(nAPVStatusBitvsTime_,
702 "nAPVStatusBitvsTime",
703 "Number of APVs with APVStatusBit error vs time",
707 "# APVs with APVStatusBit error"
710 bookProfile(nAPVErrorvsTime_,
712 "Number of APVs with APVError vs time",
716 "# APVs with APVError"
719 bookProfile(nAPVAddressErrorvsTime_,
720 "nAPVAddressErrorvsTime",
721 "Number of APVs with APVAddressError vs time",
725 "# APVs with APVAddressError"
728 dqm_->setCurrentFolder(lBaseDir+
"/PerLumiSection");
730 bookHistogram(lumiErrorFraction_,
732 "Fraction of error per lumi section vs subdetector",
737 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
738 lumiErrorFraction_.monitorEle->setLumiFlag();
739 lumiErrorFraction_.monitorEle->setBinLabel(1,
"TECB");
740 lumiErrorFraction_.monitorEle->setBinLabel(2,
"TECF");
741 lumiErrorFraction_.monitorEle->setBinLabel(3,
"TIB");
742 lumiErrorFraction_.monitorEle->setBinLabel(4,
"TIDB");
743 lumiErrorFraction_.monitorEle->setBinLabel(5,
"TIDF");
744 lumiErrorFraction_.monitorEle->setBinLabel(6,
"TOB");
748 if (tkMapConfig_.enabled){
750 tkmapFED_ =
new TkHistoMap(topFolderName,
"TkHMap_FractionOfBadChannels",0.,
true);
756 void FEDHistograms::bookFEDHistograms(
unsigned int fedId,
762 if (!histosBooked_[fedId]) {
767 std::stringstream fedIdStream;
768 fedIdStream << fedId;
769 dqm_->setCurrentFolder(fedKey.path());
770 bookHistogram(feOverflowDetailed_,
771 feOverflowDetailedMap_[fedId],
772 "FEOverflowsForFED"+fedIdStream.str(),
773 "FE overflows per FE unit for FED ID "+fedIdStream.str(),
776 bookHistogram(badMajorityAddressDetailed_,
777 badMajorityAddressDetailedMap_[fedId],
778 "BadMajorityAddressesForFED"+fedIdStream.str(),
779 "Bad majority APV addresses per FE unit for FED ID "+fedIdStream.str(),
782 bookHistogram(feMissingDetailed_,
783 feMissingDetailedMap_[fedId],
784 "FEMissingForFED"+fedIdStream.str(),
785 "Buffers with FE Unit payload missing per FE unit for FED ID "+fedIdStream.str(),
788 bookHistogram(badStatusBitsDetailed_,
789 badStatusBitsDetailedMap_[fedId],
790 "BadAPVStatusBitsForFED"+fedIdStream.str(),
791 "Bad apv status bits for FED ID "+fedIdStream.str(),
794 histosBooked_[fedId] =
true;
796 if (fullDebugMode && !debugHistosBooked_[fedId]) {
799 std::stringstream fedIdStream;
800 fedIdStream << fedId;
801 dqm_->setCurrentFolder(fedKey.path());
803 bookHistogram(apvErrorDetailed_,
804 apvErrorDetailedMap_[fedId],
805 "APVErrorBitsForFED"+fedIdStream.str(),
806 "APV errors for FED ID "+fedIdStream.str(),
809 bookHistogram(apvAddressErrorDetailed_,
810 apvAddressErrorDetailedMap_[fedId],
811 "APVAddressErrorBitsForFED"+fedIdStream.str(),
812 "Wrong APV address errors for FED ID "+fedIdStream.str(),
815 bookHistogram(unlockedDetailed_,
816 unlockedDetailedMap_[fedId],
817 "UnlockedBitsForFED"+fedIdStream.str(),
818 "Unlocked channels for FED ID "+fedIdStream.str(),
821 bookHistogram(outOfSyncDetailed_,
822 outOfSyncDetailedMap_[fedId],
823 "OOSBitsForFED"+fedIdStream.str(),
824 "Out of sync channels for FED ID "+fedIdStream.str(),
827 debugHistosBooked_[fedId] =
true;
831 void FEDHistograms::bookAllFEDHistograms()
837 for (
unsigned int iFed = siStripFedIdMin; iFed <= siStripFedIdMax; iFed++) {
838 bookFEDHistograms(iFed,
true);
842 bool FEDHistograms::tkHistoMapEnabled(
unsigned int aIndex){
843 return tkMapConfig_.enabled;
846 TkHistoMap * FEDHistograms::tkHistoMapPointer(
unsigned int aIndex){
A container class for generic run and event-related info, information required by the commissioning a...
static const uint16_t FEUNITS_PER_FED
static const uint16_t APVS_PER_FED
Constants and enumerated types for FED/FEC systems.
static const uint16_t FEDCH_PER_FED