All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AlgContext.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // Include files
3 // ============================================================================
4 // GaudiKernel
5 // ============================================================================
8 // ============================================================================
14 // ============================================================================
15 /* constructor from service and algorithm
16  * Internally invokes IAlgContextSvc::setCurrentAlg
17  * @see IAlgorithm
18  * @see IAlgContextSvc
19  * @param svc pointer to algorithm context service
20  * @param alg pointer to the current algorithm
21  */
22 // ============================================================================
25  IAlgorithm* alg )
26  : m_svc ( svc )
27  , m_alg ( alg )
28 {
29  if ( m_svc && m_alg ) { m_svc->setCurrentAlg ( m_alg.get() ).ignore() ; }
30 }
31 // ============================================================================
32 /* constructor from service and algorithm
33  * Internally invokes IAlgContextSvc::setCurrentAlg
34  * @see IAlgorithm
35  * @see IAlgContextSvc
36  * @param alg pointer to the current algorithm
37  * @param svc pointer to algorithm context service
38  */
39 // ============================================================================
41 ( IAlgorithm* alg ,
42  IAlgContextSvc* svc )
43  : m_svc ( svc )
44  , m_alg ( alg )
45 {
46  if ( m_svc && m_alg ) { m_svc->setCurrentAlg ( m_alg.get() ).ignore() ; }
47 }
48 // ============================================================================
49 /* destructor
50  * Internally invokes IAlgContextSvc::unSetCurrentAlg
51  * @see IAlgorithm
52  * @see IAlgContextSvc
53  */
54 // ============================================================================
56 {
57  if ( m_svc && m_alg )
58  { m_svc->unSetCurrentAlg ( m_alg.get() ).ignore() ; }
59 }
60 // ============================================================================
61 
62 
63 // ============================================================================
64 // The END
65 // ============================================================================
66 
~AlgContext()
destructor Internally invokes IAlgContextSvc::unSetCurrentAlg
Definition: AlgContext.cpp:55
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:27
SmartIF< IAlgContextSvc > m_svc
An abstract interface for Algorithm Context Service.
virtual StatusCode unSetCurrentAlg(IAlgorithm *a)=0
remove the algorithm ("pop_back")
SmartIF< IAlgorithm > m_alg