ATLAS Offline Software
Loading...
Searching...
No Matches
LArVectorProxy.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/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
13
14
15#ifndef LARELECCALIB_LARVECTORPROXY_H
16#define LARELECCALIB_LARVECTORPROXY_H
17
18
19#include <vector>
20#include <span>
21#include <cstdlib>
22
23
35
36
38 public std::span<const float> {
39
40public:
41
47
48
53 LArVectorProxy (const std::vector<value_type>& vec);
54
55
61 LArVectorProxy (const value_type* beg, const value_type* end);
62
63
67 bool valid() const;
68
72 value_type at (size_t i) const;
73
74
78 std::vector<value_type> asVector() const;
79
80};
81
82
84
85
86#endif // not LARELECCALIB__LARVECTORPROXY_H
std::vector< size_t > vec
bool valid() const
Test to see if the proxy has been initialized.
std::vector< value_type > asVector() const
Convert back to a vector.
value_type at(size_t i) const
Vector indexing with bounds check.
LArVectorProxy(const std::vector< value_type > &vec)
Construct a proxy referencing an existing vector.
LArVectorProxy()
Default constructor.
LArVectorProxy(const value_type *beg, const value_type *end)
Construct a proxy referencing a range of vectors in memory.