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

MCH: added plot with quality flag for each DE to the Decoding task #2487

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Modules/MUON/MCH/include/MCH/DecodingPostProcessing.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ class DecodingPostProcessing : public PostProcessingInterface
std::unique_ptr<HeartBeatPacketsPlotter> mHBPacketsPlotterOnCycle;
std::unique_ptr<FECSyncStatusPlotter> mSyncStatusPlotter;
std::unique_ptr<FECSyncStatusPlotter> mSyncStatusPlotterOnCycle;

std::unique_ptr<TH2F> mHistogramQualityPerDE; ///< quality flags for each DE, to be filled by checker task
};

template <typename T>
Expand Down
23 changes: 23 additions & 0 deletions Modules/MUON/MCH/src/DecodingCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,29 @@ void DecodingCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkRes
drawThresholdsPerStation(h, mMinGoodSyncFracPerStation, mMinGoodSyncFrac);
}
}

// update quality flags for each DE
if (mo->getName().find("QualityFlagPerDE") != std::string::npos) {
TH2F* h = dynamic_cast<TH2F*>(mo->getObject());
if (!h) {
return;
}

for (int deId = 0; deId < mQualityChecker.mQuality.size(); deId++) {
float ybin = 0;
if (mQualityChecker.mQuality[deId] == Quality::Good) {
ybin = 3;
}
if (mQualityChecker.mQuality[deId] == Quality::Medium) {
ybin = 2;
}
if (mQualityChecker.mQuality[deId] == Quality::Bad) {
ybin = 1;
}

h->SetBinContent(deId + 1, ybin, 1);
}
}
}

} // namespace o2::quality_control_modules::muonchambers
15 changes: 15 additions & 0 deletions Modules/MUON/MCH/src/DecodingPostProcessing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,21 @@ void DecodingPostProcessing::initialize(Trigger t, framework::ServiceRegistryRef
createDecodingErrorsHistos(t, &qcdb);
createHeartBeatPacketsHistos(t, &qcdb);
createSyncStatusHistos(t, &qcdb);

//--------------------------------------------------
// Detector quality histogram
//--------------------------------------------------

mHistogramQualityPerDE.reset();
mHistogramQualityPerDE = std::make_unique<TH2F>("QualityFlagPerDE", "Quality Flag vs DE", getNumDE(), 0, getNumDE(), 3, 0, 3);
mHistogramQualityPerDE->GetYaxis()->SetBinLabel(1, "Bad");
mHistogramQualityPerDE->GetYaxis()->SetBinLabel(2, "Medium");
mHistogramQualityPerDE->GetYaxis()->SetBinLabel(3, "Good");
mHistogramQualityPerDE->SetOption("colz");
mHistogramQualityPerDE->SetStats(0);
getObjectsManager()->startPublishing(mHistogramQualityPerDE.get(), core::PublicationPolicy::ThroughStop);
getObjectsManager()->setDefaultDrawOptions(mHistogramQualityPerDE.get(), "colz");
getObjectsManager()->setDisplayHint(mHistogramQualityPerDE.get(), "gridy");
}

//_________________________________________________________________________________________
Expand Down