Open m-fila opened 1 month ago
Can we have a sort of combination of things? Something like an EventCounter
algorithm that simply prints the event number from the EventContext
for the hearbeat with an internal Gaudi::Accumulator::Counter
for printing the summary?
Can we have a sort of combination of things? Something like an
EventCounter
algorithm that simply prints the event number from theEventContext
for the hearbeat with an internalGaudi::Accumulator::Counter
for printing the summary?
We can, no problem
As we discussed it's used mainly for debugging and it's not clear if there are better ways to debug especially in multi-threaded environment
A number of repositories uses the
EventCounter
that was part of the deprecatedGaudiAlg
:The
EventCounter
algorithm itself is simple as it just increments its internal counter on each execution and prints the counter's value on finalize and heartbeat on execution:EventCounter
Gaudi::Accumulator::Counter
andMessageSvcSink
(MessageSvcSink
prints the values hold in each counter at the finalize). With it, it's possible to:Gaudi::Accumulator::Counter
member to some algorithms that should be counted (for instance the input/output algorithms or filters) and remove theEventCounter
from affected repositoriesEventCounter
algorithm that does just the counting (can be copied fromGaudiTestSuite
)The solutions involving a separate algorithm doing counting would require to put it in sequential sequencer when used with the
AvalancheSchedulerSvc
(no data dependencies declared so the algorithm could be executed in any order with the respect to the other algorithms)Alternatively, the information about the event number as seen from a scheduler can be accesses with
EventContext