|
ATLAS Offline Software
|
Go to the documentation of this file.
2 #ifndef FPGATrackSimGenScanArray_H
3 #define FPGATrackSimGenScanArray_H
47 void setsize(
const std::vector<unsigned int> &
dims,
const T &initval)
74 const std::vector<unsigned int> &
dims()
const {
return m_dims; }
80 throw std::runtime_error(
"FPGATrackSimGenScanArray: index size does not match array dimensions");
85 for (
unsigned int i = 0;
i <
m_step.size();
i++)
89 throw std::runtime_error(
"FPGATrackSimGenScanArray: index out of range i=" +
std::to_string(
i) +
103 std::vector<unsigned int> idx_unsigned;
105 idx_unsigned.push_back(
d);
106 return (*
this)[idx_unsigned];
136 throw std::runtime_error(
137 "FPGATrackSimGenScanArray::Interator array size mismatch in "
149 for (
unsigned int i = 0;
i <
m_idx.size() - 1;
i++)
160 const std::vector<unsigned int> &
idx()
const {
return m_idx; }
174 return a.m_idx !=
b.m_idx;
189 std::vector<unsigned int> retv;
191 retv.push_back(
d - 1);
202 #endif // FPGATrackSimGenScanArray_H
const std::vector< unsigned int > & dims() const
std::vector< unsigned int > m_step
Iterator(const std::vector< unsigned int > &idx, FPGATrackSimGenScanArray< T > &itrdata)
std::vector< unsigned int > m_idx
unsigned int size() const
const T & operator[](const std::vector< int > &idx) const
const std::vector< unsigned int > & idx() const
T & operator[](const std::vector< unsigned > &idx)
T & operator[](const std::vector< int > &idx)
FPGATrackSimGenScanArray< T > & m_itrdata
std::vector< unsigned int > m_dims
std::string to_string(const DetectorType &type)
const std::vector< T > & flatdata() const
friend bool operator==(const Iterator &a, const Iterator &b)
#define ATLAS_THREAD_SAFE
FPGATrackSimGenScanArray()=default
void setsize(const std::vector< unsigned int > &dims, const T &initval)
friend bool operator!=(const Iterator &a, const Iterator &b)
FPGATrackSimGenScanArray(const std::vector< unsigned int > &dims, const T &initval)
std::forward_iterator_tag iterator_category
const T & operator[](const std::vector< unsigned int > &idx) const