|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKDETDESCRUTILS_BINNEDARRAY1D_H
10 #define TRKDETDESCRUTILS_BINNEDARRAY1D_H
58 size_t vecsize = tclassvector.size();
59 m_array = std::vector<SharedObject<T>>(vecsize);
62 if (bingen->inside(currentGlobal)) {
63 m_array[bingen->bin(currentGlobal, 0)] = ((tclassvector)[
ivec]).first;
65 throw GaudiException(
"BinnedArray1D constructor",
66 "Object outside bounds",
81 m_array = std::vector<SharedObject<T>>(barr.m_array.size());
82 for (
unsigned int ient = 0; ient < barr.m_array.size(); ++ient) {
83 m_array[ient] = (barr.m_array)[ient];
99 for (
unsigned int ient = 0; ient < barr.
m_array.size(); ++ient) {
142 bool associatedResult =
true)
const
175 std::make_unique<std::vector<T*>>();
178 for (
size_t ill = 0; ill <
bins; ++ill) {
195 #endif // TRKSURFACES_BINNEDARRAY1D_H
size_t entry(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
std::vector< SharedObject< T > > m_array
forced 1D vector of pointers to class T
Eigen::Matrix< double, 2, 1 > Vector2D
~BinnedArray1D()
Virtual Destructor.
Cached pointer with atomic update.
BinnedArraySpan< T *const > arrayObjects()
Return all objects of the Array non-const T.
BinnedArray1D * clone() const
Implicit Constructor.
size_t bins(size_t ba=0) const
Number of bins.
BinnedArray1D(const BinnedArray1D &barr)
Copy Constructor - copies only pointers !
T * entryObject(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray - entry point.
const BinUtility * binUtility() const
Return the BinUtility.
BinnedArray1D & operator=(const BinnedArray1D &barr)
Assignment operator.
BinnedArray1D(const std::vector< std::pair< SharedObject< T >, Amg::Vector3D >> &tclassvector, BinUtility *bingen)
Constructor with std::vector and a BinUtility.
void createArrayCache() const
vector of pointers to the class T
Cached unique_ptr 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;.
BinnedArraySpan< T const *const > arrayObjects() const
Return all objects of the Array const T.
Ensure that the ATLAS eigen extensions are properly loaded.
bool inside(const Amg::Vector3D &position) const
Check if bin is inside from Vector3D.
BinnedArray1D()
Default Constructor - needed for inherited classes.
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;.
std::shared_ptr< T > SharedObject
CxxUtils::CachedUniquePtr< std::vector< T * > > m_arrayObjects
binUtility for retrieving and filling the Array
BinUtility * clone() const
Implizit Constructor.
unsigned int arrayObjectsNumber() const
Number of Entries in the Array.
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
std::span< T > BinnedArraySpan
size_t next(const Amg::Vector3D &position, const Amg::Vector3D &direction, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
BinUtility * m_binUtility