|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #include <TVirtualCollectionProxy.h>
22 const ::TClass*
cl,
size_t size,
size_t,
24 : IAuxTypeVector( auxid, isLinked ),
26 m_proxy(
cl->GetCollectionProxy()->Generate() ), m_vec(
cl->New() ) {
30 ::Fatal(
"xAOD::TAuxVector::TAuxVector",
43 : IAuxTypeVector(
parent ),
44 m_factory(
parent.m_factory ), m_proxy(
parent.m_proxy->Generate() ),
45 m_vec(
parent.m_proxy->GetCollectionClass()->New() ) {
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 );
138 m_proxy->Allocate( sz,
false );
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() );
virtual void copy(SG::auxid_t auxid, SG::AuxVectorData &dst, size_t dst_index, const SG::AuxVectorData &src, size_t src_index, size_t n) const override
Copy elements from one location to another.
virtual void reserve(size_t sz) override
Change the capacity of the vector.
const AuxDataSpanBase & getDataSpan() const
Return a reference to a description of this vector's start+size.
virtual void * toVector() override
Return a pointer to the STL vector itself.
Make an AuxVectorData object from either a raw vector or an aux store.
std::unique_ptr<::TVirtualCollectionProxy > m_proxy
ROOT's description of the vector type Cloned from the proxy held by the TClass and permanently bound ...
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
void clear(void *dst, size_t dst_index, size_t n) const
Clear the payload of a given range inside a vector.
void storeDataSpan()
Update the stored span.
virtual void * toPtr() override
Return a pointer to the start of the vector's data.
size_t auxid_t
Identifier for a particular aux data item.
virtual std::unique_ptr< SG::IAuxTypeVector > clone() const override
Copy the managed vector.
void * beg
Pointer to the start of the variable's vector.
TAuxVector(const TAuxVectorFactory *factory, SG::auxid_t auxid, const ::TClass *cl, size_t size, size_t capacity, bool isLinked)
Constructor.
TAuxVector & operator=(const TAuxVector &other)
Assignment operator.
Auxiliary vector type for types known to ROOT.
Manage lookup of vectors of auxiliary data.
Auxiliary vector factory based on a ROOT dictionary.
virtual SG::AuxDataSpanBase getDataSpanImpl() const override final
Return a span object describing the current vector.
virtual size_t size() const override
Return the size of the vector.
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.
virtual bool resize(size_t sz) override
Change the size of the vector.
Minimal span-like object describing the range of an auxiliary variable.
auxid_t auxid() const
Return the auxid of the variable this vector represents.
Interface for non-const operations on an auxiliary store.
Make an AuxVectorData object from either a raw array or an aux store.
Interface for factory objects that create vectors.
virtual bool shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the vector.
void clearRange(void *dst, size_t n)
void * m_vec
Pointer to the vector object.
void copyRange(const void *src, void *dst, size_t n)
Function copying the payload of a range to a new location.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
const TAuxVectorFactory * m_factory
The parent factory object.