7__doc__ =
"""Module containing a set of py-components to test various aspects
10__author__ =
"Sebastien Binet <binet@cern.ch>"
13import AthenaPython.PyAthena
as PyAthena
14from AthenaPython.PyAthena
import StatusCode
17 """Simple test of a py-algorithm
24 self.
px = kw.get(
'px', 10.*Units.GeV)
25 self.
eta = kw.get(
'eta', 2.5)
26 self.
pt = kw.get(
'pt', 40.*Units.GeV)
31 self.
sg = PyAthena.py_svc(
"StoreGateSvc")
32 self.
msg.info(
"==> initializing [%s]...", self.
name )
33 self.
msg.info(
"eta: %r",self.
eta )
34 self.
msg.info(
"pt: %r",self.
pt )
35 self.
msg.info(
"px: %r",self.
px )
38 return StatusCode.Success
42 _info(
"==> execute..." )
45 _info(
"hasattr('_cppHandle'): %s", hasattr(self,
'_cppHandle'))
47 _info(
"has passed filter: %s", bool(self._cppHandle.
filterPassed()))
48 return StatusCode.Success
51 self.msg.info(
"==> finalize..." )
52 return StatusCode.Success
55 """Simple test of a py-service
65 self.
sg = PyAthena.py_svc(
"StoreGateSvc")
66 self.msg.info(
"==> initializing [%s]...", self.
name )
67 self.msg.info(
"cnt: %r",self.
counter )
68 return StatusCode.Success
71 self.msg.info(
"==> finalize..." )
72 self.msg.info(
"cnt: %r",self.
counter )
73 return StatusCode.Success
76 """Simple test of a py-tool
86 self.
sg = PyAthena.py_svc(
"StoreGateSvc")
87 self.msg.info(
"==> initializing [%s]...", self.
name )
88 self.msg.info(
"cnt: %r",self.
counter )
89 return StatusCode.Success
92 self.msg.info(
"==> finalize..." )
93 self.msg.info(
"cnt: %r",self.
counter )
94 return StatusCode.Success
97 """Simple test of a py-auditor
102 super(MyNameAud,self).
__init__(**kw)
105 self.msg.info(
"==> initializing [%s]...", self.
name)
106 return StatusCode.Success
109 self.msg.info(
"==> finalizing [%s]...", self.
name)
110 return StatusCode.Success
113 self.msg.info(
"Entering %s [%s]...", evt_name.lower(), comp_name)
116 def after (self, evt_name, comp_name, sc):
117 self.msg.info(
"Exiting %s [%s]...", evt_name.lower(), comp_name)
virtual StatusCode execute() override
virtual StatusCode initialize() override
virtual StatusCode initialize() override
Gaudi Aud Implementation.
virtual StatusCode finalize() override
virtual StatusCode finalize() override
virtual StatusCode initialize() override
Gaudi Service Implementation.
__init__(self, name="MyAlg", **kw)
before(self, evt_name, comp_name)
__init__(self, name="MyNameAud", **kw)
after(self, evt_name, comp_name, sc)
__init__(self, name="MySvc", **kw)
finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()