From 6174b8c4696bd31f3b9a0da9630d989b57a1a9c3 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 25 Apr 2022 15:50:02 -0400 Subject: [PATCH 1/2] Can now disable CondorStatusUpdator Added a parameter to allow the service to be disabled. --- FWCore/Services/plugins/CondorStatusUpdater.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/FWCore/Services/plugins/CondorStatusUpdater.cc b/FWCore/Services/plugins/CondorStatusUpdater.cc index d9b6f0e35e5cd..1208c7c7bc845 100644 --- a/FWCore/Services/plugins/CondorStatusUpdater.cc +++ b/FWCore/Services/plugins/CondorStatusUpdater.cc @@ -80,6 +80,7 @@ namespace edm { edm::ParameterSetID m_processParameterSetID; std::uint_least64_t m_lastEventCount = 0; + bool m_disable = false; }; } // namespace service @@ -92,10 +93,15 @@ const unsigned int CondorStatusService::m_defaultUpdateInterval; constexpr float CondorStatusService::m_defaultEmaInterval; CondorStatusService::CondorStatusService(ParameterSet const &pset, edm::ActivityRegistry &ar) - : m_debug(false), m_lastUpdate(0), m_events(0), m_lumis(0), m_runs(0), m_files(0) { + : m_debug(pset.getUntrackedParameter("debug", false)), + m_lastUpdate(0), + m_events(0), + m_lumis(0), + m_runs(0), + m_files(0) { m_shouldUpdate.clear(); - if (pset.exists("debug")) { - m_debug = true; + if (pset.getUntrackedParameter("disable", false)) { + return; } if (!isChirpSupported()) { return; @@ -419,6 +425,7 @@ void CondorStatusService::fillDescriptions(ConfigurationDescriptions &descriptio ->setComment("Interval, in seconds, to calculate event rate over (using EMA)"); desc.addOptionalUntracked("tag")->setComment( "Identifier tag for this process (a value of 'Foo' results in ClassAd attributes of the form 'ChirpCMSSWFoo*')"); + desc.addOptionalUntracked("disable", false)->setComment("Disable this service"); descriptions.add("CondorStatusService", desc); } From 5b59b0b469ce3fab0227dfcb596207c6898cdf1e Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 27 Apr 2022 13:32:18 -0400 Subject: [PATCH 2/2] Switch parameter to enable --- FWCore/Services/plugins/CondorStatusUpdater.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/FWCore/Services/plugins/CondorStatusUpdater.cc b/FWCore/Services/plugins/CondorStatusUpdater.cc index 1208c7c7bc845..a08af45d781fe 100644 --- a/FWCore/Services/plugins/CondorStatusUpdater.cc +++ b/FWCore/Services/plugins/CondorStatusUpdater.cc @@ -80,7 +80,6 @@ namespace edm { edm::ParameterSetID m_processParameterSetID; std::uint_least64_t m_lastEventCount = 0; - bool m_disable = false; }; } // namespace service @@ -100,7 +99,7 @@ CondorStatusService::CondorStatusService(ParameterSet const &pset, edm::Activity m_runs(0), m_files(0) { m_shouldUpdate.clear(); - if (pset.getUntrackedParameter("disable", false)) { + if (not pset.getUntrackedParameter("enable", true)) { return; } if (!isChirpSupported()) { @@ -425,7 +424,7 @@ void CondorStatusService::fillDescriptions(ConfigurationDescriptions &descriptio ->setComment("Interval, in seconds, to calculate event rate over (using EMA)"); desc.addOptionalUntracked("tag")->setComment( "Identifier tag for this process (a value of 'Foo' results in ClassAd attributes of the form 'ChirpCMSSWFoo*')"); - desc.addOptionalUntracked("disable", false)->setComment("Disable this service"); + desc.addOptionalUntracked("enable", true)->setComment("Enable this service"); descriptions.add("CondorStatusService", desc); }