ATLAS Offline Software
Loading...
Searching...
No Matches
TAuxVector.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2//
3// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4//
5#ifndef XAODROOTACCESS_TOOLS_TAUXVECTOR_H
6#define XAODROOTACCESS_TOOLS_TAUXVECTOR_H
7
8// EDM include(s):
11
12// Forward declaration(s):
13class TClass;
14class TVirtualCollectionProxy;
15
16namespace xAOD {
18
31
32 public:
34 TAuxVector( const TAuxVectorFactory* factory,
36 const ::TClass* cl, size_t size, size_t capacity,
37 bool isLinked );
39 TAuxVector( const TAuxVector& parent );
42
45
48
50 virtual std::unique_ptr< SG::IAuxTypeVector > clone() const override;
51
53 virtual void* toPtr() override;
54 virtual const void* toPtr() const override;
56 virtual void* toVector() override;
57
59 virtual size_t size() const override;
60
62 virtual bool resize( size_t sz ) override;
64 virtual void reserve( size_t sz ) override;
66 virtual bool shift( size_t pos, ptrdiff_t offs ) override;
68 virtual bool insertMove (size_t pos,
69 void* src, size_t src_pos, size_t src_n,
70 SG::IAuxStore& srcStore) override;
71
73
74 protected:
76 virtual SG::AuxDataSpanBase getDataSpanImpl() const override final;
77
79 void storeDataSpan();
80
81
82 private:
84 void copyRange( const void* src, void* dst, size_t n );
85 // Function clearing the payload of a given range
86 void clearRange( void* dst, size_t n );
87
94 std::unique_ptr<::TVirtualCollectionProxy> m_proxy;
96 void* m_vec;
97
98 }; // class TAuxVector
99
100} // namespace xAOD
101
102#endif // XAODROOTACCESS_TOOLS_TAUXVECTOR_H
Interface for factory objects that create vectors.
Abstract interface for manipulating vectors of arbitrary types.
static Double_t sz
Interface for non-const operations on an auxiliary store.
Definition IAuxStore.h:48
Abstract interface for manipulating vectors of arbitrary types.
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.
Auxiliary vector factory based on a ROOT dictionary.
TAuxVector & operator=(const TAuxVector &other)
Assignment operator.
~TAuxVector()
Destructor.
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 ...
Definition TAuxVector.h:94
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.
Definition TAuxVector.h:96
const TAuxVectorFactory * m_factory
The parent factory object.
Definition TAuxVector.h:89
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.
Definition AuxTypes.h:27
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.
Definition AuxDataSpan.h:40