Skip to content
Merged
Changes from 1 commit
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: 10 additions & 3 deletions FWCore/Services/plugins/CondorStatusUpdater.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ namespace edm {
edm::ParameterSetID m_processParameterSetID;

std::uint_least64_t m_lastEventCount = 0;
bool m_disable = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to be unnecessary

Suggested change
bool m_disable = false;

};

} // namespace service
Expand All @@ -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)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking the default value should not be needed because of having default value in the fillDescriptions(), right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, thanks.

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;
Expand Down Expand Up @@ -419,6 +425,7 @@ void CondorStatusService::fillDescriptions(ConfigurationDescriptions &descriptio
->setComment("Interval, in seconds, to calculate event rate over (using EMA)");
desc.addOptionalUntracked<std::string>("tag")->setComment(
"Identifier tag for this process (a value of 'Foo' results in ClassAd attributes of the form 'ChirpCMSSWFoo*')");
desc.addOptionalUntracked<bool>("disable", false)->setComment("Disable this service");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about inverting the logic along

Suggested change
desc.addOptionalUntracked<bool>("disable", false)->setComment("Disable this service");
desc.addOptionalUntracked<bool>("enable", true)->setComment("Enable this service");

? (just thinking if avoiding the double negation of "not disabling" would be more clear)

descriptions.add("CondorStatusService", desc);
}

Expand Down