LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ForEachAssociatedGroup.h File Reference

Helper functions to access associations in order. More...

#include "lardata/Utilities/RangeForWrapper.h"
#include "canvas/Persistency/Common/AssnsAlgorithms.h"
#include "range/v3/algorithm/for_each.hpp"
#include "range/v3/view/all.hpp"
#include "range/v3/view/group_by.hpp"
#include "range/v3/view/map.hpp"
#include "range/v3/view/transform.hpp"
#include <iterator>
#include <utility>

Go to the source code of this file.

Namespaces

 util
 Namespace for general, non-LArSoft-specific utilities.
 

Functions

template<class A , class F >
void util::for_each_associated_group (A const &assns, F &func)
 Helper functions to access associations in order. More...
 
template<class A >
auto util::associated_groups (A const &assns)
 Helper functions to access associations in order. More...
 
template<class A >
auto util::associated_groups_with_left (A const &assns)
 Helper functions to access associations in order, also with key. More...
 
template<typename Groups >
auto util::groupByIndex (Groups &&groups, std::size_t index) -> decltype(auto)
 Returns the group within groups with the specified index. More...
 

Detailed Description

Helper functions to access associations in order.

No additional linking is required to use these functions.

Provided functions:

No additional linking is required to use these functions.

Provided functions:

  • art::for_each_group() executing the provided function on each of the elements associated to the same object, for each object
  • art::for_each_group_with_left() executing the provided function on each of the elements associated to the same object, for each object, while also providing a reference to the object.

Definition in file ForEachAssociatedGroup.h.