All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions

Classes

class  IteratorWrapperBase
 Simple iterator wrapper for manipulation of dereferenced result. More...
 
class  AssnsNode
 This type extends the interface of the art pointer to Assns right side. More...
 
struct  AssnsIterTraits
 Traits for a association iterator. More...
 
class  assns_node_iterator
 
class  BoundaryListRangeBase
 
class  BoundaryListRange
 A BoundaryListRangeBase with a full container interface. More...
 
class  BoundaryListRangeIterator
 Iterator exposing elements of a boundary list as ranges. More...
 
class  BoundaryList
 Builds and keeps track of internal boundaries in a sequence. More...
 
class  AssociatedData
 Object to draft associated data interface. More...
 
struct  AssociatedDataProxyMakerWrapper
 
class  IndexBasedIterator
 Iterator to random access collection storing a current index. More...
 
struct  TemplateAdaptorOnePlus
 
struct  TemplateAdaptorOnePlus< F, First, Others...>
 
struct  SubstituteWithAuxList
 
struct  SubstituteWithAuxList< std::tuple< T...> >
 
struct  CollectionProxyImplFromTraitsImpl
 
struct  CollectionProxyImplFromTraitsImpl< Traits, std::enable_if_t< util::always_true_v< typename Traits::template collection_proxy_impl_t< Args...> > >, Args... >
 
struct  MainCollectionProxy
 Wrapper for the main collection of a proxy. More...
 
class  OneTo01Data
 Object for one-to-zero/or/one associated data interface. More...
 
struct  OneTo01DataProxyMakerWrapper
 
class  ParallelData
 Object to draft parallel data interface. More...
 
struct  ParallelDataProxyMakerWrapper
 
struct  ParallelDataProxyMakerWrapper< Aux, AuxTag, void >
 
struct  ProxyAsParallelData
 Object presenting a proxy as parallel data for another one. More...
 
class  WithAssociatedStructBase
 Helper to create associated data proxy. More...
 
class  WithProxyAsAuxStructBase
 Helper to create a proxy as auxiliary data for another proxy. More...
 
struct  TrackPointIteratorBox
 Structure for range-for iteration. More...
 
struct  isTrackProxy
 
struct  StaticAsserts
 
struct  StaticAsserts< TrackPointWrapper< Data > >
 
struct  isTrackProxy< Track< TrackCollProxy > >
 

Typedefs

template<typename Traits , typename... Args>
using CollectionProxyImplFromTraits_t = typename CollectionProxyImplFromTraitsImpl< Traits, void, Args...>::type
 
template<typename Aux , typename Metadata , typename ArgTuple , typename AuxTag = Aux>
using WithAssociatedStruct = WithAssociatedStructBase< Aux, Metadata, ArgTuple, AssociatedDataProxyMakerWrapper< Aux, Metadata, AuxTag >::template maker_t, AuxTag >
 
template<typename Aux , typename ArgTuple , typename AuxTag = Aux>
using WithParallelCollectionStruct = WithAssociatedStructBase< Aux, void, ArgTuple, ParallelDataProxyMakerWrapper< Aux, AuxTag >::template maker_t, AuxTag >
 
template<typename Aux , typename ArgTuple , typename AuxColl , typename AuxTag = Aux>
using WithWrappedParallelCollectionStruct = WithAssociatedStructBase< Aux, void, ArgTuple, ParallelDataProxyMakerWrapper< Aux, AuxTag, AuxColl >::template maker_t, AuxTag >
 
template<typename Aux , typename Metadata , typename ArgTuple , typename AuxTag = Aux>
using WithOneTo01AssociatedStruct = WithAssociatedStructBase< Aux, Metadata, ArgTuple, OneTo01DataProxyMakerWrapper< Aux, Metadata, AuxTag >::template maker_t, AuxTag >
 

Functions

template<typename ArtAssnsIterValue >
bool operator== (AssnsNode< ArtAssnsIterValue > const &A, typename AssnsNode< ArtAssnsIterValue >::valueptr_t const &B)
 
template<typename ArtAssnsIterValue >
bool operator== (typename AssnsNode< ArtAssnsIterValue >::valueptr_t const &A, AssnsNode< ArtAssnsIterValue > const &B)
 
