5#ifndef TRIGCOMPOSITEUTILS_IPARTCOMBITR_H
6#define TRIGCOMPOSITEUTILS_IPARTCOMBITR_H
44 using VecLInfo_t = std::vector<LinkInfo<xAOD::IParticleContainer>>;
66 const std::vector<std::tuple<std::size_t, LInfoItr_t, LInfoItr_t>> &pieces,
67 std::function<
bool(
const VecLInfo_t &)> filter);
79 const std::vector<std::tuple<std::size_t, LInfoItr_t, LInfoItr_t>> &pieces,
std::input_iterator_tag iterator_category
const value_type * pointer
void reset()
Reset the iterator to its starting point.
std::vector< LInfoItr_t > m_linkInfoItrs
pointer operator->() const
std::size_t size() const
The size of each combination.
IPartCombItr()
A default constructed iterator acts as a past-the-end iterator.
bool operator!=(const IPartCombItr &other) const
std::ptrdiff_t difference_type
std::function< bool(const VecLInfo_t &)> m_filter
std::vector< LinkInfo< xAOD::IParticleContainer > > VecLInfo_t
const value_type & reference
IPartCombItr & operator++()
Pre-increment operator.
std::size_t nLegs() const
The number of legs.
VecLInfo_t::const_iterator LInfoItr_t
reference operator*() const
Dereference.
ProductItr< KFromNItr > m_idxItr
bool exhausted() const
True if this iterator is past the end.
bool operator==(const IPartCombItr &other) const
Iterator comparison functions.
Iterates over all combinations of the provided input iterators.
bool uniqueObjects(const std::vector< LinkInfo< xAOD::IParticleContainer > > &links)
Helper fucntion that returns true if no objects are repeated.
bool uniqueRoIs(const std::vector< LinkInfo< xAOD::IParticleContainer > > &links)
Helper function that returns true if no objects share a final RoI.
std::function< bool(const std::vector< LinkInfo< xAOD::IParticleContainer > > &)> getFilter(FilterType filter)
Get a lambda corresponding to the specified FilterType enum.
bool uniqueInitialRoIs(const std::vector< LinkInfo< xAOD::IParticleContainer > > &links)
Helper function that returns true if no objects share an initial RoI.
@ UniqueRoIs
Do not allow any two objects to share an RoI.
@ UniqueInitialRoIs
Do not allow any two objects to share an initial RoI.
@ All
Allow all combinations.
@ UniqueObjects
Do not allow any repeated objects.
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...