ATLAS Offline Software
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):
13 class TClass;
14 class TVirtualCollectionProxy;
15 
16 namespace xAOD {
17  class TAuxVectorFactory;
18 
30  class TAuxVector : public SG::IAuxTypeVector {
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 );
41  ~TAuxVector();
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
SG::IAuxTypeVector::isLinked
bool isLinked() const
Return true if this variable is linked from another one.
Definition: IAuxTypeVector.h:226
xAOD::TAuxVector::reserve
virtual void reserve(size_t sz) override
Change the capacity of the vector.
Definition: TAuxVector.cxx:143
fitman.sz
sz
Definition: fitman.py:527
xAOD::TAuxVector::toVector
virtual void * toVector() override
Return a pointer to the STL vector itself.
Definition: TAuxVector.cxx:125
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
xAOD::TAuxVector::m_proxy
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
xAOD::other
@ other
Definition: TrackingPrimitives.h:509
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TAuxVector::storeDataSpan
void storeDataSpan()
Update the stored span.
Definition: TAuxVector.cxx:261
IAuxTypeVector.h
Abstract interface for manipulating vectors of arbitrary types.
xAOD::TAuxVector::toPtr
virtual void * toPtr() override
Return a pointer to the start of the vector's data.
Definition: TAuxVector.cxx:115
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
xAOD::TAuxVector::clone
virtual std::unique_ptr< SG::IAuxTypeVector > clone() const override
Copy the managed vector.
Definition: TAuxVector.cxx:109
beamspotman.n
n
Definition: beamspotman.py:731
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::TAuxVector::TAuxVector
TAuxVector(const TAuxVectorFactory *factory, SG::auxid_t auxid, const ::TClass *cl, size_t size, size_t capacity, bool isLinked)
Constructor.
Definition: TAuxVector.cxx:20
xAOD::TAuxVector::operator=
TAuxVector & operator=(const TAuxVector &other)
Assignment operator.
Definition: TAuxVector.cxx:71
xAOD::TAuxVector
Auxiliary vector type for types known to ROOT.
Definition: TAuxVector.h:30
xAOD::TAuxVectorFactory
Auxiliary vector factory based on a ROOT dictionary.
Definition: TAuxVectorFactory.h:30
xAOD::TAuxVector::getDataSpanImpl
virtual SG::AuxDataSpanBase getDataSpanImpl() const override final
Return a span object describing the current vector.
Definition: TAuxVector.cxx:256
xAOD::TAuxVector::size
virtual size_t size() const override
Return the size of the vector.
Definition: TAuxVector.cxx:130
xAOD::TAuxVector::insertMove
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.
Definition: TAuxVector.cxx:206
xAOD::TAuxVector::resize
virtual bool resize(size_t sz) override
Change the size of the vector.
Definition: TAuxVector.cxx:135
SG::AuxDataSpanBase
Minimal span-like object describing the range of an auxiliary variable.
Definition: AuxDataSpan.h:39
SG::IAuxTypeVector::auxid
auxid_t auxid() const
Return the auxid of the variable this vector represents.
Definition: IAuxTypeVector.h:232
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
IAuxTypeVectorFactory.h
Interface for factory objects that create vectors.
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
xAOD::TAuxVector::shift
virtual bool shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the vector.
Definition: TAuxVector.cxx:174
xAOD::TAuxVector::clearRange
void clearRange(void *dst, size_t n)
Definition: TAuxVector.cxx:239
xAOD::TAuxVector::m_vec
void * m_vec
Pointer to the vector object.
Definition: TAuxVector.h:96
xAOD::TAuxVector::copyRange
void copyRange(const void *src, void *dst, size_t n)
Function copying the payload of a range to a new location.
Definition: TAuxVector.cxx:228
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
xAOD::TAuxVector::m_factory
const TAuxVectorFactory * m_factory
The parent factory object.
Definition: TAuxVector.h:89
xAOD::TAuxVector::~TAuxVector
~TAuxVector()
Destructor.
Definition: TAuxVector.cxx:66