ATLAS Offline Software
PrimaryDPDPrescaler.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef PRIMARYDPD_PRESCALER_H
5 #define PRIMARYDPD_PRESCALER_H
6 
7 #include <string>
8 #include <vector>
9 
12 #include "Gaudi/Property.h"
13 #include "GaudiKernel/ServiceHandle.h"
15 
16 
18 public: // Constructor and Destructor
20  PrimaryDPDPrescaler(const std::string& name, ISvcLocator* pSvcLocator);
22  virtual ~PrimaryDPDPrescaler()= default;
23 
24 public:
26  StatusCode initialize() override;
27  StatusCode execute(const EventContext& ctx) const override;
28  StatusCode finalize()override;
29 
30  // Private data members
31 private:
33  ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", "Random Number Service"};
34 
35  Gaudi::Property<double> m_prescale{this , "Prescale", 1.};
36  mutable std::atomic<unsigned int> m_accepted{0};
37  mutable std::atomic<unsigned int> m_vetoed{0};
38  unsigned int m_rollover{0};
39 
41 
43  StringArrayProperty m_theAcceptAlgNames;
44 
46  StringArrayProperty m_theRequireAlgNames;
47 
48 
49 };
50 
51 
52 #endif
PrimaryDPDPrescaler::initialize
StatusCode initialize() override
Gaudi Service Interface method implementations:
Definition: PrimaryDPDPrescaler.cxx:17
PrimaryDPDPrescaler::m_accepted
std::atomic< unsigned int > m_accepted
Definition: PrimaryDPDPrescaler.h:36
PrimaryDPDPrescaler::m_prescale
Gaudi::Property< double > m_prescale
Definition: PrimaryDPDPrescaler.h:35
PrimaryDPDPrescaler
Definition: PrimaryDPDPrescaler.h:17
PrimaryDPDPrescaler::execute
StatusCode execute(const EventContext &ctx) const override
Definition: PrimaryDPDPrescaler.cxx:23
PrimaryDPDPrescaler::finalize
StatusCode finalize() override
Definition: PrimaryDPDPrescaler.cxx:47
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
PrimaryDPDPrescaler::~PrimaryDPDPrescaler
virtual ~PrimaryDPDPrescaler()=default
Destructor.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PrimaryDPDPrescaler::m_theAcceptAlgNames
StringArrayProperty m_theAcceptAlgNames
Keep these two properties for now in order not to break the current configuration.
Definition: PrimaryDPDPrescaler.h:43
AthReentrantAlgorithm.h
PrimaryDPDPrescaler::m_theRequireAlgNames
StringArrayProperty m_theRequireAlgNames
List of algorithms names to combine with logical AND.
Definition: PrimaryDPDPrescaler.h:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
EventInfo.h
PrimaryDPDPrescaler::m_vetoed
std::atomic< unsigned int > m_vetoed
Definition: PrimaryDPDPrescaler.h:37
PrimaryDPDPrescaler::m_rollover
unsigned int m_rollover
Definition: PrimaryDPDPrescaler.h:38
PrimaryDPDPrescaler::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
handle to the IAthRNGSvc we want to test
Definition: PrimaryDPDPrescaler.h:33
PrimaryDPDPrescaler::PrimaryDPDPrescaler
PrimaryDPDPrescaler(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Definition: PrimaryDPDPrescaler.cxx:11
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >