ATLAS Offline Software
JaggedVecImpl.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
4  */
17 #ifndef ATHCONTAINERS_JAGGEDVECIMPL_H
18 #define ATHCONTAINERS_JAGGEDVECIMPL_H
19 
20 
21 #include <cstddef>
22 #include <cstdint>
23 
24 
25 namespace SG {
26 
27 
52 {
53 public:
57 
58 
62  JaggedVecEltBase () = default;
63 
64 
71 
72 
77  index_type begin (size_t elt_ndx) const;
78 
79 
83  index_type end() const;
84 
85 
90  size_t size (size_t elt_ndx) const;
91 
92 
97  bool operator== (const JaggedVecEltBase& other) const;
98 
99 
103  struct Shift
104  {
106  Shift (int offs);
107 
110 
111 
112  private:
114  int m_offs;
115  };
116 
117 
118 private:
119  friend struct Shift;
120 
123 };
124 
125 
129 template <class T>
131  : public JaggedVecEltBase
132 {
133 public:
135 };
136 
137 
138 } // namespace SG
139 
140 
142 
143 
144 #endif // not ATHCONTAINERS_JAGGEDVECIMPL_H
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
SG::JaggedVecEltBase::Shift
Helper to shift indices.
Definition: JaggedVecImpl.h:104
SG::JaggedVecEltBase::m_end
index_type m_end
End index.
Definition: JaggedVecImpl.h:122
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::JaggedVecEltBase::size
size_t size(size_t elt_ndx) const
Return the number of items in this range.
JaggedVecImpl.icc
SG::JaggedVecEltBase::begin
index_type begin(size_t elt_ndx) const
Return the index of the beginning of the range.
SG::JaggedVecEltBase::operator==
bool operator==(const JaggedVecEltBase &other) const
Equality test.
SG::JaggedVecEltBase::end
index_type end() const
Return the index of the end of the range.
SG::JaggedVecEltBase
Describe one element of a jagged vector (base class).
Definition: JaggedVecImpl.h:52
SG::JaggedVecEltBase::index_type
uint32_t index_type
Type for the indices.
Definition: JaggedVecImpl.h:56
SG::JaggedVecEltBase::Shift::Shift
Shift(int offs)
Constructor.
SG::JaggedVecEltBase::Shift::m_offs
int m_offs
Offset by which to shift.
Definition: JaggedVecImpl.h:114
SG::JaggedVecEltBase::JaggedVecEltBase
JaggedVecEltBase(index_type end)
Constructor.
SG::JaggedVecEltBase::JaggedVecEltBase
JaggedVecEltBase()=default
Default constructor.
SG::JaggedVecEltBase::Shift::operator()
void operator()(JaggedVecEltBase &e) const
Shift indices in e by the offset given to the constructor.
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
SG::JaggedVecElt
Describe one element of a jagged vector.
Definition: JaggedVecImpl.h:132