Commit 27971680 authored by Oliver Majersky's avatar Oliver Majersky Committed by Nils Erik Krumnack
Browse files

AnalysisTop: Reduce warnings from unsupported photon-trigger scale factors

parent d12166f6
......@@ -25,6 +25,8 @@ namespace top {
declareProperty("config", m_config);
}
size_t ScaleFactorRetriever::s_warn_counter = 0;
StatusCode ScaleFactorRetriever::initialize() {
ATH_MSG_INFO("Initialising " << this->name());
......@@ -190,7 +192,10 @@ namespace top {
const top::topSFSyst SFSyst) const {
if (!m_config->useGlobalTrigger()) {
ATH_MSG_WARNING("Photon trigger SFs are currently supported only for the global triggers");
if (s_warn_counter < 5) {
ATH_MSG_WARNING("Photon trigger SFs are currently supported only for the global triggers");
++s_warn_counter;
}
return 1.;
}
......@@ -1340,4 +1345,5 @@ namespace top {
ATH_MSG_INFO(" LeptonEventWeight : " << std::to_string(leptonSF(event, top::topSFSyst::nominal)));
ATH_MSG_INFO(" B-TagEventWeight : " << std::to_string(btagSF(event, top::topSFSyst::nominal)));
}
} // namespace top
......@@ -479,6 +479,8 @@ namespace top {
// Configuration
std::shared_ptr<top::TopConfig> m_config;
bool m_preferGlobalTriggerSF;
static size_t s_warn_counter; // print WARNING messages limited times to prevent excessive log spam
};
} // namespace top
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment