ProductRegistryHelper.cc
Go to the documentation of this file.
2 // vim: set sw=2:
3 
8 #include "cetlib_except/exception.h"
9 
10 #include <memory>
11 
12 using namespace std;
13 
14 namespace art {
15 
16  ProductRegistryHelper::~ProductRegistryHelper() = default;
17 
18  ProductRegistryHelper::ProductRegistryHelper(product_creation_mode const mode)
19  : mode_{mode}
20  {}
21 
22  void
24  ProductDescriptions& productsToRegister,
25  ModuleDescription const& md)
26  {
27  // Possible products from input source
28  if (productList_) {
30  back_inserter(productsToRegister),
31  [](auto const& pr) { return pr.second; });
32  }
33 
34  // Now fill the descriptions for products that are to be produced.
35  fillDescriptions(md);
36  auto registerProductsPerBT = [this,
37  &productsToRegister](BranchType const bt) {
39  for (auto const& pr : expectedProducts) {
40  productsToRegister.push_back(pr.second);
41  }
42  };
43  for_each_branch_type(registerProductsPerBT);
44  }
45 
46  void
48  {
50  }
51 
52 } // namespace art
STL namespace.
std::vector< BranchDescription > ProductDescriptions
void registerProducts(ProductDescriptions &productsToRegister, ModuleDescription const &md)
std::unique_ptr< ProductList const > productList_
bt
Definition: tracks.py:83
auto transform_all(Container &, OutputIt, UnaryOp)
void fillDescriptions(ModuleDescription const &md)
void fillDescriptions(ModuleDescription const &md)
TypeLabelLookup_t const & expectedProducts() const
BranchType
Definition: BranchType.h:20
void for_each_branch_type(F f)
Definition: BranchType.h:38
TypeLabelLookup_t const & expectedProducts(BranchType) const