Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
HiveDataBroker.h
Go to the documentation of this file.
1 #pragma once
3 #include "GaudiKernel/Service.h"
4 #include <Gaudi/Algorithm.h>
5 #include <stdexcept>
6 
7 class HiveDataBrokerSvc final : public extends<Service, IDataBroker> {
8 public:
9  using extends::extends;
10 
12  const std::vector<std::string>& stoppers = {} ) const override;
14  const std::vector<std::string>& stoppers = {} ) const override;
15 
16  StatusCode initialize() override;
17  StatusCode start() override;
18  StatusCode stop() override;
19  StatusCode finalize() override;
20 
21 private:
23  "Attribute any unmet input dependencies to this Algorithm"};
25  this, "DataProducers", {}, "List of algorithms to be used to resolve data dependencies"};
26 
27  struct AlgEntry {
31  int requestCount = 0;
32 
33  AlgEntry( SmartIF<IAlgorithm>&& p ) : ialg{std::move( p )}, alg{dynamic_cast<Gaudi::Algorithm*>( ialg.get() )} {
34  if ( !alg ) throw std::runtime_error( "algorithm pointer == nullptr???" );
35  }
36  };
37 
39  instantiateAndInitializeAlgorithms( const std::vector<std::string>& names ) const; // algorithms must be fully
40  // initialized first, as
41  // doing so may create
42  // additional data
43  // dependencies...
44 
46 
48 
50 
52 };
std::map< DataObjID, AlgEntry * > mapProducers(std::vector< AlgEntry > &algorithms) const
Implementation of property with value of concrete type.
Definition: Property.h:352
std::vector< AlgEntry > m_cfnodes
StatusCode finalize() override
StatusCode start() override
std::map< DataObjID, AlgEntry * > m_dependencies
STL class.
StatusCode stop() override
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
std::set< AlgEntry * > dependsOn
Helper class to parse a string of format "type/name".
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
std::vector< AlgEntry > instantiateAndInitializeAlgorithms(const std::vector< std::string > &names) const
Gaudi::Property< std::vector< std::string > > m_producers
Gaudi::Property< std::string > m_dataLoader
AlgEntry(SmartIF< IAlgorithm > &&p)
SmartIF< IAlgorithm > ialg
std::vector< AlgEntry > m_algorithms
T move(T...args)
STL class.
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
std::vector< Gaudi::Algorithm * > algorithmsRequiredFor(const DataObjIDColl &requested, const std::vector< std::string > &stoppers={}) const override
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
StatusCode initialize() override
int requestCount
Gaudi::Algorithm * alg