|
def | __init__ (self, name="MyNameAud", **kw) |
|
def | initialize (self) |
|
def | finalize (self) |
|
def | before (self, evt_name, comp_name) |
|
def | after (self, evt_name, comp_name, sc) |
|
virtual StatusCode | initialize () override |
| Gaudi Aud Implementation. More...
|
|
virtual StatusCode | sysInitialize () override |
|
virtual StatusCode | finalize () override |
|
virtual const char * | typeName () const override |
| return the std::type_info name of the underlying py-component This is used by concrete implementations to connect a python component to its C++ counter-part More...
|
|
virtual void | before (const std::string &evt, const std::string &name, const EventContext &ctx) override |
| Auditor interface More...
|
|
virtual void | after (const std::string &evt, const std::string &name, const EventContext &ctx, const StatusCode &sc) override |
|
virtual PyObject * | self () override |
| return associated python object. More...
|
|
| DeclareInterfaceID (IPyComponent, 1, 0) |
|
Simple test of a py-auditor
Definition at line 96 of file PyTestsLib.py.
◆ __init__()
def python.tests.PyTestsLib.MyNameAud.__init__ |
( |
|
self, |
|
|
|
name = "MyNameAud" , |
|
|
** |
kw |
|
) |
| |
◆ after() [1/2]
void PyAthena::Aud::after |
( |
const std::string & |
evt, |
|
|
const std::string & |
name, |
|
|
const EventContext & |
ctx, |
|
|
const StatusCode & |
sc |
|
) |
| |
|
overridevirtualinherited |
◆ after() [2/2]
def python.tests.PyTestsLib.MyNameAud.after |
( |
|
self, |
|
|
|
evt_name, |
|
|
|
comp_name, |
|
|
|
sc |
|
) |
| |
Definition at line 116 of file PyTestsLib.py.
116 def after (self, evt_name, comp_name, sc):
117 self.msg.
info(
"Exiting %s [%s]...", evt_name.lower(), comp_name)
◆ before() [1/2]
void PyAthena::Aud::before |
( |
const std::string & |
evt, |
|
|
const std::string & |
name, |
|
|
const EventContext & |
ctx |
|
) |
| |
|
overridevirtualinherited |
◆ before() [2/2]
def python.tests.PyTestsLib.MyNameAud.before |
( |
|
self, |
|
|
|
evt_name, |
|
|
|
comp_name |
|
) |
| |
Definition at line 112 of file PyTestsLib.py.
112 def before(self, evt_name, comp_name):
113 self.msg.
info(
"Entering %s [%s]...", evt_name.lower(), comp_name)
◆ DeclareInterfaceID()
◆ finalize() [1/2]
StatusCode PyAthena::Aud::finalize |
( |
| ) |
|
|
overridevirtualinherited |
◆ finalize() [2/2]
def python.tests.PyTestsLib.MyNameAud.finalize |
( |
|
self | ) |
|
Definition at line 108 of file PyTestsLib.py.
109 self.msg.
info(
"==> finalizing [%s]...", self.name)
110 return StatusCode.Success
◆ initialize() [1/2]
StatusCode PyAthena::Aud::initialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ initialize() [2/2]
def python.tests.PyTestsLib.MyNameAud.initialize |
( |
|
self | ) |
|
Definition at line 104 of file PyTestsLib.py.
105 self.msg.
info(
"==> initializing [%s]...", self.name)
106 return StatusCode.Success
◆ self()
virtual PyObject* PyAthena::Aud::self |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ setPyAttr()
bool PyAthena::Aud::setPyAttr |
( |
PyObject * |
pyobj | ) |
|
|
overrideprotectedvirtualinherited |
attach the C++ component to its python cousin
Implements IPyComponent.
Definition at line 130 of file PyAthenaAud.cxx.
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 "
◆ sysInitialize()
StatusCode PyAthena::Aud::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Definition at line 67 of file PyAthenaAud.cxx.
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();
◆ typeName()
const char * PyAthena::Aud::typeName |
( |
| ) |
const |
|
overridevirtualinherited |
return the std::type_info
name of the underlying py-component This is used by concrete implementations to connect a python component to its C++ counter-part
Implements IPyComponent.
Definition at line 97 of file PyAthenaAud.cxx.
100 return tname.c_str();
◆ m_self
Pointer to self (from the python world)
Definition at line 90 of file PyAthenaAud.h.
The documentation for this class was generated from the following file: