The Gaudi Framework
master (9f3f8895)
Toggle main menu visibility
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
13
#include <
GaudiKernel/EventContext.h
>
14
#include <
GaudiKernel/IAlgorithm.h
>
15
#include <
GaudiKernel/IInterface.h
>
16
#include <
GaudiKernel/SmartIF.h
>
17
#include <vector>
18
25
class
GAUDI_API
IAlgContextSvc
:
virtual
public
IInterface
{
26
public
:
28
DeclareInterfaceID
(
IAlgContextSvc
, 4, 0 );
30
typedef
std::vector<IAlgorithm*>
Algorithms
;
31
32
public
:
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
43
namespace
Gaudi
{
44
namespace
Utils {
76
class
GAUDI_API
AlgContext
final {
77
public
:
86
AlgContext
(
IAlgorithm
* alg,
IAlgContextSvc
* svc,
const
EventContext
& context );
87
95
AlgContext
(
IAlgorithm
* alg,
IAlgContextSvc
* svc );
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
:
115
SmartIF<IAlgContextSvc>
m_svc
;
116
SmartIF<IAlgorithm>
m_alg
;
117
const
EventContext
&
m_context
;
118
};
119
}
// namespace Utils
120
}
// namespace Gaudi
EventContext.h
IAlgorithm.h
IInterface.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
SmartIF.h
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:35
Gaudi::Utils::AlgContext::AlgContext
AlgContext(IAlgorithm *alg, IAlgContextSvc *svc, const EventContext &context)
constructor from the service and the algorithm Internally invokes IAlgContextSvc::setCurrentAlg
Definition
AlgContext.cpp:26
Gaudi::Utils::AlgContext::operator=
AlgContext & operator=(const AlgContext &right)=delete
Gaudi::Utils::AlgContext::AlgContext
AlgContext(const AlgContext &right)=delete
Gaudi::Utils::AlgContext::m_context
const EventContext & m_context
Definition
IAlgContextSvc.h:117
Gaudi::Utils::AlgContext::m_alg
SmartIF< IAlgorithm > m_alg
Definition
IAlgContextSvc.h:116
Gaudi::Utils::AlgContext::AlgContext
AlgContext(IAlgorithm *alg, IAlgContextSvc *svc, EventContext &&context)=delete
Prevent use of temporary EventContext as current context.
Gaudi::Utils::AlgContext::m_svc
SmartIF< IAlgContextSvc > m_svc
Definition
IAlgContextSvc.h:115
IAlgContextSvc
An abstract interface for Algorithm Context Service.
Definition
IAlgContextSvc.h:25
IAlgContextSvc::Algorithms
std::vector< IAlgorithm * > Algorithms
the actual type of algorithm' stack
Definition
IAlgContextSvc.h:30
IAlgContextSvc::DeclareInterfaceID
DeclareInterfaceID(IAlgContextSvc, 4, 0)
InterfaceID.
IAlgContextSvc::algorithms
virtual const Algorithms & algorithms() const =0
get the stack of executed algorithms
IAlgContextSvc::currentAlg
virtual IAlgorithm * currentAlg() const =0
accessor to current algorithm:
IAlgContextSvc::setCurrentAlg
virtual StatusCode setCurrentAlg(IAlgorithm *a, const EventContext &context)=0
set the currently executing algorithm ("push_back")
IAlgContextSvc::unSetCurrentAlg
virtual StatusCode unSetCurrentAlg(IAlgorithm *a, const EventContext &context)=0
remove the algorithm ("pop_back")
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition
IAlgorithm.h:37
IInterface
Definition of the basic interface.
Definition
IInterface.h:225
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition
SmartIF.h:28
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition
__init__.py:1
GaudiKernel
include
GaudiKernel
IAlgContextSvc.h
Generated on
for The Gaudi Framework by
1.17.0