LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ConsumesCollector.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_ConsumesCollector_h
2 #define art_Framework_Core_ConsumesCollector_h
3 // vim: set sw=2 expandtab :
4 
10 
11 #include <array>
12 #include <string>
13 #include <vector>
14 
15 namespace art {
17  public:
18  std::array<std::vector<ProductInfo>, NumBranchTypes> const& getConsumables()
19  const;
20  void sortConsumables(std::string const& current_process_name);
21 
22  // Consumes information
23  template <typename T, BranchType = InEvent>
25  template <typename Element, BranchType = InEvent>
27  template <typename T, BranchType = InEvent>
28  void consumesMany();
29 
30  template <typename T, BranchType = InEvent>
32  template <typename Element, BranchType = InEvent>
34  template <typename T, BranchType = InEvent>
35  void mayConsumeMany();
36 
37  private:
40  TypeID const& typeID);
43  TypeID const& typeID,
44  InputTag const& tag);
45  std::array<std::vector<ProductInfo>, NumBranchTypes> consumables_{};
46  };
47 
48  template <typename T, BranchType BT>
51  {
53  BT, ProductInfo::ConsumableType::Product, TypeID{typeid(T)}, tag);
54  return ProductToken<T>{tag};
55  }
56 
57  template <typename T, BranchType BT>
60  {
63  return ViewToken<T>{tag};
64  }
65 
66  template <typename T, BranchType BT>
67  void
69  {
71  }
72 
73  template <typename T, BranchType BT>
76  {
78  BT, ProductInfo::ConsumableType::Product, TypeID{typeid(T)}, tag);
79  return ProductToken<T>{tag};
80  }
81 
82  template <typename T, BranchType BT>
85  {
88  return ViewToken<T>{tag};
89  }
90 
91  template <typename T, BranchType BT>
92  void
94  {
96  }
97 
98 } // namespace art
99 
100 // Local Variables:
101 // mode: c++
102 // End:
103 
104 #endif /* art_Framework_Core_ConsumesCollector_h */
ProductToken< T > mayConsume(InputTag const &)
void emplace_back(BranchType, ProductInfo::ConsumableType, TypeID const &typeID)
std::array< std::vector< ProductInfo >, NumBranchTypes > consumables_
ViewToken< Element > consumesView(InputTag const &)
ProductToken< T > consumes(InputTag const &)
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
ViewToken< Element > mayConsumeView(InputTag const &)
void sortConsumables(std::string const &current_process_name)
BranchType
Definition: BranchType.h:20
Definition: MVAAlg.h:12