template<typename ArtAssnsIterValue >
bool operator!= (AssnsNode< ArtAssnsIterValue > const &A, typename AssnsNode< ArtAssnsIterValue >::valueptr_t const &B)
 
template<typename ArtAssnsIterValue >
bool operator!= (typename AssnsNode< ArtAssnsIterValue >::valueptr_t const &A, AssnsNode< ArtAssnsIterValue > const &B)
 
template<typename ArtAssnsIterValue >
AssnsNode< ArtAssnsIterValue >
const & 
makeAssnsNode (ArtAssnsIterValue const &from)
 Reinterprets the specified association node as a AssnsNode. More...
 
template<typename BoundaryIter >
BoundaryListRange< BoundaryIter > makeBoundaryListRange (BoundaryIter const &iBegin)
 Reinterprets a iterator to boundaries list as a range collection. More...
 
template<std::size_t GroupKey, typename Iter >
BoundaryList< Iter >::boundaries_t associationRangesImpl (Iter begin, Iter end, std::size_t expectedSize)
 
template<std::size_t GroupKey, typename Iter >
auto associationRangeBoundaries (Iter begin, Iter end)
 
template<std::size_t GroupKey, typename Iter >
auto associationRangeBoundaries (Iter begin, Iter end, std::size_t n)
 
template<std::size_t GroupKey, typename Iter >
BoundaryList< Iter > associationRanges (Iter begin, Iter end)
 Groups associations by the first key. More...
 
template<std::size_t GroupKey, typename Iter >
BoundaryList< Iter > associationRanges (Iter begin, Iter end, std::size_t n)
 Groups associations by the first key. More...
 
template<template< typename...> class CollProxy, typename MainColl , typename... AuxColl>
auto createCollectionProxy (MainColl const &main, AuxColl &&...aux)
 Creates a collection proxy of a specified type with the given arguments. More...
 
template<typename MainColl , typename... AuxColl>
auto makeCollectionProxy (MainColl const &main, AuxColl &&...aux)
 Creates a CollectionProxy object with the given arguments. More...
 
template<typename ProxyElement , typename... AuxData>
auto makeCollectionProxyElement (std::size_t index, typename ProxyElement::main_element_t const &main, AuxData &&...auxData)
 Creates a collection proxy element object from data structures. More...
 
template<typename Traits , typename... Args>
auto createCollectionProxyFromTraits (Args &&...args)
 
template<typename T >
void extendAndAssign (std::vector< T > &v, typename std::vector< T >::size_type index, typename std::vector< T >::value_type const &value)
 
template<typename T >
void extendAndAssign (std::vector< T > &v, typename std::vector< T >::size_type index, typename std::vector< T >::value_type &&value)
 
template<std::size_t Key, std::size_t Data, typename Iter >
auto associationOneToOneFullSequence (Iter begin, Iter end, std::size_t n)
 

Detailed Description

— END Infrastructure for proxies as auxiliary data ------------------—

Typedef Documentation

template<typename Traits , typename... Args>
using proxy::details::CollectionProxyImplFromTraits_t = typedef typename CollectionProxyImplFromTraitsImpl<Traits, void, Args...>::type

Traits::collection_proxy_impl_t if that (template) type exists, proxy::CollectionProxy otherwise.

Definition at line 258 of file CollectionProxyMaker.h.

template<typename Aux , typename Metadata , typename ArgTuple , typename AuxTag = Aux>
using proxy::details::WithAssociatedStruct = typedef WithAssociatedStructBase< Aux, Metadata, ArgTuple, AssociatedDataProxyMakerWrapper<Aux, Metadata, AuxTag>::template maker_t, AuxTag >

Definition at line 63 of file withAssociated.h.

template<typename Aux , typename Metadata , typename ArgTuple , typename AuxTag = Aux>
using proxy::details::WithOneTo01AssociatedStruct = typedef WithAssociatedStructBase< Aux, Metadata, ArgTuple, OneTo01DataProxyMakerWrapper<Aux, Metadata, AuxTag>::template maker_t, AuxTag >

