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);
111 getConfigForHistogram(fedErrorsVsId_,
"FedErrorsVsId",iConfig,pDebugStream);
114 void FEDHistograms::fillCountersHistograms(
const FEDErrors::FEDCounters & fedLevelCounters,
115 const FEDErrors::ChannelCounters & chLevelCounters,
116 const unsigned int aMaxSize,
119 fillHistogram(fedMaxEventSizevsTime_,aTime,aMaxSize);
121 fillHistogram(nFEDErrors_,fedLevelCounters.nFEDErrors);
122 fillHistogram(nFEDDAQProblems_,fedLevelCounters.nDAQProblems);
123 fillHistogram(nFEDsWithFEProblems_,fedLevelCounters.nFEDsWithFEProblems);
124 fillHistogram(nFEDCorruptBuffers_,fedLevelCounters.nCorruptBuffers);
125 fillHistogram(nFEDsWithFEOverflows_,fedLevelCounters.nFEDsWithFEOverflows);
126 fillHistogram(nFEDsWithFEBadMajorityAddresses_,fedLevelCounters.nFEDsWithFEBadMajorityAddresses);
127 fillHistogram(nFEDsWithMissingFEs_,fedLevelCounters.nFEDsWithMissingFEs);
128 fillHistogram(nBadChannelStatusBits_,fedLevelCounters.nBadChannels);
129 fillHistogram(nBadActiveChannelStatusBits_,fedLevelCounters.nBadActiveChannels);
131 fillHistogram(nFEDErrorsvsTime_,aTime,fedLevelCounters.nFEDErrors);
132 fillHistogram(nFEDCorruptBuffersvsTime_,aTime,fedLevelCounters.nCorruptBuffers);
133 fillHistogram(nFEDsWithFEProblemsvsTime_,aTime,fedLevelCounters.nFEDsWithFEProblems);
135 fillHistogram(nUnconnectedChannels_,chLevelCounters.nNotConnected);
137 fillHistogram(nTotalBadChannels_,fedLevelCounters.nTotalBadChannels);
138 fillHistogram(nTotalBadActiveChannels_,fedLevelCounters.nTotalBadActiveChannels);
140 fillHistogram(nTotalBadChannelsvsTime_,aTime,fedLevelCounters.nTotalBadChannels);
141 fillHistogram(nTotalBadActiveChannelsvsTime_,aTime,fedLevelCounters.nTotalBadActiveChannels);
143 fillHistogram(nAPVStatusBit_,chLevelCounters.nAPVStatusBit);
144 fillHistogram(nAPVError_,chLevelCounters.nAPVError);
145 fillHistogram(nAPVAddressError_,chLevelCounters.nAPVAddressError);
146 fillHistogram(nUnlocked_,chLevelCounters.nUnlocked);
147 fillHistogram(nOutOfSync_,chLevelCounters.nOutOfSync);
149 fillHistogram(nAPVStatusBitvsTime_,aTime,chLevelCounters.nAPVStatusBit);
150 fillHistogram(nAPVErrorvsTime_,aTime,chLevelCounters.nAPVError);
151 fillHistogram(nAPVAddressErrorvsTime_,aTime,chLevelCounters.nAPVAddressError);
152 fillHistogram(nUnlockedvsTime_,aTime,chLevelCounters.nUnlocked);
153 fillHistogram(nOutOfSyncvsTime_,aTime,chLevelCounters.nOutOfSync);
157 void FEDHistograms::fillFEDHistograms(FEDErrors & aFedErr,
158 const unsigned int aEvtSize,
161 const FEDErrors::FEDLevelErrors & lFedLevelErrors = aFedErr.getFEDLevelErrors();
162 const unsigned int lFedId = aFedErr.fedID();
164 fillHistogram(fedEventSize_,lFedId,aEvtSize);
166 if (lFedLevelErrors.DataPresent) fillHistogram(dataPresent_,lFedId);
168 if (lFedLevelErrors.HasCabledChannels && lFedLevelErrors.DataMissing) {
169 fillHistogram(dataMissing_,lFedId);
170 fillHistogram(fedErrorsVsId_,lFedId,1);
173 if (lFedLevelErrors.InvalidBuffers) {
174 fillHistogram(invalidBuffers_,lFedId);
175 fillHistogram(fedErrorsVsId_,lFedId,2);
177 else if (lFedLevelErrors.CorruptBuffer) {
178 fillHistogram(corruptBuffers_,lFedId);
179 fillHistogram(fedErrorsVsId_,lFedId,3);
181 else if (lFedLevelErrors.BadFEDCRCs) {
182 fillHistogram(badFEDCRCs_,lFedId);
183 fillHistogram(fedErrorsVsId_,lFedId,4);
185 else if (lFedLevelErrors.BadDAQCRCs) {
186 fillHistogram(badDAQCRCs_,lFedId);
187 fillHistogram(fedErrorsVsId_,lFedId,5);
189 else if (lFedLevelErrors.BadIDs) {
190 fillHistogram(badIDs_,lFedId);
191 fillHistogram(fedErrorsVsId_,lFedId,6);
193 else if (lFedLevelErrors.BadDAQPacket) {
194 fillHistogram(badDAQPacket_,lFedId);
195 fillHistogram(fedErrorsVsId_,lFedId,7);
198 if (aFedErr.anyFEDErrors()) {
199 fillHistogram(anyFEDErrors_,lFedId);
200 fillHistogram(fedErrorsVsId_,lFedId,8);
203 if (lFedLevelErrors.HasCabledChannels && aFedErr.anyDAQProblems()) {
204 fillHistogram(anyDAQProblems_,lFedId);
205 fillHistogram(fedErrorsVsId_,lFedId,9);
207 if (aFedErr.anyFEProblems()) {
208 fillHistogram(anyFEProblems_,lFedId);
209 fillHistogram(fedErrorsVsId_,lFedId,10);
212 if (lFedLevelErrors.FEsOverflow) {
213 fillHistogram(feOverflows_,lFedId);
214 fillHistogram(fedErrorsVsId_,lFedId,11);
216 if (lFedLevelErrors.FEsMissing) {
217 fillHistogram(feMissing_,lFedId);
218 fillHistogram(fedErrorsVsId_,lFedId,12);
220 if (lFedLevelErrors.FEsBadMajorityAddress) {
221 fillHistogram(badMajorityAddresses_,lFedId);
222 fillHistogram(fedErrorsVsId_,lFedId,13);
225 if (lFedLevelErrors.BadChannelStatusBit) {
226 fillHistogram(badChannelStatusBits_,lFedId);
227 fillHistogram(fedErrorsVsId_,lFedId,14);
229 if (lFedLevelErrors.BadActiveChannelStatusBit) {
230 fillHistogram(badActiveChannelStatusBits_,lFedId);
231 fillHistogram(fedErrorsVsId_,lFedId,15);
234 std::vector<FEDErrors::FELevelErrors> & lFeVec = aFedErr.getFELevelErrors();
236 for (
unsigned int iFe(0); iFe<lFeVec.size(); iFe++){
237 fillFEHistograms(lFedId,lFeVec[iFe],aFedErr.getEventProperties());
240 std::vector<FEDErrors::ChannelLevelErrors> & lChVec = aFedErr.getChannelLevelErrors();
241 for (
unsigned int iCh(0); iCh < lChVec.size(); iCh++){
242 fillChannelsHistograms(lFedId,lChVec[iCh],lFullDebug);
245 std::vector<FEDErrors::APVLevelErrors> & lAPVVec = aFedErr.getAPVLevelErrors();
246 for (
unsigned int iApv(0); iApv < lAPVVec.size(); iApv++){
247 fillAPVsHistograms(lFedId,lAPVVec[iApv],lFullDebug);
256 void FEDHistograms::fillFEHistograms(
const unsigned int aFedId,
257 const FEDErrors::FELevelErrors & aFeLevelErrors,
const FEDErrors::EventProperties & aEventProp )
259 const unsigned short lFeId = aFeLevelErrors.FeID;
267 if (aFeLevelErrors.Overflow) fillHistogram(feOverflowDetailedMap_[aFedId],lFeId);
268 else if (aFeLevelErrors.Missing) fillHistogram(feMissingDetailedMap_[aFedId],lFeId);
269 else if (aFeLevelErrors.BadMajorityAddress) fillHistogram(badMajorityAddressDetailedMap_[aFedId],lFeId);
272 if (aFeLevelErrors.TimeDifference != 0) {
273 if (aFeLevelErrors.SubDetID == 2 || aFeLevelErrors.SubDetID == 3 || aFeLevelErrors.SubDetID == 4)
274 fillHistogram(feTimeDiffTIB_,aFeLevelErrors.TimeDifference);
275 else if (aFeLevelErrors.SubDetID == 5)
276 fillHistogram(feTimeDiffTOB_,aFeLevelErrors.TimeDifference);
277 else if (aFeLevelErrors.SubDetID == 0)
278 fillHistogram(feTimeDiffTECB_,aFeLevelErrors.TimeDifference);
279 else if (aFeLevelErrors.SubDetID == 1)
280 fillHistogram(feTimeDiffTECF_,aFeLevelErrors.TimeDifference);
281 fillHistogram(feTimeDiffvsDBX_,aEventProp.deltaBX,aFeLevelErrors.TimeDifference < 0 ? aFeLevelErrors.TimeDifference+192 : aFeLevelErrors.TimeDifference );
282 fillHistogram(apveAddress_,aFeLevelErrors.Apve);
283 fillHistogram(feMajAddress_,aFeLevelErrors.FeMaj);
288 void FEDHistograms::fillChannelsHistograms(
const unsigned int aFedId,
289 const FEDErrors::ChannelLevelErrors & aChErr,
292 unsigned int lChId = aChErr.ChannelID;
299 if (aChErr.Unlocked) {
300 fillHistogram(unlockedDetailedMap_[aFedId],lChId);
302 if (aChErr.OutOfSync) {
303 fillHistogram(outOfSyncDetailedMap_[aFedId],lChId);
308 void FEDHistograms::fillAPVsHistograms(
const unsigned int aFedId,
309 const FEDErrors::APVLevelErrors & aAPVErr,
312 unsigned int lChId = aAPVErr.APVID;
320 if (aAPVErr.APVStatusBit) fillHistogram(badStatusBitsDetailedMap_[aFedId],lChId);
321 if (aAPVErr.APVError) fillHistogram(apvErrorDetailedMap_[aFedId],lChId);
322 if (aAPVErr.APVAddressError) fillHistogram(apvAddressErrorDetailedMap_[aFedId],lChId);
325 void FEDHistograms::fillMajorityHistograms(
const unsigned int aPart,
327 const std::vector<unsigned int> & aFedIdVec){
328 if (aPart==0) fillHistogram(feMajFracTIB_,aValue);
329 else if (aPart==1) fillHistogram(feMajFracTOB_,aValue);
330 else if (aPart==2) fillHistogram(feMajFracTECB_,aValue);
331 else if (aPart==3) fillHistogram(feMajFracTECF_,aValue);
333 for (
unsigned int iFed(0); iFed<aFedIdVec.size(); ++iFed){
334 fillHistogram(badMajorityInPartition_,aFedIdVec[iFed]);
339 bool FEDHistograms::feMajHistosEnabled(){
340 return ( feMajFracTIB_.enabled ||
341 feMajFracTOB_.enabled ||
342 feMajFracTECB_.enabled ||
343 feMajFracTECF_.enabled ||
344 badMajorityInPartition_.enabled );
347 void FEDHistograms::fillLumiHistograms(
const FEDErrors::LumiErrors & aLumErr){
348 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
349 lumiErrorFraction_.monitorEle->Reset();
350 for (
unsigned int iD(0); iD<aLumErr.nTotal.size(); iD++){
351 if (aLumErr.nTotal[iD] > 0) fillHistogram(lumiErrorFraction_,iD+1,static_cast<float>(aLumErr.nErrors[iD])/aLumErr.nTotal[iD]);
358 bool FEDHistograms::cmHistosEnabled() {
359 return (medianAPV0_.enabled || medianAPV1_.enabled);
364 if (!aApv1)
return medianAPV0_.monitorEle;
365 else return medianAPV1_.monitorEle;
370 return fedIdVsApvId_.monitorEle;
380 histosBooked_.resize(siStripFedIdMax+1,
false);
381 debugHistosBooked_.resize(siStripFedIdMax+1,
false);
384 bookProfile(ibooker , fedEventSize_,
386 "Average FED buffer Size (B) per Event",
387 siStripFedIdMax-siStripFedIdMin+1,
388 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
392 "<FED buffer Size> (B)"
396 bookHistogram(ibooker , dataPresent_,
"DataPresent",
397 "Number of events where the data from a FED is seen",
398 siStripFedIdMax-siStripFedIdMin+1,
399 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
401 bookHistogram(ibooker , nTotalBadChannels_,
403 "Number of channels with any error",
404 "Total # bad enabled channels");
406 bookHistogram(ibooker , nTotalBadActiveChannels_,
407 "nTotalBadActiveChannels",
408 "Number of active channels with any error",
409 "Total # bad active channels");
411 book2DHistogram(ibooker , fedIdVsApvId_,
413 "Any error per APV per event",
419 book2DHistogram( ibooker , fedErrorsVsId_,
"FEDErrorsVsId",
421 siStripFedIdMax-siStripFedIdMin+1,
422 siStripFedIdMin,siStripFedIdMax+1,
424 1,16,
"FED ID" ,
"Error Type");
425 fedErrorsVsId_.monitorEle->setBinLabel(1,
"Data Missing", 2);
426 fedErrorsVsId_.monitorEle->setBinLabel(2,
"Invalid Buffers", 2);
427 fedErrorsVsId_.monitorEle->setBinLabel(3,
"Corrupt Buffers", 2);
428 fedErrorsVsId_.monitorEle->setBinLabel(4,
"Bad FED CRC", 2);
429 fedErrorsVsId_.monitorEle->setBinLabel(5,
"Bad DAQ CRC", 2);
430 fedErrorsVsId_.monitorEle->setBinLabel(6,
"Bad IDs", 2);
431 fedErrorsVsId_.monitorEle->setBinLabel(7,
"Bad DAQ Packet", 2);
432 fedErrorsVsId_.monitorEle->setBinLabel(8,
"Any FED Errors", 2);
433 fedErrorsVsId_.monitorEle->setBinLabel(9,
"Any DAQ Problems", 2);
434 fedErrorsVsId_.monitorEle->setBinLabel(10,
"Any FE Problems", 2);
435 fedErrorsVsId_.monitorEle->setBinLabel(11,
"FE Overflows", 2);
436 fedErrorsVsId_.monitorEle->setBinLabel(12,
"FE Missing", 2);
437 fedErrorsVsId_.monitorEle->setBinLabel(13,
"FE Bad Maj Addr", 2);
438 fedErrorsVsId_.monitorEle->setBinLabel(14,
"Bad Ch Stat Bit", 2);
439 fedErrorsVsId_.monitorEle->setBinLabel(15,
"Bad Active Ch Stat Bit", 2);
445 bookHistogram(ibooker , nFEDErrors_,
447 "Number of FEDs with errors (FED or FE Level) per event",
450 bookHistogram(ibooker , nFEDDAQProblems_,
452 "Number of FEDs with DAQ problems per event",
455 bookHistogram(ibooker , nFEDsWithFEProblems_,
456 "nFEDsWithFEProblems",
457 "Number of FEDs with FE problems per event",
458 "# FEDs with FE problems");
460 bookHistogram(ibooker , nFEDCorruptBuffers_,
461 "nFEDCorruptBuffers",
462 "Number of FEDs with corrupt buffers per event",
463 "# FEDs with corrupt buffer");
467 bookHistogram(ibooker , dataMissing_,
"DataMissing",
468 "Number of events where the data from a FED with cabled channels is missing",
469 siStripFedIdMax-siStripFedIdMin+1,
470 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
472 bookHistogram(ibooker , anyFEDErrors_,
"AnyFEDErrors",
473 "Number of buffers with any FED error (excluding bad channel status bits, FE problems except overflows) per FED",
474 siStripFedIdMax-siStripFedIdMin+1,
475 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
477 bookHistogram(ibooker , corruptBuffers_,
"CorruptBuffers",
478 "Number of corrupt FED buffers per FED",
479 siStripFedIdMax-siStripFedIdMin+1,
480 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
482 bookHistogram(ibooker , invalidBuffers_,
"InvalidBuffers",
483 "Number of invalid FED buffers per FED",
484 siStripFedIdMax-siStripFedIdMin+1,
485 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
487 bookHistogram(ibooker , anyDAQProblems_,
"AnyDAQProblems",
488 "Number of buffers with any problems flagged in DAQ header (including CRC)",
489 siStripFedIdMax-siStripFedIdMin+1,
490 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
492 bookHistogram(ibooker , badIDs_,
"BadIDs",
493 "Number of buffers with non-SiStrip source IDs in DAQ header",
494 siStripFedIdMax-siStripFedIdMin+1,
495 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
497 bookHistogram(ibooker , badDAQCRCs_,
"BadDAQCRCs",
498 "Number of buffers with bad CRCs from the DAQ",
499 siStripFedIdMax-siStripFedIdMin+1,
500 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
502 bookHistogram(ibooker , badFEDCRCs_,
"BadFEDCRCs",
503 "Number of buffers with bad CRCs from the FED",
504 siStripFedIdMax-siStripFedIdMin+1,
505 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
507 bookHistogram(ibooker , badDAQPacket_,
"BadDAQPacket",
508 "Number of buffers with (non-CRC) problems flagged in DAQ header/trailer",
509 siStripFedIdMax-siStripFedIdMin+1,
510 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
514 bookHistogram(ibooker , nFEDsWithFEOverflows_,
515 "nFEDsWithFEOverflows",
516 "Number FEDs with FE units which overflowed per event",
517 "# FEDs with FE overflows");
519 bookHistogram(ibooker , nFEDsWithFEBadMajorityAddresses_,
520 "nFEDsWithFEBadMajorityAddresses",
521 "Number of FEDs with FE units with a bad majority address per event",
522 "# FEDs with bad address");
524 bookHistogram(ibooker , nFEDsWithMissingFEs_,
525 "nFEDsWithMissingFEs",
526 "Number of FEDs with missing FE unit payloads per event",
527 "# FEDs with missing FEs");
529 bookHistogram(ibooker , feMajFracTIB_,
"FeMajFracTIB",
530 "Fraction of FEs matching majority address in TIB partition",
531 101,0,1.01,
"n(majAddrFE)/n(totFE)");
533 bookHistogram(ibooker , feMajFracTOB_,
"FeMajFracTOB",
534 "Fraction of FEs matching majority address in TOB partition",
535 101,0,1.01,
"n(majAddrFE)/n(totFE)");
537 bookHistogram(ibooker , feMajFracTECB_,
"FeMajFracTECB",
538 "Fraction of FEs matching majority address in TECB partition",
539 101,0,1.01,
"n(majAddrFE)/n(totFE)");
541 bookHistogram(ibooker , feMajFracTECF_,
"FeMajFracTECF",
542 "Fraction of FEs matching majority address in TECF partition",
543 101,0,1.01,
"n(majAddrFE)/n(totFE)");
548 bookHistogram(ibooker , feTimeDiffTIB_,
"FETimeDiffTIB",
549 "(TimeLoc FE - TimeLoc APVe) for TIB/TID, when different",
551 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
553 bookHistogram(ibooker , feTimeDiffTOB_,
"FETimeDiffTOB",
554 "(TimeLoc FE - TimeLoc APVe) for TOB, when different",
556 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
558 bookHistogram(ibooker , feTimeDiffTECB_,
"FETimeDiffTECB",
559 "(TimeLoc FE - TimeLoc APVe) for TECB, when different",
561 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
563 bookHistogram(ibooker , feTimeDiffTECF_,
"FETimeDiffTECF",
564 "(TimeLoc FE - TimeLoc APVe) for TECF, when different",
566 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
568 book2DHistogram( ibooker , feTimeDiffvsDBX_,
"FETimeDiffvsDBX",
569 "(TimeLoc FE - TimeLoc APVe) vs DBX, when different",
572 0,201,
"DeltaBX",
"#Delta_{TimeLoc}(FE-APVe)");
575 bookHistogram(ibooker , apveAddress_,
"ApveAddress",
580 bookHistogram(ibooker , feMajAddress_,
"FeMajAddress",
581 "FE Majority Address",
588 bookHistogram(ibooker , anyFEProblems_,
"AnyFEProblems",
589 "Number of buffers with any FE unit problems",
590 siStripFedIdMax-siStripFedIdMin+1,
591 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
593 bookHistogram(ibooker , feOverflows_,
"FEOverflows",
594 "Number of buffers with one or more FE overflow",
595 siStripFedIdMax-siStripFedIdMin+1,
596 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
598 bookHistogram(ibooker , badMajorityAddresses_,
"BadMajorityAddresses",
599 "Number of buffers with one or more FE with a bad majority APV address",
600 siStripFedIdMax-siStripFedIdMin+1,
601 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
603 bookHistogram(ibooker , badMajorityInPartition_,
"BadMajorityInPartition",
604 "Number of buffers with >=1 FE with FEaddress != majority in partition",
605 siStripFedIdMax-siStripFedIdMin+1,
606 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
608 bookHistogram(ibooker , feMissing_,
"FEMissing",
609 "Number of buffers with one or more FE unit payload missing",
610 siStripFedIdMax-siStripFedIdMin+1,
611 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
616 bookHistogram(ibooker , nBadChannelStatusBits_,
617 "nBadChannelStatusBits",
618 "Number of channels with bad status bits per event",
619 "# bad enabled channels");
621 bookHistogram(ibooker , nBadActiveChannelStatusBits_,
622 "nBadActiveChannelStatusBits",
623 "Number of active channels with bad status bits per event",
624 "# bad active channels");
626 bookHistogram(ibooker , nUnlocked_,
628 "Number of channels Unlocked per event",
629 "# channels unlocked");
631 bookHistogram(ibooker , nOutOfSync_,
633 "Number of channels OutOfSync per event",
634 "# channels out-of-sync");
636 bookHistogram(ibooker , nUnconnectedChannels_,
637 "nUnconnectedChannels",
638 "Number of channels not connected per event",
639 "# unconnected channels");
643 bookHistogram(ibooker , badChannelStatusBits_,
"BadChannelStatusBits",
644 "Number of buffers with one or more enabled channel with bad status bits",
645 siStripFedIdMax-siStripFedIdMin+1,
646 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
648 bookHistogram(ibooker , badActiveChannelStatusBits_,
"BadActiveChannelStatusBits",
649 "Number of buffers with one or more active channel with bad status bits",
650 siStripFedIdMax-siStripFedIdMin+1,
651 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
655 bookHistogram(ibooker , medianAPV0_,
"MedianAPV0",
659 bookHistogram(ibooker , medianAPV1_,
"MedianAPV1",
663 bookHistogram(ibooker , nAPVStatusBit_,
665 "Number of APVs with APVStatusBit error per event",
666 "# APVs with APVStatusBit error");
668 bookHistogram(ibooker , nAPVError_,
670 "Number of APVs with APVError per event",
671 "#APVs with APVError");
673 bookHistogram(ibooker , nAPVAddressError_,
675 "Number of APVs with APVAddressError per event",
676 "#APVs with APVAddressError");
681 bookProfile( ibooker , fedMaxEventSizevsTime_,
682 "FedMaxEventSizevsTime",
683 "Max FED buffer Size (B) per Event vs time",
687 "Max FED buffer Size (B)"
690 bookProfile( ibooker , nTotalBadChannelsvsTime_,
691 "nTotalBadChannelsvsTime",
692 "Number of channels with any error vs time",
696 "Total # bad enabled channels"
700 bookProfile( ibooker , nTotalBadActiveChannelsvsTime_,
701 "nTotalBadActiveChannelsvsTime",
702 "Number of active channels with any error vs time",
706 "Total # bad active channels"
711 bookProfile( ibooker , nFEDErrorsvsTime_,
713 "Number of FEDs with any error vs time",
720 bookProfile( ibooker , nFEDCorruptBuffersvsTime_,
721 "nFEDCorruptBuffersvsTime",
722 "Number of FEDs with corrupt buffer vs time",
731 bookProfile( ibooker , nFEDsWithFEProblemsvsTime_,
732 "nFEDsWithFEProblemsvsTime",
733 "Number of FEDs with any FE error vs time",
737 "# FEDsWithFEProblems"
742 bookProfile( ibooker , nUnlockedvsTime_,
744 "Number of channels Unlocked vs time",
748 "# channels unlocked "
751 bookProfile( ibooker , nOutOfSyncvsTime_,
753 "Number of channels OutOfSync vs time",
757 "# channels out-of-sync"
762 bookProfile( ibooker , nAPVStatusBitvsTime_,
763 "nAPVStatusBitvsTime",
764 "Number of APVs with APVStatusBit error vs time",
768 "# APVs with APVStatusBit error"
771 bookProfile( ibooker , nAPVErrorvsTime_,
773 "Number of APVs with APVError vs time",
777 "# APVs with APVError"
780 bookProfile( ibooker , nAPVAddressErrorvsTime_,
781 "nAPVAddressErrorvsTime",
782 "Number of APVs with APVAddressError vs time",
786 "# APVs with APVAddressError"
791 bookHistogram(ibooker , lumiErrorFraction_,
793 "Fraction of error per lumi section vs subdetector",
798 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
799 lumiErrorFraction_.monitorEle->setLumiFlag();
800 lumiErrorFraction_.monitorEle->setBinLabel(1,
"TECB");
801 lumiErrorFraction_.monitorEle->setBinLabel(2,
"TECF");
802 lumiErrorFraction_.monitorEle->setBinLabel(3,
"TIB");
803 lumiErrorFraction_.monitorEle->setBinLabel(4,
"TIDB");
804 lumiErrorFraction_.monitorEle->setBinLabel(5,
"TIDF");
805 lumiErrorFraction_.monitorEle->setBinLabel(6,
"TOB");
809 if (tkMapConfig_.enabled){
810 tkmapFED_ =
new TkHistoMap(topFolderName,
"TkHMap_FractionOfBadChannels",0.,
true);
822 if (!histosBooked_[fedId]) {
827 std::stringstream fedIdStream;
828 fedIdStream <<
fedId;
831 bookHistogram(ibooker , feOverflowDetailed_,
832 feOverflowDetailedMap_[fedId],
833 "FEOverflowsForFED"+fedIdStream.str(),
834 "FE overflows per FE unit for FED ID "+fedIdStream.str(),
837 bookHistogram(ibooker , badMajorityAddressDetailed_,
838 badMajorityAddressDetailedMap_[fedId],
839 "BadMajorityAddressesForFED"+fedIdStream.str(),
840 "Bad majority APV addresses per FE unit for FED ID "+fedIdStream.str(),
843 bookHistogram(ibooker , feMissingDetailed_,
844 feMissingDetailedMap_[fedId],
845 "FEMissingForFED"+fedIdStream.str(),
846 "Buffers with FE Unit payload missing per FE unit for FED ID "+fedIdStream.str(),
849 bookHistogram(ibooker , badStatusBitsDetailed_,
850 badStatusBitsDetailedMap_[fedId],
851 "BadAPVStatusBitsForFED"+fedIdStream.str(),
852 "Bad apv status bits for FED ID "+fedIdStream.str(),
855 histosBooked_[
fedId] =
true;
857 if (fullDebugMode && !debugHistosBooked_[fedId]) {
860 std::stringstream fedIdStream;
861 fedIdStream <<
fedId;
864 bookHistogram(ibooker , apvErrorDetailed_,
865 apvErrorDetailedMap_[fedId],
866 "APVErrorBitsForFED"+fedIdStream.str(),
867 "APV errors for FED ID "+fedIdStream.str(),
870 bookHistogram(ibooker , apvAddressErrorDetailed_,
871 apvAddressErrorDetailedMap_[fedId],
872 "APVAddressErrorBitsForFED"+fedIdStream.str(),
873 "Wrong APV address errors for FED ID "+fedIdStream.str(),
876 bookHistogram(ibooker , unlockedDetailed_,
877 unlockedDetailedMap_[fedId],
878 "UnlockedBitsForFED"+fedIdStream.str(),
879 "Unlocked channels for FED ID "+fedIdStream.str(),
882 bookHistogram(ibooker , outOfSyncDetailed_,
883 outOfSyncDetailedMap_[fedId],
884 "OOSBitsForFED"+fedIdStream.str(),
885 "Out of sync channels for FED ID "+fedIdStream.str(),
888 debugHistosBooked_[
fedId] =
true;
892 void FEDHistograms::bookAllFEDHistograms(
DQMStore::IBooker & ibooker ,
bool fullDebugMode )
898 for (
unsigned int iFed = siStripFedIdMin; iFed <= siStripFedIdMax; iFed++)
899 bookFEDHistograms(ibooker , iFed, fullDebugMode);
902 bool FEDHistograms::tkHistoMapEnabled(
unsigned int aIndex){
903 return tkMapConfig_.enabled;
906 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