![]() |
ATLAS Offline Software
|
Proxy for accessing a range of float values like a vector. More...
#include <LArVectorProxy.h>
Public Member Functions | |
LArVectorProxy () | |
Default constructor. More... | |
LArVectorProxy (const std::vector< value_type > &vec) | |
Construct a proxy referencing an existing vector. More... | |
LArVectorProxy (const value_type *beg, const value_type *end) | |
Construct a proxy referencing a range of vectors in memory. More... | |
bool | valid () const |
Test to see if the proxy has been initialized. More... | |
value_type | at (size_t i) const |
Vector indexing with bounds check. More... | |
std::vector< value_type > | asVector () const |
Convert back to a vector. More... | |
Public Attributes | |
T | elements |
STL member. More... | |
Proxy for accessing a range of float values like a vector.
For the shape and OFC conditions data, the data for many channels is flattened into a single vector. But we still want to provide a vector-like interface for the data for an individual channel.
We can do that with this proxy object, based on std::span. On top of std::span's interface, we implement methods that are used by existing clients.
Definition at line 37 of file LArVectorProxy.h.
LArVectorProxy::LArVectorProxy | ( | ) |
Default constructor.
Creates the proxy in an invalid state.
LArVectorProxy::LArVectorProxy | ( | const std::vector< value_type > & | vec | ) |
Construct a proxy referencing an existing vector.
vec | The existing vector to reference. |
LArVectorProxy::LArVectorProxy | ( | const value_type * | beg, |
const value_type * | end | ||
) |
Construct a proxy referencing a range of vectors in memory.
beg | Pointer to the start of the range. |
end | Pointer to the (exclusive) end of the range. |
std::vector<value_type> LArVectorProxy::asVector | ( | ) | const |
Convert back to a vector.
value_type LArVectorProxy::at | ( | size_t | i | ) | const |
Vector indexing with bounds check.
bool LArVectorProxy::valid | ( | ) | const |
Test to see if the proxy has been initialized.
|
inherited |
STL member.