ATLAS Offline Software
Loading...
Searching...
No Matches
ProductGen.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 TRIGHLTJETHYPO_PRODUCTGEN_H
6#define TRIGHLTJETHYPO_PRODUCTGEN_H
7
8#include <vector>
9
10// For a vector of vectors, repeated calls to next() returns
11// indices that point to elements in the inner vectors.
12// The calls will step through this data structure.
14 public:
15 ProductGen();
16
17 // ends contains the sizes of the inner vectors
18 explicit ProductGen(const std::vector<std::size_t>& ends);
19 std::vector<std::size_t> next();
20
21 private:
22 std::vector<std::size_t> m_ends;
23 std::vector<std::size_t> m_counters;
24 std::size_t m_ncounters{};
25 bool m_done{true};
26 bool atEnd(){return (m_counters == m_ends);}
27};
28
29#endif
bool m_done
Definition ProductGen.h:25
std::size_t m_ncounters
Definition ProductGen.h:24
std::vector< std::size_t > next()
std::vector< std::size_t > m_counters
Definition ProductGen.h:23
std::vector< std::size_t > m_ends
Definition ProductGen.h:22
bool atEnd()
Definition ProductGen.h:26