The Gaudi Framework  v30r4 (9b837755)
HiveDataBroker.h
Go to the documentation of this file.
1 #pragma once
4 #include "GaudiKernel/Service.h"
5 #include <stdexcept>
6 
7 class HiveDataBrokerSvc final : public extends<Service, IDataBroker>
8 {
9 public:
10  using extends::extends;
11 
13  const std::vector<std::string>& stoppers = {} ) const override;
15  const std::vector<std::string>& stoppers = {} ) const override;
16 
17  StatusCode initialize() override;
18  StatusCode start() override;
19  StatusCode stop() override;
20  StatusCode finalize() override;
21 
22 private:
24  "Attribute any unmet input dependencies to this Algorithm"};
26  this, "DataProducers", {}, "List of algorithms to be used to resolve data dependencies"};
27 
28  struct AlgEntry {
32  int requestCount = 0;
33 
34  AlgEntry( SmartIF<IAlgorithm>&& p ) : ialg{std::move( p )}, alg{dynamic_cast<Algorithm*>( ialg.get() )}
35  {
36  if ( !alg ) throw std::runtime_error( "algorithm pointer == nullptr???" );
37  }
38  };
39 
41  instantiateAndInitializeAlgorithms( const std::vector<std::string>& names ) const; // algorithms must be fully
42  // initialized first, as
43  // doing so may create
44  // additional data
45  // dependencies...
46 
48 
50 
52 
54 };
std::map< DataObjID, AlgEntry * > mapProducers(std::vector< AlgEntry > &algorithms) const
Implementation of property with value of concrete type.
Definition: Property.h:383
std::vector< AlgEntry > m_cfnodes
StatusCode finalize() override
StatusCode start() override
std::map< DataObjID, AlgEntry * > m_dependencies
Algorithm * alg
STL class.
StatusCode stop() override
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:82
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:51
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
std::vector< Algorithm * > algorithmsRequiredFor(const DataObjIDColl &requested, const std::vector< std::string > &stoppers={}) const override
T move(T...args)
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
STL class.
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
StatusCode initialize() override
int requestCount