|
ATLAS Offline Software
|
Go to the documentation of this file.
27 #include "GaudiKernel/MsgStream.h"
28 #include "GaudiKernel/ServiceHandle.h"
37 const std::string&
name,
38 const IInterface*
parent ) :
66 return PyAthena::callPyMethod(
m_self,
"sysInitialize" );
72 return PyAthena::callPyMethod(
m_self,
"sysFinalize" );
79 (
"PyAthena::PyComponentMgr/PyComponentMgr",
81 if ( !pyMgr.retrieve().isSuccess() ) {
82 ATH_MSG_ERROR(
"Could not retrieve service [" << pyMgr.typeAndName() <<
"] !!");
83 return StatusCode::FAILURE;
87 m_self = pyMgr->pyObject(
this );
91 return StatusCode::FAILURE;
103 return tname.c_str();
112 PyObject* pyobj = TPython::CPPInstance_FromVoidPtr
117 pyobj = TPython::CPPInstance_FromVoidPtr ((
void*)
this,
"PyAthena::Tool");
119 (
"could not dyncast component [" <<
name() <<
"] to a python "
120 <<
"object of type [" << this->
typeName() <<
"] (probably a missing "
121 <<
"dictionary)" <<
endmsg
122 <<
"fallback to [PyAthena::Tool]...");
127 <<
name() <<
"] to a pyobject of type ["
128 << this->
typeName() <<
"] (missing reflex dict ?)");
130 if ( -1 == PyObject_SetAttrString(o,
"_cppHandle", pyobj) ) {
133 (
"Could not attach C++ handle [" <<
name() <<
"] to its python "
135 if ( -1 == PyObject_SetAttrString(o,
"_cppHandle", Py_None) ) {
138 (
"could not attach a dummy C++ handle [" <<
name() <<
"] to its "
139 <<
"python cousin !");
std::string typeinfoName(const std::type_info &ti)
Convert a type_info to a demangled string.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode sysInitialize() override
Perform system initialization for an algorithm.
#define ATH_MSG_WARNING(x)