ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PileUpComps
src
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
9
DigitizationAlg::DigitizationAlg
(
const
std::string& name, ISvcLocator* pSvcLocator)
10
:
AthAlgorithm
(name, pSvcLocator)
11
{
12
}
13
14
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
15
16
StatusCode
DigitizationAlg::initialize
()
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
26
StatusCode
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
47
StatusCode
DigitizationAlg::finalize
() {
48
49
ATH_MSG_INFO
(
"in finalize()"
);
50
return
StatusCode::SUCCESS;
51
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
DigitizationAlg.h
an algorithm to run digitization in the original 'algorithm' approach using the common interface of I...
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Definition
AthCommonAlgorithm.h:99
DigitizationAlg::execute
StatusCode execute(const EventContext &ctx)
Execute method.
Definition
DigitizationAlg.cxx:26
DigitizationAlg::finalize
StatusCode finalize()
Definition
DigitizationAlg.cxx:47
DigitizationAlg::DigitizationAlg
DigitizationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
DigitizationAlg.cxx:9
DigitizationAlg::m_puTools
ToolHandleArray< IPileUpTool > m_puTools
Definition
DigitizationAlg.h:29
DigitizationAlg::initialize
StatusCode initialize()
Definition
DigitizationAlg.cxx:16
Generated on
for ATLAS Offline Software by
1.17.0