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:
38  std::array<std::vector<ProductInfo>, NumBranchTypes> consumables_{};
39  };
40 
41  template <typename T, BranchType BT>
44  {
46  TypeID{typeid(T)},
47  tag.label(),
48  tag.instance(),
49  ProcessTag{tag.process()});
50  return ProductToken<T>{tag};
51  }
52 
53  template <typename T, BranchType BT>
56  {
58  TypeID{typeid(T)},
59  tag.label(),
60  tag.instance(),
61  ProcessTag{tag.process()});
62  return ViewToken<T>{tag};
63  }
64 
65  template <typename T, BranchType BT>
66  void
68  {
70  TypeID{typeid(T)});
71  }
72 
73  template <typename T, BranchType BT>
76  {
78  TypeID{typeid(T)},
79  tag.label(),
80  tag.instance(),
81  ProcessTag{tag.process()});
82  return ProductToken<T>{tag};
83  }
84 
85  template <typename T, BranchType BT>
88  {
90  TypeID{typeid(T)},
91  tag.label(),
92  tag.instance(),
93  ProcessTag{tag.process()});
94  return ViewToken<T>{tag};
95  }
96 
97  template <typename T, BranchType BT>
98  void
100  {
102  TypeID{typeid(T)});
103  }
104 } // namespace art
105 
106 // Local Variables:
107 // mode: c++
108 // End:
109 
110 #endif /* art_Framework_Core_ConsumesCollector_h */
ProductToken< T > mayConsume(InputTag const &)
std::array< std::vector< ProductInfo >, NumBranchTypes > consumables_
ViewToken< Element > consumesView(InputTag const &)
std::string string
Definition: nybbler.cc:12
std::string const & instance() const noexcept
Definition: InputTag.cc:85
std::string const & process() const noexcept
Definition: InputTag.cc:91
ProductToken< T > consumes(InputTag const &)
std::string const & label() const noexcept
Definition: InputTag.cc:79
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
ViewToken< Element > mayConsumeView(InputTag const &)
void sortConsumables(std::string const &current_process_name)