Skip to content

Commit

Permalink
change type of frequency property
Browse files Browse the repository at this point in the history
  • Loading branch information
m-fila authored and jmcarcell committed Oct 30, 2024
1 parent 4bfe939 commit 403d973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions k4FWCore/components/EventCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class EventCounter final : public Gaudi::Functional::Consumer<void(const EventCo

void operator()(const EventContext& ctx) const override {
++m_count;
if ((m_frequency > 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<int> m_frequency{this, "Frequency", 1, "How often to print the event number"};
Gaudi::Property<unsigned int> m_frequency{this, "Frequency", 1, "How often to print the event number"};
};

DECLARE_COMPONENT(EventCounter)

0 comments on commit 403d973

Please sign in to comment.