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(fedErrorsVsIdVsLumi_,
"fedErrorsVsIdVsLumi",iConfig,pDebugStream);
70 getConfigForHistogram(nFEDCorruptBuffersvsTime_,
"nFEDCorruptBuffersvsTime",iConfig,pDebugStream);
71 getConfigForHistogram(nFEDsWithFEProblemsvsTime_,
"nFEDsWithFEProblemsvsTime",iConfig,pDebugStream);
73 getConfigForHistogram(nUnconnectedChannels_,
"nUnconnectedChannels",iConfig,pDebugStream);
75 getConfigForHistogram(nTotalBadChannels_,
"nTotalBadChannels",iConfig,pDebugStream);
76 getConfigForHistogram(nTotalBadActiveChannels_,
"nTotalBadActiveChannels",iConfig,pDebugStream);
78 getConfigForHistogram(nTotalBadChannelsvsTime_,
"nTotalBadChannelsvsTime",iConfig,pDebugStream);
79 getConfigForHistogram(nTotalBadActiveChannelsvsTime_,
"nTotalBadActiveChannelsvsTime",iConfig,pDebugStream);
81 getConfigForHistogram(nAPVStatusBit_,
"nAPVStatusBit",iConfig,pDebugStream);
82 getConfigForHistogram(nAPVError_,
"nAPVError",iConfig,pDebugStream);
83 getConfigForHistogram(nAPVAddressError_,
"nAPVAddressError",iConfig,pDebugStream);
84 getConfigForHistogram(nUnlocked_,
"nUnlocked",iConfig,pDebugStream);
85 getConfigForHistogram(nOutOfSync_,
"nOutOfSync",iConfig,pDebugStream);
87 getConfigForHistogram(nAPVStatusBitvsTime_,
"nAPVStatusBitvsTime",iConfig,pDebugStream);
88 getConfigForHistogram(nAPVErrorvsTime_,
"nAPVErrorvsTime",iConfig,pDebugStream);
89 getConfigForHistogram(nAPVAddressErrorvsTime_,
"nAPVAddressErrorvsTime",iConfig,pDebugStream);
90 getConfigForHistogram(nUnlockedvsTime_,
"nUnlockedvsTime",iConfig,pDebugStream);
91 getConfigForHistogram(nOutOfSyncvsTime_,
"nOutOfSyncvsTime",iConfig,pDebugStream);
93 getConfigForHistogram(tkMapConfig_,
"TkHistoMap",iConfig,pDebugStream);
95 getConfigForHistogram(feTimeDiffTIB_,
"FETimeDiffTIB",iConfig,pDebugStream);
96 getConfigForHistogram(feTimeDiffTOB_,
"FETimeDiffTOB",iConfig,pDebugStream);
97 getConfigForHistogram(feTimeDiffTECB_,
"FETimeDiffTECB",iConfig,pDebugStream);
98 getConfigForHistogram(feTimeDiffTECF_,
"FETimeDiffTECF",iConfig,pDebugStream);
100 getConfigForHistogram(feTimeDiffvsDBX_,
"FETimeDiffvsDBX",iConfig,pDebugStream);
102 getConfigForHistogram(apveAddress_,
"ApveAddress",iConfig,pDebugStream);
103 getConfigForHistogram(feMajAddress_,
"FeMajAddress",iConfig,pDebugStream);
105 getConfigForHistogram(medianAPV0_,
"MedianAPV0",iConfig,pDebugStream);
106 getConfigForHistogram(medianAPV1_,
"MedianAPV1",iConfig,pDebugStream);
108 getConfigForHistogram(lumiErrorFraction_,
"ErrorFractionByLumiBlock",iConfig,pDebugStream);
110 getConfigForHistogram(fedIdVsApvId_,
"FedIdVsApvId",iConfig,pDebugStream);
112 getConfigForHistogram(fedErrorsVsId_,
"FedErrorsVsId",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,
161 const double aLumiSection,
162 unsigned int & NumBadChannels_perFEDID
165 const FEDErrors::FEDLevelErrors & lFedLevelErrors = aFedErr.getFEDLevelErrors();
166 const unsigned int lFedId = aFedErr.fedID();
168 fillHistogram(fedEventSize_,lFedId,aEvtSize);
170 if (lFedLevelErrors.DataPresent) fillHistogram(dataPresent_,lFedId);
172 if (lFedLevelErrors.HasCabledChannels && lFedLevelErrors.DataMissing) {
173 fillHistogram(dataMissing_,lFedId);
174 fillHistogram(fedErrorsVsId_,lFedId,1);
177 if (lFedLevelErrors.InvalidBuffers) {
178 fillHistogram(invalidBuffers_,lFedId);
179 fillHistogram(fedErrorsVsId_,lFedId,2);
181 else if (lFedLevelErrors.CorruptBuffer) {
182 fillHistogram(corruptBuffers_,lFedId);
183 fillHistogram(fedErrorsVsId_,lFedId,3);
185 else if (lFedLevelErrors.BadFEDCRCs) {
186 fillHistogram(badFEDCRCs_,lFedId);
187 fillHistogram(fedErrorsVsId_,lFedId,4);
189 else if (lFedLevelErrors.BadDAQCRCs) {
190 fillHistogram(badDAQCRCs_,lFedId);
191 fillHistogram(fedErrorsVsId_,lFedId,5);
193 else if (lFedLevelErrors.BadIDs) {
194 fillHistogram(badIDs_,lFedId);
195 fillHistogram(fedErrorsVsId_,lFedId,6);
197 else if (lFedLevelErrors.BadDAQPacket) {
198 fillHistogram(badDAQPacket_,lFedId);
199 fillHistogram(fedErrorsVsId_,lFedId,7);
202 if (aFedErr.anyFEDErrors()) {
203 fillHistogram(anyFEDErrors_,lFedId);
204 fillHistogram(fedErrorsVsId_,lFedId,8);
207 if (lFedLevelErrors.HasCabledChannels && aFedErr.anyDAQProblems()) {
208 fillHistogram(anyDAQProblems_,lFedId);
209 fillHistogram(fedErrorsVsId_,lFedId,9);
211 if (aFedErr.anyFEProblems()) {
212 fillHistogram(anyFEProblems_,lFedId);
213 fillHistogram(fedErrorsVsId_,lFedId,10);
216 if (lFedLevelErrors.FEsOverflow) {
217 fillHistogram(feOverflows_,lFedId);
218 fillHistogram(fedErrorsVsId_,lFedId,11);
220 if (lFedLevelErrors.FEsMissing) {
221 fillHistogram(feMissing_,lFedId);
222 fillHistogram(fedErrorsVsId_,lFedId,12);
224 if (lFedLevelErrors.FEsBadMajorityAddress) {
225 fillHistogram(badMajorityAddresses_,lFedId);
226 fillHistogram(fedErrorsVsId_,lFedId,13);
229 if (lFedLevelErrors.BadChannelStatusBit) {
230 fillHistogram(badChannelStatusBits_,lFedId);
231 fillHistogram(fedErrorsVsId_,lFedId,14);
233 if (lFedLevelErrors.BadActiveChannelStatusBit) {
234 fillHistogram(badActiveChannelStatusBits_,lFedId);
235 fillHistogram(fedErrorsVsId_,lFedId,15);
238 std::vector<FEDErrors::FELevelErrors> & lFeVec = aFedErr.getFELevelErrors();
240 for (
unsigned int iFe(0); iFe<lFeVec.size(); iFe++){
241 fillFEHistograms(lFedId,lFeVec[iFe],aFedErr.getEventProperties());
244 std::vector<FEDErrors::ChannelLevelErrors> & lChVec = aFedErr.getChannelLevelErrors();
245 for (
unsigned int iCh(0); iCh < lChVec.size(); iCh++){
246 fillChannelsHistograms(lFedId,lChVec[iCh],lFullDebug);
249 std::vector<FEDErrors::APVLevelErrors> & lAPVVec = aFedErr.getAPVLevelErrors();
250 for (
unsigned int iApv(0); iApv < lAPVVec.size(); iApv++){
251 fillAPVsHistograms(lFedId,lAPVVec[iApv],lFullDebug);
254 double numChannelLevelErrors = 0;
255 if(fedErrorsVsIdVsLumi_.globalswitchon){
256 numChannelLevelErrors = double(lChVec.size());
257 fillHistogram2D(fedErrorsVsIdVsLumi_,aLumiSection,lFedId,numChannelLevelErrors);
266 void FEDHistograms::fillFEHistograms(
const unsigned int aFedId,
267 const FEDErrors::FELevelErrors & aFeLevelErrors,
const FEDErrors::EventProperties & aEventProp )
269 const unsigned short lFeId = aFeLevelErrors.FeID;
277 if (aFeLevelErrors.Overflow) fillHistogram(feOverflowDetailedMap_[aFedId],lFeId);
278 else if (aFeLevelErrors.Missing) fillHistogram(feMissingDetailedMap_[aFedId],lFeId);
279 else if (aFeLevelErrors.BadMajorityAddress) fillHistogram(badMajorityAddressDetailedMap_[aFedId],lFeId);
282 if (aFeLevelErrors.TimeDifference != 0) {
283 if (aFeLevelErrors.SubDetID == 2 || aFeLevelErrors.SubDetID == 3 || aFeLevelErrors.SubDetID == 4)
284 fillHistogram(feTimeDiffTIB_,aFeLevelErrors.TimeDifference);
285 else if (aFeLevelErrors.SubDetID == 5)
286 fillHistogram(feTimeDiffTOB_,aFeLevelErrors.TimeDifference);
287 else if (aFeLevelErrors.SubDetID == 0)
288 fillHistogram(feTimeDiffTECB_,aFeLevelErrors.TimeDifference);
289 else if (aFeLevelErrors.SubDetID == 1)
290 fillHistogram(feTimeDiffTECF_,aFeLevelErrors.TimeDifference);
291 fillHistogram(feTimeDiffvsDBX_,aEventProp.deltaBX,aFeLevelErrors.TimeDifference < 0 ? aFeLevelErrors.TimeDifference+192 : aFeLevelErrors.TimeDifference );
292 fillHistogram(apveAddress_,aFeLevelErrors.Apve);
293 fillHistogram(feMajAddress_,aFeLevelErrors.FeMaj);
298 void FEDHistograms::fillChannelsHistograms(
const unsigned int aFedId,
299 const FEDErrors::ChannelLevelErrors & aChErr,
302 unsigned int lChId = aChErr.ChannelID;
309 if (aChErr.Unlocked) {
310 fillHistogram(unlockedDetailedMap_[aFedId],lChId);
312 if (aChErr.OutOfSync) {
313 fillHistogram(outOfSyncDetailedMap_[aFedId],lChId);
318 void FEDHistograms::fillAPVsHistograms(
const unsigned int aFedId,
319 const FEDErrors::APVLevelErrors & aAPVErr,
322 unsigned int lChId = aAPVErr.APVID;
330 if (aAPVErr.APVStatusBit) fillHistogram(badStatusBitsDetailedMap_[aFedId],lChId);
331 if (aAPVErr.APVError) fillHistogram(apvErrorDetailedMap_[aFedId],lChId);
332 if (aAPVErr.APVAddressError) fillHistogram(apvAddressErrorDetailedMap_[aFedId],lChId);
335 void FEDHistograms::fillMajorityHistograms(
const unsigned int aPart,
337 const std::vector<unsigned int> & aFedIdVec){
338 if (aPart==0) fillHistogram(feMajFracTIB_,aValue);
339 else if (aPart==1) fillHistogram(feMajFracTOB_,aValue);
340 else if (aPart==2) fillHistogram(feMajFracTECB_,aValue);
341 else if (aPart==3) fillHistogram(feMajFracTECF_,aValue);
343 for (
unsigned int iFed(0); iFed<aFedIdVec.size(); ++iFed){
344 fillHistogram(badMajorityInPartition_,aFedIdVec[iFed]);
349 bool FEDHistograms::feMajHistosEnabled(){
350 return ( feMajFracTIB_.enabled ||
351 feMajFracTOB_.enabled ||
352 feMajFracTECB_.enabled ||
353 feMajFracTECF_.enabled ||
354 badMajorityInPartition_.enabled );
357 void FEDHistograms::fillLumiHistograms(
const FEDErrors::LumiErrors & aLumErr){
358 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
359 lumiErrorFraction_.monitorEle->Reset();
360 for (
unsigned int iD(0); iD<aLumErr.nTotal.size(); iD++){
361 if (aLumErr.nTotal[iD] > 0) fillHistogram(lumiErrorFraction_,iD+1,static_cast<float>(aLumErr.nErrors[iD])/aLumErr.nTotal[iD]);
368 bool FEDHistograms::cmHistosEnabled() {
369 return (medianAPV0_.enabled || medianAPV1_.enabled);
374 if (!aApv1)
return medianAPV0_.monitorEle;
375 else return medianAPV1_.monitorEle;
380 return fedIdVsApvId_.monitorEle;
390 histosBooked_.resize(siStripFedIdMax+1,
false);
391 debugHistosBooked_.resize(siStripFedIdMax+1,
false);
394 bookProfile(ibooker , fedEventSize_,
396 "Average FED buffer Size (B) per Event",
397 siStripFedIdMax-siStripFedIdMin+1,
398 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
402 "<FED buffer Size> (B)" 406 bookHistogram(ibooker , dataPresent_,
"DataPresent",
407 "Number of events where the data from a FED is seen",
408 siStripFedIdMax-siStripFedIdMin+1,
409 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
411 bookHistogram(ibooker , nTotalBadChannels_,
413 "Number of channels with any error",
414 "Total # bad enabled channels");
416 bookHistogram(ibooker , nTotalBadActiveChannels_,
417 "nTotalBadActiveChannels",
418 "Number of active channels with any error",
419 "Total # bad active channels");
421 book2DHistogram(ibooker , fedIdVsApvId_,
423 "Any error per APV per event",
429 book2DHistogram( ibooker , fedErrorsVsId_,
"FEDErrorsVsId",
431 siStripFedIdMax-siStripFedIdMin+1,
432 siStripFedIdMin,siStripFedIdMax+1,
434 1,16,
"FED ID" ,
"Error Type");
435 fedErrorsVsId_.monitorEle->setBinLabel(1,
"Data Missing", 2);
436 fedErrorsVsId_.monitorEle->setBinLabel(2,
"Invalid Buffers", 2);
437 fedErrorsVsId_.monitorEle->setBinLabel(3,
"Corrupt Buffers", 2);
438 fedErrorsVsId_.monitorEle->setBinLabel(4,
"Bad FED CRC", 2);
439 fedErrorsVsId_.monitorEle->setBinLabel(5,
"Bad DAQ CRC", 2);
440 fedErrorsVsId_.monitorEle->setBinLabel(6,
"Bad IDs", 2);
441 fedErrorsVsId_.monitorEle->setBinLabel(7,
"Bad DAQ Packet", 2);
442 fedErrorsVsId_.monitorEle->setBinLabel(8,
"Any FED Errors", 2);
443 fedErrorsVsId_.monitorEle->setBinLabel(9,
"Any DAQ Problems", 2);
444 fedErrorsVsId_.monitorEle->setBinLabel(10,
"Any FE Problems", 2);
445 fedErrorsVsId_.monitorEle->setBinLabel(11,
"FE Overflows", 2);
446 fedErrorsVsId_.monitorEle->setBinLabel(12,
"FE Missing", 2);
447 fedErrorsVsId_.monitorEle->setBinLabel(13,
"FE Bad Maj Addr", 2);
448 fedErrorsVsId_.monitorEle->setBinLabel(14,
"Bad Ch Stat Bit", 2);
449 fedErrorsVsId_.monitorEle->setBinLabel(15,
"Bad Active Ch Stat Bit", 2);
455 bookHistogram(ibooker , nFEDErrors_,
457 "Number of FEDs with errors (FED or FE Level) per event",
460 bookHistogram(ibooker , nFEDDAQProblems_,
462 "Number of FEDs with DAQ problems per event",
465 bookHistogram(ibooker , nFEDsWithFEProblems_,
466 "nFEDsWithFEProblems",
467 "Number of FEDs with FE problems per event",
468 "# FEDs with FE problems");
470 bookHistogram(ibooker , nFEDCorruptBuffers_,
471 "nFEDCorruptBuffers",
472 "Number of FEDs with corrupt buffers per event",
473 "# FEDs with corrupt buffer");
477 bookHistogram(ibooker , dataMissing_,
"DataMissing",
478 "Number of events where the data from a FED with cabled channels is missing",
479 siStripFedIdMax-siStripFedIdMin+1,
480 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
482 bookHistogram(ibooker , anyFEDErrors_,
"AnyFEDErrors",
483 "Number of buffers with any FED error (excluding bad channel status bits, FE problems except overflows) per FED",
484 siStripFedIdMax-siStripFedIdMin+1,
485 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
487 bookHistogram(ibooker , corruptBuffers_,
"CorruptBuffers",
488 "Number of corrupt FED buffers per FED",
489 siStripFedIdMax-siStripFedIdMin+1,
490 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
492 bookHistogram(ibooker , invalidBuffers_,
"InvalidBuffers",
493 "Number of invalid FED buffers per FED",
494 siStripFedIdMax-siStripFedIdMin+1,
495 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
497 bookHistogram(ibooker , anyDAQProblems_,
"AnyDAQProblems",
498 "Number of buffers with any problems flagged in DAQ header (including CRC)",
499 siStripFedIdMax-siStripFedIdMin+1,
500 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
502 bookHistogram(ibooker , badIDs_,
"BadIDs",
503 "Number of buffers with non-SiStrip source IDs in DAQ header",
504 siStripFedIdMax-siStripFedIdMin+1,
505 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
507 bookHistogram(ibooker , badDAQCRCs_,
"BadDAQCRCs",
508 "Number of buffers with bad CRCs from the DAQ",
509 siStripFedIdMax-siStripFedIdMin+1,
510 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
512 bookHistogram(ibooker , badFEDCRCs_,
"BadFEDCRCs",
513 "Number of buffers with bad CRCs from the FED",
514 siStripFedIdMax-siStripFedIdMin+1,
515 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
517 bookHistogram(ibooker , badDAQPacket_,
"BadDAQPacket",
518 "Number of buffers with (non-CRC) problems flagged in DAQ header/trailer",
519 siStripFedIdMax-siStripFedIdMin+1,
520 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
524 bookHistogram(ibooker , nFEDsWithFEOverflows_,
525 "nFEDsWithFEOverflows",
526 "Number FEDs with FE units which overflowed per event",
527 "# FEDs with FE overflows");
529 bookHistogram(ibooker , nFEDsWithFEBadMajorityAddresses_,
530 "nFEDsWithFEBadMajorityAddresses",
531 "Number of FEDs with FE units with a bad majority address per event",
532 "# FEDs with bad address");
534 bookHistogram(ibooker , nFEDsWithMissingFEs_,
535 "nFEDsWithMissingFEs",
536 "Number of FEDs with missing FE unit payloads per event",
537 "# FEDs with missing FEs");
539 bookHistogram(ibooker , feMajFracTIB_,
"FeMajFracTIB",
540 "Fraction of FEs matching majority address in TIB partition",
541 101,0,1.01,
"n(majAddrFE)/n(totFE)");
543 bookHistogram(ibooker , feMajFracTOB_,
"FeMajFracTOB",
544 "Fraction of FEs matching majority address in TOB partition",
545 101,0,1.01,
"n(majAddrFE)/n(totFE)");
547 bookHistogram(ibooker , feMajFracTECB_,
"FeMajFracTECB",
548 "Fraction of FEs matching majority address in TECB partition",
549 101,0,1.01,
"n(majAddrFE)/n(totFE)");
551 bookHistogram(ibooker , feMajFracTECF_,
"FeMajFracTECF",
552 "Fraction of FEs matching majority address in TECF partition",
553 101,0,1.01,
"n(majAddrFE)/n(totFE)");
558 bookHistogram(ibooker , feTimeDiffTIB_,
"FETimeDiffTIB",
559 "(TimeLoc FE - TimeLoc APVe) for TIB/TID, when different",
561 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
563 bookHistogram(ibooker , feTimeDiffTOB_,
"FETimeDiffTOB",
564 "(TimeLoc FE - TimeLoc APVe) for TOB, when different",
566 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
568 bookHistogram(ibooker , feTimeDiffTECB_,
"FETimeDiffTECB",
569 "(TimeLoc FE - TimeLoc APVe) for TECB, when different",
571 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
573 bookHistogram(ibooker , feTimeDiffTECF_,
"FETimeDiffTECF",
574 "(TimeLoc FE - TimeLoc APVe) for TECF, when different",
576 -200,201,
"#Delta_{TimeLoc}(FE-APVe)");
578 book2DHistogram( ibooker , feTimeDiffvsDBX_,
"FETimeDiffvsDBX",
579 "(TimeLoc FE - TimeLoc APVe) vs DBX, when different",
582 0,201,
"DeltaBX",
"#Delta_{TimeLoc}(FE-APVe)");
585 bookHistogram(ibooker , apveAddress_,
"ApveAddress",
590 bookHistogram(ibooker , feMajAddress_,
"FeMajAddress",
591 "FE Majority Address",
598 bookHistogram(ibooker , anyFEProblems_,
"AnyFEProblems",
599 "Number of buffers with any FE unit problems",
600 siStripFedIdMax-siStripFedIdMin+1,
601 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
603 bookHistogram(ibooker , feOverflows_,
"FEOverflows",
604 "Number of buffers with one or more FE overflow",
605 siStripFedIdMax-siStripFedIdMin+1,
606 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
608 bookHistogram(ibooker , badMajorityAddresses_,
"BadMajorityAddresses",
609 "Number of buffers with one or more FE with a bad majority APV address",
610 siStripFedIdMax-siStripFedIdMin+1,
611 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
613 bookHistogram(ibooker , badMajorityInPartition_,
"BadMajorityInPartition",
614 "Number of buffers with >=1 FE with FEaddress != majority in partition",
615 siStripFedIdMax-siStripFedIdMin+1,
616 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
618 bookHistogram(ibooker , feMissing_,
"FEMissing",
619 "Number of buffers with one or more FE unit payload missing",
620 siStripFedIdMax-siStripFedIdMin+1,
621 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
626 bookHistogram(ibooker , nBadChannelStatusBits_,
627 "nBadChannelStatusBits",
628 "Number of channels with bad status bits per event",
629 "# bad enabled channels");
631 bookHistogram(ibooker , nBadActiveChannelStatusBits_,
632 "nBadActiveChannelStatusBits",
633 "Number of active channels with bad status bits per event",
634 "# bad active channels");
636 bookHistogram(ibooker , nUnlocked_,
638 "Number of channels Unlocked per event",
639 "# channels unlocked");
641 bookHistogram(ibooker , nOutOfSync_,
643 "Number of channels OutOfSync per event",
644 "# channels out-of-sync");
646 bookHistogram(ibooker , nUnconnectedChannels_,
647 "nUnconnectedChannels",
648 "Number of channels not connected per event",
649 "# unconnected channels");
653 bookHistogram(ibooker , badChannelStatusBits_,
"BadChannelStatusBits",
654 "Number of buffers with one or more enabled channel with bad status bits",
655 siStripFedIdMax-siStripFedIdMin+1,
656 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
658 bookHistogram(ibooker , badActiveChannelStatusBits_,
"BadActiveChannelStatusBits",
659 "Number of buffers with one or more active channel with bad status bits",
660 siStripFedIdMax-siStripFedIdMin+1,
661 siStripFedIdMin-0.5,siStripFedIdMax+0.5,
"FED-ID");
665 bookHistogram(ibooker , medianAPV0_,
"MedianAPV0",
669 bookHistogram(ibooker , medianAPV1_,
"MedianAPV1",
673 bookHistogram(ibooker , nAPVStatusBit_,
675 "Number of APVs with APVStatusBit error per event",
676 "# APVs with APVStatusBit error");
678 bookHistogram(ibooker , nAPVError_,
680 "Number of APVs with APVError per event",
681 "#APVs with APVError");
683 bookHistogram(ibooker , nAPVAddressError_,
685 "Number of APVs with APVAddressError per event",
686 "#APVs with APVAddressError");
691 bookProfile( ibooker , fedMaxEventSizevsTime_,
692 "FedMaxEventSizevsTime",
693 "Max FED buffer Size (B) per Event vs time",
697 "Max FED buffer Size (B)" 700 bookProfile( ibooker , nTotalBadChannelsvsTime_,
701 "nTotalBadChannelsvsTime",
702 "Number of channels with any error vs time",
706 "Total # bad enabled channels" 710 bookProfile( ibooker , nTotalBadActiveChannelsvsTime_,
711 "nTotalBadActiveChannelsvsTime",
712 "Number of active channels with any error vs time",
716 "Total # bad active channels" 721 if(fedErrorsVsIdVsLumi_.globalswitchon){
722 bookProfile2D( ibooker , fedErrorsVsIdVsLumi_,
723 "fedErrorsVsIdVsLumi",
724 "Total number of errors per FED ID per lumi section",
733 bookProfile( ibooker , nFEDErrorsvsTime_,
735 "Number of FEDs with any error vs time",
742 bookProfile( ibooker , nFEDCorruptBuffersvsTime_,
743 "nFEDCorruptBuffersvsTime",
744 "Number of FEDs with corrupt buffer vs time",
753 bookProfile( ibooker , nFEDsWithFEProblemsvsTime_,
754 "nFEDsWithFEProblemsvsTime",
755 "Number of FEDs with any FE error vs time",
759 "# FEDsWithFEProblems" 764 bookProfile( ibooker , nUnlockedvsTime_,
766 "Number of channels Unlocked vs time",
770 "# channels unlocked " 773 bookProfile( ibooker , nOutOfSyncvsTime_,
775 "Number of channels OutOfSync vs time",
779 "# channels out-of-sync" 784 bookProfile( ibooker , nAPVStatusBitvsTime_,
785 "nAPVStatusBitvsTime",
786 "Number of APVs with APVStatusBit error vs time",
790 "# APVs with APVStatusBit error" 793 bookProfile( ibooker , nAPVErrorvsTime_,
795 "Number of APVs with APVError vs time",
799 "# APVs with APVError" 802 bookProfile( ibooker , nAPVAddressErrorvsTime_,
803 "nAPVAddressErrorvsTime",
804 "Number of APVs with APVAddressError vs time",
808 "# APVs with APVAddressError" 813 bookHistogram(ibooker , lumiErrorFraction_,
815 "Fraction of error per lumi section vs subdetector",
820 if (lumiErrorFraction_.enabled && lumiErrorFraction_.monitorEle) {
821 lumiErrorFraction_.monitorEle->setLumiFlag();
822 lumiErrorFraction_.monitorEle->setBinLabel(1,
"TECB");
823 lumiErrorFraction_.monitorEle->setBinLabel(2,
"TECF");
824 lumiErrorFraction_.monitorEle->setBinLabel(3,
"TIB");
825 lumiErrorFraction_.monitorEle->setBinLabel(4,
"TIDB");
826 lumiErrorFraction_.monitorEle->setBinLabel(5,
"TIDF");
827 lumiErrorFraction_.monitorEle->setBinLabel(6,
"TOB");
831 if (tkMapConfig_.enabled){
832 tkmapFED_ = std::make_unique<TkHistoMap>(tkDetMap,
topFolderName,
"TkHMap_FractionOfBadChannels",0.,
true);
834 else tkmapFED_ =
nullptr;
844 if (!histosBooked_[fedId]) {
849 std::stringstream fedIdStream;
850 fedIdStream <<
fedId;
853 bookHistogram(ibooker , feOverflowDetailed_,
854 feOverflowDetailedMap_[fedId],
855 "FEOverflowsForFED"+fedIdStream.str(),
856 "FE overflows per FE unit for FED ID "+fedIdStream.str(),
859 bookHistogram(ibooker , badMajorityAddressDetailed_,
860 badMajorityAddressDetailedMap_[fedId],
861 "BadMajorityAddressesForFED"+fedIdStream.str(),
862 "Bad majority APV addresses per FE unit for FED ID "+fedIdStream.str(),
865 bookHistogram(ibooker , feMissingDetailed_,
866 feMissingDetailedMap_[fedId],
867 "FEMissingForFED"+fedIdStream.str(),
868 "Buffers with FE Unit payload missing per FE unit for FED ID "+fedIdStream.str(),
871 bookHistogram(ibooker , badStatusBitsDetailed_,
872 badStatusBitsDetailedMap_[fedId],
873 "BadAPVStatusBitsForFED"+fedIdStream.str(),
874 "Bad apv status bits for FED ID "+fedIdStream.str(),
877 histosBooked_[
fedId] =
true;
879 if (fullDebugMode && !debugHistosBooked_[fedId]) {
882 std::stringstream fedIdStream;
883 fedIdStream <<
fedId;
886 bookHistogram(ibooker , apvErrorDetailed_,
887 apvErrorDetailedMap_[fedId],
888 "APVErrorBitsForFED"+fedIdStream.str(),
889 "APV errors for FED ID "+fedIdStream.str(),
892 bookHistogram(ibooker , apvAddressErrorDetailed_,
893 apvAddressErrorDetailedMap_[fedId],
894 "APVAddressErrorBitsForFED"+fedIdStream.str(),
895 "Wrong APV address errors for FED ID "+fedIdStream.str(),
898 bookHistogram(ibooker , unlockedDetailed_,
899 unlockedDetailedMap_[fedId],
900 "UnlockedBitsForFED"+fedIdStream.str(),
901 "Unlocked channels for FED ID "+fedIdStream.str(),
904 bookHistogram(ibooker , outOfSyncDetailed_,
905 outOfSyncDetailedMap_[fedId],
906 "OOSBitsForFED"+fedIdStream.str(),
907 "Out of sync channels for FED ID "+fedIdStream.str(),
910 debugHistosBooked_[
fedId] =
true;
914 void FEDHistograms::bookAllFEDHistograms(
DQMStore::IBooker & ibooker ,
bool fullDebugMode )
920 for (
unsigned int iFed = siStripFedIdMin; iFed <= siStripFedIdMax; iFed++)
921 bookFEDHistograms(ibooker , iFed, fullDebugMode);
924 bool FEDHistograms::tkHistoMapEnabled(
unsigned int aIndex){
925 return tkMapConfig_.enabled;
928 TkHistoMap * FEDHistograms::tkHistoMapPointer(
unsigned int aIndex){
929 return tkmapFED_.get();
A container class for generic run and event-related info, information required by the commissioning a...
void setCurrentFolder(std::string const &fullpath)
static const uint16_t FEUNITS_PER_FED
static const uint16_t APVS_PER_FED
std::string const & pwd()
Constants and enumerated types for FED/FEC systems.
static const uint16_t FEDCH_PER_FED