Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKDETDESCRUTILS_BINNEDARRAY1D1D_H
10 #define TRKDETDESCRUTILS_BINNEDARRAY1D1D_H
45 const std::vector<std::pair<std::shared_ptr<T>,
Amg::Vector3D>>& tclassvector,
47 const std::vector<BinUtility>& singleBinGen)
56 const std::vector<std::pair<std::shared_ptr<T>,
Amg::Vector3D>>& tclassvector,
58 std::vector<BinUtility>&& singleBinGen)
96 return (
m_array[steerBin][singleBin]).get();
106 return (
m_array[steerBin][singleBin]).get();
115 return (
m_array[steerBin][singleBin]).get();
148 std::unique_ptr<std::vector<T*>>
arrayObjects = std::make_unique<std::vector<T*>>();
150 for (
size_t isingle = 0;
163 m_array[
i] = std::vector<std::shared_ptr<T>>(sizeOfSubBin);
166 int vecsize(tclassvector.size());
172 std::vector<std::shared_ptr<T>>& curVec =
m_array[steeringBin];
173 curVec[singleBin] = ((tclassvector)[
ivec]).first;
175 throw GaudiException(
"BinnedArray1D1D",
"Object outside bounds",
176 StatusCode::FAILURE);
182 std::vector<std::vector<std::shared_ptr<T>>>
m_array{};
191 #endif // TRKSURFACES_BINNEDARRAY1D1D_H
size_t entry(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
BinnedArray1D1D(const BinnedArray1D1D &barr)
Copy Constructor.
T * entryObject(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray - entry point.
BinnedArray1D1D(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector, BinUtility &&steeringBinGen1D, std::vector< BinUtility > &&singleBinGen)
Eigen::Matrix< double, 2, 1 > Vector2D
BinnedArray1D1D & operator=(const BinnedArray1D1D &barr)
Assignment operator.
Cached pointer with atomic update.
BinnedArray1D1D & operator=(BinnedArray1D1D &&)=default
CxxUtils::CachedUniquePtr< std::vector< T * > > m_arrayObjects
binUtility for retrieving and filling the Array
BinnedArray1D1D(BinnedArray1D1D &&)=default
void initialize(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector)
vector of pointers to the class T
size_t bins(size_t ba=0) const
Number of bins.
BinnedArraySpan< T *const > arrayObjects()
Return all objects of the Array non-const T.
unsigned int arrayObjectsNumber() const
Number of Entries in the Array.
void createArrayCache() const
BinnedArray1D1D * clone() const
Implicit Constructor.
const BinUtility * binUtility() const
Return the BinUtility - returns the steering binUtility in this case.
T * nextObject(const Amg::Vector3D &, const Amg::Vector3D &, bool) const
Returns the pointer to the templated class object from the BinnedArray.
Cached unique_ptr with atomic update.
T * object(const Amg::Vector2D &lp) const
Returns the pointer to the templated class object from the BinnedArray, it returns 0 if not defined.
std::vector< BinUtility > m_singleBinUtilities
single bin utilities
Ensure that the ATLAS eigen extensions are properly loaded.
bool inside(const Amg::Vector3D &position) const
Check if bin is inside from Vector3D.
BinnedArraySpan< T const *const > arrayObjects() const
Return all objects of the Array const T.
BinUtility m_steeringBinUtility
Eigen::Matrix< double, 3, 1 > Vector3D
T * object(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray, it returns 0 if not defined.
size_t bin(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
vec_fb< typename boost::int_t< sizeof(T) *8 >::exact, N > ivec
BinnedArray1D1D(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector, const BinUtility &steeringBinGen1D, const std::vector< BinUtility > &singleBinGen)
ctors with arguments
std::span< T > BinnedArraySpan
~BinnedArray1D1D()=default
std::vector< std::vector< std::shared_ptr< T > > > m_array
forced 1D vector of pointers to class T
BinnedArray1D1D()=default