diff --git a/k4FWCore/components/EventCounter.cpp b/k4FWCore/components/EventCounter.cpp index 59955a4e..758061f4 100644 --- a/k4FWCore/components/EventCounter.cpp +++ b/k4FWCore/components/EventCounter.cpp @@ -26,14 +26,14 @@ class EventCounter final : public Gaudi::Functional::Consumer 0) && (ctx.evt() % m_frequency == 0)) { + if (m_frequency && (ctx.evt() % m_frequency == 0)) { info() << "Processing event " << ctx.evt() << endmsg; } } private: mutable Gaudi::Accumulators::Counter<> m_count{this, "count"}; - Gaudi::Property m_frequency{this, "Frequency", 1, "How often to print the event number"}; + Gaudi::Property m_frequency{this, "Frequency", 1, "How often to print the event number"}; }; DECLARE_COMPONENT(EventCounter)