Skip to content
Snippets Groups Projects

TrigOnlineMonitor: Add histograms to monitor number of forks, threads and slots

Merged Rafal Bielski requested to merge rbielski/athena:trigop-mon-mt-conf into master
2 files
+ 49
1
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -76,6 +76,8 @@ void TrigOpMonitor::handle( const Incident& incident ) {
fillMagFieldHist();
fillIOVDbHist();
fillSubDetHist();
const AthenaInterprocess::UpdateAfterFork& updinc = dynamic_cast<const AthenaInterprocess::UpdateAfterFork&>(incident);
fillProcThreadHist(updinc.workerID());
}
}
@@ -128,6 +130,14 @@ StatusCode TrigOpMonitor::bookHists()
m_releaseHist = new TH1I("GeneralOpInfo", "General operational info;;Applications", 1, 0, 1);
m_mtConfigHist = new TH2I("MTConfig", "Multi-threading configuration", 2, 0, 2, 10, 0, 10);
m_mtConfigHist->SetCanExtend(TH1::kYaxis);
m_mtConfigHist->GetXaxis()->SetBinLabel(1, "N threads");
m_mtConfigHist->GetXaxis()->SetBinLabel(2, "N slots");
m_workersHist = new TH1I("MPWorkers", "Worker IDs;Worker ID;Number of workers", 10, 0, 10);
m_workersHist->SetCanExtend(TH1::kXaxis);
m_subdetHist = new TH2I("Subdetectors", "State of subdetectors", 1, 0, 1, 3, 0, 3);
m_subdetHist->SetCanExtend(TH1::kXaxis);
m_subdetHist->GetYaxis()->SetBinLabel(1, "# ROB");
@@ -140,7 +150,10 @@ StatusCode TrigOpMonitor::bookHists()
m_muHist = new TProfile("Pileup", "Pileup;Lumiblock;Interactions per BX", m_maxLB, 0, m_maxLB);
// Register histograms
TH1* hist[] = {m_releaseHist, m_subdetHist, m_iovChangeHist, m_magFieldHist, m_lumiHist, m_muHist};
TH1* hist[] = {
m_releaseHist, m_mtConfigHist, m_workersHist, m_subdetHist,
m_iovChangeHist, m_magFieldHist, m_lumiHist, m_muHist
};
for (TH1* h : hist) {
if (h) ATH_CHECK(m_histSvc->regHist(m_histPath + h->GetName(), h));
}
@@ -347,6 +360,38 @@ void TrigOpMonitor::fillReleaseDataHist()
}
}
void TrigOpMonitor::fillProcThreadHist(const int workerID)
{
m_workersHist->Fill(workerID, 1);
auto getIntProp = [this](std::string_view name, const std::string& prop) -> std::optional<int> {
IProperty* svc = serviceLocator()->service(name).as<IProperty>();
if (svc == nullptr) return std::nullopt;
try {
return std::stoi(svc->getProperty(prop).toString());
}
catch (...) {
return std::nullopt;
}
};
const std::optional<int> numThreads = getIntProp("AvalancheSchedulerSvc","ThreadPoolSize");
if (numThreads.has_value()) {
m_mtConfigHist->Fill("N threads", numThreads.value(), 1.0);
}
else {
ATH_MSG_WARNING("Could not retrieve the number of threads to fill the monitoring histogram");
}
const std::optional<int> numSlots = getIntProp("EventDataSvc","NSlots");
if (numSlots.has_value()) {
m_mtConfigHist->Fill("N slots", numSlots.value(), 1.0);
}
else {
ATH_MSG_WARNING("Could not retrieve the number of slots to fill the monitoring histogram");
}
}
void TrigOpMonitor::fillSubDetHist()
{
// Retrieve the enabled ROBs/SubDets list from DataFlowConfig which is a special object
Loading