5#include <TVirtualCollectionProxy.h>
22 const ::TClass* cl,
size_t size,
size_t,
26 m_proxy( cl->GetCollectionProxy()->Generate() ),
m_vec( cl->New() ) {
30 ::Fatal(
"xAOD::TAuxVector::TAuxVector",
50 const size_t size = parent.size();
60 const void* parentPtr = parent.toPtr();
74 if(
this == &
other ) {
82 IAuxTypeVector::operator=(
other );
90 IAuxTypeVector::resetDataSpan();
100 const void* otherPtr =
other.toPtr();
111 return std::make_unique< TAuxVector >( *
this );
176 size_t eltsz =
m_proxy->GetIncrement();
179 if( -offs >
static_cast< ptrdiff_t
>( pos ) ) {
182 char* beg =
reinterpret_cast< char*
>(
m_proxy->At( 0 ) );
184 beg + eltsz * ( pos + offs ),
190 }
else if( offs > 0 ) {
192 size_t oldsz =
m_proxy->Size();
193 m_proxy->Allocate( oldsz + offs,
false );
194 char* beg =
reinterpret_cast< char*
>(
m_proxy->At( 0 ) );
196 beg + eltsz * ( pos + offs ),
207 void* src,
size_t src_pos,
size_t src_n,
210 size_t eltsz =
m_proxy->GetIncrement();
213 char* srcp =
reinterpret_cast<char*
> (src);
214 char* begp = srcp + src_pos*eltsz;
221 reinterpret_cast<char*
>(this->
toPtr()) + pos*eltsz,
242 size_t eltsz =
m_proxy->GetIncrement();
245 if(
m_proxy->GetValueClass() ) {
250 memset( dst, 0, n * eltsz );
263 IAuxTypeVector::storeDataSpan(
toPtr(),
size() );
Manage lookup of vectors of auxiliary data.
Make an AuxVectorData object from either a raw vector or an aux store.
Interface for factory objects that create vectors.
Make an AuxVectorData object from either a raw array or an aux store.
Interface for non-const operations on an auxiliary store.
bool isLinked() const
Return true if this variable is linked from another one.
auxid_t auxid() const
Return the auxid of the variable this vector represents.
const AuxDataSpanBase & getDataSpan() const
Return a reference to a description of this vector's start+size.
IAuxTypeVector(auxid_t auxid, bool isLinked)
Constructor.
Auxiliary vector factory based on a ROOT dictionary.
TAuxVector & operator=(const TAuxVector &other)
Assignment operator.
virtual void * toPtr() override
Return a pointer to the start of the vector's data.
virtual bool insertMove(size_t pos, void *src, size_t src_pos, size_t src_n, SG::IAuxStore &srcStore) override
Insert a range of elements via move.
TAuxVector(const TAuxVectorFactory *factory, SG::auxid_t auxid, const ::TClass *cl, size_t size, size_t capacity, bool isLinked)
Constructor.
virtual void reserve(size_t sz) override
Change the capacity of the vector.
virtual void * toVector() override
Return a pointer to the STL vector itself.
void storeDataSpan()
Update the stored span.
std::unique_ptr<::TVirtualCollectionProxy > m_proxy
ROOT's description of the vector type Cloned from the proxy held by the TClass and permanently bound ...
void copyRange(const void *src, void *dst, size_t n)
Function copying the payload of a range to a new location.
virtual bool shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the vector.
virtual size_t size() const override
Return the size of the vector.
virtual bool resize(size_t sz) override
Change the size of the vector.
void clearRange(void *dst, size_t n)
void * m_vec
Pointer to the vector object.
const TAuxVectorFactory * m_factory
The parent factory object.
virtual std::unique_ptr< SG::IAuxTypeVector > clone() const override
Copy the managed vector.
virtual SG::AuxDataSpanBase getDataSpanImpl() const override final
Return a span object describing the current vector.
size_t auxid_t
Identifier for a particular aux data item.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Minimal span-like object describing the range of an auxiliary variable.
void * beg
Pointer to the start of the variable's vector.