LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
proxy::details::ProxyAsParallelData< AuxProxyColl, Aux, Tag > Struct Template Reference

Object presenting a proxy as parallel data for another one. More...

#include "ProxyAsParallelData.h"

Inheritance diagram for proxy::details::ProxyAsParallelData< AuxProxyColl, Aux, Tag >:
proxy::details::ParallelData< AuxProxyColl, Aux, Tag >

Public Types

using tag = Tag
 Tag of this association proxy. More...
 
using auxiliary_data_t = decltype(util::makeTagged< tag >(std::declval< aux_element_t >()))
 Type returned when accessing auxiliary data. More...
 

Public Member Functions

 ProxyAsParallelData (AuxProxyColl &&proxy)
 Steals and wraps collection proxy. More...
 
auto begin () const -> decltype(auto)
 Returns an iterator pointing to the first data element. More...
 
auto end () const -> decltype(auto)
 Returns an iterator pointing past the last data element. More...
 
auto operator[] (std::size_t index) const -> decltype(auto)
 Returns the element with the specified index (no check performed). More...
 
parallel_data_t const * data () const
 Returns a pointer to the whole data collection. More...
 
parallel_data_t const & dataRef () const
 Returns a reference to the whole data collection. More...
 

Static Public Member Functions

static constexpr bool hasTag ()
 Returns whether this data is labeled with the specified tag. More...
 

Detailed Description

template<typename AuxProxyColl, typename Aux, typename Tag>
struct proxy::details::ProxyAsParallelData< AuxProxyColl, Aux, Tag >

Object presenting a proxy as parallel data for another one.

Template Parameters
AuxProxyColltype of the parallel data collection
Auxtype of the associated object
Tagtag this data is labeled with

This object inherits its interface from proxy::ParallelData. In addition, it owns the proxy it wraps.

Definition at line 32 of file ProxyAsParallelData.h.

Member Typedef Documentation

using proxy::details::ParallelData< AuxProxyColl , Aux, Tag >::auxiliary_data_t = decltype(util::makeTagged<tag>(std::declval<aux_element_t>()))
inherited

Type returned when accessing auxiliary data.

Definition at line 101 of file ParallelData.h.

using proxy::details::ParallelData< AuxProxyColl , Aux, Tag >::tag = Tag
inherited

Tag of this association proxy.

Definition at line 97 of file ParallelData.h.

Constructor & Destructor Documentation

template<typename AuxProxyColl, typename Aux, typename Tag>
proxy::details::ProxyAsParallelData< AuxProxyColl, Aux, Tag >::ProxyAsParallelData ( AuxProxyColl &&  proxy)
inline

Steals and wraps collection proxy.

Definition at line 89 of file ProxyAsParallelData.h.

90  : AuxProxyColl(std::move(proxy))
91  , ParallelData<AuxProxyColl, Aux, Tag>
92  (static_cast<AuxProxyColl const*>(this))
93  {}
Encloses LArSoft data product proxy objects and utilities.See this doxygen module for an introduction...

Member Function Documentation

auto proxy::details::ParallelData< AuxProxyColl , Aux, Tag >::begin ( ) const-> decltype(auto)
inlineinherited

Returns an iterator pointing to the first data element.

Definition at line 109 of file ParallelData.h.

References proxy::details::ParallelData< AuxColl, Aux, Tag >::fData.

110  { return fData->begin(); }
parallel_data_t const * fData
Reference to the original data product.
Definition: ParallelData.h:138
parallel_data_t const* proxy::details::ParallelData< AuxProxyColl , Aux, Tag >::data ( ) const
inlineinherited

Returns a pointer to the whole data collection.

Definition at line 131 of file ParallelData.h.

References proxy::details::ParallelData< AuxColl, Aux, Tag >::fData.

131 { return fData; }
parallel_data_t const * fData
Reference to the original data product.
Definition: ParallelData.h:138
parallel_data_t const& proxy::details::ParallelData< AuxProxyColl , Aux, Tag >::dataRef ( ) const
inlineinherited

Returns a reference to the whole data collection.

Definition at line 134 of file ParallelData.h.

References proxy::details::ParallelData< AuxColl, Aux, Tag >::data().

134 { return *(data()); }
parallel_data_t const * data() const
Returns a pointer to the whole data collection.
Definition: ParallelData.h:131
auto proxy::details::ParallelData< AuxProxyColl , Aux, Tag >::end ( void  ) const-> decltype(auto)
inlineinherited

Returns an iterator pointing past the last data element.

Definition at line 113 of file ParallelData.h.

References proxy::details::ParallelData< AuxColl, Aux, Tag >::fData.

114  { return fData->end(); }
parallel_data_t const * fData
Reference to the original data product.
Definition: ParallelData.h:138
static constexpr bool proxy::details::ParallelData< AuxProxyColl , Aux, Tag >::hasTag ( )
inlinestaticinherited

Returns whether this data is labeled with the specified tag.

Definition at line 128 of file ParallelData.h.

128 { return std::is_same<TestTag, tag>(); }
auto proxy::details::ParallelData< AuxProxyColl , Aux, Tag >::operator[] ( std::size_t  index) const-> decltype(auto)
inlineinherited

Returns the element with the specified index (no check performed).

Definition at line 117 of file ParallelData.h.

References proxy::details::ParallelData< AuxColl, Aux, Tag >::getElement().

118  {
119  static_assert(
120  std::is_convertible<decltype(getElement(index)), auxiliary_data_t>(),
121  "Inconsistent data types."
122  );
123  return getElement(index);
124  }
auto getElement(std::size_t index) const -> decltype(auto)
Definition: ParallelData.h:140
decltype(util::makeTagged< tag >(std::declval< aux_element_t >())) auxiliary_data_t
Type returned when accessing auxiliary data.
Definition: ParallelData.h:101

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