ATLAS Offline Software
TestFilterReentrantAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
10 
11 TestFilterReentrantAlg::TestFilterReentrantAlg(const std::string &name, ISvcLocator *pSvcLocator)
12  : AthReentrantAlgorithm(name, pSvcLocator)
13 {
14 }
15 
16 
18 {
19  ATH_MSG_DEBUG("initialize()");
20 
22 
23  return StatusCode::SUCCESS;
24 }
25 
26 
27 StatusCode TestFilterReentrantAlg::execute(const EventContext &ctx) const
28 {
29  ATH_MSG_DEBUG("execute()");
30 
32  if (ctx.eventID().event_number() % m_modulo.value() == 0) {
33  filter.setPassed(true);
34  }
35 
36  return StatusCode::SUCCESS;
37 }
38 
40 {
41  ATH_MSG_DEBUG("finalize()");
42 
44 
45  return StatusCode::SUCCESS;
46 }
FilterReporter
a guard class for use with ref FilterReporterParams
Definition: FilterReporter.h:35
TestFilterReentrantAlg::initialize
virtual StatusCode initialize() override final
Definition: TestFilterReentrantAlg.cxx:17
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TestFilterReentrantAlg::TestFilterReentrantAlg
TestFilterReentrantAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TestFilterReentrantAlg.cxx:11
TestFilterReentrantAlg.h
TestFilterReentrantAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: TestFilterReentrantAlg.cxx:27
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
covarianceTool.filter
filter
Definition: covarianceTool.py:514
TestFilterReentrantAlg::finalize
virtual StatusCode finalize() override final
Definition: TestFilterReentrantAlg.cxx:39
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TestFilterReentrantAlg::m_filterParams
FilterReporterParams m_filterParams
Definition: TestFilterReentrantAlg.h:22
FilterReporterParams::initialize
StatusCode initialize(bool enabled=true)
do anything we need to do in initialize
Definition: FilterReporterParams.cxx:24
FilterReporter.h
TestFilterReentrantAlg::m_modulo
Gaudi::Property< int > m_modulo
Definition: TestFilterReentrantAlg.h:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
FilterReporterParams::summary
std::string summary()
report the status of filtering
Definition: FilterReporterParams.cxx:60