Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FED Errors vs FED ID 2D plot #14793

Merged
merged 3 commits into from Jul 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions DQM/SiStripMonitorHardware/interface/FEDHistograms.hh
Expand Up @@ -196,6 +196,8 @@ private:
outOfSyncDetailedMap_;


HistogramConfig fedErrorsVsId_;

//has individual FED histogram been booked? (index is FedId)
std::vector<bool> histosBooked_,
debugHistosBooked_;
Expand Down
3 changes: 3 additions & 0 deletions DQM/SiStripMonitorHardware/python/siStripFEDMonitor_cfi.py
Expand Up @@ -251,5 +251,8 @@
),
FedIdVsApvIdHistogramConfig = cms.untracked.PSet(
Enabled = cms.untracked.bool(True)
),
FedErrorsVsIdHistogramConfig = cms.untracked.PSet(
Enabled = cms.untracked.bool(True)
)
)
100 changes: 84 additions & 16 deletions DQM/SiStripMonitorHardware/src/FEDHistograms.cc
Expand Up @@ -108,6 +108,7 @@ void FEDHistograms::initialise(const edm::ParameterSet& iConfig,

getConfigForHistogram(fedIdVsApvId_,"FedIdVsApvId",iConfig,pDebugStream);

getConfigForHistogram(fedErrorsVsId_,"FedErrorsVsId",iConfig,pDebugStream);
}

void FEDHistograms::fillCountersHistograms(const FEDErrors::FEDCounters & fedLevelCounters,
Expand Down Expand Up @@ -164,25 +165,71 @@ void FEDHistograms::fillFEDHistograms(FEDErrors & aFedErr,

if (lFedLevelErrors.DataPresent) fillHistogram(dataPresent_,lFedId);

if (lFedLevelErrors.HasCabledChannels && lFedLevelErrors.DataMissing) fillHistogram(dataMissing_,lFedId);
if (lFedLevelErrors.HasCabledChannels && lFedLevelErrors.DataMissing) {
fillHistogram(dataMissing_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,1);
}

if (lFedLevelErrors.InvalidBuffers) fillHistogram(invalidBuffers_,lFedId);
else if (lFedLevelErrors.BadFEDCRCs) fillHistogram(badFEDCRCs_,lFedId);
else if (lFedLevelErrors.BadDAQCRCs) fillHistogram(badDAQCRCs_,lFedId);
else if (lFedLevelErrors.BadIDs) fillHistogram(badIDs_,lFedId);
else if (lFedLevelErrors.BadDAQPacket) fillHistogram(badDAQPacket_,lFedId);
else if (lFedLevelErrors.CorruptBuffer) fillHistogram(corruptBuffers_,lFedId);
if (lFedLevelErrors.InvalidBuffers) {
fillHistogram(invalidBuffers_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,2);
}
else if (lFedLevelErrors.CorruptBuffer) {
fillHistogram(corruptBuffers_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,3);
}
else if (lFedLevelErrors.BadFEDCRCs) {
fillHistogram(badFEDCRCs_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,4);
}
else if (lFedLevelErrors.BadDAQCRCs) {
fillHistogram(badDAQCRCs_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,5);
}
else if (lFedLevelErrors.BadIDs) {
fillHistogram(badIDs_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,6);
}
else if (lFedLevelErrors.BadDAQPacket) {
fillHistogram(badDAQPacket_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,7);
}

if (aFedErr.anyFEDErrors()) {
fillHistogram(anyFEDErrors_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,8);
}

if (aFedErr.anyFEDErrors()) fillHistogram(anyFEDErrors_,lFedId);
if (lFedLevelErrors.HasCabledChannels && aFedErr.anyDAQProblems()) fillHistogram(anyDAQProblems_,lFedId);
if (aFedErr.anyFEProblems()) fillHistogram(anyFEProblems_,lFedId);
if (lFedLevelErrors.HasCabledChannels && aFedErr.anyDAQProblems()) {
fillHistogram(anyDAQProblems_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,9);
}
if (aFedErr.anyFEProblems()) {
fillHistogram(anyFEProblems_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,10);
}

if (lFedLevelErrors.FEsOverflow) fillHistogram(feOverflows_,lFedId);
if (lFedLevelErrors.FEsMissing) fillHistogram(feMissing_,lFedId);
if (lFedLevelErrors.FEsBadMajorityAddress) fillHistogram(badMajorityAddresses_,lFedId);
if (lFedLevelErrors.FEsOverflow) {
fillHistogram(feOverflows_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,11);
}
if (lFedLevelErrors.FEsMissing) {
fillHistogram(feMissing_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,12);
}
if (lFedLevelErrors.FEsBadMajorityAddress) {
fillHistogram(badMajorityAddresses_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,13);
}

if (lFedLevelErrors.BadChannelStatusBit) fillHistogram(badChannelStatusBits_,lFedId);
if (lFedLevelErrors.BadActiveChannelStatusBit) fillHistogram(badActiveChannelStatusBits_,lFedId);
if (lFedLevelErrors.BadChannelStatusBit) {
fillHistogram(badChannelStatusBits_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,14);
}
if (lFedLevelErrors.BadActiveChannelStatusBit) {
fillHistogram(badActiveChannelStatusBits_,lFedId);
fillHistogram(fedErrorsVsId_,lFedId,15);
}

std::vector<FEDErrors::FELevelErrors> & lFeVec = aFedErr.getFELevelErrors();

Expand Down Expand Up @@ -369,6 +416,28 @@ void FEDHistograms::bookTopLevelHistograms(DQMStore::IBooker & ibooker , std::st
"APV-ID",
"FED-ID");

book2DHistogram( ibooker , fedErrorsVsId_,"FEDErrorsVsId",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check that fedErrorsVsId_ is initialized. book2DHistogram has a nasty if statement...
I suspect in some cases it does not properly book the element and causes the segfault you are receiving.

"FED Errors vs ID",
siStripFedIdMax-siStripFedIdMin+1,
siStripFedIdMin,siStripFedIdMax+1,
15,
1,16, "FED ID" , "Error Type");
fedErrorsVsId_.monitorEle->setBinLabel(1, "Data Missing", 2);
fedErrorsVsId_.monitorEle->setBinLabel(2, "Invalid Buffers", 2);
fedErrorsVsId_.monitorEle->setBinLabel(3, "Corrupt Buffers", 2);
fedErrorsVsId_.monitorEle->setBinLabel(4, "Bad FED CRC", 2);
fedErrorsVsId_.monitorEle->setBinLabel(5, "Bad DAQ CRC", 2);
fedErrorsVsId_.monitorEle->setBinLabel(6, "Bad IDs", 2);
fedErrorsVsId_.monitorEle->setBinLabel(7, "Bad DAQ Packet", 2);
fedErrorsVsId_.monitorEle->setBinLabel(8, "Any FED Errors", 2);
fedErrorsVsId_.monitorEle->setBinLabel(9, "Any DAQ Problems", 2);
fedErrorsVsId_.monitorEle->setBinLabel(10, "Any FE Problems", 2);
fedErrorsVsId_.monitorEle->setBinLabel(11, "FE Overflows", 2);
fedErrorsVsId_.monitorEle->setBinLabel(12, "FE Missing", 2);
fedErrorsVsId_.monitorEle->setBinLabel(13, "FE Bad Maj Addr", 2);
fedErrorsVsId_.monitorEle->setBinLabel(14, "Bad Ch Stat Bit", 2);
fedErrorsVsId_.monitorEle->setBinLabel(15, "Bad Active Ch Stat Bit", 2);

const std::string lBaseDir = ibooker.pwd();

ibooker.setCurrentFolder(lBaseDir+"/FED");
Expand All @@ -393,7 +462,6 @@ void FEDHistograms::bookTopLevelHistograms(DQMStore::IBooker & ibooker , std::st
"Number of FEDs with corrupt buffers per event",
"# FEDs with corrupt buffer");


ibooker.setCurrentFolder(lBaseDir+"/FED/VsId");

bookHistogram(ibooker , dataMissing_,"DataMissing",
Expand Down