ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigSteer
TrigCompositeUtils
TrigCompositeUtils
ProductItr.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGCOMPOSITEUTILS_PRODUCTITR_H
6
#define TRIGCOMPOSITEUTILS_PRODUCTITR_H
7
8
#include <functional>
9
#include <iterator>
10
#include <type_traits>
11
#include <vector>
12
13
namespace
TrigCompositeUtils
{
42
template
<
typename
Iterator>
43
class
ProductItr
{
44
public
:
46
using
iterator_category
= std::input_iterator_tag;
47
using
value_type
= std::vector<Iterator>;
48
using
reference
=
const
value_type
&;
49
using
pointer
=
const
value_type
*;
50
using
difference_type
= std::ptrdiff_t;
51
53
ProductItr
() =
default
;
54
61
ProductItr
(
const
std::vector<Iterator> &itrs,
const
std::vector<Iterator> &endItrs);
62
64
std::size_t
nItrs
()
const
{
return
m_startItrs
.size(); }
65
67
void
reset
();
68
70
bool
exhausted
()
const
;
71
73
reference
operator*
()
const
;
74
pointer
operator->
()
const
;
75
77
ProductItr
&
operator++
();
78
80
ProductItr
operator++
(
int
);
81
83
bool
operator==
(
const
ProductItr
&other)
const
;
84
bool
operator!=
(
const
ProductItr
&other)
const
;
85
86
private
:
87
std::vector<Iterator>
m_startItrs
;
88
std::vector<Iterator>
m_endItrs
;
89
std::vector<Iterator>
m_currentItrs
;
90
91
};
//> end class ProductItr<Iterator>
92
}
// namespace TrigCompositeUtils
93
94
#include "
TrigCompositeUtils/ProductItr.icc
"
95
96
#endif
//> !TRIGCOMPOSITEUTILS_PRODUCT_ITR_H
ProductItr.icc
TrigCompositeUtils::ProductItr::operator++
ProductItr operator++(int)
Post-increment operator.
TrigCompositeUtils::ProductItr::reset
void reset()
Helper function to reset this iterator to its start position.
TrigCompositeUtils::ProductItr::pointer
const value_type * pointer
Definition
ProductItr.h:49
TrigCompositeUtils::ProductItr::ProductItr
ProductItr(const std::vector< Iterator > &itrs, const std::vector< Iterator > &endItrs)
Construct the iterator from an input vector of iterators.
TrigCompositeUtils::ProductItr::exhausted
bool exhausted() const
True if this iterator is past the end.
TrigCompositeUtils::ProductItr::m_currentItrs
std::vector< Iterator > m_currentItrs
Definition
ProductItr.h:89
TrigCompositeUtils::ProductItr::ProductItr
ProductItr()=default
Default constructor creates a generic past-the-end iterator.
TrigCompositeUtils::ProductItr::operator==
bool operator==(const ProductItr &other) const
Iterator comparison functions.
TrigCompositeUtils::ProductItr::reference
const value_type & reference
Definition
ProductItr.h:48
TrigCompositeUtils::ProductItr::value_type
std::vector< Iterator > value_type
Definition
ProductItr.h:47
TrigCompositeUtils::ProductItr::m_startItrs
std::vector< Iterator > m_startItrs
Definition
ProductItr.h:87
TrigCompositeUtils::ProductItr::difference_type
std::ptrdiff_t difference_type
Definition
ProductItr.h:50
TrigCompositeUtils::ProductItr::nItrs
std::size_t nItrs() const
The number of input iterators.
Definition
ProductItr.h:64
TrigCompositeUtils::ProductItr::operator!=
bool operator!=(const ProductItr &other) const
TrigCompositeUtils::ProductItr::operator++
ProductItr & operator++()
Pre-increment operator.
TrigCompositeUtils::ProductItr::operator->
pointer operator->() const
TrigCompositeUtils::ProductItr::operator*
reference operator*() const
Dereference.
TrigCompositeUtils::ProductItr::m_endItrs
std::vector< Iterator > m_endItrs
Definition
ProductItr.h:88
TrigCompositeUtils::ProductItr::iterator_category
std::input_iterator_tag iterator_category
Iterator traits.
Definition
ProductItr.h:46
TrigCompositeUtils
Definition
TrigComposite.h:19
Generated on
for ATLAS Offline Software by
1.17.0