From 403d9731c4ef08b655cf00f25df89e70b2f4abde Mon Sep 17 00:00:00 2001 From: Mateusz Jakub Fila Date: Mon, 28 Oct 2024 16:51:26 +0100 Subject: [PATCH] change type of frequency property --- k4FWCore/components/EventCounter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)