Definition at line 37 of file withZeroOrOne.h.

template<typename Aux , typename ArgTuple , typename AuxTag = Aux>
using proxy::details::WithParallelCollectionStruct = typedef WithAssociatedStructBase< Aux, void, ArgTuple, ParallelDataProxyMakerWrapper<Aux, AuxTag>::template maker_t, AuxTag >

Definition at line 37 of file withParallelData.h.

template<typename Aux , typename ArgTuple , typename AuxColl , typename AuxTag = Aux>
using proxy::details::WithWrappedParallelCollectionStruct = typedef WithAssociatedStructBase< Aux, void, ArgTuple, ParallelDataProxyMakerWrapper<Aux, AuxTag, AuxColl>::template maker_t, AuxTag >

Definition at line 48 of file withParallelData.h.

Function Documentation

template<std::size_t Key, std::size_t Data, typename Iter >
auto proxy::details::associationOneToOneFullSequence ( Iter  begin,
Iter  end,
std::size_t  n 
)

Definition at line 246 of file OneTo01Data.h.

246  {
247  //
248  // Here we are actually not using the assumption that the keys are in
249  // increasing order; which is just as good as long as we use a fast random
250  // access container as STL vector.
251  // We do assume the key side of the association to be valid, though.
252  //
253  using value_type = typename Iter::value_type;
254  using data_t = std::tuple_element_t<Data, value_type>;
255  std::vector<data_t> data(n); // all default-constructed
256  for (auto it = begin; it != end; ++it) {
257  auto const& keyPtr = std::get<Key>(*it);
258  extendAndAssign(data, keyPtr.key(), std::get<Data>(*it));
259  }
260  return data;
261  } // associationOneToOneFullSequence(Iter, Iter, std::size_t)
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
void extendAndAssign(std::vector< T > &v, typename std::vector< T >::size_type index, typename std::vector< T >::value_type const &value)
Definition: OneTo01Data.h:214
template<std::size_t GroupKey, typename Iter >
auto proxy::details::associationRangeBoundaries ( Iter  begin,
Iter  end 
)

Definition at line 960 of file AssociatedData.h.

961  { return associationRangesImpl<GroupKey, Iter>(begin, end); }
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
template<std::size_t GroupKey, typename Iter >
auto proxy::details::associationRangeBoundaries ( Iter  begin,
Iter  end,
std::size_t  n 
)

Definition at line 966 of file AssociatedData.h.

966  {
967  auto boundaries = associationRangesImpl<GroupKey, Iter>(begin, end, n);
968  if (boundaries.size() <= n) {
969  boundaries.insert
970  (boundaries.end(), n + 1 - boundaries.size(), boundaries.back());
971  assert(boundaries.size() == (n + 1));
972  }
973  return boundaries;
974  } // associationRangeBoundaries(Iter, Iter, std::size_t)
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
template<std::size_t GroupKey, typename Iter >
BoundaryList<Iter> proxy::details::associationRanges ( Iter  begin,
Iter  end 
)

Groups associations by the first key.

Template Parameters
GroupKeyindex of the key in the tuple pointed by the iterator
Itertype of iterators delimiting the data (same type required)
Parameters
beginiterator to the first association in the list
enditerator past the last association in the list
Returns
a list of range boundaries marking the different groups.
Exceptions
std::runtime_errorif input key is not monotonic

The input iterators are expected to point to a tuple-like structure whose key element can be accessed as std::get<GroupKey>() and is an art pointer of some sort.

The index of the grouping key is expected to be monotonically increasing. Gaps are supported except that at the end: if e.g. an association of 5 keys associates objects to only elements #0, #1 and #3, the resulting list will cover 4 ranges for elements #0 to #3 included, but excluding the end elements, the existence of which can't be inferred from the association list in input. In this example, the range #2 will exist and be empty. To enforce a minimum number of elements, use associationRanges(Iter, Iter, std::size_t).

Definition at line 1001 of file AssociatedData.h.

1002  {
1003  return BoundaryList<Iter>
1004  (associationRangeBoundaries<GroupKey>(begin, end));
1005  }
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
template<std::size_t GroupKey, typename Iter >
BoundaryList<Iter> proxy::details::associationRanges ( Iter  begin,
Iter  end,
std::size_t  n 
)

