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 <optional>
13 #include <string>
14 #include <vector>
15 
16 namespace art {
18  public:
19  std::array<std::vector<ProductInfo>, NumBranchTypes> const& getConsumables()
20  const;
21  void sortConsumables(std::string const& current_process_name);
22 
23  // Consumes information
24  template <typename T, BranchType = InEvent>
26  template <typename Element, BranchType = InEvent>
28  template <typename T, BranchType = InEvent>
29  void consumesMany();
30 
31  template <typename T, BranchType = InEvent>
33  template <typename Element, BranchType = InEvent>
35  template <typename T, BranchType = InEvent>
36  void mayConsumeMany();
37 
38  private:
39  std::array<std::vector<ProductInfo>, NumBranchTypes> consumables_{};
40  };
41 
42  template <typename T, BranchType BT>
45  {
47  TypeID{typeid(T)},
48  tag.label(),
49  tag.instance(),
50  ProcessTag{tag.process()});
51  return ProductToken<T>{tag};
52  }
53 
54  template <typename T, BranchType BT>
57  {
59  TypeID{typeid(T)},
60  tag.label(),
61  tag.instance(),
62  ProcessTag{tag.process()});
63  return ViewToken<T>{tag};
64  }
65 
66  template <typename T, BranchType BT>
67  void
69  {
71  TypeID{typeid(T)});
72  }
73 
74  template <typename T, BranchType BT>
77  {
79  TypeID{typeid(T)},
80  tag.label(),
81  tag.instance(),
82  ProcessTag{tag.process()});
83  return ProductToken<T>{tag};
84  }
85 
86  template <typename T, BranchType BT>
89  {
91  TypeID{typeid(T)},
92  tag.label(),
93  tag.instance(),
94  ProcessTag{tag.process()});
95  return ViewToken<T>{tag};
96  }
97 
98  template <typename T, BranchType BT>
99  void
101  {
103  TypeID{typeid(T)});
104  }
105 } // namespace art
106 
107 // Local Variables:
108 // mode: c++
109 // End:
110 
111 #endif /* art_Framework_Core_ConsumesCollector_h */
ProductToken< T > mayConsume(InputTag const &)
std::array< std::vector< ProductInfo >, NumBranchTypes > consumables_
ViewToken< Element > consumesView(InputTag const &)
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
ProductToken< T > consumes(InputTag const &)
std::string const & process() const noexcept
std::string const & instance() const noexcept
ViewToken< Element > mayConsumeView(InputTag const &)
void sortConsumables(std::string const &current_process_name)
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
double T
Definition: Xdiff_gwt.C:5
std::string const & label() const noexcept
enum BeamMode string