It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
More...
#include <GaudiKernel/Guards.h>
List of all members.
Public Member Functions |
| | AuditorGuard (INamedInterface *obj, IAuditor *svc, IAuditor::StandardEventType evt) |
| | constructor
|
| | AuditorGuard (INamedInterface *obj, IAuditor *svc, IAuditor::CustomEventTypeRef evt) |
| | constructor
|
| | AuditorGuard (INamedInterface *obj, IAuditor *svc, IAuditor::StandardEventType evt, const StatusCode &sc) |
| | constructor
|
| | AuditorGuard (INamedInterface *obj, IAuditor *svc, IAuditor::CustomEventTypeRef evt, const StatusCode &sc) |
| | constructor
|
| | AuditorGuard (const std::string &name, IAuditor *svc, IAuditor::StandardEventType evt) |
| | constructor
|
| | AuditorGuard (const std::string &name, IAuditor *svc, IAuditor::CustomEventTypeRef evt) |
| | constructor
|
| | AuditorGuard (const std::string &name, IAuditor *svc, IAuditor::StandardEventType evt, const StatusCode &sc) |
| | constructor
|
| | AuditorGuard (const std::string &name, IAuditor *svc, IAuditor::CustomEventTypeRef evt, const StatusCode &sc) |
| | constructor
|
| | ~AuditorGuard () |
| | dectructor
|
| const StatusCode & | code () const |
Private Member Functions |
| | AuditorGuard () |
| | the default constructor is disabled
|
| | AuditorGuard (const AuditorGuard &right) |
| | no copy
|
| AuditorGuard & | operator= (const AuditorGuard &right) |
| | no assignement
|
| void | i_before () |
| void | i_after () |
Private Attributes |
| INamedInterface * | m_obj |
| | the guarded object
|
| std::string | m_objName |
| | the guarded object name (if there is no INamedInterface)
|
| IAuditor * | m_svc |
| | auditor service
|
| IAuditor::StandardEventType | m_evt |
| | Event type (standard events)
|
| IAuditor::CustomEventType | m_cevt |
| | Event type (custom events)
|
| const StatusCode * | m_sc |
| | 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.
|
| bool | m_customEvtType |
| | Flag to remember which event type was used.
|
Detailed Description
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
- Author:
- Vanya BELYAEV ibelyaev@physics.syr.edu
- Date:
- 2007-03-07
Definition at line 218 of file Guards.h.
Constructor & Destructor Documentation
| Gaudi::Guards::AuditorGuard::~AuditorGuard |
( |
) |
|
| Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
) |
[private] |
the default constructor is disabled
| Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
const AuditorGuard & |
right ) |
[private] |
Member Function Documentation
| const StatusCode& Gaudi::Guards::AuditorGuard::code |
( |
) |
const [inline] |
| void Gaudi::Guards::AuditorGuard::i_after |
( |
) |
[inline, private] |
Definition at line 309 of file Guards.h.
{
if ( 0 != m_svc ) {
if (0 != m_obj) {
if (m_customEvtType) {
if (0 != m_sc) {
m_svc->after(m_cevt,m_obj,*m_sc);
} else {
m_svc->after(m_cevt,m_obj);
}
} else {
if (0 != m_sc) {
m_svc->after(m_evt,m_obj,*m_sc);
} else {
m_svc->after(m_evt,m_obj);
}
}
} else {
if (m_customEvtType) {
if (0 != m_sc) {
m_svc->after(m_cevt,m_objName,*m_sc);
} else {
m_svc->after(m_cevt,m_objName);
}
} else {
if (0 != m_sc) {
m_svc->after(m_evt,m_objName,*m_sc);
} else {
m_svc->after(m_evt,m_objName);
}
}
}
m_svc->release();
m_svc = 0 ;
}
}
| void Gaudi::Guards::AuditorGuard::i_before |
( |
) |
[inline, private] |
Member Data Documentation
Event type (custom events)
Definition at line 282 of file Guards.h.
bool Gaudi::Guards::AuditorGuard::m_customEvtType [private] |
Flag to remember which event type was used.
Definition at line 288 of file Guards.h.
Event type (standard events)
Definition at line 280 of file Guards.h.
the guarded object
Definition at line 274 of file Guards.h.
std::string Gaudi::Guards::AuditorGuard::m_objName [private] |
const StatusCode* Gaudi::Guards::AuditorGuard::m_sc [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 286 of file Guards.h.
IAuditor* Gaudi::Guards::AuditorGuard::m_svc [private] |
auditor service
Definition at line 278 of file Guards.h.
The documentation for this class was generated from the following files:
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r2/GaudiKernel/GaudiKernel/Guards.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r2/GaudiKernel/src/Lib/Guards.cpp