Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AlgContext.cpp
Go to the documentation of this file.
4 
12  : m_svc( svc ), m_alg( alg ), m_context( context ) {
13  if ( m_svc && m_alg ) { m_svc->setCurrentAlg( m_alg.get(), m_context ).ignore(); }
14 }
15 
17  : AlgContext( alg, svc, Gaudi::Hive::currentContext() ) {}
18 
20  if ( m_svc && m_alg ) { m_svc->unSetCurrentAlg( m_alg.get(), m_context ).ignore(); }
21 }
Helper "sentry" class to automatize the safe register/unregister the algorithm's context.
~AlgContext()
destructor Internally invokes IAlgContextSvc::unSetCurrentAlg
Definition: AlgContext.cpp:19
This class represents an entry point to all the event specific data.
Definition: EventContext.h:31
virtual StatusCode unSetCurrentAlg(IAlgorithm *a, const EventContext &context)=0
remove the algorithm ("pop_back")
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
GAUDI_API const EventContext & currentContext()
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
SmartIF< IAlgContextSvc > m_svc
An abstract interface for Algorithm Context Service.
AlgContext(IAlgorithm *alg, IAlgContextSvc *svc, const EventContext &context)
constructor from the service and the algorithm Internally invokes IAlgContextSvc::setCurrentAlg ...
Definition: AlgContext.cpp:11
const EventContext m_context
virtual StatusCode setCurrentAlg(IAlgorithm *a, const EventContext &context)=0
set the currently executing algorithm ("push_back")
Helper functions to set/get the application return code.
Definition: __init__.py:1
SmartIF< IAlgorithm > m_alg