 |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKDETDESCRUTILS_BINNEDARRAY1D1D1D_H
10 #define TRKDETDESCRUTILS_BINNEDARRAY1D1D1D_H
47 const std::vector<std::pair<std::shared_ptr<T>,
Amg::Vector3D>>& tclassvector,
49 const std::vector<std::vector<BinUtility>>& binUtilVec)
59 const std::vector<std::pair<std::shared_ptr<T>,
Amg::Vector3D>>& tclassvector,
62 std::vector<std::vector<BinUtility>>&& binUtilVec)
174 std::unique_ptr<std::vector<T*>>
arrayObjects = std::make_unique<std::vector<T*>>();
177 for (
size_t ibin3 = 0; ibin3 < std::as_const(
m_binUtilArray)[ibin1][ibin2].bins(); ++ibin3) {
189 m_array = std::vector<std::vector<std::vector<std::shared_ptr<T>>>>(v1Size);
190 for (
int i = 0;
i < v1Size; ++
i) {
191 m_array[
i] = std::vector<std::vector<std::shared_ptr<T>>>(v2Size);
192 for (
int j = 0; j < v2Size; ++j) {
197 int vecsize(tclassvector.size());
204 std::vector<std::vector<std::shared_ptr<T>>>& currArr =
m_array[
bin1];
205 std::vector<std::shared_ptr<T>>& curVec = currArr[
bin2];
208 throw GaudiException(
"BinnedArray1D1D1D",
"Object outside bounds",
209 StatusCode::FAILURE);
214 std::vector<std::vector<std::vector<std::shared_ptr<T>>>>
m_array{};
223 #endif // TRKSURFACES_BINNEDARRAY1D1D1D_H
size_t entry(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
BinnedArray1D1D1D & operator=(const BinnedArray1D1D1D &barr)
Assignment operator.
BinUtility m_binUtil1
binUtility for retrieving and filling the Array
T * object(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray, it returns nullptr if not def...
std::span< T const *const > arrayObjects() const
Return all objects of the Array const T.
Eigen::Matrix< double, 2, 1 > Vector2D
BinnedArray1D1D1D & operator=(BinnedArray1D1D1D &&)=default
void createArrayCache() const
Cached pointer with atomic update.
T * object(const Amg::Vector2D &lp) const
Returns the pointer to the templated class object from the BinnedArray, it returns nullptr if not def...
BinnedArray1D1D1D(const BinnedArray1D1D1D &barr)
Copy.
~BinnedArray1D1D1D()=default
std::vector< std::vector< BinUtility > > m_binUtilArray
BinnedArray1D1D1D * clone() const
Implicit Constructor.
size_t bins(size_t ba=0) const
Number of bins.
std::span< T *const > arrayObjects()
Return all objects of the Array const T.
BinnedArray1D1D1D(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector, const BinUtility &binUtil1, const BinUtility &binUtil2, const std::vector< std::vector< BinUtility >> &binUtilVec)
ctors
BinnedArray1D1D1D()=default
Cached unique_ptr with atomic update.
void initialize(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector)
vector of pointers to the class T
std::vector< std::vector< std::vector< std::shared_ptr< T > > > > m_array
1D cache of non owning pointers to class T
Ensure that the ATLAS eigen extensions are properly loaded.
bool inside(const Amg::Vector3D &position) const
Check if bin is inside from Vector3D.
T * nextObject(const Amg::Vector3D &, const Amg::Vector3D &, bool) const
Returns the pointer to the templated class object from the BinnedArray dummy for multidimensional arr...
Eigen::Matrix< double, 3, 1 > Vector3D
const BinUtility * binUtility() const
Return the BinUtility - returns the first binUtility in this case.
BinnedArray1D1D1D(BinnedArray1D1D1D &&)=default
unsigned int arrayObjectsNumber() const
Number of Entries in the Array.
BinUtility m_binUtil2
binUtility for retrieving and filling the Array
size_t bin(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
T * entryObject(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray - entry point.
BinnedArray1D1D1D(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector, BinUtility &&binUtil1, BinUtility &&binUtil2, std::vector< std::vector< BinUtility >> &&binUtilVec)
vec_fb< typename boost::int_t< sizeof(T) *8 >::exact, N > ivec
CxxUtils::CachedUniquePtr< std::vector< T * > > m_arrayObjects