It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
More...
#include <GaudiKernel/Guards.h>
|
| AuditorGuard (INamedInterface *obj, IAuditor *svc, IAuditor::StandardEventType evt) |
| constructor More...
|
|
| AuditorGuard (INamedInterface *obj, IAuditor *svc, IAuditor::CustomEventTypeRef evt) |
| constructor More...
|
|
| AuditorGuard (INamedInterface *obj, IAuditor *svc, IAuditor::StandardEventType evt, const StatusCode &sc) |
| constructor More...
|
|
| AuditorGuard (INamedInterface *obj, IAuditor *svc, IAuditor::CustomEventTypeRef evt, const StatusCode &sc) |
| constructor More...
|
|
| AuditorGuard (std::string name, IAuditor *svc, IAuditor::StandardEventType evt) |
| constructor More...
|
|
| AuditorGuard (std::string name, IAuditor *svc, IAuditor::CustomEventTypeRef evt) |
| constructor More...
|
|
| AuditorGuard (std::string name, IAuditor *svc, IAuditor::StandardEventType evt, const StatusCode &sc) |
| constructor More...
|
|
| AuditorGuard (std::string name, IAuditor *svc, IAuditor::CustomEventTypeRef evt, const StatusCode &sc) |
| constructor More...
|
|
| ~AuditorGuard () |
| dectructor More...
|
|
const StatusCode & | code () const |
|
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
The pattern ensures that "post-action" will be always executed
{
auditSvc() ,
...
...
return sc ;
}
{
auditSvc() ,
...
...
auditor.setCode ( sc ) ;
...
return sc ;
}
- Author
- Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
- Date
- 2007-03-07
Definition at line 203 of file Guards.h.
◆ AuditorGuard() [1/10]
constructor
Definition at line 55 of file Guards.cpp.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
INamedInterface * m_obj
the guarded object
◆ AuditorGuard() [2/10]
constructor
Definition at line 59 of file Guards.cpp.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
IAuditor::CustomEventType m_cevt
Event type (custom events)
INamedInterface * m_obj
the guarded object
bool m_customEvtType
Flag to remember which event type was used.
◆ AuditorGuard() [3/10]
constructor
Definition at line 68 of file Guards.cpp.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
INamedInterface * m_obj
the guarded object
const StatusCode * m_sc
Pointer to a status code instance, to be passed to the "after" function if needed The instance must h...
bool m_customEvtType
Flag to remember which event type was used.
◆ AuditorGuard() [4/10]
constructor
Definition at line 73 of file Guards.cpp.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
IAuditor::CustomEventType m_cevt
Event type (custom events)
INamedInterface * m_obj
the guarded object
const StatusCode * m_sc
Pointer to a status code instance, to be passed to the "after" function if needed The instance must h...
bool m_customEvtType
Flag to remember which event type was used.
◆ AuditorGuard() [5/10]
constructor
Definition at line 84 of file Guards.cpp.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
std::string m_objName
the guarded object name (if there is no INamedInterface)
bool m_customEvtType
Flag to remember which event type was used.
◆ AuditorGuard() [6/10]
constructor
Definition at line 88 of file Guards.cpp.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
IAuditor::CustomEventType m_cevt
Event type (custom events)
std::string m_objName
the guarded object name (if there is no INamedInterface)
bool m_customEvtType
Flag to remember which event type was used.
◆ AuditorGuard() [7/10]
constructor
Definition at line 97 of file Guards.cpp.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
std::string m_objName
the guarded object name (if there is no INamedInterface)
const StatusCode * m_sc
Pointer to a status code instance, to be passed to the "after" function if needed The instance must h...
bool m_customEvtType
Flag to remember which event type was used.
◆ AuditorGuard() [8/10]
constructor
Definition at line 102 of file Guards.cpp.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
IAuditor::CustomEventType m_cevt
Event type (custom events)
std::string m_objName
the guarded object name (if there is no INamedInterface)
const StatusCode * m_sc
Pointer to a status code instance, to be passed to the "after" function if needed The instance must h...
bool m_customEvtType
Flag to remember which event type was used.
◆ ~AuditorGuard()
Gaudi::Guards::AuditorGuard::~AuditorGuard |
( |
| ) |
|
◆ AuditorGuard() [9/10]
Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
| ) |
|
|
privatedelete |
◆ AuditorGuard() [10/10]
Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
const AuditorGuard & |
right | ) |
|
|
privatedelete |
◆ code()
const StatusCode& Gaudi::Guards::AuditorGuard::code |
( |
| ) |
const |
|
inline |
Definition at line 229 of file Guards.h.
const StatusCode * m_sc
Pointer to a status code instance, to be passed to the "after" function if needed The instance must h...
◆ i_after()
void Gaudi::Guards::AuditorGuard::i_after |
( |
| ) |
|
|
inlineprivate |
Definition at line 273 of file Guards.h.
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
IAuditor::CustomEventType m_cevt
Event type (custom events)
INamedInterface * m_obj
the guarded object
std::string m_objName
the guarded object name (if there is no INamedInterface)
virtual void after(StandardEventType, INamedInterface *, const StatusCode &sc=StatusCode(StatusCode::SUCCESS, true))=0
Audit the end of a standard "event".
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
const StatusCode * m_sc
Pointer to a status code instance, to be passed to the "after" function if needed The instance must h...
bool m_customEvtType
Flag to remember which event type was used.
◆ i_before()
void Gaudi::Guards::AuditorGuard::i_before |
( |
| ) |
|
|
inlineprivate |
Definition at line 255 of file Guards.h.
virtual void before(StandardEventType, INamedInterface *)=0
Audit the start of a standard "event".
IAuditor::StandardEventType m_evt
Event type (standard events)
SmartIF< IAuditor > m_svc
auditor service
IAuditor::CustomEventType m_cevt
Event type (custom events)
INamedInterface * m_obj
the guarded object
std::string m_objName
the guarded object name (if there is no INamedInterface)
bool m_customEvtType
Flag to remember which event type was used.
◆ operator=()
◆ m_cevt
Event type (custom events)
Definition at line 247 of file Guards.h.
◆ m_customEvtType
bool Gaudi::Guards::AuditorGuard::m_customEvtType = false |
|
private |
Flag to remember which event type was used.
Definition at line 253 of file Guards.h.
◆ m_evt
Event type (standard events)
Definition at line 245 of file Guards.h.
◆ m_obj
the guarded object
Definition at line 239 of file Guards.h.
◆ m_objName
◆ m_sc
const StatusCode* Gaudi::Guards::AuditorGuard::m_sc = nullptr |
|
private |
Pointer to a status code instance, to be passed to the "after" function if needed The instance must have a scope larger than the one of the guard.
No check is performed.
Definition at line 251 of file Guards.h.
◆ m_svc
auditor service
Definition at line 243 of file Guards.h.
The documentation for this class was generated from the following files: