|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKDETDESCRUTILS_NAVBINNEDARRAY1D_H
10 #define TRKDETDESCRUTILS_NAVBINNEDARRAY1D_H
63 m_array = std::vector<SharedObject<T>>(tclassvector);
88 for (
size_t ient = 0; ient <
m_binUtility.get()->bins(0); ++ient) {
89 m_array[ient] = (barr.m_array)[ient];
107 for (
size_t ient = 0; ient <
m_binUtility.get()->bins(0); ++ient) {
155 bool associatedResult =
true)
const
161 size_t firstBin =
m_binUtility.get()->next(navGP, navMom, 0);
163 if (associatedResult) {
165 return (
m_array[firstBin]).get();
213 std::make_unique<std::vector<T*>>();
214 for (
unsigned int ill = 0; ill <
m_array.size(); ++ill) {
233 #endif // TRKDETDESCRUTILS_NAVBINNEDARRAY1D_H
SharedObject< BinUtility > m_binUtility
unsigned int arrayObjectsNumber() const
Number of Entries in the Array.
Eigen::Matrix< double, 2, 1 > Vector2D
~NavBinnedArray1D()
Virtual Destructor.
Cached pointer with atomic update.
T * nextObject(const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool associatedResult=true) const
Returns the pointer to the templated class object from the BinnedArray.
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< size_t > vec
const BinUtility * binUtility() const
Return the BinUtility.
NavBinnedArray1D(const NavBinnedArray1D &barr)
Copy Constructor - copies only pointers !
Amg::Transform3D * m_transf
CxxUtils::CachedUniquePtr< std::vector< T * > > m_arrayObjects
binUtility for retrieving and filling the Array
BinnedArraySpan< T const *const > arrayObjects() const
Return all objects of the Array const T.
Amg::Transform3D * transform() const
Return the transform.
Eigen::Affine3d Transform3D
NavBinnedArray1D()
Default Constructor - needed for inherited classes.
T * object(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray it returns 0 if not defined;.
std::vector< SharedObject< T > > m_array
forced 1D vector of pointers to class T
Ensure that the ATLAS eigen extensions are properly loaded.
NavBinnedArray1D(const NavBinnedArray1D &barr, std::vector< SharedObject< T >> &&vec, Amg::Transform3D &shift)
Copy Constructor with shift.
NavBinnedArray1D(const std::vector< SharedObject< T >> &tclassvector, BinUtility *bingen, Amg::Transform3D *transform)
Constructor with std::vector and a BinUtility - reference counted, will delete objects at the end,...
Eigen::Matrix< double, 3, 1 > Vector3D
BinnedArraySpan< T *const > arrayObjects()
Return all objects of the Array non-const T.
NavBinnedArray1D & operator=(const NavBinnedArray1D &barr)
Assignment operator.
std::shared_ptr< T > SharedObject
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
void updateTransform(Amg::Transform3D &transform)
Reposition.
T * entryObject(const Amg::Vector3D &) const
Returns the pointer to the templated class object from the BinnedArray - entry point.
std::span< T > BinnedArraySpan
NavBinnedArray1D * clone() const
Implicit Constructor.
void createArrayCache() const
vector of pointers to the class T