ATLAS Offline Software
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 */
15 #ifndef LARELECCALIB_LARVECTORPROXY_H
16 #define LARELECCALIB_LARVECTORPROXY_H
17 
18 
19 #include <vector>
20 #include <span>
21 #include <cstdlib>
22 
23 
38  public std::span<const float> {
39 
40 public:
41 
47 
48 
53  LArVectorProxy (const std::vector<value_type>& vec);
54 
55 
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
LArVectorProxy::LArVectorProxy
LArVectorProxy(const value_type *beg, const value_type *end)
Construct a proxy referencing a range of vectors in memory.
CxxUtils::span
span(T *ptr, std::size_t sz) -> span< T >
A couple needed deduction guides.
LArVectorProxy::valid
bool valid() const
Test to see if the proxy has been initialized.
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
LArVectorProxy::LArVectorProxy
LArVectorProxy(const std::vector< value_type > &vec)
Construct a proxy referencing an existing vector.
LArVectorProxy::LArVectorProxy
LArVectorProxy()
Default constructor.
LArVectorProxy::at
value_type at(size_t i) const
Vector indexing with bounds check.
lumiFormat.i
int i
Definition: lumiFormat.py:85
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
LArVectorProxy.icc
LArVectorProxy::asVector
std::vector< value_type > asVector() const
Convert back to a vector.
value_type
Definition: EDM_MasterSearch.h:11
LArVectorProxy
Proxy for accessing a range of float values like a vector.
Definition: LArVectorProxy.h:38