ATLAS Offline Software
Loading...
Searching...
No Matches
AthEventCounter.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5*/
6
7// AthEventCounter.h
8// Header file for class AthEventCounter
9// Author: S.Binet<binet@cern.ch>
11#ifndef GAUDISEQUENCER_ATHEVENTCOUNTER_H
12#define GAUDISEQUENCER_ATHEVENTCOUNTER_H
13
15#include "Gaudi/Property.h"
16#include <atomic>
17
19{
20public:
21
22 using AthReentrantAlgorithm::AthReentrantAlgorithm;
23 ~AthEventCounter( ) = default;
24
25 /*****************************
26 ** Public Function Members **
27 *****************************/
28
29 StatusCode initialize();
30 StatusCode execute(const EventContext& ctx) const ;
31 StatusCode finalize();
32
33private:
34
35 /**************************
36 ** Private Data Members **
37 **************************/
38
44 Gaudi::Property<int> m_frequency{this, "Frequency", 1,
45 "The frequency with which the number of events should be "
46 "reported. The default is 1, corresponding to every event" };
47
51 mutable std::atomic<int> m_total{0};
52};
53
54#endif // GAUDISEQUENCER_ATHEVENTCOUNTER_H
55
Gaudi::Property< int > m_frequency
The frequency with which the number of events should be reported.
~AthEventCounter()=default
StatusCode initialize()
StatusCode finalize()
StatusCode execute(const EventContext &ctx) const
std::atomic< int > m_total
The total events seen.
An algorithm that can be simultaneously executed in multiple threads.