|
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 | py_before (IAuditor::StandardEventType, const std::string &) |
| Audit the start of a standard "event". More...
|
|
virtual void | py_before (IAuditor::CustomEventTypeRef, const std::string &) |
| Audit the start of a custom "event". More...
|
|
virtual void | py_after (IAuditor::StandardEventType, const std::string &, const StatusCode &) |
| Audit the end of a standard "event". More...
|
|
virtual void | py_after (IAuditor::CustomEventTypeRef, const std::string &, const StatusCode &) |
| Audit the end of a custom "event". More...
|
|
virtual PyObject * | self () override |
| return associated python object. More...
|
|
| DeclareInterfaceID (IPyComponent, 1, 0) |
|
|
virtual bool | setPyAttr (PyObject *pyobj) override |
| attach the C++ component to its python cousin More...
|
|
virtual void | before (StandardEventType, INamedInterface *) override |
| Auditor interface More...
|
|
virtual void | before (StandardEventType, const std::string &) override |
|
virtual void | before (CustomEventTypeRef, INamedInterface *) override |
|
virtual void | before (CustomEventTypeRef, const std::string &) override |
|
virtual void | after (StandardEventType, INamedInterface *, const StatusCode &) override |
|
virtual void | after (StandardEventType, const std::string &, const StatusCode &) override |
|
virtual void | after (CustomEventTypeRef, INamedInterface *, const StatusCode &) override |
|
virtual void | after (CustomEventTypeRef, const std::string &, const StatusCode &) override |
|
virtual void | beforeInitialize (INamedInterface *) override |
|
virtual void | afterInitialize (INamedInterface *) override |
|
virtual void | beforeReinitialize (INamedInterface *) override |
|
virtual void | afterReinitialize (INamedInterface *) override |
|
virtual void | beforeExecute (INamedInterface *) override |
|
virtual void | afterExecute (INamedInterface *, const StatusCode &) override |
|
virtual void | beforeFinalize (INamedInterface *) override |
|
virtual void | afterFinalize (INamedInterface *) override |
|
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/5]
void PyAthena::Aud::after |
( |
CustomEventTypeRef |
evt, |
|
|
const std::string & |
comp, |
|
|
const StatusCode & |
sc |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ after() [2/5]
void PyAthena::Aud::after |
( |
CustomEventTypeRef |
evt, |
|
|
INamedInterface * |
comp, |
|
|
const StatusCode & |
sc |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ after() [3/5]
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)
◆ after() [4/5]
void PyAthena::Aud::after |
( |
StandardEventType |
evt, |
|
|
const std::string & |
comp, |
|
|
const StatusCode & |
sc |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ after() [5/5]
void PyAthena::Aud::after |
( |
StandardEventType |
evt, |
|
|
INamedInterface * |
comp, |
|
|
const StatusCode & |
sc |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ afterExecute()
void PyAthena::Aud::afterExecute |
( |
INamedInterface * |
comp, |
|
|
const StatusCode & |
sc |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ afterFinalize()
void PyAthena::Aud::afterFinalize |
( |
INamedInterface * |
comp | ) |
|
|
overrideprotectedvirtualinherited |
◆ afterInitialize()
void PyAthena::Aud::afterInitialize |
( |
INamedInterface * |
comp | ) |
|
|
overrideprotectedvirtualinherited |
◆ afterReinitialize()
void PyAthena::Aud::afterReinitialize |
( |
INamedInterface * |
comp | ) |
|
|
overrideprotectedvirtualinherited |
◆ before() [1/5]
void PyAthena::Aud::before |
( |
CustomEventTypeRef |
evt, |
|
|
const std::string & |
comp |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ before() [2/5]
void PyAthena::Aud::before |
( |
CustomEventTypeRef |
evt, |
|
|
INamedInterface * |
comp |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ before() [3/5]
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)
◆ before() [4/5]
void PyAthena::Aud::before |
( |
StandardEventType |
evt, |
|
|
const std::string & |
comp |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ before() [5/5]
void PyAthena::Aud::before |
( |
StandardEventType |
evt, |
|
|
INamedInterface * |
comp |
|
) |
| |
|
overrideprotectedvirtualinherited |
◆ beforeExecute()
void PyAthena::Aud::beforeExecute |
( |
INamedInterface * |
comp | ) |
|
|
overrideprotectedvirtualinherited |
◆ beforeFinalize()
void PyAthena::Aud::beforeFinalize |
( |
INamedInterface * |
comp | ) |
|
|
overrideprotectedvirtualinherited |
◆ beforeInitialize()
void PyAthena::Aud::beforeInitialize |
( |
INamedInterface * |
comp | ) |
|
|
overrideprotectedvirtualinherited |
◆ beforeReinitialize()
void PyAthena::Aud::beforeReinitialize |
( |
INamedInterface * |
comp | ) |
|
|
overrideprotectedvirtualinherited |
◆ 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
◆ py_after() [1/2]
void PyAthena::Aud::py_after |
( |
IAuditor::CustomEventTypeRef |
evt, |
|
|
const std::string & |
component, |
|
|
const StatusCode & |
sc |
|
) |
| |
|
virtualinherited |
Audit the end of a custom "event".
Definition at line 246 of file PyAthenaAud.cxx.
250 return PyAthena::pyAudit (
m_self,
251 "after",
evt.c_str(), component.c_str(),
sc);
◆ py_after() [2/2]
void PyAthena::Aud::py_after |
( |
IAuditor::StandardEventType |
evt, |
|
|
const std::string & |
component, |
|
|
const StatusCode & |
sc |
|
) |
| |
|
virtualinherited |
Audit the end of a standard "event".
Definition at line 228 of file PyAthenaAud.cxx.
232 const char* evtname = 0;
234 case Initialize: evtname =
"initialize";
break;
235 case ReInitialize: evtname =
"reinitialize";
break;
236 case Execute: evtname =
"execute";
break;
237 case Finalize: evtname =
"finalize";
break;
238 case Start: evtname =
"start";
break;
239 case Stop: evtname =
"stop";
break;
240 case ReStart: evtname =
"restart";
break;
242 return PyAthena::pyAudit (
m_self,
"after", evtname, component.c_str(),
sc);
◆ py_before() [1/2]
void PyAthena::Aud::py_before |
( |
IAuditor::CustomEventTypeRef |
evt, |
|
|
const std::string & |
component |
|
) |
| |
|
virtualinherited |
Audit the start of a custom "event".
Definition at line 222 of file PyAthenaAud.cxx.
224 return PyAthena::pyAudit (
m_self,
"before",
evt.c_str(), component.c_str());
◆ py_before() [2/2]
void PyAthena::Aud::py_before |
( |
IAuditor::StandardEventType |
evt, |
|
|
const std::string & |
component |
|
) |
| |
|
virtualinherited |
Audit the start of a standard "event".
Definition at line 206 of file PyAthenaAud.cxx.
208 const char* evtname = 0;
210 case Initialize: evtname =
"initialize";
break;
211 case ReInitialize: evtname =
"reinitialize";
break;
212 case Execute: evtname =
"execute";
break;
213 case Finalize: evtname =
"finalize";
break;
214 case Start: evtname =
"start";
break;
215 case Stop: evtname =
"stop";
break;
216 case ReStart: evtname =
"restart";
break;
218 return PyAthena::pyAudit (
m_self,
"before", evtname, component.c_str());
◆ 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 260 of file PyAthenaAud.cxx.
264 PyObject* pyobj = TPython::CPPInstance_FromVoidPtr
269 pyobj = TPython::CPPInstance_FromVoidPtr ((
void*)
this,
"PyAthena::Aud");
272 <<
"could not dyncast component [" <<
name() <<
"] to a python "
273 <<
"object of type [" << this->
typeName() <<
"] (probably a missing "
274 <<
"dictionary)" <<
endmsg
275 <<
"fallback to [PyAthena::Aud]..."
281 msg << MSG::WARNING <<
"Could not dyncast component ["
282 <<
name() <<
"] to a pyobject of type ["
286 if ( -1 == PyObject_SetAttrString(o,
"_cppHandle", pyobj) ) {
290 <<
"Could not attach C++ handle [" <<
name() <<
"] to its python "
293 if ( -1 == PyObject_SetAttrString(o,
"_cppHandle", Py_None) ) {
296 <<
"could not attach a dummy C++ handle [" <<
name() <<
"] to its "
◆ sysInitialize()
StatusCode PyAthena::Aud::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Definition at line 66 of file PyAthenaAud.cxx.
69 (
"PyAthena::PyComponentMgr/PyComponentMgr",
name() );
70 if ( !pyMgr.retrieve().isSuccess() ) {
71 return StatusCode::FAILURE;
75 m_self = pyMgr->pyObject(
this );
78 return StatusCode::FAILURE;
82 return ::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 96 of file PyAthenaAud.cxx.
98 static const std::string tname = System::typeinfoName(
typeid(*
this));
◆ m_self
Pointer to self (from the python world)
Definition at line 123 of file PyAthenaAud.h.
The documentation for this class was generated from the following file: