The Gaudi Framework  v32r2 (46d42edc)
IAlgContextSvc.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_IALGCONTEXTSVC_H
2 #define GAUDIKERNEL_IALGCONTEXTSVC_H
3 // ============================================================================
4 // Include files:
5 // ============================================================================
6 // STD & STL
7 // ============================================================================
8 #include <vector>
9 // ============================================================================
10 // GaudiKernel
11 // ============================================================================
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 public:
29 
30 public:
32  virtual StatusCode setCurrentAlg( IAlgorithm* a, const EventContext& context ) = 0;
34  virtual StatusCode unSetCurrentAlg( IAlgorithm* a, const EventContext& context ) = 0;
36  virtual IAlgorithm* currentAlg() const = 0;
38  virtual const Algorithms& algorithms() const = 0;
39 };
40 // ============================================================================
41 namespace Gaudi {
42  namespace Utils {
74  class GAUDI_API AlgContext final {
75  public:
84  AlgContext( IAlgorithm* alg, IAlgContextSvc* svc, const EventContext& context );
85 
94 
97  AlgContext( IAlgorithm* alg, IAlgContextSvc* svc, EventContext&& context ) = delete;
98 
104  ~AlgContext();
105 
106  private:
107  // copy constructor is disabled
108  AlgContext( const AlgContext& right ) = delete;
109  // assignement operator is disabled
110  AlgContext& operator=( const AlgContext& right ) = delete;
111 
112  private:
116  };
117  } // namespace Utils
118 } // end of namespace Gaudi
119 
120 #endif
Helper "sentry" class to automatize the safe register/unregister the algorithm's context.
const EventContext & m_context
This class represents an entry point to all the event specific data.
Definition: EventContext.h:24
std::vector< IAlgorithm * > Algorithms
the actual type of algorithm' stack
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Definition of the basic interface.
Definition: IInterface.h:244
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.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
SmartIF< IAlgContextSvc > m_svc
An abstract interface for Algorithm Context Service.
#define GAUDI_API
Definition: Kernel.h:71
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
SmartIF< IAlgorithm > m_alg