5 #include "DQM/SiStripMonitorHardware/interface/FEDHistograms.hh" 7 FEDHistograms::FEDHistograms() {}
9 FEDHistograms::~FEDHistograms() {}
11 void FEDHistograms::initialise(
const edm::ParameterSet& iConfig, std::ostringstream* pDebugStream) {
12 getConfigForHistogram(fedEventSize_,
"FedEventSize", iConfig, pDebugStream);
13 getConfigForHistogram(fedMaxEventSizevsTime_,
"FedMaxEventSizevsTime", iConfig, pDebugStream);
15 getConfigForHistogram(dataPresent_,
"DataPresent", iConfig, pDebugStream);
16 getConfigForHistogram(anyFEDErrors_,
"AnyFEDErrors", iConfig, pDebugStream);
17 getConfigForHistogram(anyDAQProblems_,
"AnyDAQProblems", iConfig, pDebugStream);
18 getConfigForHistogram(anyFEProblems_,
"AnyFEProblems", iConfig, pDebugStream);
19 getConfigForHistogram(corruptBuffers_,
"CorruptBuffers", iConfig, pDebugStream);
20 getConfigForHistogram(badChannelStatusBits_,
"BadChannelStatusBits", iConfig, pDebugStream);
21 getConfigForHistogram(badActiveChannelStatusBits_,
"BadActiveChannelStatusBits", iConfig, pDebugStream);
23 getConfigForHistogram(feOverflows_,
"FEOverflows", iConfig, pDebugStream);
24 getConfigForHistogram(feMissing_,
"FEMissing", iConfig, pDebugStream);
25 getConfigForHistogram(badMajorityAddresses_,
"BadMajorityAddresses", iConfig, pDebugStream);
26 getConfigForHistogram(badMajorityInPartition_,
"BadMajorityInPartition", iConfig, pDebugStream);
27 getConfigForHistogram(feMajFracTIB_,
"FeMajFracTIB", iConfig, pDebugStream);
28 getConfigForHistogram(feMajFracTOB_,
"FeMajFracTOB", iConfig, pDebugStream);
29 getConfigForHistogram(feMajFracTECB_,
"FeMajFracTECB", iConfig, pDebugStream);
30 getConfigForHistogram(feMajFracTECF_,
"FeMajFracTECF", iConfig, pDebugStream);
32 getConfigForHistogram(dataMissing_,
"DataMissing", iConfig, pDebugStream);
33 getConfigForHistogram(badIDs_,
"BadIDs", iConfig, pDebugStream);
34 getConfigForHistogram(badDAQPacket_,
"BadDAQPacket", iConfig, pDebugStream);
35 getConfigForHistogram(invalidBuffers_,
"InvalidBuffers", iConfig, pDebugStream);
36 getConfigForHistogram(badDAQCRCs_,
"BadDAQCRCs", iConfig, pDebugStream);
37 getConfigForHistogram(badFEDCRCs_,
"BadFEDCRCs", iConfig, pDebugStream);
39 getConfigForHistogram(feOverflowDetailed_,
"FEOverflowsDetailed", iConfig, pDebugStream);
40 getConfigForHistogram(feMissingDetailed_,
"FEMissingDetailed", iConfig, pDebugStream);
41 getConfigForHistogram(badMajorityAddressDetailed_,
"BadMajorityAddressesDetailed", iConfig, pDebugStream);
42 getConfigForHistogram(badStatusBitsDetailed_,
"BadAPVStatusBitsDetailed", iConfig, pDebugStream);
43 getConfigForHistogram(apvErrorDetailed_,
"APVErrorBitsDetailed", iConfig, pDebugStream);
44 getConfigForHistogram(apvAddressErrorDetailed_,
"APVAddressErrorBitsDetailed", iConfig, pDebugStream);
45 getConfigForHistogram(unlockedDetailed_,
"UnlockedBitsDetailed", iConfig, pDebugStream);
46 getConfigForHistogram(outOfSyncDetailed_,
"OOSBitsDetailed", iConfig, pDebugStream);
48 getConfigForHistogram(nFEDErrors_,
"nFEDErrors", iConfig, pDebugStream);
49 getConfigForHistogram(nFEDDAQProblems_,
"nFEDDAQProblems", iConfig, pDebugStream);
50 getConfigForHistogram(nFEDsWithFEProblems_,
"nFEDsWithFEProblems", iConfig, pDebugStream);
51 getConfigForHistogram(nFEDCorruptBuffers_,
"nFEDCorruptBuffers", iConfig, pDebugStream);
52 getConfigForHistogram(nBadChannelStatusBits_,
"nBadChannelStatusBits", iConfig, pDebugStream);
53 getConfigForHistogram(nBadActiveChannelStatusBits_,
"nBadActiveChannelStatusBits", iConfig, pDebugStream);
54 getConfigForHistogram(nFEDsWithFEOverflows_,
"nFEDsWithFEOverflows", iConfig, pDebugStream);
55 getConfigForHistogram(nFEDsWithMissingFEs_,
"nFEDsWithMissingFEs", iConfig, pDebugStream);
56 getConfigForHistogram(nFEDsWithFEBadMajorityAddresses_,
"nFEDsWithFEBadMajorityAddresses", iConfig, pDebugStream);
58 getConfigForHistogram(nFEDErrorsvsTime_,
"nFEDErrorsvsTime", iConfig, pDebugStream);
59 getConfigForHistogram(fedErrorsVsIdVsLumi_,
"fedErrorsVsIdVsLumi", iConfig, pDebugStream);
60 getConfigForHistogram(nFEDCorruptBuffersvsTime_,
"nFEDCorruptBuffersvsTime", iConfig, pDebugStream);
61 getConfigForHistogram(nFEDsWithFEProblemsvsTime_,
"nFEDsWithFEProblemsvsTime", iConfig, pDebugStream);
63 getConfigForHistogram(nUnconnectedChannels_,
"nUnconnectedChannels", iConfig, pDebugStream);
65 getConfigForHistogram(nTotalBadChannels_,
"nTotalBadChannels", iConfig, pDebugStream);
66 getConfigForHistogram(nTotalBadActiveChannels_,
"nTotalBadActiveChannels", iConfig, pDebugStream);
68 getConfigForHistogram(nTotalBadChannelsvsTime_,
"nTotalBadChannelsvsTime", iConfig, pDebugStream);
69 getConfigForHistogram(nTotalBadActiveChannelsvsTime_,
"nTotalBadActiveChannelsvsTime", iConfig, pDebugStream);
71 getConfigForHistogram(nAPVStatusBit_,
"nAPVStatusBit", iConfig, pDebugStream);
72 getConfigForHistogram(nAPVError_,
"nAPVError", iConfig, pDebugStream);
73 getConfigForHistogram(nAPVAddressError_,
"nAPVAddressError", iConfig, pDebugStream);
74 getConfigForHistogram(nUnlocked_,
"nUnlocked", iConfig, pDebugStream);
75 getConfigForHistogram(nOutOfSync_,
"nOutOfSync", iConfig, pDebugStream);
77 getConfigForHistogram(nAPVStatusBitvsTime_,
"nAPVStatusBitvsTime", iConfig, pDebugStream);
78 getConfigForHistogram(nAPVErrorvsTime_,
"nAPVErrorvsTime", iConfig, pDebugStream);
79 getConfigForHistogram(nAPVAddressErrorvsTime_,
"nAPVAddressErrorvsTime", iConfig, pDebugStream);
80 getConfigForHistogram(nUnlockedvsTime_,
"nUnlockedvsTime", iConfig, pDebugStream);
81 getConfigForHistogram(nOutOfSyncvsTime_,
"nOutOfSyncvsTime", iConfig, pDebugStream);
83 getConfigForHistogram(tkMapConfig_,
"TkHistoMap", iConfig, pDebugStream);
85 getConfigForHistogram(feTimeDiffTIB_,
"FETimeDiffTIB", iConfig, pDebugStream);
86 getConfigForHistogram(feTimeDiffTOB_,
"FETimeDiffTOB", iConfig, pDebugStream);
87 getConfigForHistogram(feTimeDiffTECB_,
"FETimeDiffTECB", iConfig, pDebugStream);
88 getConfigForHistogram(feTimeDiffTECF_,
"FETimeDiffTECF", iConfig, pDebugStream);
90 getConfigForHistogram(feTimeDiffvsDBX_,
"FETimeDiffvsDBX", iConfig, pDebugStream);
92 getConfigForHistogram(apveAddress_,
"ApveAddress", iConfig, pDebugStream);
93 getConfigForHistogram(feMajAddress_,
"FeMajAddress", iConfig, pDebugStream);
95 getConfigForHistogram(medianAPV0_,
"MedianAPV0", iConfig, pDebugStream);
96 getConfigForHistogram(medianAPV1_,
"MedianAPV1", iConfig, pDebugStream);
98 getConfigForHistogram(fedIdVsApvId_,
"FedIdVsApvId", iConfig, pDebugStream);
100 getConfigForHistogram(fedErrorsVsId_,
"FedErrorsVsId", iConfig, pDebugStream);
103 void FEDHistograms::fillCountersHistograms(
const FEDErrors::FEDCounters& fedLevelCounters,
104 const FEDErrors::ChannelCounters& chLevelCounters,
105 const unsigned int aMaxSize,
106 const double aTime) {
107 fillHistogram(fedMaxEventSizevsTime_, aTime, aMaxSize);
109 fillHistogram(nFEDErrors_, fedLevelCounters.nFEDErrors);
110 fillHistogram(nFEDDAQProblems_, fedLevelCounters.nDAQProblems);
111 fillHistogram(nFEDsWithFEProblems_, fedLevelCounters.nFEDsWithFEProblems);
112 fillHistogram(nFEDCorruptBuffers_, fedLevelCounters.nCorruptBuffers);
113 fillHistogram(nFEDsWithFEOverflows_, fedLevelCounters.nFEDsWithFEOverflows);
114 fillHistogram(nFEDsWithFEBadMajorityAddresses_, fedLevelCounters.nFEDsWithFEBadMajorityAddresses);
115 fillHistogram(nFEDsWithMissingFEs_, fedLevelCounters.nFEDsWithMissingFEs);
116 fillHistogram(nBadChannelStatusBits_, fedLevelCounters.nBadChannels);
117 fillHistogram(nBadActiveChannelStatusBits_, fedLevelCounters.nBadActiveChannels);
119 fillHistogram(nFEDErrorsvsTime_, aTime, fedLevelCounters.nFEDErrors);
120 fillHistogram(nFEDCorruptBuffersvsTime_, aTime, fedLevelCounters.nCorruptBuffers);
121 fillHistogram(nFEDsWithFEProblemsvsTime_, aTime, fedLevelCounters.nFEDsWithFEProblems);
123 fillHistogram(nUnconnectedChannels_, chLevelCounters.nNotConnected);
125 fillHistogram(nTotalBadChannels_, fedLevelCounters.nTotalBadChannels);
126 fillHistogram(nTotalBadActiveChannels_, fedLevelCounters.nTotalBadActiveChannels);
128 fillHistogram(nTotalBadChannelsvsTime_, aTime, fedLevelCounters.nTotalBadChannels);
129 fillHistogram(nTotalBadActiveChannelsvsTime_, aTime, fedLevelCounters.nTotalBadActiveChannels);
131 fillHistogram(nAPVStatusBit_, chLevelCounters.nAPVStatusBit);
132 fillHistogram(nAPVError_, chLevelCounters.nAPVError);
133 fillHistogram(nAPVAddressError_, chLevelCounters.nAPVAddressError);
134 fillHistogram(nUnlocked_, chLevelCounters.nUnlocked);
135 fillHistogram(nOutOfSync_, chLevelCounters.nOutOfSync);
137 fillHistogram(nAPVStatusBitvsTime_, aTime, chLevelCounters.nAPVStatusBit);
138 fillHistogram(nAPVErrorvsTime_, aTime, chLevelCounters.nAPVError);
139 fillHistogram(nAPVAddressErrorvsTime_, aTime, chLevelCounters.nAPVAddressError);
140 fillHistogram(nUnlockedvsTime_, aTime, chLevelCounters.nUnlocked);
141 fillHistogram(nOutOfSyncvsTime_, aTime, chLevelCounters.nOutOfSync);
144 void FEDHistograms::fillFEDHistograms(FEDErrors& aFedErr,
145 const unsigned int aEvtSize,
147 const double aLumiSection,
148 unsigned int& NumBadChannels_perFEDID) {
149 const FEDErrors::FEDLevelErrors& lFedLevelErrors = aFedErr.getFEDLevelErrors();
150 const unsigned int lFedId = aFedErr.fedID();
152 fillHistogram(fedEventSize_, lFedId, aEvtSize);
154 if (lFedLevelErrors.DataPresent)
155 fillHistogram(dataPresent_, lFedId);
157 if (lFedLevelErrors.HasCabledChannels && lFedLevelErrors.DataMissing) {
158 fillHistogram(dataMissing_, lFedId);
159 fillHistogram(fedErrorsVsId_, lFedId, 1);
162 if (lFedLevelErrors.InvalidBuffers) {
163 fillHistogram(invalidBuffers_, lFedId);
164 fillHistogram(fedErrorsVsId_, lFedId, 2);
165 }
else if (lFedLevelErrors.CorruptBuffer) {
166 fillHistogram(corruptBuffers_, lFedId);
167 fillHistogram(fedErrorsVsId_, lFedId, 3);
168 }
else if (lFedLevelErrors.BadFEDCRCs) {
169 fillHistogram(badFEDCRCs_, lFedId);
170 fillHistogram(fedErrorsVsId_, lFedId, 4);
171 }
else if (lFedLevelErrors.BadDAQCRCs) {
172 fillHistogram(badDAQCRCs_, lFedId);
173 fillHistogram(fedErrorsVsId_, lFedId, 5);
174 }
else if (lFedLevelErrors.BadIDs) {
175 fillHistogram(badIDs_, lFedId);
176 fillHistogram(fedErrorsVsId_, lFedId, 6);
177 }
else if (lFedLevelErrors.BadDAQPacket) {
178 fillHistogram(badDAQPacket_, lFedId);
179 fillHistogram(fedErrorsVsId_, lFedId, 7);
182 if (aFedErr.anyFEDErrors()) {
183 fillHistogram(anyFEDErrors_, lFedId);
184 fillHistogram(fedErrorsVsId_, lFedId, 8);
187 if (lFedLevelErrors.HasCabledChannels && aFedErr.anyDAQProblems()) {
188 fillHistogram(anyDAQProblems_, lFedId);
189 fillHistogram(fedErrorsVsId_, lFedId, 9);
191 if (aFedErr.anyFEProblems()) {
192 fillHistogram(anyFEProblems_, lFedId);
193 fillHistogram(fedErrorsVsId_, lFedId, 10);
196 if (lFedLevelErrors.FEsOverflow) {
197 fillHistogram(feOverflows_, lFedId);
198 fillHistogram(fedErrorsVsId_, lFedId, 11);
200 if (lFedLevelErrors.FEsMissing) {
201 fillHistogram(feMissing_, lFedId);
202 fillHistogram(fedErrorsVsId_, lFedId, 12);
204 if (lFedLevelErrors.FEsBadMajorityAddress) {
205 fillHistogram(badMajorityAddresses_, lFedId);
206 fillHistogram(fedErrorsVsId_, lFedId, 13);
209 if (lFedLevelErrors.BadChannelStatusBit) {
210 fillHistogram(badChannelStatusBits_, lFedId);
211 fillHistogram(fedErrorsVsId_, lFedId, 14);
213 if (lFedLevelErrors.BadActiveChannelStatusBit) {
214 fillHistogram(badActiveChannelStatusBits_, lFedId);
215 fillHistogram(fedErrorsVsId_, lFedId, 15);
218 std::vector<FEDErrors::FELevelErrors>& lFeVec = aFedErr.getFELevelErrors();
220 for (
unsigned int iFe(0); iFe < lFeVec.size(); iFe++) {
221 fillFEHistograms(lFedId, lFeVec[iFe], aFedErr.getEventProperties());
224 std::vector<FEDErrors::ChannelLevelErrors>& lChVec = aFedErr.getChannelLevelErrors();
225 for (
unsigned int iCh(0); iCh < lChVec.size(); iCh++) {
226 fillChannelsHistograms(lFedId, lChVec[iCh], lFullDebug);
229 std::vector<FEDErrors::APVLevelErrors>& lAPVVec = aFedErr.getAPVLevelErrors();
230 for (
unsigned int iApv(0); iApv < lAPVVec.size(); iApv++) {
231 fillAPVsHistograms(lFedId, lAPVVec[iApv], lFullDebug);
234 double numChannelLevelErrors = 0;
235 if (fedErrorsVsIdVsLumi_.globalswitchon) {
236 numChannelLevelErrors = double(lChVec.size());
237 fillHistogram2D(fedErrorsVsIdVsLumi_, aLumiSection, lFedId, numChannelLevelErrors);
242 void FEDHistograms::fillFEHistograms(
const unsigned int aFedId,
243 const FEDErrors::FELevelErrors& aFeLevelErrors,
244 const FEDErrors::EventProperties& aEventProp) {
245 const unsigned short lFeId = aFeLevelErrors.FeID;
253 if (aFeLevelErrors.Overflow)
254 fillHistogram(feOverflowDetailedMap_[aFedId], lFeId);
255 else if (aFeLevelErrors.Missing)
256 fillHistogram(feMissingDetailedMap_[aFedId], lFeId);
257 else if (aFeLevelErrors.BadMajorityAddress)
258 fillHistogram(badMajorityAddressDetailedMap_[aFedId], lFeId);
260 if (aFeLevelErrors.TimeDifference != 0) {
261 if (aFeLevelErrors.SubDetID == 2 || aFeLevelErrors.SubDetID == 3 || aFeLevelErrors.SubDetID == 4)
262 fillHistogram(feTimeDiffTIB_, aFeLevelErrors.TimeDifference);
263 else if (aFeLevelErrors.SubDetID == 5)
264 fillHistogram(feTimeDiffTOB_, aFeLevelErrors.TimeDifference);
265 else if (aFeLevelErrors.SubDetID == 0)
266 fillHistogram(feTimeDiffTECB_, aFeLevelErrors.TimeDifference);
267 else if (aFeLevelErrors.SubDetID == 1)
268 fillHistogram(feTimeDiffTECF_, aFeLevelErrors.TimeDifference);
272 aFeLevelErrors.TimeDifference < 0 ? aFeLevelErrors.TimeDifference + 192 : aFeLevelErrors.TimeDifference);
273 fillHistogram(apveAddress_, aFeLevelErrors.Apve);
274 fillHistogram(feMajAddress_, aFeLevelErrors.FeMaj);
279 void FEDHistograms::fillChannelsHistograms(
const unsigned int aFedId,
280 const FEDErrors::ChannelLevelErrors& aChErr,
282 unsigned int lChId = aChErr.ChannelID;
289 if (aChErr.Unlocked) {
290 fillHistogram(unlockedDetailedMap_[aFedId], lChId);
292 if (aChErr.OutOfSync) {
293 fillHistogram(outOfSyncDetailedMap_[aFedId], lChId);
297 void FEDHistograms::fillAPVsHistograms(
const unsigned int aFedId,
298 const FEDErrors::APVLevelErrors& aAPVErr,
300 unsigned int lChId = aAPVErr.APVID;
308 if (aAPVErr.APVStatusBit)
309 fillHistogram(badStatusBitsDetailedMap_[aFedId], lChId);
310 if (aAPVErr.APVError)
311 fillHistogram(apvErrorDetailedMap_[aFedId], lChId);
312 if (aAPVErr.APVAddressError)
313 fillHistogram(apvAddressErrorDetailedMap_[aFedId], lChId);
316 void FEDHistograms::fillMajorityHistograms(
const unsigned int aPart,
318 const std::vector<unsigned int>& aFedIdVec) {
320 fillHistogram(feMajFracTIB_, aValue);
322 fillHistogram(feMajFracTOB_, aValue);
324 fillHistogram(feMajFracTECB_, aValue);
326 fillHistogram(feMajFracTECF_, aValue);
328 for (
unsigned int iFed(0); iFed < aFedIdVec.size(); ++iFed) {
329 fillHistogram(badMajorityInPartition_, aFedIdVec[iFed]);
333 bool FEDHistograms::feMajHistosEnabled() {
334 return (feMajFracTIB_.enabled || feMajFracTOB_.enabled || feMajFracTECB_.enabled || feMajFracTECF_.enabled ||
335 badMajorityInPartition_.enabled);
338 bool FEDHistograms::cmHistosEnabled() {
return (medianAPV0_.enabled || medianAPV1_.enabled); }
342 return medianAPV0_.monitorEle;
344 return medianAPV1_.monitorEle;
357 histosBooked_.resize(siStripFedIdMax + 1,
false);
358 debugHistosBooked_.resize(siStripFedIdMax + 1,
false);
364 "Average FED buffer Size (B) per Event",
365 siStripFedIdMax - siStripFedIdMin + 1,
366 siStripFedIdMin - 0.5,
367 siStripFedIdMax + 0.5,
371 "<FED buffer Size> (B)");
373 bookHistogram(ibooker,
376 "Number of events where the data from a FED is seen",
377 siStripFedIdMax - siStripFedIdMin + 1,
378 siStripFedIdMin - 0.5,
379 siStripFedIdMax + 0.5,
382 bookHistogram(ibooker,
385 "Number of channels with any error",
386 "Total # bad enabled channels");
388 bookHistogram(ibooker,
389 nTotalBadActiveChannels_,
390 "nTotalBadActiveChannels",
391 "Number of active channels with any error",
392 "Total # bad active channels");
394 book2DHistogram(ibooker,
397 "Any error per APV per event",
407 book2DHistogram(ibooker,
411 siStripFedIdMax - siStripFedIdMin + 1,
419 fedErrorsVsId_.monitorEle->setBinLabel(1,
"Data Missing", 2);
420 fedErrorsVsId_.monitorEle->setBinLabel(2,
"Invalid Buffers", 2);
421 fedErrorsVsId_.monitorEle->setBinLabel(3,
"Corrupt Buffers", 2);
422 fedErrorsVsId_.monitorEle->setBinLabel(4,
"Bad FED CRC", 2);
423 fedErrorsVsId_.monitorEle->setBinLabel(5,
"Bad DAQ CRC", 2);
424 fedErrorsVsId_.monitorEle->setBinLabel(6,
"Bad IDs", 2);
425 fedErrorsVsId_.monitorEle->setBinLabel(7,
"Bad DAQ Packet", 2);
426 fedErrorsVsId_.monitorEle->setBinLabel(8,
"Any FED Errors", 2);
427 fedErrorsVsId_.monitorEle->setBinLabel(9,
"Any DAQ Problems", 2);
428 fedErrorsVsId_.monitorEle->setBinLabel(10,
"Any FE Problems", 2);
429 fedErrorsVsId_.monitorEle->setBinLabel(11,
"FE Overflows", 2);
430 fedErrorsVsId_.monitorEle->setBinLabel(12,
"FE Missing", 2);
431 fedErrorsVsId_.monitorEle->setBinLabel(13,
"FE Bad Maj Addr", 2);
432 fedErrorsVsId_.monitorEle->setBinLabel(14,
"Bad Ch Stat Bit", 2);
433 fedErrorsVsId_.monitorEle->setBinLabel(15,
"Bad Active Ch Stat Bit", 2);
440 ibooker, nFEDErrors_,
"nFEDErrors",
"Number of FEDs with errors (FED or FE Level) per event",
"# FEDErrors");
443 ibooker, nFEDDAQProblems_,
"nFEDDAQProblems",
"Number of FEDs with DAQ problems per event",
"# FEDDAQProblems");
445 bookHistogram(ibooker,
446 nFEDsWithFEProblems_,
447 "nFEDsWithFEProblems",
448 "Number of FEDs with FE problems per event",
449 "# FEDs with FE problems");
451 bookHistogram(ibooker,
453 "nFEDCorruptBuffers",
454 "Number of FEDs with corrupt buffers per event",
455 "# FEDs with corrupt buffer");
459 bookHistogram(ibooker,
462 "Number of events where the data from a FED with cabled channels is missing",
463 siStripFedIdMax - siStripFedIdMin + 1,
464 siStripFedIdMin - 0.5,
465 siStripFedIdMax + 0.5,
472 "Number of buffers with any FED error (excluding bad channel status bits, FE problems except overflows) per FED",
473 siStripFedIdMax - siStripFedIdMin + 1,
474 siStripFedIdMin - 0.5,
475 siStripFedIdMax + 0.5,
478 bookHistogram(ibooker,
481 "Number of corrupt FED buffers per FED",
482 siStripFedIdMax - siStripFedIdMin + 1,
483 siStripFedIdMin - 0.5,
484 siStripFedIdMax + 0.5,
487 bookHistogram(ibooker,
490 "Number of invalid FED buffers per FED",
491 siStripFedIdMax - siStripFedIdMin + 1,
492 siStripFedIdMin - 0.5,
493 siStripFedIdMax + 0.5,
496 bookHistogram(ibooker,
499 "Number of buffers with any problems flagged in DAQ header (including CRC)",
500 siStripFedIdMax - siStripFedIdMin + 1,
501 siStripFedIdMin - 0.5,
502 siStripFedIdMax + 0.5,
505 bookHistogram(ibooker,
508 "Number of buffers with non-SiStrip source IDs in DAQ header",
509 siStripFedIdMax - siStripFedIdMin + 1,
510 siStripFedIdMin - 0.5,
511 siStripFedIdMax + 0.5,
514 bookHistogram(ibooker,
517 "Number of buffers with bad CRCs from the DAQ",
518 siStripFedIdMax - siStripFedIdMin + 1,
519 siStripFedIdMin - 0.5,
520 siStripFedIdMax + 0.5,
523 bookHistogram(ibooker,
526 "Number of buffers with bad CRCs from the FED",
527 siStripFedIdMax - siStripFedIdMin + 1,
528 siStripFedIdMin - 0.5,
529 siStripFedIdMax + 0.5,
532 bookHistogram(ibooker,
535 "Number of buffers with (non-CRC) problems flagged in DAQ header/trailer",
536 siStripFedIdMax - siStripFedIdMin + 1,
537 siStripFedIdMin - 0.5,
538 siStripFedIdMax + 0.5,
543 bookHistogram(ibooker,
544 nFEDsWithFEOverflows_,
545 "nFEDsWithFEOverflows",
546 "Number FEDs with FE units which overflowed per event",
547 "# FEDs with FE overflows");
549 bookHistogram(ibooker,
550 nFEDsWithFEBadMajorityAddresses_,
551 "nFEDsWithFEBadMajorityAddresses",
552 "Number of FEDs with FE units with a bad majority address per event",
553 "# FEDs with bad address");
555 bookHistogram(ibooker,
556 nFEDsWithMissingFEs_,
557 "nFEDsWithMissingFEs",
558 "Number of FEDs with missing FE unit payloads per event",
559 "# FEDs with missing FEs");
561 bookHistogram(ibooker,
564 "Fraction of FEs matching majority address in TIB partition",
568 "n(majAddrFE)/n(totFE)");
570 bookHistogram(ibooker,
573 "Fraction of FEs matching majority address in TOB partition",
577 "n(majAddrFE)/n(totFE)");
579 bookHistogram(ibooker,
582 "Fraction of FEs matching majority address in TECB partition",
586 "n(majAddrFE)/n(totFE)");
588 bookHistogram(ibooker,
591 "Fraction of FEs matching majority address in TECF partition",
595 "n(majAddrFE)/n(totFE)");
599 bookHistogram(ibooker,
602 "(TimeLoc FE - TimeLoc APVe) for TIB/TID, when different",
606 "#Delta_{TimeLoc}(FE-APVe)");
608 bookHistogram(ibooker,
611 "(TimeLoc FE - TimeLoc APVe) for TOB, when different",
615 "#Delta_{TimeLoc}(FE-APVe)");
617 bookHistogram(ibooker,
620 "(TimeLoc FE - TimeLoc APVe) for TECB, when different",
624 "#Delta_{TimeLoc}(FE-APVe)");
626 bookHistogram(ibooker,
629 "(TimeLoc FE - TimeLoc APVe) for TECF, when different",
633 "#Delta_{TimeLoc}(FE-APVe)");
635 book2DHistogram(ibooker,
638 "(TimeLoc FE - TimeLoc APVe) vs DBX, when different",
646 "#Delta_{TimeLoc}(FE-APVe)");
648 bookHistogram(ibooker, apveAddress_,
"ApveAddress",
"apve Address", 256, 0, 256,
"apveAddress");
650 bookHistogram(ibooker, feMajAddress_,
"FeMajAddress",
"FE Majority Address", 256, 0, 256,
"feMajAddress");
654 bookHistogram(ibooker,
657 "Number of buffers with any FE unit problems",
658 siStripFedIdMax - siStripFedIdMin + 1,
659 siStripFedIdMin - 0.5,
660 siStripFedIdMax + 0.5,
663 bookHistogram(ibooker,
666 "Number of buffers with one or more FE overflow",
667 siStripFedIdMax - siStripFedIdMin + 1,
668 siStripFedIdMin - 0.5,
669 siStripFedIdMax + 0.5,
672 bookHistogram(ibooker,
673 badMajorityAddresses_,
674 "BadMajorityAddresses",
675 "Number of buffers with one or more FE with a bad majority APV address",
676 siStripFedIdMax - siStripFedIdMin + 1,
677 siStripFedIdMin - 0.5,
678 siStripFedIdMax + 0.5,
681 bookHistogram(ibooker,
682 badMajorityInPartition_,
683 "BadMajorityInPartition",
684 "Number of buffers with >=1 FE with FEaddress != majority in partition",
685 siStripFedIdMax - siStripFedIdMin + 1,
686 siStripFedIdMin - 0.5,
687 siStripFedIdMax + 0.5,
690 bookHistogram(ibooker,
693 "Number of buffers with one or more FE unit payload missing",
694 siStripFedIdMax - siStripFedIdMin + 1,
695 siStripFedIdMin - 0.5,
696 siStripFedIdMax + 0.5,
701 bookHistogram(ibooker,
702 nBadChannelStatusBits_,
703 "nBadChannelStatusBits",
704 "Number of channels with bad status bits per event",
705 "# bad enabled channels");
707 bookHistogram(ibooker,
708 nBadActiveChannelStatusBits_,
709 "nBadActiveChannelStatusBits",
710 "Number of active channels with bad status bits per event",
711 "# bad active channels");
713 bookHistogram(ibooker, nUnlocked_,
"nUnlocked",
"Number of channels Unlocked per event",
"# channels unlocked");
715 bookHistogram(ibooker, nOutOfSync_,
"nOutOfSync",
"Number of channels OutOfSync per event",
"# channels out-of-sync");
717 bookHistogram(ibooker,
718 nUnconnectedChannels_,
719 "nUnconnectedChannels",
720 "Number of channels not connected per event",
721 "# unconnected channels");
725 bookHistogram(ibooker,
726 badChannelStatusBits_,
727 "BadChannelStatusBits",
728 "Number of buffers with one or more enabled channel with bad status bits",
729 siStripFedIdMax - siStripFedIdMin + 1,
730 siStripFedIdMin - 0.5,
731 siStripFedIdMax + 0.5,
734 bookHistogram(ibooker,
735 badActiveChannelStatusBits_,
736 "BadActiveChannelStatusBits",
737 "Number of buffers with one or more active channel with bad status bits",
738 siStripFedIdMax - siStripFedIdMin + 1,
739 siStripFedIdMin - 0.5,
740 siStripFedIdMax + 0.5,
745 bookHistogram(ibooker, medianAPV0_,
"MedianAPV0",
"Median APV0",
"medianAPV0");
747 bookHistogram(ibooker, medianAPV1_,
"MedianAPV1",
"Median APV1",
"MedianAPV1");
749 bookHistogram(ibooker,
752 "Number of APVs with APVStatusBit error per event",
753 "# APVs with APVStatusBit error");
755 bookHistogram(ibooker, nAPVError_,
"nAPVError",
"Number of APVs with APVError per event",
"#APVs with APVError");
757 bookHistogram(ibooker,
760 "Number of APVs with APVAddressError per event",
761 "#APVs with APVAddressError");
766 fedMaxEventSizevsTime_,
767 "FedMaxEventSizevsTime",
768 "Max FED buffer Size (B) per Event vs time",
772 "Max FED buffer Size (B)");
775 nTotalBadChannelsvsTime_,
776 "nTotalBadChannelsvsTime",
777 "Number of channels with any error vs time",
781 "Total # bad enabled channels");
784 nTotalBadActiveChannelsvsTime_,
785 "nTotalBadActiveChannelsvsTime",
786 "Number of active channels with any error vs time",
790 "Total # bad active channels");
794 if (fedErrorsVsIdVsLumi_.globalswitchon) {
795 bookProfile2D(ibooker,
796 fedErrorsVsIdVsLumi_,
797 "fedErrorsVsIdVsLumi",
798 "Total number of errors per FED ID per lumi section",
809 "Number of FEDs with any error vs time",
816 nFEDCorruptBuffersvsTime_,
817 "nFEDCorruptBuffersvsTime",
818 "Number of FEDs with corrupt buffer vs time",
822 "# FEDCorruptBuffer");
827 nFEDsWithFEProblemsvsTime_,
828 "nFEDsWithFEProblemsvsTime",
829 "Number of FEDs with any FE error vs time",
833 "# FEDsWithFEProblems");
840 "Number of channels Unlocked vs time",
844 "# channels unlocked ");
849 "Number of channels OutOfSync vs time",
853 "# channels out-of-sync");
858 nAPVStatusBitvsTime_,
859 "nAPVStatusBitvsTime",
860 "Number of APVs with APVStatusBit error vs time",
864 "# APVs with APVStatusBit error");
869 "Number of APVs with APVError vs time",
873 "# APVs with APVError");
876 nAPVAddressErrorvsTime_,
877 "nAPVAddressErrorvsTime",
878 "Number of APVs with APVAddressError vs time",
882 "# APVs with APVAddressError");
885 if (tkMapConfig_.enabled) {
886 tkmapFED_ = std::make_unique<TkHistoMap>(tkDetMap,
topFolderName,
"TkHMap_FractionOfBadChannels", 0.,
true);
891 void FEDHistograms::bookFEDHistograms(
DQMStore::IBooker& ibooker,
unsigned int fedId,
bool fullDebugMode) {
892 if (!histosBooked_[
fedId]) {
895 std::stringstream fedIdStream;
896 fedIdStream <<
fedId;
899 bookHistogram(ibooker,
901 feOverflowDetailedMap_[
fedId],
902 "FEOverflowsForFED" + fedIdStream.str(),
903 "FE overflows per FE unit for FED ID " + fedIdStream.str(),
908 bookHistogram(ibooker,
909 badMajorityAddressDetailed_,
910 badMajorityAddressDetailedMap_[
fedId],
911 "BadMajorityAddressesForFED" + fedIdStream.str(),
912 "Bad majority APV addresses per FE unit for FED ID " + fedIdStream.str(),
917 bookHistogram(ibooker,
919 feMissingDetailedMap_[
fedId],
920 "FEMissingForFED" + fedIdStream.str(),
921 "Buffers with FE Unit payload missing per FE unit for FED ID " + fedIdStream.str(),
926 bookHistogram(ibooker,
927 badStatusBitsDetailed_,
928 badStatusBitsDetailedMap_[
fedId],
929 "BadAPVStatusBitsForFED" + fedIdStream.str(),
930 "Bad apv status bits for FED ID " + fedIdStream.str(),
935 histosBooked_[
fedId] =
true;
937 if (fullDebugMode && !debugHistosBooked_[
fedId]) {
940 std::stringstream fedIdStream;
941 fedIdStream <<
fedId;
944 bookHistogram(ibooker,
946 apvErrorDetailedMap_[
fedId],
947 "APVErrorBitsForFED" + fedIdStream.str(),
948 "APV errors for FED ID " + fedIdStream.str(),
953 bookHistogram(ibooker,
954 apvAddressErrorDetailed_,
955 apvAddressErrorDetailedMap_[
fedId],
956 "APVAddressErrorBitsForFED" + fedIdStream.str(),
957 "Wrong APV address errors for FED ID " + fedIdStream.str(),
962 bookHistogram(ibooker,
964 unlockedDetailedMap_[
fedId],
965 "UnlockedBitsForFED" + fedIdStream.str(),
966 "Unlocked channels for FED ID " + fedIdStream.str(),
971 bookHistogram(ibooker,
973 outOfSyncDetailedMap_[
fedId],
974 "OOSBitsForFED" + fedIdStream.str(),
975 "Out of sync channels for FED ID " + fedIdStream.str(),
980 debugHistosBooked_[
fedId] =
true;
984 void FEDHistograms::bookAllFEDHistograms(
DQMStore::IBooker& ibooker,
bool fullDebugMode) {
989 for (
unsigned int iFed = siStripFedIdMin; iFed <= siStripFedIdMax; iFed++)
990 bookFEDHistograms(ibooker, iFed, fullDebugMode);
993 bool FEDHistograms::tkHistoMapEnabled(
unsigned int aIndex) {
return tkMapConfig_.enabled; }
995 TkHistoMap* FEDHistograms::tkHistoMapPointer(
unsigned int aIndex) {
return tkmapFED_.get(); }
virtual void setCurrentFolder(std::string const &fullpath)
A container class for generic run and event-related info, information required by the commissioning a...
virtual std::string pwd()
static const uint16_t FEUNITS_PER_FED
static const uint16_t APVS_PER_FED
dqm::legacy::MonitorElement MonitorElement
Constants and enumerated types for FED/FEC systems.
static const uint16_t FEDCH_PER_FED