ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkTrigger
src
BuildCombinations.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef DERIVATIONFRAMEWORKTRIGGER_BUILDCOMBINATIONS_H
6
#define DERIVATIONFRAMEWORKTRIGGER_BUILDCOMBINATIONS_H
7
8
#include "
RangedItr.h
"
9
10
namespace
DerivationFramework
{
namespace
TriggerMatchingUtils
{
11
24
template
<
typename
T,
typename
PROJ = std::
id
entity >
25
bool
insertIntoSortedVector
(std::vector<T>&
vec
,
const
T& ele,
26
PROJ proj = {});
27
36
template
<
typename
R,
typename
PROJ = std::
id
entity>
37
std::vector<typename R::value_type>
sorted
(
const
R&
r
, PROJ proj = {});
38
49
// First, a note on the type of the argument. This is essentially a way of
50
// passing a vector of vectors but only with iterators over the vectors.
51
template
<
typename
T,
52
typename
INNERPROJ = std::identity,
53
typename
OUTERPROJ = std::identity>
54
std::vector<std::vector<T>>
getAllDistinctCombinations
(
55
std::vector<
RangedItr
<
typename
std::vector<T>::const_iterator>>& inputs,
56
INNERPROJ innerproj = {},
57
OUTERPROJ outerproj = {});
58
59
}}
//> end namespace DerivationFramework::TriggerMatchingUtils
60
#include "
BuildCombinations.icc
"
61
#endif
//> !DERIVATIONFRAMEWORKTRIGGER_BUILDCOMBINATIONS_H
BuildCombinations.icc
vec
std::vector< size_t > vec
Definition
CombinationsGeneratorTest.cxx:9
RangedItr.h
DerivationFramework::TriggerMatchingUtils::RangedItr
utility class that acts wraps a bidirectional iterator.
Definition
RangedItr.h:18
r
int r
Definition
globals.cxx:22
DerivationFramework::TriggerMatchingUtils
Definition
BuildCombinations.h:10
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
DerivationFramework::TriggerMatchingUtils::getAllDistinctCombinations
std::vector< std::vector< T > > getAllDistinctCombinations(std::vector< RangedItr< typename std::vector< T >::const_iterator > > &inputs, INNERPROJ innerproj={}, OUTERPROJ outerproj={})
Get all valid, unique combinations of distinct elements from the input ranges.
DerivationFramework::TriggerMatchingUtils::insertIntoSortedVector
bool insertIntoSortedVector(std::vector< T > &vec, const T &ele, PROJ proj={})
Helper function for inserting an element into a sorted vector.
DerivationFramework
THE reconstruction tool.
Definition
CascadeTools.h:16
Generated on
for ATLAS Offline Software by
1.17.0