|
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 |
|
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 |
◆ 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 |
◆ 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 197 of file PyAthenaAud.cxx.
201 return PyAthena::pyAudit (
m_self,
202 "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 179 of file PyAthenaAud.cxx.
183 const char* evtname = 0;
185 case Initialize: evtname =
"initialize";
break;
186 case ReInitialize: evtname =
"reinitialize";
break;
187 case Execute: evtname =
"execute";
break;
188 case Finalize: evtname =
"finalize";
break;
189 case Start: evtname =
"start";
break;
190 case Stop: evtname =
"stop";
break;
191 case ReStart: evtname =
"restart";
break;
193 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 173 of file PyAthenaAud.cxx.
175 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 157 of file PyAthenaAud.cxx.
159 const char* evtname = 0;
161 case Initialize: evtname =
"initialize";
break;
162 case ReInitialize: evtname =
"reinitialize";
break;
163 case Execute: evtname =
"execute";
break;
164 case Finalize: evtname =
"finalize";
break;
165 case Start: evtname =
"start";
break;
166 case Stop: evtname =
"stop";
break;
167 case ReStart: evtname =
"restart";
break;
169 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 211 of file PyAthenaAud.cxx.
215 PyObject* pyobj = TPython::CPPInstance_FromVoidPtr
220 pyobj = TPython::CPPInstance_FromVoidPtr ((
void*)
this,
"PyAthena::Aud");
223 <<
"could not dyncast component [" <<
name() <<
"] to a python "
224 <<
"object of type [" << this->
typeName() <<
"] (probably a missing "
225 <<
"dictionary)" <<
endmsg
226 <<
"fallback to [PyAthena::Aud]..."
232 msg << MSG::WARNING <<
"Could not dyncast component ["
233 <<
name() <<
"] to a pyobject of type ["
237 if ( -1 == PyObject_SetAttrString(o,
"_cppHandle", pyobj) ) {
241 <<
"Could not attach C++ handle [" <<
name() <<
"] to its python "
244 if ( -1 == PyObject_SetAttrString(o,
"_cppHandle", Py_None) ) {
247 <<
"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.
◆ m_self
Pointer to self (from the python world)
Definition at line 112 of file PyAthenaAud.h.
The documentation for this class was generated from the following file: