Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v36r16 (ea80daf8)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AlgResourcePool.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 #include "AlgResourcePool.h"
14 
15 // C++
16 #include <functional>
17 #include <queue>
18 #include <sstream>
19 
20 // DP TODO: Manage SmartIFs and not pointers to algorithms
21 
22 // Instantiation of a static factory class used by clients to create instances of this service
24 
25 #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
26 #define DEBUG_MSG ON_DEBUG debug()
27 
28 //---------------------------------------------------------------------------
29 
30 // Destructor
32  for ( auto& algoId_algoQueue : m_algqueue_map ) {
33  auto* queue = algoId_algoQueue.second;
34  delete queue;
35  }
36 }
37 
38 //---------------------------------------------------------------------------
39 
40 // Initialize the pool with the list of algorithms known to the IAlgManager
42 
44  if ( !sc.isSuccess() ) warning() << "Base class could not be started" << endmsg;
45 
46  // Try to recover the topAlgList from the ApplicationManager for backward-compatibility
47  if ( m_topAlgNames.value().empty() ) {
48  info() << "TopAlg list empty. Recovering the one of Application Manager" << endmsg;
49  const Gaudi::Utils::TypeNameString appMgrName( "ApplicationMgr/ApplicationMgr" );
50  SmartIF<IProperty> appMgrProps( serviceLocator()->service( appMgrName ) );
51  m_topAlgNames.assign( appMgrProps->getProperty( "TopAlg" ) );
52  }
53 
54  sc = decodeTopAlgs();
55  if ( sc.isFailure() ) warning() << "Algorithms could not be properly decoded." << endmsg;
56 
57  // let's assume all resources are there
59  return StatusCode::SUCCESS;
60 }
61 
62 //---------------------------------------------------------------------------
63 
65 
66  StatusCode startSc = Service::start();
67  if ( !startSc.isSuccess() ) return startSc;
68 
69  // sys-Start the algorithms
70  for ( auto& ialgo : m_algList ) {
71  startSc = ialgo->sysStart();
72  if ( startSc.isFailure() ) {
73  error() << "Unable to start Algorithm: " << ialgo->name() << endmsg;
74  return startSc;
75  }
76  }
77  return StatusCode::SUCCESS;
78 }
79 
80 //---------------------------------------------------------------------------
81 
82 StatusCode AlgResourcePool::acquireAlgorithm( std::string_view name, IAlgorithm*& algo, bool blocking ) {
83 
84  std::hash<std::string_view> hash_function;
85  size_t algo_id = hash_function( name );
86  auto itQueueIAlgPtr = m_algqueue_map.find( algo_id );
87 
88  if ( itQueueIAlgPtr == m_algqueue_map.end() ) {
89  error() << "Algorithm " << name << " requested, but not recognised" << endmsg;
90  algo = nullptr;
91  return StatusCode::FAILURE;
92  }
93 
94  StatusCode sc;
95  if ( blocking ) {
96  itQueueIAlgPtr->second->pop( algo );
97  } else {
98  if ( !itQueueIAlgPtr->second->try_pop( algo ) ) {
99  if ( m_countAlgInstMisses ) {
100  auto result = m_algInstanceMisses.find( name );
101  if ( result != m_algInstanceMisses.end() )
102  ++( result->second );
103  else
105  }
106  sc = StatusCode::FAILURE;
107  }
108  }
109 
110  // Note that reentrant algorithms are not consumed so we put them
111  // back immediately in the queue at the end of this function.
112  // Now we may still be called again in between and get this
113  // error. In such a case, the Scheduler will retry later.
114  // This is of course not optimal, but should only happen very
115  // seldom and thud won't affect the global efficiency
116  if ( sc.isFailure() )
117  DEBUG_MSG << "No instance of algorithm " << name << " could be retrieved in non-blocking mode" << endmsg;
118 
119  // if (m_lazyCreation ) {
120  // TODO: fill the lazyCreation part
121  // }
122  if ( sc.isSuccess() ) {
123  state_type requirements = m_resource_requirements[algo_id];
125  if ( requirements.is_subset_of( m_available_resources ) ) {
126  m_available_resources ^= requirements;
127  } else {
128  sc = StatusCode::FAILURE;
129  error() << "Failure to allocate resources of algorithm " << name << endmsg;
130  // in case of not reentrant, push it back. Reentrant ones are pushed back
131  // in all cases further down
132  if ( !algo->isReEntrant() ) { itQueueIAlgPtr->second->push( algo ); }
133  }
135  if ( algo->isReEntrant() ) {
136  // push back reentrant algorithms immediately as it can be reused
137  itQueueIAlgPtr->second->push( algo );
138  }
139  }
140  return sc;
141 }
142 
143 //---------------------------------------------------------------------------
144 
146 
147  std::hash<std::string_view> hash_function;
148  size_t algo_id = hash_function( name );
149 
150  // release resources used by the algorithm
154 
155  // release algorithm itself if not reentrant
156  if ( !algo->isReEntrant() ) { m_algqueue_map[algo_id]->push( algo ); }
157  return StatusCode::SUCCESS;
158 }
159 
160 //---------------------------------------------------------------------------
161 
166  return StatusCode::SUCCESS;
167 }
168 
169 //---------------------------------------------------------------------------
170 
175  return StatusCode::SUCCESS;
176 }
177 
178 //---------------------------------------------------------------------------
179 
180 StatusCode AlgResourcePool::flattenSequencer( Gaudi::Algorithm* algo, ListAlg& alglist, unsigned int recursionDepth ) {
181 
183 
184  if ( algo->isSequence() ) {
185  auto seq = dynamic_cast<Gaudi::Sequence*>( algo );
186  if ( seq == 0 ) {
187  error() << "Unable to dcast Algorithm " << algo->name() << " to a Sequence, but it has isSequence==true"
188  << endmsg;
189  return StatusCode::FAILURE;
190  }
191 
192  auto subAlgorithms = seq->subAlgorithms();
193 
194  // Recursively unroll
195  ++recursionDepth;
196 
197  for ( auto subalgo : *subAlgorithms ) {
198  sc = flattenSequencer( subalgo, alglist, recursionDepth );
199  if ( sc.isFailure() ) {
200  error() << "Algorithm " << subalgo->name() << " could not be flattened" << endmsg;
201  return sc;
202  }
203  }
204  } else {
205  alglist.emplace_back( algo );
206  return sc;
207  }
208  return sc;
209 }
210 
211 //---------------------------------------------------------------------------
212 
214 
216  if ( !algMan.isValid() ) {
217  error() << "Algorithm manager could not be properly fetched." << endmsg;
218  return StatusCode::FAILURE;
219  }
220 
221  // Useful lambda not to repeat ourselves --------------------------
222  auto createAlg = [&algMan, this]( const std::string& item_type, const std::string& item_name, IAlgorithm*& algo ) {
223  StatusCode createAlgSc = algMan->createAlgorithm( item_type, item_name, algo, true, false );
224  if ( createAlgSc.isFailure() )
225  this->warning() << "Algorithm " << item_type << "/" << item_name << " could not be created." << endmsg;
226  };
227  // End of lambda --------------------------------------------------
228 
230 
231  // Fill the top algorithm list ----
232  const std::vector<std::string>& topAlgNames = m_topAlgNames.value();
233  for ( auto& name : topAlgNames ) {
234  IAlgorithm* algo( nullptr );
235 
237  const std::string& item_name = item.name();
238  const std::string& item_type = item.type();
239  SmartIF<IAlgorithm> algoSmartIF( algMan->algorithm( item_name, false ) );
240 
241  if ( !algoSmartIF.isValid() ) {
242  createAlg( item_type, item_name, algo );
243  algoSmartIF = algo;
244  }
245 
246  algoSmartIF->sysInitialize().ignore();
247  m_topAlgList.push_back( algoSmartIF );
248  }
249  // Top algorithm list filled ----
250 
251  // Now we unroll it ----
252  for ( auto& algoSmartIF : m_topAlgList ) {
253  Gaudi::Algorithm* algorithm = dynamic_cast<Gaudi::Algorithm*>( algoSmartIF.get() );
254  if ( !algorithm ) {
255  fatal() << "Conversion from IAlgorithm to Gaudi::Algorithm failed" << endmsg;
256  return StatusCode::FAILURE;
257  }
258  sc = flattenSequencer( algorithm, m_flatUniqueAlgList );
259  }
260  // stupid O(N^2) unique-ification..
261  for ( auto i = begin( m_flatUniqueAlgList ); i != end( m_flatUniqueAlgList ); ++i ) {
262  auto n = next( i );
263  while ( n != end( m_flatUniqueAlgList ) ) {
264  if ( *n == *i )
266  else
267  ++n;
268  }
269  }
270  if ( msgLevel( MSG::DEBUG ) ) {
271  debug() << "List of algorithms is: " << endmsg;
272  for ( auto& algo : m_flatUniqueAlgList )
273  debug() << " o " << algo->type() << "/" << algo->name() << " @ " << algo << endmsg;
274  }
275 
276  // Unrolled ---
277 
278  // Now let's manage the clones
279  unsigned int resource_counter( 0 );
280  std::hash<std::string> hash_function;
281  for ( auto& ialgoSmartIF : m_flatUniqueAlgList ) {
282 
283  const std::string& item_name = ialgoSmartIF->name();
284 
285  verbose() << "Treating resource management and clones of " << item_name << endmsg;
286 
287  Gaudi::Algorithm* algo = dynamic_cast<Gaudi::Algorithm*>( ialgoSmartIF.get() );
288  if ( !algo ) {
289  fatal() << "Conversion from IAlgorithm to Gaudi::Algorithm failed" << endmsg;
290  return StatusCode::FAILURE;
291  }
292  const std::string& item_type = algo->type();
293 
294  size_t algo_id = hash_function( item_name );
296  m_algqueue_map[algo_id] = queue;
297 
298  // DP TODO Do it properly with SmartIFs, also in the queues
299  IAlgorithm* ialgo( ialgoSmartIF.get() );
300 
301  queue->push( ialgo );
302  m_algList.push_back( ialgo );
303  if ( ialgo->isReEntrant() ) {
304  if ( ialgo->cardinality() != 0 ) {
305  info() << "Algorithm " << ialgo->name() << " is ReEntrant, but Cardinality was set to " << ialgo->cardinality()
306  << ". Only creating 1 instance" << endmsg;
307  }
308  m_n_of_allowed_instances[algo_id] = 1;
309  } else if ( ialgo->isClonable() ) {
310  m_n_of_allowed_instances[algo_id] = ialgo->cardinality();
311  } else {
312  if ( ialgo->cardinality() == 1 ) {
313  m_n_of_allowed_instances[algo_id] = 1;
314  } else {
315  if ( !m_overrideUnClonable ) {
316  info() << "Algorithm " << ialgo->name() << " is un-Clonable but Cardinality was set to "
317  << ialgo->cardinality() << ". Only creating 1 instance" << endmsg;
318  m_n_of_allowed_instances[algo_id] = 1;
319  } else {
320  warning() << "Overriding UnClonability of Algorithm " << ialgo->name() << ". Setting Cardinality to "
321  << ialgo->cardinality() << endmsg;
322  m_n_of_allowed_instances[algo_id] = ialgo->cardinality();
323  }
324  }
325  }
326  m_n_of_created_instances[algo_id] = 1;
327 
328  state_type requirements( 0 );
329 
330  for ( auto& resource_name : ialgo->neededResources() ) {
331  auto ret = m_resource_indices.emplace( resource_name, resource_counter );
332  // insert successful means == wasn't known before. So increment counter
333  if ( ret.second ) ++resource_counter;
334  // Resize for every algorithm according to the found resources
335  requirements.resize( resource_counter );
336  // in any case the return value holds the proper product index
337  requirements[ret.first->second] = true;
338  }
339 
340  m_resource_requirements[algo_id] = requirements;
341 
342  // potentially create clones; if not lazy creation we have to do it now
343  if ( !m_lazyCreation ) {
344  for ( unsigned int i = 1, end = m_n_of_allowed_instances[algo_id]; i < end; ++i ) {
345  debug() << "type/name to create clone of: " << item_type << "/" << item_name << endmsg;
346  IAlgorithm* ialgoClone( nullptr );
347  createAlg( item_type, item_name, ialgoClone );
348  ialgoClone->setIndex( i );
349  if ( ialgoClone->sysInitialize().isFailure() ) {
350  error() << "unable to initialize Algorithm clone " << ialgoClone->name() << endmsg;
351  sc = StatusCode::FAILURE;
352  // FIXME: should we delete this failed clone?
353  } else {
354  queue->push( ialgoClone );
355  m_n_of_created_instances[algo_id] += 1;
356  }
357  }
358  }
359  }
360 
361  // Now resize all the requirement bitsets to the same size
362  for ( auto& kv : m_resource_requirements ) { kv.second.resize( resource_counter ); }
363 
364  // Set all resources to be available
365  m_available_resources.resize( resource_counter );
366  m_available_resources.set();
367 
368  return sc;
369 }
370 
371 //---------------------------------------------------------------------------
372 
375  for ( auto algoSmartIF : m_flatUniqueAlgList ) m_flatUniqueAlgPtrList.push_back( algoSmartIF.get() );
376  return m_flatUniqueAlgPtrList;
377 }
378 
379 //---------------------------------------------------------------------------
380 
383  for ( auto algoSmartIF : m_topAlgList ) m_topAlgPtrList.push_back( algoSmartIF.get() );
384  return m_topAlgPtrList;
385 }
386 
387 //---------------------------------------------------------------------------
389 
391 
392  for ( auto& p : m_algInstanceMisses ) sortedAlgInstanceMisses.insert( { p.second, p.first } );
393 
394  // determine optimal indentation
395  int indnt = std::to_string( sortedAlgInstanceMisses.cbegin()->first ).length();
396 
398 
399  out << "Hit parade of algorithm instance misses:\n"
400  << std::right << std::setfill( ' ' )
401  << " ===============================================================================\n"
402  << std::setw( indnt + 7 ) << "Misses "
403  << "| Algorithm (# of clones) \n"
404  << " ===============================================================================\n";
405 
406  std::hash<std::string_view> hash_function;
407 
408  out << std::right << std::setfill( ' ' );
409  for ( const auto& p : sortedAlgInstanceMisses ) {
410  out << std::setw( indnt + 7 ) << std::to_string( p.first ) + " "
411  << " " << p.second << " (" << m_n_of_allowed_instances.at( hash_function( p.second ) ) << ")\n";
412  }
413 
414  info() << out.str() << endmsg;
415 }
416 
417 //---------------------------------------------------------------------------
418 
420 
421  StatusCode stopSc = Service::stop();
422  if ( !stopSc.isSuccess() ) return stopSc;
423 
424  // sys-Stop the algorithm
425  for ( auto& ialgo : m_algList ) {
426  stopSc = ialgo->sysStop();
427  if ( stopSc.isFailure() ) {
428  error() << "Unable to stop Algorithm: " << ialgo->name() << endmsg;
429  return stopSc;
430  }
431  }
433 
434  return StatusCode::SUCCESS;
435 }
436 
438  // we do not need to hold the ref counts of the algorithms anymore
439  // (this triggers algorithms destructors)
441  m_algList.clear();
443  return extends::finalize();
444 }
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
AlgResourcePool::~AlgResourcePool
~AlgResourcePool() override
Definition: AlgResourcePool.cpp:31
AlgResourcePool::initialize
StatusCode initialize() override
Definition: AlgResourcePool.cpp:41
std::mutex::lock
T lock(T... args)
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:118
std::string
STL class.
AlgResourcePool::m_countAlgInstMisses
Gaudi::Property< bool > m_countAlgInstMisses
Definition: AlgResourcePool.h:96
AlgResourcePool::m_available_resources
state_type m_available_resources
Definition: AlgResourcePool.h:73
Gaudi::Utils::TypeNameString::name
const std::string & name() const
Definition: TypeNameString.h:49
std::list< SmartIF< IAlgorithm > >
AlgResourcePool::releaseResource
StatusCode releaseResource(std::string_view name) override
Release a certain resource.
Definition: AlgResourcePool.cpp:171
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:528
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
Service::start
StatusCode start() override
Definition: Service.cpp:187
IAlgorithm::setIndex
virtual void setIndex(const unsigned int &idx)=0
Set instantiation index of Alg.
Gaudi::Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:165
AlgResourcePool::m_algList
ListAlg m_algList
The list of all algorithms created within the Pool which are not top.
Definition: AlgResourcePool.h:101
std::vector< std::string >
std::map::find
T find(T... args)
AlgResourcePool::m_flatUniqueAlgList
ListAlg m_flatUniqueAlgList
The flat list of algorithms w/o clones.
Definition: AlgResourcePool.h:107
std::map::emplace
T emplace(T... args)
IAlgorithm::cardinality
virtual unsigned int cardinality() const =0
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentra...
AlgResourcePool::state_type
boost::dynamic_bitset state_type
Definition: AlgResourcePool.h:69
std::setfill
T setfill(T... args)
Gaudi::Property::assign
bool assign(const Details::PropertyBase &source) override
get the value from another property
Definition: Property.h:372
AlgResourcePool::m_flatUniqueAlgPtrList
std::list< IAlgorithm * > m_flatUniqueAlgPtrList
The flat list of algorithms w/o clones which is returned.
Definition: AlgResourcePool.h:110
IAlgorithm::neededResources
virtual const std::vector< std::string > & neededResources() const =0
Named, non thread-safe resources used during event processing.
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:148
IAlgorithm::isClonable
virtual bool isClonable() const
Specify if the algorithm is clonable.
Definition: IAlgorithm.h:64
std::list::clear
T clear(T... args)
IAlgorithm::isReEntrant
virtual bool isReEntrant() const =0
std::mutex::unlock
T unlock(T... args)
AlgResourcePool::m_n_of_created_instances
std::map< size_t, unsigned int > m_n_of_created_instances
Definition: AlgResourcePool.h:77
AlgResourcePool::finalize
StatusCode finalize() override
Definition: AlgResourcePool.cpp:437
std::list::push_back
T push_back(T... args)
AlgResourcePool
Definition: AlgResourcePool.h:42
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:72
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:20
AlgResourcePool::m_resource_requirements
std::map< size_t, state_type > m_resource_requirements
Definition: AlgResourcePool.h:75
TimingHistograms.name
name
Definition: TimingHistograms.py:25
Service::name
const std::string & name() const override
Retrieve name of the service
Definition: Service.cpp:332
StatusCode
Definition: StatusCode.h:65
std::map::at
T at(T... args)
IAlgorithm
Definition: IAlgorithm.h:38
CLHEP::begin
double * begin(CLHEP::HepVector &v)
Definition: TupleAlg.cpp:45
AlgResourcePool::m_resource_indices
std::map< std::string_view, unsigned int > m_resource_indices
Definition: AlgResourcePool.h:78
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:239
std::to_string
T to_string(T... args)
std::list::erase
T erase(T... args)
AlgResourcePool::stop
StatusCode stop() override
Definition: AlgResourcePool.cpp:419
AlgResourcePool::dumpInstanceMisses
void dumpInstanceMisses() const
Dump recorded Algorithm instance misses.
Definition: AlgResourcePool.cpp:388
HistogramsTiming.seq
seq
Definition: HistogramsTiming.py:24
SmartIF< IProperty >
AlgResourcePool::decodeTopAlgs
StatusCode decodeTopAlgs()
Decode the top Algorithm list.
Definition: AlgResourcePool.cpp:213
genconfuser.verbose
verbose
Definition: genconfuser.py:29
AlgResourcePool::concurrentQueueIAlgPtr
tbb::concurrent_bounded_queue< IAlgorithm * > concurrentQueueIAlgPtr
Definition: AlgResourcePool.h:67
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
AlgResourcePool::m_overrideUnClonable
Gaudi::Property< bool > m_overrideUnClonable
Definition: AlgResourcePool.h:94
AlgResourcePool::m_n_of_allowed_instances
std::map< size_t, size_t > m_n_of_allowed_instances
Definition: AlgResourcePool.h:76
AlgResourcePool::start
StatusCode start() override
Definition: AlgResourcePool.cpp:64
Gaudi::Utils::TypeNameString::type
const std::string & type() const
Definition: TypeNameString.h:48
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:235
std::ostringstream
STL class.
AlgResourcePool::m_algInstanceMisses
std::unordered_map< std::string_view, unsigned int > m_algInstanceMisses
Counters for Algorithm instance misses.
Definition: AlgResourcePool.h:89
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
AlgResourcePool::m_lazyCreation
Gaudi::Property< bool > m_lazyCreation
Definition: AlgResourcePool.h:91
AlgResourcePool::acquireResource
StatusCode acquireResource(std::string_view name) override
Acquire a certain resource.
Definition: AlgResourcePool.cpp:162
std::list::emplace_back
T emplace_back(T... args)
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
Service::stop
StatusCode stop() override
Definition: Service.cpp:181
std::right
T right(T... args)
AlgResourcePool::m_topAlgNames
Gaudi::Property< std::vector< std::string > > m_topAlgNames
Definition: AlgResourcePool.h:92
AlgResourcePool.h
std::multimap::cbegin
T cbegin(T... args)
AlgResourcePool::flattenSequencer
StatusCode flattenSequencer(Gaudi::Algorithm *sequencer, ListAlg &alglist, unsigned int recursionDepth=0)
Recursively flatten an algList.
Definition: AlgResourcePool.cpp:180
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
std::multimap::insert
T insert(T... args)
AlgResourcePool::m_algqueue_map
std::map< size_t, concurrentQueueIAlgPtr * > m_algqueue_map
Definition: AlgResourcePool.h:74
AlgResourcePool::acquireAlgorithm
StatusCode acquireAlgorithm(std::string_view name, IAlgorithm *&algo, bool blocking=false) override
Acquire a certain algorithm using its name.
Definition: AlgResourcePool.cpp:82
DEBUG_MSG
#define DEBUG_MSG
Definition: AlgResourcePool.cpp:26
AlgResourcePool::getFlatAlgList
std::list< IAlgorithm * > getFlatAlgList() override
Definition: AlgResourcePool.cpp:373
std::multimap
STL class.
AlgResourcePool::m_resource_mutex
std::mutex m_resource_mutex
Definition: AlgResourcePool.h:71
std::map::end
T end(T... args)
IOTest.end
end
Definition: IOTest.py:123
std::setw
T setw(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
Gaudi::Sequence
Definition: Sequence.h:18
AlgResourcePool::releaseAlgorithm
StatusCode releaseAlgorithm(std::string_view name, IAlgorithm *&algo) override
Release a certain algorithm.
Definition: AlgResourcePool.cpp:145
IAlgorithm::sysInitialize
virtual StatusCode sysInitialize()=0
Initialization method invoked by the framework.
ISvcLocator.h
GaudiSequencer.h
AlgResourcePool::m_topAlgPtrList
std::list< IAlgorithm * > m_topAlgPtrList
The top list of algorithms.
Definition: AlgResourcePool.h:113
Service::service
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Service.h:88
Gaudi::Algorithm::isSequence
bool isSequence() const override
Are we a Sequence?
Definition: Algorithm.h:198
AlgResourcePool::m_topAlgList
ListAlg m_topAlgList
The list of top algorithms.
Definition: AlgResourcePool.h:104
AlgResourcePool::getTopAlgList
std::list< IAlgorithm * > getTopAlgList() override
Definition: AlgResourcePool.cpp:381
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
Definition: Service.cpp:335
std::hash
PrepareBase.out
out
Definition: PrepareBase.py:20