ATLAS Offline Software
PyAthenaAud.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // PyAthenaAud.h
8 // Header file for class PyAthena::Aud
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef ATHENAPYTHON_PYATHENAAUD_H
12 #define ATHENAPYTHON_PYATHENAAUD_H
13 
14 // STL includes
15 #include <string>
16 
17 // FrameWork includes
18 #include "GaudiKernel/Auditor.h"
21 
22 // Forward declaration
23 class INamedInterface;
24 // Python
25 struct _object;
26 typedef _object PyObject;
27 
28 namespace PyAthena {
29 
30 class ATLAS_NOT_THREAD_SAFE Aud : virtual public ::IPyComponent,
31  public ::Auditor
32 {
33  public:
34 
35  // Copy constructor:
36 
38  Aud( const std::string& name, ISvcLocator* svcLocator );
39 
41  virtual ~Aud();
42 
44 
45  virtual StatusCode initialize() override;
46  virtual StatusCode sysInitialize() override;
47  virtual StatusCode finalize() override;
49 
50 
55  virtual const char* typeName() const override;
56 
57 
59  virtual void py_before(IAuditor::StandardEventType, const std::string&);
60 
62  virtual void py_before(IAuditor::CustomEventTypeRef, const std::string&);
63 
65  virtual void py_after(IAuditor::StandardEventType,
66  const std::string&,
67  const StatusCode&);
68 
70  virtual void py_after(IAuditor::CustomEventTypeRef,
71  const std::string&,
72  const StatusCode&);
73 
76  virtual PyObject* self() override { return m_self; }
77 
78  protected:
79 
82  virtual bool setPyAttr( PyObject* pyobj ) override;
83 
85 
86  virtual void before(StandardEventType, INamedInterface*) override;
87  virtual void before(StandardEventType, const std::string&) override;
88 
89  virtual void before(CustomEventTypeRef, INamedInterface*) override;
90  virtual void before(CustomEventTypeRef, const std::string&) override;
91 
92  virtual void after(StandardEventType, INamedInterface*, const StatusCode&) override;
93  virtual void after(StandardEventType, const std::string&, const StatusCode&) override;
94 
95  virtual void after(CustomEventTypeRef, INamedInterface*, const StatusCode&) override;
96  virtual void after(CustomEventTypeRef, const std::string&, const StatusCode&) override;
97 
98  // ---> Obsolete methods
99  virtual void beforeInitialize(INamedInterface* ) override;
100  virtual void afterInitialize(INamedInterface* ) override;
101  virtual void beforeReinitialize(INamedInterface* ) override;
102  virtual void afterReinitialize(INamedInterface* ) override;
103  virtual void beforeExecute(INamedInterface* ) override;
104  virtual void afterExecute(INamedInterface*, const StatusCode& ) override;
105  virtual void beforeFinalize(INamedInterface* ) override;
106  virtual void afterFinalize(INamedInterface* ) override;
107  // <--- Obsolete methods
108 
110  // Private data:
112  private:
113 
115  Aud();
116 
118  // Protected data:
120  protected:
121 
124 
125 };
126 
127 // I/O operators
129 
131 // Inline methods:
133 
134 } //> end namespace PyAthena
135 
136 #endif //> ATHENAPYTHON_PYATHENAAUD_H
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
initialize
void initialize()
Definition: run_EoverP.cxx:894
PyAthena::Aud::Aud
Aud()
Default constructor:
PyAthena::Aud
Definition: PyAthenaAud.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IPyComponent
Definition: IPyComponent.h:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
PyObject
_object PyObject
Definition: PyAthenaAud.h:25
IPyComponent.h
PyAthena
Definition: IPyComponent.h:28
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
PyAthena::Aud::m_self
PyObject * m_self
Pointer to self (from the python world)
Definition: PyAthenaAud.h:123
checker_macros.h
Define macros for attributes used to control the static checker.
PyObject
_object PyObject
Definition: IPyComponent.h:26
PyAthena::ATLAS_NOT_THREAD_SAFE
StatusCode callPyMethod ATLAS_NOT_THREAD_SAFE(PyObject *self, const char *method, PyObject *arg=nullptr)
call the python method