All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | Private Types | List of all members
proxy::AssociatedDataProxyMaker< Main, Aux, Metadata, CollProxy, Tag > Class Template Reference

Creates an associated data wrapper for the specified types. More...

#include <AssociatedDataProxyMaker.h>

Inheritance diagram for proxy::AssociatedDataProxyMaker< Main, Aux, Metadata, CollProxy, Tag >:
proxy::AssociatedDataProxyMakerBase< Main, Aux, Metadata, Tag >

Public Types

using main_element_t = Main
 Type of the main datum ("left"). More...
 
using aux_element_t = Aux
 Type of the auxiliary associated datum ("right"). More...
 
using metadata_t = Metadata
 Type of metadata in the association. More...
 
using aux_collection_proxy_t = details::AssociatedData< main_element_t, aux_element_t, metadata_t, data_tag >
 Type of associated data proxy being created. More...
 
using assns_t = typename aux_collection_proxy_t::assns_t
 Type of art association being used as input. More...
 
- Public Types inherited from proxy::AssociatedDataProxyMakerBase< Main, Aux, Metadata, Tag >
using data_tag = Tag
 Tag labelling the associated data we are going to produce. More...
 
using main_element_t = Main
 Type of the main datum ("left"). More...
 
using aux_element_t = Aux
 Type of the auxiliary associated datum ("right"). More...
 
using metadata_t = Metadata
 Type of metadata in the association. More...
 
using aux_collection_proxy_t = details::AssociatedData< main_element_t, aux_element_t, metadata_t, data_tag >
 Type of associated data proxy being created. More...
 
using assns_t = typename aux_collection_proxy_t::assns_t
 Type of art association being used as input. More...
 

Static Public Member Functions

template<typename Event , typename Handle , typename MainArgs , typename... Args>
static auto make (Event const &event, Handle &&mainHandle, MainArgs const &margs, Args &&...args)
 Create a association proxy collection using main collection tag. More...
 
- Static Public Member Functions inherited from proxy::AssociatedDataProxyMakerBase< Main, Aux, Metadata, Tag >
static auto make (Event const &event, Handle &&mainHandle, MainArgs const &mainArgs)
 Create a association proxy collection using main collection tag. More...
 
static auto make (Event const &event, Handle &&mainHandle, MainArgs const &, art::InputTag const &auxInputTag)
 Create a association proxy collection using the specified tag. More...
 
static auto make (Event const &, Handle &&, MainArgs const &, Assns const &assns)
 Create a association proxy collection using the specified tag. More...
 

Private Types

using base_t = AssociatedDataProxyMakerBase< Main, Aux, Metadata, Tag >
 

Detailed Description

template<typename Main, typename Aux, typename Metadata, typename CollProxy, typename Tag = Aux>
class proxy::AssociatedDataProxyMaker< Main, Aux, Metadata, CollProxy, Tag >

Creates an associated data wrapper for the specified types.

Template Parameters
Maintype of main datum (element) to associate from ("left")
Auxtype of datum (element) to associate to ("right")
CollProxytype of proxy this associated data works for
Tagtag for the association proxy to be created
See Also
withAssociated() This class is (indirectly) called when using proxy::withAssociated() in getCollection(). Its task is to supervise the creation of the proxy to the data association between the main data type and an auxiliary one. The interface required by withAssociated() includes:

This class can be specialized (see withAssociated() for an example). The default implementation just wraps a one-to-many art::Assns<Main, Aux> data product fulfilling "one-to-many sequential association" requirement (see the "Definitions" section in ProxyBase.h documentation).

The last template argument is designed for specialization of associations in the context of a specific proxy type.

Definition at line 197 of file AssociatedDataProxyMaker.h.

Member Typedef Documentation

template<typename Main , typename Aux , typename Metadata , typename CollProxy , typename Tag = Aux>
using proxy::AssociatedDataProxyMakerBase< Main, Aux, Metadata, AuxTag >::assns_t = typename aux_collection_proxy_t::assns_t

Type of art association being used as input.

Definition at line 69 of file AssociatedDataProxyMaker.h.

template<typename Main , typename Aux , typename Metadata , typename CollProxy , typename Tag = Aux>
using proxy::AssociatedDataProxyMakerBase< Main, Aux, Metadata, AuxTag >::aux_collection_proxy_t = details::AssociatedData <main_element_t, aux_element_t, metadata_t, data_tag>

Type of associated data proxy being created.

Definition at line 66 of file AssociatedDataProxyMaker.h.

template<typename Main , typename Aux , typename Metadata , typename CollProxy , typename Tag = Aux>
using proxy::AssociatedDataProxyMakerBase< Main, Aux, Metadata, AuxTag >::aux_element_t = Aux

Type of the auxiliary associated datum ("right").

Definition at line 59 of file AssociatedDataProxyMaker.h.

template<typename Main , typename Aux , typename Metadata , typename CollProxy , typename Tag = Aux>
using proxy::AssociatedDataProxyMaker< Main, Aux, Metadata, CollProxy, Tag >::base_t = AssociatedDataProxyMakerBase<Main, Aux, Metadata, Tag>
private

Definition at line 205 of file AssociatedDataProxyMaker.h.

template<typename Main , typename Aux , typename Metadata , typename CollProxy , typename Tag = Aux>
using proxy::AssociatedDataProxyMakerBase< Main, Aux, Metadata, AuxTag >::main_element_t = Main

Type of the main datum ("left").

Definition at line 56 of file AssociatedDataProxyMaker.h.

template<typename Main , typename Aux , typename Metadata , typename CollProxy , typename Tag = Aux>
using proxy::AssociatedDataProxyMakerBase< Main, Aux, Metadata, AuxTag >::metadata_t = Metadata

Type of metadata in the association.

Definition at line 62 of file AssociatedDataProxyMaker.h.

Member Function Documentation

template<typename Main , typename Aux , typename Metadata , typename CollProxy , typename Tag = Aux>
template<typename Event , typename Handle , typename MainArgs , typename... Args>
static auto proxy::AssociatedDataProxyMaker< Main, Aux, Metadata, CollProxy, Tag >::make ( Event const &  event,
Handle &&  mainHandle,
MainArgs const &  margs,
Args &&...  args 
)
inlinestatic

Create a association proxy collection using main collection tag.

Template Parameters
Eventtype of the event to read associations from
Handletype of data product handle
MainArgsany type convertible to art::InputTag
Argsoptional single type (art::InputTag required)
Parameters
eventthe event to read associations from
mainHandlehandle of the main collection data product
margsan object describing the main data product
argsinput tag for associated data, if different from main
Returns
an auxiliary data proxy object

The returned object exposes a random access container interface, with data indexed by the index of the corresponding object in the main collection.

This implementation requires margs object to be convertible by explicit type cast into a art::InputTag; that input tag will be used to fetch the association.

Definition at line 246 of file AssociatedDataProxyMaker.h.

250  {
251  return base_t::make(
252  event,
253  std::forward<Handle>(mainHandle),
254  margs,
255  std::forward<Args>(args)...
256  );
257  }
static auto make(Event const &event, Handle &&mainHandle, MainArgs const &mainArgs)
Create a association proxy collection using main collection tag.

The documentation for this class was generated from the following file: