LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ProxyAsAuxProxyMaker.h
Go to the documentation of this file.
1 
11 #ifndef LARDATA_RECOBASEPROXY_PROXYBASE_PROXYASAUXPROXYMAKER_H
12 #define LARDATA_RECOBASEPROXY_PROXYBASE_PROXYASAUXPROXYMAKER_H
13 
14 // LArSoft libraries
17 #include "larcorealg/CoreUtils/ContainerMeta.h" // util::collection_value_t, ...
18 
19 // framework libraries
21 
22 // C/C++ standard
23 #include <utility> // std::forward(), std::move()
24 
25 
26 namespace proxy {
27 
31 
44  template <
45  typename Main,
46  typename AuxProxy,
47  typename AuxTag = AuxProxy
48  >
50 
52  using data_tag = AuxTag;
53 
55  using main_element_t = Main;
56 
58  using aux_proxy_t = AuxProxy;
59 
78  template
79  <typename Event, typename Handle, typename MainArgs, typename... AuxArgs>
80  static auto make(
81  Event const& event, Handle&&, MainArgs const&,
82  art::InputTag const& auxProxyTag, AuxArgs&&... args
83  )
84  {
85  auto auxProxy = makeAuxiliaryProxy
86  (event, auxProxyTag, std::forward<AuxArgs>(args)...);
89  (std::move(auxProxy));
90  }
91 
92 
93  private:
94 
96  template <typename Event, typename... AuxArgs>
97  static auto makeAuxiliaryProxy(
98  Event const& event,
99  art::InputTag const& auxProxyTag,
100  AuxArgs&&... args
101  )
102  {
103  return getCollection<aux_proxy_t>
104  (event, auxProxyTag, std::forward<AuxArgs>(args)...);
105  }
106 
107 
108  }; // struct ProxyAsAuxProxyMakerBase<>
109 
110 
111  //--------------------------------------------------------------------------
143  template <
144  typename Main,
145  typename AuxProxy,
146  typename CollProxy,
148  >
150  : public ProxyAsAuxProxyMakerBase<Main, AuxProxy, Tag>
151  {};
152 
153 
156 
157 
158 } // namespace proxy
159 
160 
161 #endif // LARDATA_RECOBASEPROXY_PROXYBASE_PROXYASAUXPROXYMAKER_H
Tag data_tag
Tag labelling the associated data we are going to produce.
AuxProxy aux_proxy_t
Tag-type of the auxiliary proxy (not the type of the proxy!).
static auto makeAuxiliaryProxy(Event const &event, art::InputTag const &auxProxyTag, AuxArgs &&...args)
Creates the proxy to be used as parallel data.
Creates an auxiliary proxy wrapper for the specified proxy.
Encloses LArSoft data product proxy objects and utilities.See this doxygen module for an introduction...
Data encapsulating a collection proxy as auxiliary data.
Creates a proxy wrapper for merging into another proxy ("main").
static auto make(Event const &event, Handle &&, MainArgs const &, art::InputTag const &auxProxyTag, AuxArgs &&...args)
Create a parallel data proxy collection using the specified tag.
Creation of a collection proxy.
auto makeProxyAsParallelData(AuxProxyColl &&auxProxy)
typename collection_value_type< Coll >::type collection_value_t
Type contained in the collection Coll.
Definition: ContainerMeta.h:65
C++ metaprogramming utilities for dealing with containers.
Event finding and building.