|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   28 #include "GaudiKernel/System.h" 
   29 #include "GaudiKernel/INamedInterface.h" 
   30 #include "GaudiKernel/ServiceHandle.h" 
   63   return PyAthena::callPyMethod( 
m_self, 
"sysInitialize" );
 
   70     ( 
"PyAthena::PyComponentMgr/PyComponentMgr", 
name() );
 
   71   if ( !pyMgr.retrieve().isSuccess() ) {
 
   72     return StatusCode::FAILURE;
 
   76   m_self = pyMgr->pyObject( 
this );
 
   79     return StatusCode::FAILURE;
 
   83   return Gaudi::Auditor::sysInitialize();
 
   89   return PyAthena::callPyMethod( 
m_self, 
"sysFinalize" );
 
  100   return tname.c_str();
 
  111   std::string evtname = 
evt;
 
  113   PyAthena::pyAudit (
m_self, 
"before", evtname.c_str(), 
name.c_str());
 
  120   std::string evtname = 
evt;
 
  122   PyAthena::pyAudit (
m_self, 
"after", evtname.c_str(), 
name.c_str(), 
sc);
 
  134   PyObject* pyobj = TPython::CPPInstance_FromVoidPtr
 
  139     pyobj = TPython::CPPInstance_FromVoidPtr ((
void*)
this, 
"PyAthena::Aud");
 
  142         << 
"could not dyncast component [" << 
name() << 
"] to a python " 
  143         << 
"object of type [" << this->
typeName() << 
"] (probably a missing " 
  144         << 
"dictionary)" << 
endmsg 
  145         << 
"fallback to [PyAthena::Aud]..." 
  151     msg << MSG::WARNING << 
"Could not dyncast component [" 
  152         << 
name() << 
"] to a pyobject of type ["  
  156     if ( -1 == PyObject_SetAttrString(o, 
"_cppHandle", pyobj) ) {
 
  160           << 
"Could not attach C++ handle [" << 
name() << 
"] to its python " 
  163       if ( -1 == PyObject_SetAttrString(o, 
"_cppHandle", Py_None) ) {
 
  166             << 
"could not attach a dummy C++ handle [" << 
name() << 
"] to its " 
  
virtual StatusCode initialize() override
Gaudi Aud Implementation.
virtual void before(const std::string &evt, const std::string &name, const EventContext &ctx) override
Auditor interface
virtual StatusCode finalize() override
virtual bool setPyAttr(PyObject *pyobj) override
attach the C++ component to its python cousin
virtual ~Aud()
Destructor:
Aud()
Default constructor:
std::string typeinfoName(const std::type_info &ti)
Convert a type_info to a demangled string.
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual void after(const std::string &evt, const std::string &name, const EventContext &ctx, const StatusCode &sc) override
void tolower(std::string &s)
virtual const char * typeName() const override
return the std::type_info name of the underlying py-component This is used by concrete implementation...
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
virtual StatusCode sysInitialize() override
=============================================================================
PyObject * m_self
Pointer to self (from the python world)