61 def executeAlgorithms( self, cppcontext ):
62
63 from AthenaPython.PyAthena import py_svc
64 from AthenaPython.PyAthenaComps import StatusCode
65 appmgr = py_svc('ApplicationMgr',iface="IProperty")
66 algmgr = py_svc('ApplicationMgr',iface='IAlgManager')
67
68 import cppyy
69 ctx = cppyy.bind_object(cppcontext, "EventContext")
70
71 try:
72 for name in appmgr.getProperty("TopAlg").value():
73 ialg=algmgr.algorithm(name).
get()
74 ialg.execState(ctx).reset()
75 result = ialg.sysExecute(ctx)
76 if result.isFailure():
77 from AthenaCommon.Logging import log as msg
78 msg.error( "Execution of algorithm %s failed", name )
79 return result.getCode()
80 except KeyboardInterrupt:
81 from AthenaCommon.Logging import log as msg
82 msg.critical( "event loop stopped by user interrupt" )
83 return StatusCode.Failure
84
85 return StatusCode.Success
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)