The Gaudi Framework  v29r0 (ff2e7097)
IAlgContextSvc.h
Go to the documentation of this file.
1 // ============================================================================
2 #ifndef GAUDIKERNEL_IALGCONTEXTSVC_H
3 #define GAUDIKERNEL_IALGCONTEXTSVC_H
4 // ============================================================================
5 // Include files:
6 // ============================================================================
7 // STD & STL
8 // ============================================================================
9 #include <vector>
10 // ============================================================================
11 // GaudiKernel
12 // ============================================================================
13 #include "GaudiKernel/IAlgorithm.h"
14 #include "GaudiKernel/IInterface.h"
15 #include "GaudiKernel/SmartIF.h"
16 // ============================================================================
23 class GAUDI_API IAlgContextSvc : virtual public IInterface
24 {
25 public:
30 
31 public:
33  virtual StatusCode setCurrentAlg( IAlgorithm* a ) = 0;
35  virtual StatusCode unSetCurrentAlg( IAlgorithm* a ) = 0;
37  virtual IAlgorithm* currentAlg() const = 0;
39  virtual const Algorithms& algorithms() const = 0;
40 };
41 // ============================================================================
42 namespace Gaudi
43 {
44  namespace Utils
45  {
77  class GAUDI_API AlgContext final
78  {
79  public:
87  AlgContext( IAlgContextSvc* svc, IAlgorithm* alg );
95  AlgContext( IAlgorithm* alg, IAlgContextSvc* svc );
101  ~AlgContext();
102 
103  private:
104  // default constructor is disabled
105  AlgContext() = delete;
106  // copy constructor is disabled
107  AlgContext( const AlgContext& right ) = delete;
108  // assignement operator is disabled
109  AlgContext& operator=( const AlgContext& right ) = delete;
110 
111  private:
114  };
115  } // end of namespace Gaudi::Utils
116 } // end of namespace Gaudi
117 // ============================================================================
118 // The END
119 // ============================================================================
120 #endif // GAUDIKERNEL_IALGCONTEXTSVC_H
121 // ============================================================================
Helper "sentry" class to automatize the safe register/unregister the algorithm&#39;s context.
PropertyMgr & operator=(const PropertyMgr &)=delete
std::vector< IAlgorithm * > Algorithms
the actual type of algorithm&#39; stack
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:13
Definition of the basic interface.
Definition: IInterface.h:277
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.
#define GAUDI_API
Definition: Kernel.h:110
Helper functions to set/get the application return code.
Definition: __init__.py:1
SmartIF< IAlgorithm > m_alg