|
ATLAS Offline Software
|
Go to the documentation of this file.
31 #include "GaudiKernel/MsgStream.h"
32 #include "GaudiKernel/Bootstrap.h"
33 #include "GaudiKernel/IConversionSvc.h"
34 #include "GaudiKernel/ISvcLocator.h"
35 #include "GaudiKernel/IAlgorithm.h"
36 #include "GaudiKernel/DataSvc.h"
47 char* execalgs =
const_cast< char*
>(
"executeAlgorithms" );
57 SmartIF<IEventProcessor> ep{Gaudi::svcLocator()->service(
"PyAthenaEventLoopMgr",
false )};
88 if ( ! PyObject_HasAttrString(
mgr, execalgs ) )
90 PyErr_SetString( PyExc_TypeError,
"given object is not a manager" );
101 PyObject* pyelm = PyImport_AddModule(
const_cast< char*
>(
"AthenaServices.PyAthenaEventLoopMgr" ) );
104 if (PyModule_AddObject( pyelm,
const_cast< char*
>(
"EventLoopMgr" ),
mgr ) < 0) {
110 PyObject* pyself = PyCapsule_New( (
void*)
static_cast< IEventSeek*
>(
this ),
nullptr,
nullptr );
111 #if PY_MAJOR_VERSION < 3
124 if (
old !=
nullptr )
127 Py_INCREF( Py_None );
136 Py_INCREF( Py_None );
152 PyObject* modpyelm = PyImport_ImportModule(
const_cast< char*
>(
"AthenaServices.PyAthenaEventLoopMgr" ) );
155 PyObject* pyelm = PyObject_GetAttrString( modpyelm,
const_cast< char*
>(
"PyAthenaEventLoopMgr" ) );
156 Py_DECREF( modpyelm );
175 return StatusCode::FAILURE;
186 return StatusCode::FAILURE;
200 PyObject* pycontext = PyCapsule_New (
const_cast<EventContext*
>(&ctx),
nullptr,
nullptr);
202 (
char*)
"O", pycontext);
203 Py_DECREF (pycontext);
208 return StatusCode::FAILURE;
211 #if PY_MAJOR_VERSION < 3
219 if ( PyLong_Check(
result ) )
230 <<
"result from python event loop manager has unexpected type."
233 return StatusCode::FAILURE;
The default ATLAS batch event loop manager.
virtual const std::string & name() const
static PyAthenaEventLoopMgr * pointer()
outside access
virtual StatusCode initialize()
implementation of IAppMgrUI::initalize
virtual StatusCode executeAlgorithms(const EventContext &)
Run the algorithms for the current event.
PyAthenaEventLoopMgr()
Unimplemented features to keep Reflex happy.
virtual StatusCode initialize()
implementation of IAppMgrUI::initalize
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
Implementation of the AthenaEventLoopMgr that allows selective and specific overrides in python....
virtual StatusCode finalize()
implementation of IAppMgrUI::finalize
Implementation of the AthenaEventLoopMgr that allows selective and specific overrides in python....
StringProperty m_clearStorePolicy
Abstract interface for seeking within an event stream.
PyObject * setManager(PyObject *)
actual manager object
Define macros for attributes used to control the static checker.
virtual StatusCode executeAlgorithms(const EventContext &)
Run the algorithms for the current event.
virtual StatusCode finalize()
implementation of IAppMgrUI::finalize
ATLAS_NO_CHECK_FILE_THREAD_SAFETY