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, void* beg, void* end,
69  SG::IAuxStore& srcStore) override;
70 
72 
73  private:
75  void copyRange( const void* src, void* dst, size_t n );
76  // Function clearing the payload of a given range
77  void clearRange( void* dst, size_t n );
78 
85  std::unique_ptr<::TVirtualCollectionProxy> m_proxy;
87  void* m_vec;
88 
89  }; // class TAuxVector
90 
91 } // namespace xAOD
92 
93 #endif // XAODROOTACCESS_TOOLS_TAUXVECTOR_H
SG::IAuxTypeVector::isLinked
bool isLinked() const
Return true if this variable is linked from another one.
Definition: IAuxTypeVector.h:221
xAOD::TAuxVector::reserve
virtual void reserve(size_t sz) override
Change the capacity of the vector.
Definition: TAuxVector.cxx:140
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:123
xAOD::TAuxVector::insertMove
virtual bool insertMove(size_t pos, void *beg, void *end, SG::IAuxStore &srcStore) override
Insert a range of elements via move.
Definition: TAuxVector.cxx:201
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:85
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
IAuxTypeVector.h
Abstract interface for manipulating vectors of arbitrary types.
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
xAOD::TAuxVector::toPtr
virtual void * toPtr() override
Return a pointer to the start of the vector's data.
Definition: TAuxVector.cxx:113
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:107
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::size
virtual size_t size() const override
Return the size of the vector.
Definition: TAuxVector.cxx:128
xAOD::TAuxVector::resize
virtual bool resize(size_t sz) override
Change the size of the vector.
Definition: TAuxVector.cxx:133
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
SG::IAuxTypeVector::auxid
auxid_t auxid() const
Return the auxid of the variable this vector represents.
Definition: IAuxTypeVector.h:227
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:40
xAOD::TAuxVector::shift
virtual bool shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the vector.
Definition: TAuxVector.cxx:171
xAOD::TAuxVector::clearRange
void clearRange(void *dst, size_t n)
Definition: TAuxVector.cxx:233
xAOD::TAuxVector::m_vec
void * m_vec
Pointer to the vector object.
Definition: TAuxVector.h:87
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:222
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:80
xAOD::TAuxVector::~TAuxVector
~TAuxVector()
Destructor.
Definition: TAuxVector.cxx:66