LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
proxy::ProxyAsAuxProxyMaker< Main, AuxProxy, CollProxy, Tag > Class Template Reference

Creates an auxiliary proxy wrapper for the specified proxy. More...

#include "ProxyAsAuxProxyMaker.h"

Inheritance diagram for proxy::ProxyAsAuxProxyMaker< Main, AuxProxy, CollProxy, Tag >:
proxy::ProxyAsAuxProxyMakerBase< Main, AuxProxy, Tag >

Public Types

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. More...
 
using aux_proxy_t = AuxProxy
 Tag-type of the auxiliary proxy (not the type of the proxy!). More...
 

Static Public Member Functions

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. More...
 

Detailed Description

template<typename Main, typename AuxProxy, typename CollProxy, typename Tag = util::collection_value_t<AuxProxy>>
class proxy::ProxyAsAuxProxyMaker< Main, AuxProxy, CollProxy, Tag >

Creates an auxiliary proxy wrapper for the specified proxy.

Template Parameters
Maintype of main datum (element) to associate from ("left")
AuxProxytype of proxy collection to be associated
CollProxytype of proxy this associated data works for
Tagtag for the association proxy to be created
See also
withCollectionProxy()

This class is (indirectly) called when using proxy::withCollectionProxy() in getCollection(). Its task is to supervise the creation of the collection proxy that is used as auxiliary data for the main data type. The interface required by withCollectionProxy() includes:

  • a static make() method creating and returning the auxiliary data proxy with arguments an event, the main data product handle, a template argument representing the main collection information, and all the arguments required for the creation of the auxiliary collection proxy (coming from withCollectionProxy()); equivalent to the signature:
    template <typename Event, typename Handle, typename MainArg, typename... Args>
    auto make(Event const&, Handle&&, MainArg const&, Args&&...);

This class can be specialized. The default implementation just uses getCollection() to create the auxiliary proxy, and merges it to the main collection proxy in a fashion similar to parallel data.

The template argument CollProxy is designed for specialization of auxiliary data in the context of a specific proxy type.

Definition at line 149 of file ProxyAsAuxProxyMaker.h.

Member Typedef Documentation

using proxy::ProxyAsAuxProxyMakerBase< Main, AuxProxy, Tag >::aux_proxy_t = AuxProxy
inherited

Tag-type of the auxiliary proxy (not the type of the proxy!).

Definition at line 58 of file ProxyAsAuxProxyMaker.h.

using proxy::ProxyAsAuxProxyMakerBase< Main, AuxProxy, Tag >::data_tag = Tag
inherited

Tag labelling the associated data we are going to produce.

Definition at line 52 of file ProxyAsAuxProxyMaker.h.

using proxy::ProxyAsAuxProxyMakerBase< Main, AuxProxy, Tag >::main_element_t = Main
inherited

Type of the main datum.

Definition at line 55 of file ProxyAsAuxProxyMaker.h.

Member Function Documentation

static auto proxy::ProxyAsAuxProxyMakerBase< Main, AuxProxy, Tag >::make ( Event const &  event,
Handle &&  ,
MainArgs const &  ,
art::InputTag const &  auxProxyTag,
AuxArgs &&...  args 
)
inlinestaticinherited

Create a parallel data proxy collection using the specified tag.

Template Parameters
Eventtype of the event to read data from
Handle(unused) type of handle to the main data product
MainArgs(unused) any type convertible to art::InputTag
AuxArgstype of arguments for the creation of the auxiliary proxy
Parameters
eventevent to create the proxy from
auxProxyTagtag for the creation of the auxiliary collection proxy
argsother arguments for the creation of the auxiliary proxy
Returns
a auxiliary proxy data object

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

The tag of the main collection proxy is ignored even if present, and the caller must specify it.

Definition at line 80 of file ProxyAsAuxProxyMaker.h.

References proxy::ProxyAsAuxProxyMakerBase< Main, AuxProxy, AuxTag >::makeAuxiliaryProxy(), and proxy::makeProxyAsParallelData().

Referenced by proxy::details::WithProxyAsAuxStructBase< AuxProxy, ArgTuple, AuxTag >::createAuxProxyImpl().

84  {
85  auto auxProxy = makeAuxiliaryProxy
86  (event, auxProxyTag, std::forward<AuxArgs>(args)...);
89  (std::move(auxProxy));
90  }
Tag data_tag
Tag labelling the associated data we are going to produce.
static auto makeAuxiliaryProxy(Event const &event, art::InputTag const &auxProxyTag, AuxArgs &&...args)
Creates the proxy to be used as parallel data.
auto makeProxyAsParallelData(AuxProxyColl &&auxProxy)
typename collection_value_type< Coll >::type collection_value_t
Type contained in the collection Coll.
Definition: ContainerMeta.h:65
Event finding and building.

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