5 #include "DQM/SiStripMonitorHardware/interface/FEDHistograms.hh"
9 FEDHistograms::FEDHistograms()
14 FEDHistograms::~FEDHistograms()
19 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;
213 if ( (feOverflowDetailed_.enabled && aFeLevelErrors.Overflow) ||
214 (badMajorityAddressDetailed_.enabled && aFeLevelErrors.BadMajorityAddress) ||
215 (feMissingDetailed_.enabled && aFeLevelErrors.Missing)
216 ) bookFEDHistograms(aFedId);
217 if (aFeLevelErrors.Overflow) fillHistogram(feOverflowDetailedMap_[aFedId],lFeId);
218 else if (aFeLevelErrors.Missing) fillHistogram(feMissingDetailedMap_[aFedId],lFeId);
219 else if (aFeLevelErrors.BadMajorityAddress) fillHistogram(badMajorityAddressDetailedMap_[aFedId],lFeId);
222 if (aFeLevelErrors.TimeDifference != 0) {
223 if (aFeLevelErrors.SubDetID == 2 || aFeLevelErrors.SubDetID == 3 || aFeLevelErrors.SubDetID == 4)
224 fillHistogram(feTimeDiffTIB_,aFeLevelErrors.TimeDifference);
225 else if (aFeLevelErrors.SubDetID == 5)
226 fillHistogram(feTimeDiffTOB_,aFeLevelErrors.TimeDifference);
227 else if (aFeLevelErrors.SubDetID == 0)
228 fillHistogram(feTimeDiffTECB_,aFeLevelErrors.TimeDifference);
229 else if (aFeLevelErrors.SubDetID == 1)
230 fillHistogram(feTimeDiffTECF_,aFeLevelErrors.TimeDifference);
231 fillHistogram(feTimeDiffvsDBX_,aEventProp.deltaBX,aFeLevelErrors.TimeDifference < 0 ? aFeLevelErrors.TimeDifference+192 : aFeLevelErrors.TimeDifference );
232 fillHistogram(apveAddress_,aFeLevelErrors.Apve);
233 fillHistogram(feMajAddress_,aFeLevelErrors.FeMaj);
238 void FEDHistograms::fillChannelsHistograms(
const unsigned int aFedId,
239 const FEDErrors::ChannelLevelErrors & aChErr,
242 unsigned int lChId = aChErr.ChannelID;
244 if ( (unlockedDetailed_.enabled && aChErr.Unlocked) ||
245 (outOfSyncDetailed_.enabled && aChErr.OutOfSync)
246 ) bookFEDHistograms(aFedId,fullDebug);
248 if (aChErr.Unlocked) {
249 fillHistogram(unlockedDetailedMap_[aFedId],lChId);
251 if (aChErr.OutOfSync) {
252 fillHistogram(outOfSyncDetailedMap_[aFedId],lChId);
257 void FEDHistograms::fillAPVsHistograms(
const unsigned int aFedId,
258 const FEDErrors::APVLevelErrors & aAPVErr,
261 unsigned int lChId = aAPVErr.APVID;
263 if ( (badStatusBitsDetailed_.enabled && aAPVErr.APVStatusBit) ||
264 (apvErrorDetailed_.enabled && aAPVErr.APVError) ||
265 (apvAddressErrorDetailed_.enabled && aAPVErr.APVAddressError)
266 ) bookFEDHistograms(aFedId,fullDebug);
268 if (aAPVErr.APVStatusBit) fillHistogram(badStatusBitsDetailedMap_[aFedId],lChId);
269 if (aAPVErr.APVError) fillHistogram(apvErrorDetailedMap_[aFedId],lChId);
270 if (aAPVErr.APVAddressError) fillHistogram(apvAddressErrorDetailedMap_[aFedId],lChId);
273 void FEDHistograms::fillMajorityHistograms(
const unsigned int aPart,
275 const std::vector<unsigned int> & aFedIdVec){
276 if (aPart==0) fillHistogram(feMajFracTIB_,aValue);
277 else if (aPart==1) fillHistogram(feMajFracTOB_,aValue);
278 else if (aPart==2) fillHistogram(feMajFracTECB_,aValue);
279 else if (aPart==3) fillHistogram(feMajFracTECF_,aValue);
281 for (
unsigned int iFed(0); iFed<aFedIdVec.size(); ++iFed){
282 fillHistogram(badMajorityInPartition_,aFedIdVec[iFed]);
287 bool FEDHistograms::feMajHistosEnabled(){
288 return ( feMajFracTIB_.enabled ||
289 feMajFracTOB_.enabled ||
290 feMajFracTECB_.enabled ||
291 feMajFracTECF_.enabled ||
292 badMajorityInPartition_.enabled );
295 void FEDHistograms::fillLumiHistograms(
const FEDErrors::LumiErrors & aLumErr){
296 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
297 lumiErrorFraction_.monitorEle->Reset();
298 for (
unsigned int iD(0); iD<aLumErr.nTotal.size(); iD++){
299 if (aLumErr.nTotal[iD] > 0) fillHistogram(lumiErrorFraction_,iD+1,static_cast<float>(aLumErr.nErrors[iD])/aLumErr.nTotal[iD]);
306 bool FEDHistograms::cmHistosEnabled() {
307 return (medianAPV0_.enabled || medianAPV1_.enabled);
312 if (!aApv1)
return medianAPV0_.monitorEle;
313 else return medianAPV1_.monitorEle;
318 return fedIdVsApvId_.monitorEle;
321 void FEDHistograms::bookTopLevelHistograms(
DQMStore* dqm)
331 histosBooked_.resize(siStripFedIdMax+1,
false);
332 debugHistosBooked_.resize(siStripFedIdMax+1,
false);
335 bookProfile(fedEventSize_,
337 "Average FED buffer Size (B) per Event",
338 siStripFedIdMax-siStripFedIdMin+1,
339 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
343 "<FED buffer Size> (B)"
347 bookHistogram(dataPresent_,
"DataPresent",
348 "Number of events where the data from a FED is seen",
349 siStripFedIdMax-siStripFedIdMin+1,
350 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
352 bookHistogram(nTotalBadChannels_,
354 "Number of channels with any error",
355 "Total # bad enabled channels");
357 bookHistogram(nTotalBadActiveChannels_,
358 "nTotalBadActiveChannels",
359 "Number of active channels with any error",
360 "Total # bad active channels");
362 book2DHistogram(fedIdVsApvId_,
364 "Any error per APV per event",
376 const std::string lBaseDir = dqm_->pwd();
378 dqm_->setCurrentFolder(lBaseDir+
"/FED");
380 bookHistogram(nFEDErrors_,
382 "Number of FEDs with errors (FED or FE Level) per event",
385 bookHistogram(nFEDDAQProblems_,
387 "Number of FEDs with DAQ problems per event",
390 bookHistogram(nFEDsWithFEProblems_,
391 "nFEDsWithFEProblems",
392 "Number of FEDs with FE problems per event",
393 "# FEDs with FE problems");
395 bookHistogram(nFEDCorruptBuffers_,
396 "nFEDCorruptBuffers",
397 "Number of FEDs with corrupt buffers per event",
398 "# FEDs with corrupt buffer");
401 dqm_->setCurrentFolder(lBaseDir+
"/FED/VsId");
403 bookHistogram(dataMissing_,
"DataMissing",
404 "Number of events where the data from a FED with cabled channels is missing",
405 siStripFedIdMax-siStripFedIdMin+1,
406 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
408 bookHistogram(anyFEDErrors_,
"AnyFEDErrors",
409 "Number of buffers with any FED error (excluding bad channel status bits, FE problems except overflows) per FED",
410 siStripFedIdMax-siStripFedIdMin+1,
411 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
413 bookHistogram(corruptBuffers_,
"CorruptBuffers",
414 "Number of corrupt FED buffers per FED",
415 siStripFedIdMax-siStripFedIdMin+1,
416 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
418 bookHistogram(invalidBuffers_,
"InvalidBuffers",
419 "Number of invalid FED buffers per FED",
420 siStripFedIdMax-siStripFedIdMin+1,
421 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
423 bookHistogram(anyDAQProblems_,
"AnyDAQProblems",
424 "Number of buffers with any problems flagged in DAQ header (including CRC)",
425 siStripFedIdMax-siStripFedIdMin+1,
426 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
428 bookHistogram(badIDs_,
"BadIDs",
429 "Number of buffers with non-SiStrip source IDs in DAQ header",
430 siStripFedIdMax-siStripFedIdMin+1,
431 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
433 bookHistogram(badDAQCRCs_,
"BadDAQCRCs",
434 "Number of buffers with bad CRCs from the DAQ",
435 siStripFedIdMax-siStripFedIdMin+1,
436 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
438 bookHistogram(badFEDCRCs_,
"BadFEDCRCs",
439 "Number of buffers with bad CRCs from the FED",
440 siStripFedIdMax-siStripFedIdMin+1,
441 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
443 bookHistogram(badDAQPacket_,
"BadDAQPacket",
444 "Number of buffers with (non-CRC) problems flagged in DAQ header/trailer",
445 siStripFedIdMax-siStripFedIdMin+1,
446 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
448 dqm_->setCurrentFolder(lBaseDir+
"/FE");
450 bookHistogram(nFEDsWithFEOverflows_,
451 "nFEDsWithFEOverflows",
452 "Number FEDs with FE units which overflowed per event",
453 "# FEDs with FE overflows");
455 bookHistogram(nFEDsWithFEBadMajorityAddresses_,
456 "nFEDsWithFEBadMajorityAddresses",
457 "Number of FEDs with FE units with a bad majority address per event",
458 "# FEDs with bad address");
460 bookHistogram(nFEDsWithMissingFEs_,
461 "nFEDsWithMissingFEs",
462 "Number of FEDs with missing FE unit payloads per event",
463 "# FEDs with missing FEs");
465 bookHistogram(feMajFracTIB_,
"FeMajFracTIB",
466 "Fraction of FEs matching majority address in TIB partition",
467 101,0,1.01,
"n(majAddrFE)/n(totFE)");
469 bookHistogram(feMajFracTOB_,
"FeMajFracTOB",
470 "Fraction of FEs matching majority address in TOB partition",
471 101,0,1.01,
"n(majAddrFE)/n(totFE)");
473 bookHistogram(feMajFracTECB_,
"FeMajFracTECB",
474 "Fraction of FEs matching majority address in TECB partition",
475 101,0,1.01,
"n(majAddrFE)/n(totFE)");
477 bookHistogram(feMajFracTECF_,
"FeMajFracTECF",
478 "Fraction of FEs matching majority address in TECF partition",
479 101,0,1.01,
"n(majAddrFE)/n(totFE)");
482 dqm_->setCurrentFolder(lBaseDir+
"/FE/APVe");
484 bookHistogram(feTimeDiffTIB_,
"FETimeDiffTIB",
485 "(TimeLoc FE - TimeLoc APVe) for TIB/TID, when different",
487 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
489 bookHistogram(feTimeDiffTOB_,
"FETimeDiffTOB",
490 "(TimeLoc FE - TimeLoc APVe) for TOB, when different",
492 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
494 bookHistogram(feTimeDiffTECB_,
"FETimeDiffTECB",
495 "(TimeLoc FE - TimeLoc APVe) for TECB, when different",
497 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
499 bookHistogram(feTimeDiffTECF_,
"FETimeDiffTECF",
500 "(TimeLoc FE - TimeLoc APVe) for TECF, when different",
502 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
504 book2DHistogram(feTimeDiffvsDBX_,
"FETimeDiffvsDBX",
505 "(TimeLoc FE - TimeLoc APVe) vs DBX, when different",
508 0,201,
"DeltaBX",
"#Delta_{TimeLoc}(FE-APVe)");
511 bookHistogram(apveAddress_,
"ApveAddress",
516 bookHistogram(feMajAddress_,
"FeMajAddress",
517 "FE Majority Address",
522 dqm_->setCurrentFolder(lBaseDir+
"/FE/VsId");
524 bookHistogram(anyFEProblems_,
"AnyFEProblems",
525 "Number of buffers with any FE unit problems",
526 siStripFedIdMax-siStripFedIdMin+1,
527 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
529 bookHistogram(feOverflows_,
"FEOverflows",
530 "Number of buffers with one or more FE overflow",
531 siStripFedIdMax-siStripFedIdMin+1,
532 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
534 bookHistogram(badMajorityAddresses_,
"BadMajorityAddresses",
535 "Number of buffers with one or more FE with a bad majority APV address",
536 siStripFedIdMax-siStripFedIdMin+1,
537 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
539 bookHistogram(badMajorityInPartition_,
"BadMajorityInPartition",
540 "Number of buffers with >=1 FE with FEaddress != majority in partition",
541 siStripFedIdMax-siStripFedIdMin+1,
542 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
544 bookHistogram(feMissing_,
"FEMissing",
545 "Number of buffers with one or more FE unit payload missing",
546 siStripFedIdMax-siStripFedIdMin+1,
547 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
550 dqm_->setCurrentFolder(lBaseDir+
"/Fiber");
552 bookHistogram(nBadChannelStatusBits_,
553 "nBadChannelStatusBits",
554 "Number of channels with bad status bits per event",
555 "# bad enabled channels");
557 bookHistogram(nBadActiveChannelStatusBits_,
558 "nBadActiveChannelStatusBits",
559 "Number of active channels with bad status bits per event",
560 "# bad active channels");
562 bookHistogram(nUnlocked_,
564 "Number of channels Unlocked per event",
565 "# channels unlocked");
567 bookHistogram(nOutOfSync_,
569 "Number of channels OutOfSync per event",
570 "# channels out-of-sync");
572 bookHistogram(nUnconnectedChannels_,
573 "nUnconnectedChannels",
574 "Number of channels not connected per event",
575 "# unconnected channels");
577 dqm_->setCurrentFolder(lBaseDir+
"/Fiber/VsId");
579 bookHistogram(badChannelStatusBits_,
"BadChannelStatusBits",
580 "Number of buffers with one or more enabled channel with bad status bits",
581 siStripFedIdMax-siStripFedIdMin+1,
582 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
584 bookHistogram(badActiveChannelStatusBits_,
"BadActiveChannelStatusBits",
585 "Number of buffers with one or more active channel with bad status bits",
586 siStripFedIdMax-siStripFedIdMin+1,
587 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
589 dqm_->setCurrentFolder(lBaseDir+
"/APV");
591 bookHistogram(medianAPV0_,
"MedianAPV0",
595 bookHistogram(medianAPV1_,
"MedianAPV1",
599 bookHistogram(nAPVStatusBit_,
601 "Number of APVs with APVStatusBit error per event",
602 "# APVs with APVStatusBit error");
604 bookHistogram(nAPVError_,
606 "Number of APVs with APVError per event",
607 "#APVs with APVError");
609 bookHistogram(nAPVAddressError_,
611 "Number of APVs with APVAddressError per event",
612 "#APVs with APVAddressError");
615 dqm_->setCurrentFolder(lBaseDir+
"/Trends");
617 bookProfile(fedMaxEventSizevsTime_,
618 "FedMaxEventSizevsTime",
619 "Max FED buffer Size (B) per Event vs time",
623 "Max FED buffer Size (B)"
626 bookProfile(nTotalBadChannelsvsTime_,
627 "nTotalBadChannelsvsTime",
628 "Number of channels with any error vs time",
632 "Total # bad enabled channels"
636 bookProfile(nTotalBadActiveChannelsvsTime_,
637 "nTotalBadActiveChannelsvsTime",
638 "Number of active channels with any error vs time",
642 "Total # bad active channels"
645 dqm_->setCurrentFolder(lBaseDir+
"/Trends/FED");
647 bookProfile(nFEDErrorsvsTime_,
649 "Number of FEDs with any error vs time",
656 bookProfile(nFEDCorruptBuffersvsTime_,
657 "nFEDCorruptBuffersvsTime",
658 "Number of FEDs with corrupt buffer vs time",
665 dqm_->setCurrentFolder(lBaseDir+
"/Trends/FE");
667 bookProfile(nFEDsWithFEProblemsvsTime_,
668 "nFEDsWithFEProblemsvsTime",
669 "Number of FEDs with any FE error vs time",
673 "# FEDsWithFEProblems"
676 dqm_->setCurrentFolder(lBaseDir+
"/Trends/Fiber");
678 bookProfile(nUnlockedvsTime_,
680 "Number of channels Unlocked vs time",
684 "# channels unlocked "
687 bookProfile(nOutOfSyncvsTime_,
689 "Number of channels OutOfSync vs time",
693 "# channels out-of-sync"
696 dqm_->setCurrentFolder(lBaseDir+
"/Trends/APV");
698 bookProfile(nAPVStatusBitvsTime_,
699 "nAPVStatusBitvsTime",
700 "Number of APVs with APVStatusBit error vs time",
704 "# APVs with APVStatusBit error"
707 bookProfile(nAPVErrorvsTime_,
709 "Number of APVs with APVError vs time",
713 "# APVs with APVError"
716 bookProfile(nAPVAddressErrorvsTime_,
717 "nAPVAddressErrorvsTime",
718 "Number of APVs with APVAddressError vs time",
722 "# APVs with APVAddressError"
725 dqm_->setCurrentFolder(lBaseDir+
"/PerLumiSection");
727 bookHistogram(lumiErrorFraction_,
729 "Fraction of error per lumi section vs subdetector",
734 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
735 lumiErrorFraction_.monitorEle->setLumiFlag();
736 lumiErrorFraction_.monitorEle->setBinLabel(1,
"TECB");
737 lumiErrorFraction_.monitorEle->setBinLabel(2,
"TECF");
738 lumiErrorFraction_.monitorEle->setBinLabel(3,
"TIB");
739 lumiErrorFraction_.monitorEle->setBinLabel(4,
"TIDB");
740 lumiErrorFraction_.monitorEle->setBinLabel(5,
"TIDF");
741 lumiErrorFraction_.monitorEle->setBinLabel(6,
"TOB");
745 if (tkMapConfig_.enabled){
747 tkmapFED_ =
new TkHistoMap(
"SiStrip/TkHisto",
"TkHMap_FractionOfBadChannels",0.,1);
753 void FEDHistograms::bookFEDHistograms(
unsigned int fedId,
759 if (!histosBooked_[fedId]) {
764 std::stringstream fedIdStream;
765 fedIdStream << fedId;
766 dqm_->setCurrentFolder(fedKey.path());
767 bookHistogram(feOverflowDetailed_,
768 feOverflowDetailedMap_[fedId],
769 "FEOverflowsForFED"+fedIdStream.str(),
770 "FE overflows per FE unit for FED ID "+fedIdStream.str(),
773 bookHistogram(badMajorityAddressDetailed_,
774 badMajorityAddressDetailedMap_[fedId],
775 "BadMajorityAddressesForFED"+fedIdStream.str(),
776 "Bad majority APV addresses per FE unit for FED ID "+fedIdStream.str(),
779 bookHistogram(feMissingDetailed_,
780 feMissingDetailedMap_[fedId],
781 "FEMissingForFED"+fedIdStream.str(),
782 "Buffers with FE Unit payload missing per FE unit for FED ID "+fedIdStream.str(),
785 bookHistogram(badStatusBitsDetailed_,
786 badStatusBitsDetailedMap_[fedId],
787 "BadAPVStatusBitsForFED"+fedIdStream.str(),
788 "Bad apv status bits for FED ID "+fedIdStream.str(),
791 histosBooked_[fedId] =
true;
793 if (fullDebugMode && !debugHistosBooked_[fedId]) {
796 std::stringstream fedIdStream;
797 fedIdStream << fedId;
798 dqm_->setCurrentFolder(fedKey.path());
800 bookHistogram(apvErrorDetailed_,
801 apvErrorDetailedMap_[fedId],
802 "APVErrorBitsForFED"+fedIdStream.str(),
803 "APV errors for FED ID "+fedIdStream.str(),
806 bookHistogram(apvAddressErrorDetailed_,
807 apvAddressErrorDetailedMap_[fedId],
808 "APVAddressErrorBitsForFED"+fedIdStream.str(),
809 "Wrong APV address errors for FED ID "+fedIdStream.str(),
812 bookHistogram(unlockedDetailed_,
813 unlockedDetailedMap_[fedId],
814 "UnlockedBitsForFED"+fedIdStream.str(),
815 "Unlocked channels for FED ID "+fedIdStream.str(),
818 bookHistogram(outOfSyncDetailed_,
819 outOfSyncDetailedMap_[fedId],
820 "OOSBitsForFED"+fedIdStream.str(),
821 "Out of sync channels for FED ID "+fedIdStream.str(),
824 debugHistosBooked_[fedId] =
true;
828 void FEDHistograms::bookAllFEDHistograms()
834 for (
unsigned int iFed = siStripFedIdMin; iFed <= siStripFedIdMax; iFed++) {
835 bookFEDHistograms(iFed,
true);
839 bool FEDHistograms::tkHistoMapEnabled(
unsigned int aIndex){
840 return tkMapConfig_.enabled;
843 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