It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
More...
#include <GaudiKernel/Guards.h>
|
| std::string | m_objName |
| | the guarded object name (if there is no INamedInterface)
|
| |
| SmartIF< IAuditor > | m_svc = nullptr |
| | auditor service
|
| |
| std::string const | m_evt |
| | Event type.
|
| |
| StatusCode const * | 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.
|
| |
| const EventContext & | 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.
|
| |
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 ;
}
StatusCode sysInitialize() override
Initialization method invoked by the framework.
AuditorGuard(std::string name, IAuditor *svc, std::string const &evt, EventContext const &context={})
static const std::string Initialize
This class is used for returning status codes from appropriate routines.
{
auditSvc() ,
IAuditor::execute ) ;
...
...
auditor.setCode ( sc ) ;
...
return sc ;
}
StatusCode sysExecute(const EventContext &ctx) override
The actions to be performed by the algorithm on an event.
- 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 202 of file Guards.h.
◆ AuditorGuard() [1/3]
| Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
std::string | name, |
|
|
IAuditor * | svc, |
|
|
std::string const & | evt, |
|
|
EventContext const & | context = {} ) |
Definition at line 42 of file Guards.cpp.
46}
std::string const m_evt
Event type.
SmartIF< IAuditor > m_svc
auditor service
const EventContext & m_context
Pointer to a EventContext instance, to be passed to the "before" and "after" function If given,...
std::string m_objName
the guarded object name (if there is no INamedInterface)
◆ AuditorGuard() [2/3]
| Gaudi::Guards::AuditorGuard::AuditorGuard |
( |
std::string | name, |
|
|
IAuditor * | svc, |
|
|
std::string const & | evt, |
|
|
StatusCode const & | sc, |
|
|
EventContext const & | context = {} ) |
Definition at line 48 of file Guards.cpp.
52}
StatusCode const * m_sc
Pointer to a status code instance, to be passed to the "after" function if needed The instance must h...
◆ ~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 |
Definition at line 242 of file Guards.h.
243 {
247 } else {
249 }
251 }
◆ 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 234 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 230 of file Guards.h.
◆ m_svc
auditor service
Definition at line 224 of file Guards.h.
The documentation for this class was generated from the following files: