Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:33

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
0003 *                                                                                   *
0004 * This software is distributed under the terms of the Apache version 2 licence,     *
0005 * copied verbatim in the file "LICENSE".                                            *
0006 *                                                                                   *
0007 * In applying this licence, CERN does not waive the privileges and immunities       *
0008 * granted to it by virtue of its status as an Intergovernmental Organization        *
0009 * or submit itself to any jurisdiction.                                             *
0010 \***********************************************************************************/
0011 #include "GaudiKernel/Algorithm.h"
0012 #include <Gaudi/Property.h>
0013 
0014 class GAUDI_API EventCounter : public Algorithm {
0015 public:
0016   /**
0017    ** Constructor(s)
0018    **/
0019   EventCounter( const std::string& name, ISvcLocator* pSvcLocator );
0020 
0021   /*****************************
0022    ** Public Function Members **
0023    *****************************/
0024 
0025   StatusCode initialize() override;
0026   StatusCode execute() override;
0027   StatusCode finalize() override;
0028 
0029 private:
0030   /**************************
0031    ** Private Data Members **
0032    **************************/
0033 
0034   /**
0035    ** The frequency with which the number of events
0036    ** should be reported. The default is 1, corresponding
0037    ** to every event.
0038    **/
0039   Gaudi::CheckedProperty<int> m_frequency{ this, "Frequency", 1 };
0040 
0041   /**
0042    ** The number of events skipped since the last time
0043    ** the count was reported.
0044    **/
0045   int m_skip = 0;
0046 
0047   /**
0048    ** The total events seen.
0049    **/
0050   int m_total = 0;
0051 };