LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 28 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 92 of file ParallelData.h.

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

Tag of this association proxy.

Definition at line 89 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 75 of file ProxyAsParallelData.h.

76  : AuxProxyColl(std::move(proxy))
77  , ParallelData<AuxProxyColl, Aux, Tag>(static_cast<AuxProxyColl const*>(this))
78  {}
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 98 of file ParallelData.h.

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

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

Returns a pointer to the whole data collection.

Definition at line 119 of file ParallelData.h.

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

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

Returns a reference to the whole data collection.

Definition at line 122 of file ParallelData.h.

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

122 { return *(data()); }
parallel_data_t const * data() const
Returns a pointer to the whole data collection.
Definition: ParallelData.h:119
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 101 of file ParallelData.h.

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

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

Returns whether this data is labeled with the specified tag.

Definition at line 113 of file ParallelData.h.

114  {
115  return std::is_same<TestTag, tag>();
116  }
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 104 of file ParallelData.h.

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

105  {
106  static_assert(std::is_convertible<decltype(getElement(index)), auxiliary_data_t>(),
107  "Inconsistent data types.");
108  return getElement(index);
109  }
decltype(util::makeTagged< tag >(std::declval< aux_element_t >())) auxiliary_data_t
Type returned when accessing auxiliary data.
Definition: ParallelData.h:92
auto getElement(std::size_t index) const -> decltype(auto)
Definition: ParallelData.h:127

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