Groups associations by the first key.

Template Parameters
GroupKeyindex of the key in the tuple pointed by the iterator
Itertype of iterators delimiting the data (same type required)
Parameters
beginiterator to the first association in the list
enditerator past the last association in the list
nminimum number of ranges to be produced.
Returns
a list of range boundaries marking the different groups.
Exceptions
std::runtime_errorif input key is not monotonic
See Also
associationRanges(Iter, Iter)

This function operates almost like associationRanges(Iter, Iter). The only difference is that at least n ranges are guaranteed to be produced: if the input defines less than n, the missing ones will be added at the end, empty. This allows to work around the possibility of empty ranges at the end, which the associationRanges(Iter, Iter) algorithm does not support.

Definition at line 1026 of file AssociatedData.h.

1027  {
1028  return BoundaryList<Iter>
1029  (associationRangeBoundaries<GroupKey>(begin, end, n));
1030  }
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
template<std::size_t GroupKey, typename Iter >
BoundaryList<Iter>::boundaries_t proxy::details::associationRangesImpl ( Iter  begin,
Iter  end,
std::size_t  expectedSize 
)

Definition at line 929 of file AssociatedData.h.

930  {
931  constexpr auto KeyIndex = GroupKey;
932 
933  auto extractKey
934  = [](auto const& assn){ return std::get<KeyIndex>(assn).key(); };
935 
936  typename BoundaryList<Iter>::boundaries_t boundaries;
937  boundaries.reserve(expectedSize + 1);
938  boundaries.push_back(begin);
939  std::size_t current = 0;
940  for (auto it = begin; it != end; ++it) {
941  auto const key = extractKey(*it);
942  if (key == current) continue;
943  if (key < current) {
944  auto index = std::distance(begin, it);
945  throw std::runtime_error("associationRanges() got input element #"
946  + std::to_string(index - 1) + " with key " + std::to_string(current)
947  + " and the next with key " + std::to_string(key) + "!"
948  );
949  }
950  boundaries.insert(boundaries.end(), key - current, it);
951  current = key;
952  } // for
953  boundaries.push_back(end);
954  return boundaries;
955  } // associationRangesImpl()
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
std::string to_string(WindowPattern const &pattern)
template<template< typename...> class CollProxy, typename MainColl , typename... AuxColl>
auto proxy::details::createCollectionProxy ( MainColl const &  main,
AuxColl &&...  aux 
)

Creates a collection proxy of a specified type with the given arguments.

Definition at line 324 of file CollectionProxy.h.

325  {
326  return CollProxy<MainColl, AuxColl...>
327  (main, std::forward<AuxColl>(aux)...);
328  }
int main(int argc, char **argv)
template<typename Traits , typename... Args>
auto proxy::details::createCollectionProxyFromTraits ( Args &&...  args)

Definition at line 263 of file CollectionProxyMaker.h.

263  {
264  using collection_proxy_impl_t
265  = CollectionProxyImplFromTraits_t<Traits, std::decay_t<Args>...>;
266  return collection_proxy_impl_t(std::forward<Args>(args)...);
267  } // createCollectionProxyFromTraits()
template<typename T >
void proxy::details::extendAndAssign ( std::vector< T > &  v,
typename std::vector< T >::size_type  index,
typename std::vector< T >::value_type const &  value 
)

Definition at line 214 of file OneTo01Data.h.

218  {
219  if (index >= v.size()) {
220  v.reserve(index + 1);
221  v.resize(index);
222  v.push_back(value);
223  }
224  else v[index] = value;
225  } // extendAndAssign()
temporary value
template<typename T >
void proxy::details::extendAndAssign ( std::vector< T > &  v,
typename std::vector< T >::size_type  index,
typename std::vector< T >::value_type &&  value 
)

Definition at line 230 of file OneTo01Data.h.

234  {
235  if (index >= v.size()) {
236  v.reserve(index + 1);
237  v.resize(index);
238  v.push_back(std::move(value));
239  }
240  else v[index] = std::move(value);
241  } // extendAndAssign()
temporary value
template<typename ArtAssnsIterValue >
AssnsNode<ArtAssnsIterValue> const& proxy::details::makeAssnsNode ( ArtAssnsIterValue const &  from)

