ATLAS Offline Software
Loading...
Searching...
No Matches
DynamicDataHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4/* Dear emacs, this is -*-c++-*- */
5#ifndef _DynamicDataHelper_H_
6#define _DynamicDataHelper_H_
7
10#include "GaudiKernel/StatusCode.h"
11
12// @TODO extend Gaudi's tool visitor to allow for an externally provided list of tools which have been visited already.
13namespace Ath {
14
16 std::size_t operator()( const DataObjID* k ) const { return DataObjID_Hasher()(*k); }
17 };
19 std::size_t operator()( const DataObjID* a, const DataObjID* b) const { return *a == *b; }
20 };
21 using DataObjIDPtrColl = std::unordered_set<const DataObjID *, DataObjID_PtrHasher, DataObjID_PtrEqual>;
22
26 public:
33 void gatherDataHandlesAndDynamicConsumers(const std::string &parent_name, Gaudi::Algorithm *theAlgorithm);
34
40 StatusCode addExtraDependencies(IClassIDSvc& clid_svc, std::vector<std::string> &undeclared_output_data, MsgStream &out);
41
48 void updateDataNeeds(unsigned int max_pass,
49 MsgStream &out);
50
51 protected:
59 bool updateDataNeeds(const std::vector<const DataObjID *> &input_data_in,
60 const std::vector<const DataObjID *> &output_data_in,
61 std::vector<const DataObjID *> &input_data_out,
62 std::vector<const DataObjID *> &output_data_out,
63 MsgStream &out);
64
65 std::vector<DataObjID> m_extraOutputIDs;
68
69 std::unordered_map< IDynamicDataConsumer *,std::vector<Gaudi::Algorithm *> > m_dynDataConsumer;
70
71 };
72}
73#endif
static Double_t a
Helper class to gather all declared data IDs and propagate them to components which declare data depe...
StatusCode addExtraDependencies(IClassIDSvc &clid_svc, std::vector< std::string > &undeclared_output_data, MsgStream &out)
Add extra output data which is not declared by any of the gathered components.
void gatherDataHandlesAndDynamicConsumers(const std::string &parent_name, Gaudi::Algorithm *theAlgorithm)
Gather the input and output data declared by the given algorithm, its child algorithms and their tool...
void updateDataNeeds(unsigned int max_pass, MsgStream &out)
Update the data dependencies of all components which dynamically declare tehm.
std::vector< DataObjID > m_extraOutputIDs
DataObjIDPtrColl m_inputHandles
DataObjIDPtrColl m_outputHandles
std::unordered_map< IDynamicDataConsumer *, std::vector< Gaudi::Algorithm * > > m_dynDataConsumer
std::unordered_set< const DataObjID *, DataObjID_PtrHasher, DataObjID_PtrEqual > DataObjIDPtrColl
std::size_t operator()(const DataObjID *a, const DataObjID *b) const
std::size_t operator()(const DataObjID *k) const