ATLAS Offline Software
Loading...
Searching...
No Matches
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
6import AthenaPython.PyAthena as PyAthena
7from AthenaPython.PyAthena import StatusCode
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
const bool debug
MsgStream & msg() const
virtual StatusCode execute() override
virtual StatusCode finalize() override
virtual StatusCode initialize() override