ATLAS Offline Software
Loading...
Searching...
No Matches
DigitizationAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "DigitizationAlg.h"
6
8
9DigitizationAlg::DigitizationAlg(const std::string& name, ISvcLocator* pSvcLocator)
10 : AthAlgorithm(name, pSvcLocator)
11{
12}
13
14// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
15
17{
18 ATH_MSG_DEBUG ( "Initializing " << name() );
19 //locate the PileupTools and initialize them
20 ATH_CHECK(m_puTools.retrieve());
21 return StatusCode::SUCCESS;
22}
23
24// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
25
26StatusCode DigitizationAlg::execute(const EventContext& ctx)
27{
28 ATH_MSG_DEBUG ("in execute()");
29 for(auto& puToolHandle : m_puTools)
30 {
31 // Reset the filter first
32 puToolHandle->resetFilter();
33 ATH_CHECK(puToolHandle->processAllSubEvents(ctx));
34 // Check if the event was filtered out by the current PileUpTool.
35 if (!puToolHandle->filterPassed())
36 {
37 ATH_MSG_VERBOSE( "Filter " << puToolHandle->name() << " failed - will stop the event" );
38 this->setFilterPassed(false, ctx);
39 break;
40 }
41 }
42 return StatusCode::SUCCESS;
43}
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
46
48
49 ATH_MSG_INFO ("in finalize()");
50 return StatusCode::SUCCESS;
51}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
an algorithm to run digitization in the original 'algorithm' approach using the common interface of I...
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual void setFilterPassed(bool state, const EventContext &ctx) const
StatusCode execute(const EventContext &ctx)
Execute method.
StatusCode finalize()
DigitizationAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandleArray< IPileUpTool > m_puTools
StatusCode initialize()