The most simple guard - it execute the certain code withing typical "try {} catch" clause, used in Auditor, Algorithm, AlgTool, etc.
More...
#include <GaudiKernel/Guards.h>
The most simple guard - it execute the certain code withing typical "try {} catch" clause, used in Auditor, Algorithm, AlgTool, etc.
. classes
The usage is fairly trivial:
Gaudi::Guards::Guard guard
( this ,
log ) ;
The utility could be reused for member-function, regular functions, etc.. It could be easily combined with STL-idioms Essentially it required only the semantical validity of the expression "StatusCode sc = fun(obj)"
- 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 108 of file Guards.h.
template<class OBJECT , class FUNCTION >
< execute the functor
Definition at line 118 of file Guards.h.
{
try
{
}
{
if ( 0 != svc ) {
m_sc = svc ->
handle ( *obj , e ) ; }
}
{
if ( 0 != svc ) {
m_sc = svc ->
handle ( *obj , e ) ; }
}
catch ( ... )
{
if ( 0 != svc ) {
m_sc = svc ->
handle ( *obj ) ; }
}
}
| Gaudi::Guards::ExceptionGuard::~ExceptionGuard |
( |
| ) |
|
| Gaudi::Guards::ExceptionGuard::ExceptionGuard |
( |
| ) |
|
|
private |
default constructor is disabled
| Gaudi::Guards::ExceptionGuard::ExceptionGuard |
( |
const ExceptionGuard & |
| ) |
|
|
private |
| const StatusCode& Gaudi::Guards::ExceptionGuard::code |
( |
| ) |
const |
|
inline |
the result of function evaluation
Definition at line 154 of file Guards.h.
| void Gaudi::Guards::ExceptionGuard::handle |
( |
MsgStream & |
s | ) |
|
|
protected |
local handler of UNKNOWN exceptions
Definition at line 53 of file Guards.cpp.
| Gaudi::Guards::ExceptionGuard::operator const StatusCode & |
( |
| ) |
const |
|
inline |
cast operator, useful for the implicit conversions
Definition at line 156 of file Guards.h.
status code : result of function evaluation
Definition at line 173 of file Guards.h.
The documentation for this class was generated from the following files:
- /afs/.cern.ch/sw/Gaudi/www/releases/GAUDI/GAUDI_v23r10/GaudiKernel/GaudiKernel/Guards.h
- /afs/.cern.ch/sw/Gaudi/www/releases/GAUDI/GAUDI_v23r10/GaudiKernel/src/Lib/Guards.cpp