ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthContainers
AthContainers
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-2026 CERN for the benefit of the ATLAS collaboration.
4
*/
15
16
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
56
class
JaggedVecEltBase
57
{
58
public
:
61
using
index_type
= uint32_t;
62
63
67
JaggedVecEltBase
() =
default
;
68
69
74
JaggedVecEltBase
(
index_type
end
);
75
76
81
index_type
begin
(
size_t
elt_ndx)
const
;
82
83
87
index_type
end
()
const
;
88
89
94
size_t
size
(
size_t
elt_ndx)
const
;
95
96
101
bool
operator==
(
const
JaggedVecEltBase
& other)
const
;
102
103
107
struct
Shift
108
{
110
Shift
(
int
offs);
111
113
void
operator()
(
JaggedVecEltBase
& e)
const
;
114
115
116
private
:
118
int
m_offs
;
119
};
120
121
122
private
:
123
friend
struct
Shift
;
124
126
index_type
m_end
= 0;
127
};
128
129
133
template
<
class
T>
134
class
JaggedVecElt
135
:
public
JaggedVecEltBase
136
{
137
public
:
138
using
JaggedVecEltBase::JaggedVecEltBase
;
139
};
140
141
142
}
// namespace SG
143
144
145
#include "
AthContainers/JaggedVecImpl.icc
"
146
147
148
#endif
// not ATHCONTAINERS_JAGGEDVECIMPL_H
JaggedVecImpl.icc
SG::JaggedVecEltBase::index_type
uint32_t index_type
Type for the indices.
Definition
JaggedVecImpl.h:61
SG::JaggedVecEltBase::begin
index_type begin(size_t elt_ndx) const
Return the index of the beginning of the range.
SG::JaggedVecEltBase::size
size_t size(size_t elt_ndx) const
Return the number of items in this range.
SG::JaggedVecEltBase::operator==
bool operator==(const JaggedVecEltBase &other) const
Equality test.
SG::JaggedVecEltBase::m_end
index_type m_end
End index.
Definition
JaggedVecImpl.h:126
SG::JaggedVecEltBase::JaggedVecEltBase
JaggedVecEltBase()=default
Default constructor.
SG::JaggedVecEltBase::end
index_type end() const
Return the index of the end of the range.
SG::JaggedVecEltBase::JaggedVecEltBase
JaggedVecEltBase(index_type end)
Constructor.
SG::JaggedVecElt
Describe one element of a jagged vector.
Definition
JaggedVecImpl.h:136
SG::JaggedVecElt::JaggedVecEltBase
JaggedVecEltBase()=default
Default constructor.
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::JaggedVecEltBase::Shift
Helper to shift indices.
Definition
JaggedVecImpl.h:108
SG::JaggedVecEltBase::Shift::operator()
void operator()(JaggedVecEltBase &e) const
Shift indices in e by the offset given to the constructor.
SG::JaggedVecEltBase::Shift::m_offs
int m_offs
Offset by which to shift.
Definition
JaggedVecImpl.h:118
SG::JaggedVecEltBase::Shift::Shift
Shift(int offs)
Constructor.
Generated on
for ATLAS Offline Software by
1.17.0