All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlgContextSvc.h
Go to the documentation of this file.
1 // $Id: AlgContextSvc.h,v 1.4 2007/05/24 13:49:47 hmd Exp $
2 // ============================================================================
3 #ifndef GAUDISVC_ALGCONTEXTSVC_H
4 #define GAUDISVC_ALGCONTEXTSVC_H 1
5 // ============================================================================
6 // Include files
7 // ============================================================================
8 // GaudiKernel
9 // ============================================================================
10 #include "GaudiKernel/StatusCode.h"
12 #include "GaudiKernel/IAlgorithm.h"
14 #include "GaudiKernel/Service.h"
15 // ============================================================================
16 // Forward declarations
17 // ============================================================================
18 class IIncidentSvc ;
19 // ============================================================================
27 class AlgContextSvc: public extends2<Service, IAlgContextSvc, IIncidentListener>
28 {
29 public:
31  virtual StatusCode setCurrentAlg ( IAlgorithm* a ) ;
33  virtual StatusCode unSetCurrentAlg ( IAlgorithm* a ) ;
35  virtual IAlgorithm* currentAlg () const ;
37  virtual const IAlgContextSvc::Algorithms& algorithms () const
38  { return m_algorithms ; }
39 public:
41  virtual void handle ( const Incident& ) ;
42 public:
44  virtual StatusCode initialize () ;
46  virtual StatusCode finalize () ;
47 public:
50  ( const std::string& name ,
51  ISvcLocator* svc ) ;
53  virtual ~AlgContextSvc();
54 private:
55  // default constructor is disabled
56  AlgContextSvc () ;
57  // copy constructor is disabled
58  AlgContextSvc ( const AlgContextSvc& );
59  // assignment operator is disabled
61 private:
62  // the stack of current algorithms
64  // pointer to Incident Service
66  // flag to perform more checking
67  bool m_check ;
68 } ;
69 
70 // ============================================================================
71 // The END
72 // ============================================================================
73 #endif // GAUDISVC_ALGCONTEXTSVC_H
74 // ============================================================================
75 
IAlgContextSvc::Algorithms m_algorithms
the stack of current algorithms
Definition: AlgContextSvc.h:63
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
virtual IAlgorithm * currentAlg() const
accessor to current algorithm:
virtual ~AlgContextSvc()
Standard Destructor.
AlgContextSvc()
no default constructor
Base class used to extend a class implementing other interfaces.
Definition: extends.h:75
std::vector< IAlgorithm * > Algorithms
the actual type of algorithm' stack
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:20
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
AlgContextSvc & operator=(const AlgContextSvc &)
no assignment
IIncidentSvc * m_inc
pointer to Incident Service
Definition: AlgContextSvc.h:65
virtual StatusCode unSetCurrentAlg(IAlgorithm *a)
remove the algorithm ("pop_back")
Base class for all Incidents (computing events).
Definition: Incident.h:16
virtual StatusCode finalize()
standard finalization of the service
virtual StatusCode setCurrentAlg(IAlgorithm *a)
set the currently executing algorithm ("push_back")
virtual StatusCode initialize()
standard initialization of the service
virtual const IAlgContextSvc::Algorithms & algorithms() const
get the stack of executed algorithms
Definition: AlgContextSvc.h:37
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:22
virtual void handle(const Incident &)
handle incident