LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag > Class Template Reference

Helper to create associated data proxy. More...

#include "WithAssociatedStructBase.h"

Public Types

template<typename CollProxy >
using aux_collection_proxy_t = typename proxy_maker_t< CollProxy >::aux_collection_proxy_t
 Type of association proxy created for the specified CollProxy. More...
 

Public Member Functions

 WithAssociatedStructBase (ArgTuple &&args)
 
template<typename CollProxy , typename Event , typename Handle , typename MainArgs >
auto createAuxProxyMaker (Event const &event, Handle &&mainHandle, MainArgs const &mainArgs)
 Creates the associated data proxy by means of ProxyMaker. More...
 

Protected Member Functions

template<typename CollProxy , typename Event , typename Handle , typename MainArgs , std::size_t... I>
auto createAssnProxyMaker (Event const &event, Handle &&mainHandle, MainArgs const &mainArgs, std::index_sequence< I... >)
 

Protected Attributes

ArgTuple args
 Argument construction storage as tuple. More...
 

Static Protected Attributes

static constexpr std::size_t NArgs = std::tuple_size<ArgTuple>()
 Number of arguments stored. More...
 

Private Types

template<typename CollProxy >
using main_t = typename CollProxy::main_element_t
 Type of main data product element from a proxy of type CollProxy. More...
 
using aux_t = Aux
 Type of associated data. More...
 
using metadata_t = Metadata
 Type of associated metadata. More...
 
using tag = AuxTag
 Tag for the associated data (same as the data type itself). More...
 
template<typename CollProxy >
using proxy_maker_t = ProxyMaker< CollProxy >
 Class to create the data proxy associated to a CollProxy. More...
 

Detailed Description

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
class proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >

Helper to create associated data proxy.

Template Parameters
Auxtype of data associated to the main one
Metadatatype of metadata of the association
ArgTupletype of arguments required for the creation of proxy
ProxyMakertemplate type of the proxy maker class
AuxTagtag for the associated data (default: as Aux)

This class stores user arguments for the construction of a proxy to associated data of type Aux. It can use that information plus some additional one to create the associated data itself. This additional information is provided by getCollection().

The association will be identified by type AuxTag.

This is not a customization point: to have a custom associated data produced, choose and then specialize the ProxyMaker class.

Definition at line 68 of file WithAssociatedStructBase.h.

Member Typedef Documentation

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
template<typename CollProxy >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::aux_collection_proxy_t = typename proxy_maker_t<CollProxy>::aux_collection_proxy_t

Type of association proxy created for the specified CollProxy.

Definition at line 90 of file WithAssociatedStructBase.h.

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::aux_t = Aux
private

Type of associated data.

Definition at line 75 of file WithAssociatedStructBase.h.

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
template<typename CollProxy >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::main_t = typename CollProxy::main_element_t
private

Type of main data product element from a proxy of type CollProxy.

Definition at line 72 of file WithAssociatedStructBase.h.

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::metadata_t = Metadata
private

Type of associated metadata.

Definition at line 78 of file WithAssociatedStructBase.h.

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
template<typename CollProxy >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::proxy_maker_t = ProxyMaker<CollProxy>
private

Class to create the data proxy associated to a CollProxy.

Definition at line 85 of file WithAssociatedStructBase.h.

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::tag = AuxTag
private

Tag for the associated data (same as the data type itself).

Definition at line 81 of file WithAssociatedStructBase.h.

Constructor & Destructor Documentation

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::WithAssociatedStructBase ( ArgTuple &&  args)
inline

Constructor: steals the arguments, to be used by createAuxProxyMaker().

Definition at line 94 of file WithAssociatedStructBase.h.

94 : args(std::move(args)) {}
ArgTuple args
Argument construction storage as tuple.

Member Function Documentation

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
template<typename CollProxy , typename Event , typename Handle , typename MainArgs , std::size_t... I>
auto proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::createAssnProxyMaker ( Event const &  event,
Handle &&  mainHandle,
MainArgs const &  mainArgs,
std::index_sequence< I... >   
)
inlineprotected

Definition at line 116 of file WithAssociatedStructBase.h.

References art::InputSourceFactory::make().

120  {
122  event, mainHandle, mainArgs, std::get<I>(std::forward<ArgTuple>(args))...);
123  }
std::unique_ptr< InputSource > make(fhicl::ParameterSet const &conf, InputSourceDescription &desc)
ArgTuple args
Argument construction storage as tuple.
Event finding and building.
template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
template<typename CollProxy , typename Event , typename Handle , typename MainArgs >
auto proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::createAuxProxyMaker ( Event const &  event,
Handle &&  mainHandle,
MainArgs const &  mainArgs 
)
inline

Creates the associated data proxy by means of ProxyMaker.

Definition at line 98 of file WithAssociatedStructBase.h.

99  {
100  return createAssnProxyMaker<CollProxy>(
101  event, std::forward<Handle>(mainHandle), mainArgs, std::make_index_sequence<NArgs>());
102  } // construct()
Event finding and building.

Member Data Documentation

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
ArgTuple proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::args
protected

Argument construction storage as tuple.

Definition at line 105 of file WithAssociatedStructBase.h.

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
constexpr std::size_t proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::NArgs = std::tuple_size<ArgTuple>()
staticprotected

Number of arguments stored.

Definition at line 108 of file WithAssociatedStructBase.h.


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