The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
IAlgResourcePool.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
14#include <list>
15#include <string_view>
16
17class IAlgorithm;
18
31class GAUDI_API IAlgResourcePool : virtual public IInterface {
32public:
35
37 virtual StatusCode acquireAlgorithm( std::string_view name, IAlgorithm*& algo, bool blocking = false ) = 0;
39 virtual StatusCode releaseAlgorithm( std::string_view name, IAlgorithm*& algo ) = 0;
40
42 virtual std::list<IAlgorithm*> getFlatAlgList() = 0;
43
45 virtual std::list<IAlgorithm*> getTopAlgList() = 0;
46
48 virtual StatusCode acquireResource( std::string_view name ) = 0;
50 virtual StatusCode releaseResource( std::string_view name ) = 0;
51};
#define GAUDI_API
Definition Kernel.h:49
The IAlgResourcePool is the interface for managing algorithm instances, in particular if clones of th...
virtual std::list< IAlgorithm * > getTopAlgList()=0
Get top list of algorithms.
virtual StatusCode acquireAlgorithm(std::string_view name, IAlgorithm *&algo, bool blocking=false)=0
Acquire a certain algorithm using its name.
virtual StatusCode acquireResource(std::string_view name)=0
Acquire a certain resource.
virtual StatusCode releaseResource(std::string_view name)=0
Release a certrain resource.
DeclareInterfaceID(IAlgResourcePool, 1, 0)
InterfaceID.
virtual StatusCode releaseAlgorithm(std::string_view name, IAlgorithm *&algo)=0
Release a certain algorithm.
virtual std::list< IAlgorithm * > getFlatAlgList()=0
Get the flat list of algorithms.
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition IAlgorithm.h:36
Definition of the basic interface.
Definition IInterface.h:225
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64