ATLAS Offline Software
PhysicsAnalysis
AnalysisCommon
ParticleJetTools
python
CopyTruthParticlesAlg.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
3
# CopyTruthParticlesAlgs for Athena
4
# based loosely on
5
# atlasoff/Reconstruction/EventShapes/EventShapeTools/python/EventDensityConfig.py
6
import
AthenaPython.PyAthena
as
PyAthena
7
from
AthenaPython.PyAthena
import
StatusCode
8
class
CopyTruthParticlesAlg
(
PyAthena.Alg
):
9
"""Athena algorithm wrapper around CopyTruthParticles tools"""
10
def
__init__
(self, ctptool, name, **kw):
11
self.
ctptool
= ctptool
12
kw[
'name'
] = name
13
super(CopyTruthParticlesAlg, self).
__init__
(**kw)
14
15
return
16
17
def
initialize
(self):
18
self.
msg
.
info
(
'==> initialize...'
)
19
self.
ctptool
= PyAthena.py_tool(self.
ctptool
.getFullName(), iface=
"CopyTruthParticles"
)
20
return
StatusCode.Success
21
22
def
execute
(self):
23
self.
msg
.
debug
(
'==> executing ...'
)
24
if
self.
ctptool
.
execute
() != 0:
25
return
StatusCode.Failure
26
else
:
27
return
StatusCode.Success
28
29
30
def
finalize
(self):
31
self.
msg
.
info
(
'==> finalize...'
)
32
return
StatusCode.Success
grepfile.info
info
Definition:
grepfile.py:38
PyAthena::Alg::initialize
virtual StatusCode initialize() override
Definition:
PyAthenaAlg.cxx:60
PyAthena::Alg::execute
virtual StatusCode execute() override
Definition:
PyAthenaAlg.cxx:93
CopyTruthParticlesAlg.CopyTruthParticlesAlg.__init__
def __init__(self, ctptool, name, **kw)
Definition:
CopyTruthParticlesAlg.py:10
PyAthena::Alg::finalize
virtual StatusCode finalize() override
Definition:
PyAthenaAlg.cxx:86
CopyTruthParticlesAlg.CopyTruthParticlesAlg
Definition:
CopyTruthParticlesAlg.py:8
debug
const bool debug
Definition:
MakeUncertaintyPlots.cxx:53
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition:
AthCommonMsg.h:24
PyAthena::Alg
Definition:
PyAthenaAlg.h:33
CopyTruthParticlesAlg.CopyTruthParticlesAlg.ctptool
ctptool
Definition:
CopyTruthParticlesAlg.py:11
Generated on Thu Nov 7 2024 21:12:31 for ATLAS Offline Software by
1.8.18