ATLAS Offline Software
Classes | Functions
DerivationFramework::TriggerMatchingUtils Namespace Reference

Classes

class  RangedItr
 utility class that acts wraps a bidirectional iterator. More...
 

Functions

template<typename T >
bool insertIntoSortedVector (std::vector< T > &vec, const T &ele)
 Helper function for inserting an element into a sorted vector. More...
 
template<typename T >
std::vector< typename T::value_type > sorted (T begin, T end)
 Helper function to create a sorted vector from an unsorted one. More...
 
template<typename T >
std::vector< std::vector< T > > getAllDistinctCombinations (std::vector< RangedItr< typename std::vector< T >::const_iterator >> &inputs)
 Get all valid, unique combinations of distinct elements from the input ranges. More...
 

Function Documentation

◆ getAllDistinctCombinations()

template<typename T >
std::vector<std::vector<T> > DerivationFramework::TriggerMatchingUtils::getAllDistinctCombinations ( std::vector< RangedItr< typename std::vector< T >::const_iterator >> &  inputs)

Get all valid, unique combinations of distinct elements from the input ranges.

Parameters
inputsThe ranges over vectors of possible elements.

◆ insertIntoSortedVector()

template<typename T >
bool DerivationFramework::TriggerMatchingUtils::insertIntoSortedVector ( std::vector< T > &  vec,
const T &  ele 
)

Helper function for inserting an element into a sorted vector.

Template Parameters
TThe type stored in the vector
Parameters
[out]vecThe vector to insert into
eleThe element to insert
Returns
Whether or not the element was inserted. The element will not be inserted if it already exists.

◆ sorted()

template<typename T >
std::vector<typename T::value_type> DerivationFramework::TriggerMatchingUtils::sorted ( begin,
end 
)

Helper function to create a sorted vector from an unsorted one.

Template Parameters
TThe type of the iterator
Parameters
beginThe start of the unsorted range
endThe end of the unsorted range