#include <GaudiKernel/Guards.h>
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/3]
Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
std::string |
name, |
|
|
IAuditor * |
svc, |
|
|
std::string const & |
evt, |
|
|
EventContext const & |
context = {} |
|
) |
| |
◆ AuditorGuard() [2/3]
Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
std::string |
name, |
|
|
IAuditor * |
svc, |
|
|
std::string const & |
evt, |
|
|
StatusCode const & |
sc, |
|
|
EventContext const & |
context = {} |
|
) |
| |
◆ ~AuditorGuard()
Gaudi::Guards::AuditorGuard::~AuditorGuard |
( |
| ) |
|
|
inline |
◆ AuditorGuard() [3/3]
Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
const AuditorGuard & |
right | ) |
|
|
privatedelete |
◆ code()
const StatusCode Gaudi::Guards::AuditorGuard::code |
( |
| ) |
const |
|
inline |
◆ i_after()
void Gaudi::Guards::AuditorGuard::i_after |
( |
| ) |
|
|
inlineprivate |
◆ i_before()
void Gaudi::Guards::AuditorGuard::i_before |
( |
| ) |
|
|
inlineprivate |
◆ operator=()
◆ m_context
Pointer to a EventContext instance, to be passed to the "before" and "after" function If given, the instance must have a scope larger than the one of the guard.
No check is performed.
Definition at line 235 of file Guards.h.
◆ m_evt
std::string const Gaudi::Guards::AuditorGuard::m_evt |
|
private |
◆ m_objName
std::string Gaudi::Guards::AuditorGuard::m_objName |
|
private |
◆ m_sc
StatusCode const* 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 231 of file Guards.h.
◆ m_svc
auditor service
Definition at line 225 of file Guards.h.
The documentation for this class was generated from the following files: