The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
IAlgContextSvc.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
16#include <GaudiKernel/SmartIF.h>
17#include <vector>
18
25class GAUDI_API IAlgContextSvc : virtual public IInterface {
26public:
30 typedef std::vector<IAlgorithm*> Algorithms;
31
32public:
34 virtual StatusCode setCurrentAlg( IAlgorithm* a, const EventContext& context ) = 0;
36 virtual StatusCode unSetCurrentAlg( IAlgorithm* a, const EventContext& context ) = 0;
38 virtual IAlgorithm* currentAlg() const = 0;
40 virtual const Algorithms& algorithms() const = 0;
41};
42
43namespace Gaudi {
44 namespace Utils {
76 class GAUDI_API AlgContext final {
77 public:
86 AlgContext( IAlgorithm* alg, IAlgContextSvc* svc, const EventContext& context );
87
96
99 AlgContext( IAlgorithm* alg, IAlgContextSvc* svc, EventContext&& context ) = delete;
100
106 ~AlgContext();
107
108 private:
109 // copy constructor is disabled
110 AlgContext( const AlgContext& right ) = delete;
111 // assignement operator is disabled
112 AlgContext& operator=( const AlgContext& right ) = delete;
113
114 private:
118 };
119 } // namespace Utils
120} // namespace Gaudi
#define GAUDI_API
Definition Kernel.h:49
This class represents an entry point to all the event specific data.
AlgContext(IAlgorithm *alg, IAlgContextSvc *svc, const EventContext &context)
constructor from the service and the algorithm Internally invokes IAlgContextSvc::setCurrentAlg
AlgContext & operator=(const AlgContext &right)=delete
AlgContext(const AlgContext &right)=delete
const EventContext & m_context
SmartIF< IAlgorithm > m_alg
AlgContext(IAlgorithm *alg, IAlgContextSvc *svc, EventContext &&context)=delete
Prevent use of temporary EventContext as current context.
SmartIF< IAlgContextSvc > m_svc
An abstract interface for Algorithm Context Service.
std::vector< IAlgorithm * > Algorithms
the actual type of algorithm' stack
DeclareInterfaceID(IAlgContextSvc, 4, 0)
InterfaceID.
virtual const Algorithms & algorithms() const =0
get the stack of executed algorithms
virtual IAlgorithm * currentAlg() const =0
accessor to current algorithm:
virtual StatusCode setCurrentAlg(IAlgorithm *a, const EventContext &context)=0
set the currently executing algorithm ("push_back")
virtual StatusCode unSetCurrentAlg(IAlgorithm *a, const EventContext &context)=0
remove the algorithm ("pop_back")
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition IAlgorithm.h:36
Definition of the basic interface.
Definition IInterface.h:225
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1