11 #ifndef LARDATA_RECOBASEPROXY_PROXYBASE_MAKEASSOCIATEDDATAFROM_H
12 #define LARDATA_RECOBASEPROXY_PROXYBASE_MAKEASSOCIATEDDATAFROM_H
19 #include "canvas/Persistency/Common/Assns.h"
20 #include "canvas/Utilities/InputTag.h"
34 template <
typename Tag,
typename Assns>
36 {
return proxy::makeAssociatedData<Tag>(assns, minSize); }
38 template <
typename Assns>
40 {
return makeAssociatedDataFrom<typename Assns::right_t>(assns, minSize); }
68 typename Main,
typename Aux,
typename Metadata,
typename Tag,
72 (Event
const& event, art::InputTag
const& tag, std::size_t minSize = 0);
74 template <
typename Main,
typename Aux,
typename Metadata,
typename Event>
76 (Event
const& event, art::InputTag
const& tag, std::size_t minSize = 0)
78 return makeAssociatedDataFrom<Main, Aux, Metadata, Aux, Event>
79 (event, tag, minSize);
82 template <
typename Main,
typename Aux,
typename Event>
84 (Event
const& event, art::InputTag
const& tag, std::size_t minSize = 0)
86 return makeAssociatedDataFrom<Main, Aux, void, Aux, Event>
87 (event, tag, minSize);
116 typename Aux,
typename Metadata,
typename Tag,
117 typename Handle,
typename Event
120 (Handle&& handle, Event
const& event, art::InputTag
const& tag);
122 template <
typename Aux,
typename Metadata,
typename Handle,
typename Event>
124 (Handle&& handle, Event
const& event, art::InputTag
const& tag)
126 return makeAssociatedDataFrom<Aux, Metadata, Aux, Handle, Event>
127 (std::forward<Handle>(handle), event, tag);
130 template <
typename Aux,
typename Handle,
typename Event>
132 (Handle&& handle, Event
const& event, art::InputTag
const& tag)
134 return makeAssociatedDataFrom<Aux, void, Aux, Handle, Event>
135 (std::forward<Handle>(handle), event, tag);
153 template <
typename Tag,
typename MainColl,
typename Assns>
155 {
return proxy::makeAssociatedData<Tag>(assns, mainColl.size()); }
157 template <
typename MainColl,
typename Assns>
159 {
return makeAssociatedDataFrom<typename Assns::right_t>(mainColl, assns); }
181 typename Main,
typename Aux,
typename Metadata,
typename Tag,
185 Event
const& event, art::InputTag
const& tag, std::size_t minSize
190 using Metadata_t = Metadata;
191 using AssociatedData_t
193 using Assns_t =
typename AssociatedData_t::assns_t;
196 makeAssociatedDataFrom<Tag>(*(
event.template getValidHandle<Assns_t>(tag)));
203 typename Aux,
typename Metadata,
typename Tag,
204 typename Handle,
typename Event
207 (Handle&& handle, Event
const& event, art::InputTag
const& tag)
212 using Metadata_t = Metadata;
213 return makeAssociatedDataFrom<Main_t, Aux_t, Metadata_t, Tag>
214 (event, tag, handle->size());
221 #endif // LARDATA_RECOBASEPROXY_PROXYBASE_MAKEASSOCIATEDDATAFROM_H
auto makeAssociatedDataFrom(Assns const &assns, std::size_t minSize=0)
Auxiliary data from one-to-many sequential association.
Object to draft associated data interface.