Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Modules/ITS/src/ITSFhrCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ std::string ITSFhrCheck::getAcceptedType() { return "TH1"; }

void ITSFhrCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
{
auto* h = dynamic_cast<TH2Poly*>(mo->getObject());
auto* msg = new TPaveText(0.5, 0.5, 0.9, 0.75, "NDC");
msg->SetName(Form("%s_msg", mo->GetName()));
if (mo->getName() == "General/ErrorPlots") {
auto* h = dynamic_cast<TH1D*>(mo->getObject());
auto* msg = new TPaveText(0.5, 0.5, 0.9, 0.75, "NDC");
msg->SetName(Form("%s_msg", mo->GetName()));
if (checkResult == Quality::Good) {
msg->Clear();
msg->AddText("Quality::Good");
Expand All @@ -75,7 +75,11 @@ void ITSFhrCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul
msg->AddText("Decoding ERROR detected");
msg->AddText("please inform SL");
}
h->GetListOfFunctions()->Add(msg);
} else if (mo->getName() == "General/General_Occupancy") {
auto* h = dynamic_cast<TH2Poly*>(mo->getObject());
auto* msg = new TPaveText(0.5, 0.5, 0.9, 0.75, "NDC");
msg->SetName(Form("%s_msg", mo->GetName()));
if (checkResult == Quality::Good) {
msg->Clear();
msg->AddText("Quality::Good");
Expand All @@ -85,15 +89,16 @@ void ITSFhrCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul
msg->AddText("Quality::Bad");
msg->SetTextColor(kRed);
msg->AddText("Max Occupancy over 10^{-5}");
msg->AddText("or ERROR detected");
msg->AddText("Please Inform SL");
} else if (checkResult == Quality::Medium) {
msg->Clear();
msg->AddText("Quality::Medium");
msg->SetTextColor(kOrange);
msg->AddText("Max Occupancy over 10^{-6}");
}
h->GetListOfFunctions()->Add(msg);
}
h->GetListOfFunctions()->Add(msg);
}

} // namespace o2::quality_control_modules::its
18 changes: 10 additions & 8 deletions Modules/ITS/src/ITSFhrTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ void ITSFhrTask::initialize(o2::framework::InitContext& /*ctx*/)
mOccupancy = new double*[NStaves[mLayer]];
mErrorCount = new int**[NStaves[mLayer]];

for (int istave = 0; istave < NStaves[mLayer]; istave++) {
double* px = new double[4];
double* py = new double[4];
getStavePoint(mLayer, istave, px, py);
mGeneralOccupancy->AddBin(4, px, py);
for (int ilayer = 0; ilayer < 7; ilayer++) {
for (int istave = 0; istave < NStaves[ilayer]; istave++) {
double* px = new double[4];
double* py = new double[4];
getStavePoint(ilayer, istave, px, py);
mGeneralOccupancy->AddBin(4, px, py);
}
}
if (mGeneralOccupancy) {
getObjectsManager()->startPublishing(mGeneralOccupancy);
Expand Down Expand Up @@ -618,21 +620,21 @@ void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
}
}
}
mGeneralOccupancy->SetBinContent(istave + 1, *(std::max_element(mOccupancy[istave], mOccupancy[istave] + nChipsPerHic[lay])));
mGeneralOccupancy->SetBinContent(istave + 1 + StaveBoundary[mLayer], *(std::max_element(mOccupancy[istave], mOccupancy[istave] + nChipsPerHic[lay])));
} else {
for (int ihic = 0; ihic < nHicPerStave[lay]; ihic++) {
int ilink = ihic / (nHicPerStave[lay] / 2);
mChipStaveOccupancy[lay]->SetBinContent(ihic + 1, istave + 1, mOccupancy[istave][ihic]);
if (ihic == 0 || ihic == 7) {
for (int ierror = 0; ierror < o2::itsmft::GBTLinkDecodingStat::NErrorsDefined; ierror++) {
if (mErrorVsFeeid && (mErrorCount[istave][ilink][ierror] != 0)) {
mErrorVsFeeid->SetBinContent((3 * StaveBoundary[3]) + (istave * 2) + ilink + 1, ierror + 1, mErrorCount[istave][ilink][ierror]);
mErrorVsFeeid->SetBinContent((3 * StaveBoundary[3]) + ((StaveBoundary[lay] - StaveBoundary[NLayerIB] + istave) * 2) + ilink + 1, ierror + 1, mErrorCount[istave][ilink][ierror]);
}
}
}
}
mGeneralOccupancy->SetBinContent(istave + 1 + StaveBoundary[mLayer], *(std::max_element(mOccupancy[istave], mOccupancy[istave] + nChipsPerHic[lay])));
}
mGeneralOccupancy->SetBinContent(istave + 1, *(std::max_element(mOccupancy[istave], mOccupancy[istave] + nChipsPerHic[lay])));
}
for (int ierror = 0; ierror < o2::itsmft::GBTLinkDecodingStat::NErrorsDefined; ierror++) {
int feeError = mErrorVsFeeid->Integral(1, mErrorVsFeeid->GetXaxis()->GetNbins(), ierror + 1, ierror + 1);
Expand Down