![]() |
|
|||
File indexing completed on 2025-02-21 10:00:30
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 #ifndef GAUDIKERNEL_IALGRESOURCEPOOL_H 0012 #define GAUDIKERNEL_IALGRESOURCEPOOL_H 0013 0014 // Framework includes 0015 #include "GaudiKernel/IInterface.h" 0016 0017 // C++ includes 0018 #include <list> 0019 #include <string_view> 0020 0021 // Forward class declaration 0022 class IAlgorithm; 0023 0024 /** @class IAlgResourcePool IAlgResourcePool.h GaudiKernel/IAlgResourcePool.h 0025 0026 The IAlgResourcePool is the interface for managing algorithm instances, 0027 in particular if clones of the same algorithm exist. 0028 It as well manages the shared resources between different algorithms and 0029 ensures that not two algorithms with the same non-thread-safe resource 0030 needs are made available. The actual creation and deletion of algorithm 0031 instances is done through the IAlgManager service. 0032 0033 @author Benedikt Hegner 0034 @version 1.0 0035 */ 0036 class GAUDI_API IAlgResourcePool : virtual public IInterface { 0037 public: 0038 /// InterfaceID 0039 DeclareInterfaceID( IAlgResourcePool, 1, 0 ); 0040 0041 /// Acquire a certain algorithm using its name 0042 virtual StatusCode acquireAlgorithm( std::string_view name, IAlgorithm*& algo, bool blocking = false ) = 0; 0043 /// Release a certain algorithm 0044 virtual StatusCode releaseAlgorithm( std::string_view name, IAlgorithm*& algo ) = 0; 0045 0046 /// Get the flat list of algorithms 0047 virtual std::list<IAlgorithm*> getFlatAlgList() = 0; 0048 0049 /// Get top list of algorithms 0050 virtual std::list<IAlgorithm*> getTopAlgList() = 0; 0051 0052 /// Acquire a certain resource 0053 virtual StatusCode acquireResource( std::string_view name ) = 0; 0054 /// Release a certrain resource 0055 virtual StatusCode releaseResource( std::string_view name ) = 0; 0056 }; 0057 0058 #endif // GAUDIKERNEL_IALGRESOURCEPOOL_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |