3 #ifndef GAUDIKERNEL_GUARDS_H
4 #define GAUDIKERNEL_GUARDS_H 1
116 template <
class OBJECT,
class FUNCTION>
129 if ( 0 != svc && m_sc.isFailure() ) { m_sc = svc->handleErr ( *obj , m_sc ) ; }
135 if ( 0 != svc ) { m_sc = svc -> handle ( *obj , e ) ; }
137 catch (
const std::exception& e )
141 if ( 0 != svc ) { m_sc = svc -> handle ( *obj , e ) ; }
147 if ( 0 != svc ) { m_sc = svc -> handle ( *obj ) ; }
168 void handle (
const std::exception& e ,
MsgStream&
s ) ;
294 if (m_customEvtType) {
295 m_svc->before(m_cevt,m_obj);
297 m_svc->before(m_evt,m_obj);
300 if (m_customEvtType) {
301 m_svc->before(m_cevt,m_objName);
303 m_svc->before(m_evt,m_objName);
312 if (m_customEvtType) {
314 m_svc->after(m_cevt,m_obj,*m_sc);
316 m_svc->after(m_cevt,m_obj);
320 m_svc->after(m_evt,m_obj,*m_sc);
322 m_svc->after(m_evt,m_obj);
326 if (m_customEvtType) {
328 m_svc->after(m_cevt,m_objName,*m_sc);
330 m_svc->after(m_cevt,m_objName);
334 m_svc->after(m_evt,m_objName,*m_sc);
336 m_svc->after(m_evt,m_objName);
352 #endif // GAUDIKERNEL_GUARDS_H
Definition of the MsgStream class used to transmit messages.
IAuditor::StandardEventType m_evt
Event type (standard events)
Define general base for Gaudi exception.
const StatusCode & code() const
the result of function evaluation
StandardEventType
Defines the standard (= used by the framework) auditable event types.
IAuditor::CustomEventType m_cevt
Event type (custom events)
const CustomEventType & CustomEventTypeRef
Used in function calls for optimization purposes.
StatusCode m_sc
status code : result of function evaluation
INamedInterface * m_obj
the guarded object
const StatusCode & code() const
std::string CustomEventType
Type used to allow users to specify a custom event to be audit.
This class is used for returning status codes from appropriate routines.
IAuditor * m_svc
auditor service
std::string m_objName
the guarded object name (if there is no INamedInterface)
The most simple guard - it execute the certain code withing typical "try {} catch" clause...
IInterface compliant class extending IInterface with the name() method.
double fun(const std::vector< double > &x)
This is a number of static methods for bootstrapping the Gaudi framework.
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
const StatusCode * m_sc
Pointer to a status code instance, to be passed to the "after" function if needed The instance must h...
A DataObject is the base class of any identifiable object on any data store.
The IAuditor is the interface implmented by the AlgAuditor base class.
bool m_customEvtType
Flag to remember which event type was used.
The abstract interface for exception handling service.