Reinterprets the specified association node as a AssnsNode.

Definition at line 360 of file AssociatedData.h.

361  { return AssnsNode<ArtAssnsIterValue>::makeFrom(from); }
template<typename BoundaryIter >
BoundaryListRange<BoundaryIter> proxy::details::makeBoundaryListRange ( BoundaryIter const &  iBegin)

Reinterprets a iterator to boundaries list as a range collection.

Template Parameters
BoundaryItertype of iterator to boundary collection
Parameters
iBeginiterator to the begin iterator of a range
Returns
a collection view (lar::CollectionView) of the range

A range is conceptually defined as a sequence of data between a begin and and end iterator. The argument of this function is an iterator to the begin iterator of the range. The begin iterator itself is obtained by dereferencing the argument: *iBegin. The end iterator of the range is required to be immediately after the begin iterator (

*std::next(iBegin)

). This pair of iterators is exposed via the lar::CollectionView view, that presents a vector-like interface. For this to fully work, the data iterators (e.g., *iBegin) must comply with the random-access iterator requirements.

An example of BoundaryIter is the iterator to the list of boundaries in BoundaryList: BoundaryList::boundaries_t::const_iterator.

Definition at line 575 of file AssociatedData.h.

576  { return { iBegin }; }
template<typename MainColl , typename... AuxColl>
auto proxy::details::makeCollectionProxy ( MainColl const &  main,
AuxColl &&...  aux 
)

Creates a CollectionProxy object with the given arguments.

Definition at line 333 of file CollectionProxy.h.

334  {
335  return createCollectionProxy<CollectionProxy>
336  (main, std::forward<AuxColl>(aux)...);
337  }
int main(int argc, char **argv)
template<typename ProxyElement , typename... AuxData>
auto proxy::details::makeCollectionProxyElement ( std::size_t  index,
typename ProxyElement::main_element_t const &  main,
AuxData &&...  auxData 
)

Creates a collection proxy element object from data structures.

Template Parameters
ProxyElementtype of proxy element to be created
AuxDatatypes of auxiliary data structures being included
Parameters
indexindex in main collection of the element being represented
mainmain collection proxy data
auxDataauxiliary data collections
Returns
a ProxyElement object bound to the specified data element

Definition at line 311 of file CollectionProxyElement.h.

315  {
316  return ProxyElement(
317  index, main,
318  typename ProxyElement::aux_elements_t(std::forward<AuxData>(auxData)...)
319  );
320  } // makeCollectionProxyElement()
int main(int argc, char **argv)
template<typename ArtAssnsIterValue >
bool proxy::details::operator!= ( AssnsNode< ArtAssnsIterValue > const &  A,
typename AssnsNode< ArtAssnsIterValue >::valueptr_t const &  B 
)

Definition at line 345 of file AssociatedData.h.

349  { return A.valuePtr() != B; }
float A
Definition: dedx.py:137
template<typename ArtAssnsIterValue >
bool proxy::details::operator!= ( typename AssnsNode< ArtAssnsIterValue >::valueptr_t const &  A,
AssnsNode< ArtAssnsIterValue > const &  B 
)

Definition at line 351 of file AssociatedData.h.

355  { return A != B.valuePtr(); }
float A
Definition: dedx.py:137
template<typename ArtAssnsIterValue >
bool proxy::details::operator== ( AssnsNode< ArtAssnsIterValue > const &  A,
typename AssnsNode< ArtAssnsIterValue >::valueptr_t const &  B 
)

Definition at line 333 of file AssociatedData.h.

337  { return A.valuePtr() == B; }
float A
Definition: dedx.py:137
template<typename ArtAssnsIterValue >
bool proxy::details::operator== ( typename AssnsNode< ArtAssnsIterValue >::valueptr_t const &  A,
AssnsNode< ArtAssnsIterValue > const &  B 
)

Definition at line 339 of file AssociatedData.h.

343  { return A == B.valuePtr(); }
float A
Definition: dedx.py:137