11 #ifndef LARDATA_RECOBASEPROXY_PROXYBASE_PARALLELDATA_H 12 #define LARDATA_RECOBASEPROXY_PROXYBASE_PARALLELDATA_H 20 #include <type_traits> 52 template <
typename AuxColl,
typename Aux = util::collection_value_t<AuxColl>,
typename Tag = Aux>
70 template <
typename AuxColl,
92 using auxiliary_data_t = decltype(util::makeTagged<tag>(std::declval<aux_element_t>()));
98 auto begin() const -> decltype(auto) {
return fData->begin(); }
101 auto end() const -> decltype(auto) {
return fData->end(); }
107 "Inconsistent data types.");
112 template <
typename TestTag>
115 return std::is_same<TestTag, tag>();
129 return util::makeTagged<tag>(fData->operator[](index));
151 template <
typename AuxColl,
167 #endif // LARDATA_RECOBASEPROXY_PROXYBASE_PARALLELDATA_H Object to draft parallel data interface.
auto begin() const -> decltype(auto)
Returns an iterator pointing to the first data element.
parallel_data_t const * data() const
Returns a pointer to the whole data collection.
parallel_data_t const * fData
Reference to the original data product.
util::collection_value_constant_access_t< AuxProxyColl > aux_element_t
Type returned when accessing an auxiliary collection element.
static constexpr bool hasTag()
Returns whether this data is labeled with the specified tag.
auto operator[](std::size_t index) const -> decltype(auto)
Returns the element with the specified index (no check performed).
AuxColl parallel_data_t
Type of auxiliary collection.
Encloses LArSoft data product proxy objects and utilities.See this doxygen module for an introduction...
auto makeParallelData(AuxColl const &data)
Wraps a collection into a parallel data collection object.
parallel_data_t const & dataRef() const
Returns a reference to the whole data collection.
auto end() const -> decltype(auto)
Returns an iterator pointing past the last data element.
Aux aux_t
Type of the value of auxiliary collection element.
ParallelData(parallel_data_t const &data)
Constructor: points to the specified data collection.
Utilities to address elements of a tuple-like class by tag.
decltype(util::makeTagged< tag >(std::declval< aux_element_t >())) auxiliary_data_t
Type returned when accessing auxiliary data.
Tag tag
Tag of this association proxy.
typename parallel_data_t::const_iterator parallel_data_iterator_t
auto getElement(std::size_t index) const -> decltype(auto)