ATLAS Offline Software
RootAuxVectorFactory.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
17 #include "AthLinks/ElementLinkBase.h"
18 #include "CxxUtils/ClassName.h"
20 #include "TClass.h"
21 #include "TVirtualCollectionProxy.h"
22 #include "TROOT.h"
23 #include <iostream>
24 #include <stdexcept>
25 
26 
27 namespace {
28 
29 
38 TClass* lookupVectorType (TClass *cl)
39 {
40  std::string tname = cl->GetName();
41  tname += "::vector_type";
42  TDataType* typ = gROOT->GetType (tname.c_str());
43  if (typ)
44  return TClass::GetClass (typ->GetFullTypeName());
45  return nullptr;
46 }
47 
48 
49 } // anonymous namespace
50 
51 
52 namespace SG {
53 
54 
64  SG::auxid_t auxid,
65  size_t size, size_t /*capacity*/,
66  bool isLinked)
67  : IAuxTypeVector (auxid, isLinked),
68  m_factory (factory),
69  m_ownFlag (true)
70 {
71  const TClass* vecClass = factory->vecClass();
72  m_proxy.reset (vecClass->GetCollectionProxy()->Generate());
73  m_obj = factory->objClass()->New ();
74  m_vec = reinterpret_cast<char*> (m_obj) + factory->offset();
75  m_proxy->PushProxy (m_vec);
76  this->resize (size);
77 }
78 
79 
96  SG::auxid_t auxid,
97  void* data,
98  bool isPacked,
99  bool ownFlag,
100  bool isLinked)
101  : IAuxTypeVector (auxid, isLinked),
102  m_factory (factory),
103  m_ownFlag (ownFlag)
104 {
105  if (isPacked) std::abort();
106  const TClass* vecClass = factory->vecClass();
107  m_proxy.reset (vecClass->GetCollectionProxy()->Generate());
108  m_obj = data;
109  m_vec = reinterpret_cast<char*> (m_obj) + factory->offset();
110  m_proxy->PushProxy (m_vec);
111 }
112 
113 
119  : IAuxTypeVector (other),
120  m_factory (other.m_factory),
121  m_proxy (other.m_proxy->Generate()),
122  m_ownFlag (true)
123 {
124  m_obj = m_factory->objClass()->New ();
125  m_vec = reinterpret_cast<char*> (m_obj) + m_factory->offset();
126  m_proxy->PushProxy (m_vec);
127  size_t sz = other.size();
128  this->resize (sz);
129 
130  if (sz > 0) {
132  const void* otherPtr = other.toPtr();
133  rootType.copyRange (this->toPtr(), otherPtr, sz);
134  }
135 }
136 
137 
144 {
145  if (m_ownFlag)
146  m_factory->objClass()->Destructor (m_obj);
147 }
148 
149 
153 std::unique_ptr<SG::IAuxTypeVector> RootAuxVector::clone() const
154 {
155  return std::make_unique<RootAuxVector> (*this);
156 }
157 
158 
163 {
164  if (m_proxy->Size() == 0)
165  return 0;
166  return m_proxy->At(0);
167 }
168 
169 
173 const void* RootAuxVector::toPtr () const
174 {
175  if (m_proxy->Size() == 0)
176  return 0;
177  TVirtualCollectionProxy* proxy ATLAS_THREAD_SAFE = m_proxy.get();
178  return proxy->At(0);
179 }
180 
181 
186 {
187  return m_obj;
188 }
189 
190 
194 size_t RootAuxVector::size() const
195 {
196  return m_proxy->Size();
197 }
198 
199 
207 {
208  const void* orig = this->getDataSpan().beg;
209  m_proxy->Allocate(sz, false);
210  this->storeDataSpan();
211  return this->getDataSpan().beg == orig;
212 }
213 
214 
219 void RootAuxVector::reserve (size_t /*sz*/)
220 {
221 }
222 
223 
250 bool RootAuxVector::shift (size_t pos, ptrdiff_t offs)
251 {
252  size_t eltsz = m_proxy->GetIncrement();
253 
255 
256  if (offs < 0) {
257  if (-offs > static_cast<ptrdiff_t>(pos)) offs = -pos;
258  char* beg = reinterpret_cast<char*>(m_proxy->At(0));
259  rootType.copyRange (beg + eltsz*(pos+offs),
260  beg + eltsz*pos,
261  m_proxy->Size() - pos);
262  m_proxy->Allocate (m_proxy->Size() + offs, false);
263  this->storeDataSpan();
264  return true;
265  }
266  else if (offs > 0) {
267  size_t oldsz = m_proxy->Size();
268  m_proxy->Allocate (oldsz + offs, false);
269  char* beg = reinterpret_cast<char*>(m_proxy->At(0));
270  if (pos < oldsz)
271  rootType.copyRange (beg + eltsz*(pos+offs),
272  beg + eltsz*pos,
273  oldsz - pos);
274  rootType.clearRange (beg + eltsz*pos, offs);
275  this->storeDataSpan();
276  return false;
277  }
278  return true;
279 }
280 
281 
305  void* src, size_t src_pos, size_t src_n,
306  SG::IAuxStore& /*srcStore*/)
307 {
308  size_t eltsz = m_proxy->GetIncrement();
309  const void* orig = this->getDataSpan().beg;
311 
312  char* srcp = reinterpret_cast<char*> (src);
313  char* begp = srcp + src_pos*eltsz;
314 
315  shift (pos, src_n);
316  // FIXME: want move, not copy.
317  // But i don't seem to be able to call move operations through cling,
318  // so just use copy for now.
319  rootType.copyRange (reinterpret_cast<char*>(this->toPtr()) + pos*eltsz,
320  begp, src_n);
321  this->storeDataSpan();
322  return this->getDataSpan().beg == orig;
323 }
324 
325 
337 const std::type_info* RootAuxVector::objType() const
338 {
339  return m_factory->objClass()->GetTypeInfo();
340 }
341 
342 
349 {
350  void* ptr ATLAS_THREAD_SAFE = const_cast<void*>(this->toPtr());
351  return AuxDataSpanBase (ptr, m_proxy->Size());
352 }
353 
354 
359 {
360  IAuxTypeVector::storeDataSpan (this->toPtr(), m_proxy->Size());
361 }
362 
363 
364 //==================================================================
365 
366 
372  : m_objClass (objClass),
373  m_vecClass (objClass),
374  m_offset (0),
375  m_isEL (NONE)
376 {
377  TVirtualCollectionProxy* proxy = m_vecClass->GetCollectionProxy();
378 
379  if (!proxy) {
380  TClass* vecClass = lookupVectorType (objClass);
381  if (vecClass) {
382  m_vecClass = vecClass;
383  Int_t offs = objClass->GetBaseClassOffset (vecClass);
384  if (offs >= 0) {
385  m_offset = offs;
386  proxy = vecClass->GetCollectionProxy();
387  }
388  else {
389  ATHCONTAINERS_ERROR("RootAuxVectorFactory::RootAuxVectorFactory",
390  std::string("Can't find vector base class in ") +
391  objClass->GetName());
392  }
393  }
394  }
395 
396  if (!proxy) {
397  std::string err = "Can't find collection proxy for ";
398  err += m_vecClass->GetName();
399  throw std::runtime_error (err.c_str());
400  }
401 
402  if (m_vecClass->GetTypeInfo() == 0) {
403  ATHCONTAINERS_ERROR("RootAuxVectorFactory::RootAuxVectorFactory",
404  std::string("No type_info available for class ") +
405  m_vecClass->GetName() +
406  std::string(". There is probably a missing dictionary. We will likely crash further on."));
407  }
408 
409  TClass* eltClass = proxy->GetValueClass();
410  if (eltClass) {
411  m_type.init (eltClass);
412 
413  const std::type_info* ti = eltClass->GetTypeInfo();
414  if (ti) {
415 
416  static const CxxUtils::ClassName pat1 ("ElementLink<$T>");
417  static const CxxUtils::ClassName pat2 ("std::vector<ElementLink<$T> >");
418 
421  if (clname.match (pat1, matches)) {
423  if (eltClass->GetBaseClass ("ElementLinkBase") == nullptr) {
425  }
426  }
427  else if (clname.match (pat2, matches)) {
429 
430  TVirtualCollectionProxy* proxy2 = eltClass->GetCollectionProxy();
431  if (proxy2) {
432  TClass* innerEltClass = proxy2->GetValueClass();
433  if (innerEltClass) {
434  if (innerEltClass->GetBaseClass ("ElementLinkBase") == nullptr) {
436  }
437  }
438  }
439  }
440  }
441  }
442  else
443  m_type.init (proxy->GetType());
444 }
445 
446 
451 {
452 }
453 
454 
462 std::unique_ptr<SG::IAuxTypeVector>
464  size_t size,
465  size_t capacity,
466  bool isLinked) const
467 {
468  return std::make_unique<RootAuxVector> (this, auxid, size, capacity,
469  isLinked);
470 }
471 
472 
493 std::unique_ptr<SG::IAuxTypeVector>
495  void* data,
496  IAuxTypeVector* linkedVector,
497  bool isPacked,
498  bool ownFlag,
499  bool isLinked) const
500 {
501  if (linkedVector) std::abort();
502  return std::make_unique<RootAuxVector> (this, auxid, data, isPacked, ownFlag,
503  isLinked);
504 }
505 
506 
510  AuxVectorData& dst,
511  size_t dst_index,
512  const AuxVectorData& src,
513  size_t src_index,
514  size_t n) const
515 {
516  if (n == 0) return nullptr;
517  size_t eltsz = m_type.getSize();
518  char* dstptr = reinterpret_cast<char*> (dst.getDataArray (auxid));
519  if (&src == &dst) {
520  // Source and destination containers are the same,
521  // so we don't need to bother with fetching the src pointer.
522  // copyRange properly handles overlapping regions.
523  m_type.copyRange (dstptr + eltsz*dst_index, dstptr + eltsz*src_index, n);
524  return dstptr + eltsz*dst_index;
525  }
526  else {
527  const char* srcptr = reinterpret_cast<const char*>(src.getDataArrayAllowMissing (auxid));
528  if (srcptr) {
529  m_type.copyRange (dstptr + eltsz*dst_index, srcptr + eltsz*src_index, n);
530  return dstptr + eltsz*dst_index;
531  }
532  else {
533  m_type.clearRange (dstptr + eltsz*dst_index, n);
534  return nullptr;
535  }
536  }
537 }
538 
539 
552  AuxVectorData& dst,
553  size_t dst_index,
554  const AuxVectorData& src,
555  size_t src_index,
556  size_t n) const
557 {
558  (void)copyImpl (auxid, dst, dst_index, src, src_index, n);
559 }
560 
561 
575  AuxVectorData& dst, size_t dst_index,
576  const AuxVectorData& src, size_t src_index,
577  size_t n) const
578 {
579  char* dstptr = copyImpl (auxid, dst, dst_index, src, src_index, n);
580 
581  if (m_isEL == ELEMENT_LINK) {
582  size_t eltsz = m_type.getSize();
583  for (size_t i = 0; i < n; i++) {
584  reinterpret_cast<ElementLinkBase*>(dstptr + i*eltsz)->thin();
585  }
586  }
587  else if (m_isEL == ELEMENT_LINK_VECTOR) {
588  size_t eltsz = m_type.getSize();
589  for (size_t i = 0; i < n; i++) {
590  std::vector<ElementLinkBase>& v =
591  *reinterpret_cast<std::vector<ElementLinkBase>* > (dstptr +i*eltsz);
592  for (ElementLinkBase& el : v) {
593  el.thin();
594  }
595  }
596  }
597  else if (m_isEL == ELEMENT_LINK_NONPOINTER) {
598  ATHCONTAINERS_ERROR("RootAuxVectorFactory::copyForOutput",
599  std::string("Cannot apply thinning for ElementLink with non-pointer element: ") +
600  m_vecClass->GetName());
601  }
602 }
603 
604 
618  AuxVectorData& a, size_t aindex,
619  AuxVectorData& b, size_t bindex,
620  size_t n) const
621 {
622  if (n == 0) return;
623  void* aptr = a.getDataArray (auxid);
624  void* bptr = &a == &b ? aptr : b.getDataArray (auxid);
625  m_type.swapRange (aptr, aindex, bptr, bindex, n);
626 }
627 
628 
637  AuxVectorData& dst, size_t dst_index,
638  size_t n) const
639 {
640  if (n == 0) return;
641  m_type.clearRange (dst.getDataArray (auxid), dst_index, n);
642 }
643 
644 
649 {
650  return m_type.getSize();
651 }
652 
653 
657 const std::type_info* RootAuxVectorFactory::tiVec() const
658 {
659  return m_objClass->GetTypeInfo();
660 }
661 
662 
669 {
670  return true;
671 }
672 
673 
679 const std::type_info* RootAuxVectorFactory::tiAlloc() const
680 {
681  return nullptr;
682 }
683 
684 
689 {
690  std::string name = SG::normalizedTypeinfoName (*m_vecClass->GetTypeInfo());
692  std::string alloc_name;
693  if (cn.ntargs() >= 2) {
694  alloc_name = cn.targ(1).fullName();
695  }
696  else if (cn.ntargs() == 1) {
697  alloc_name = "std::allocator<" + cn.targ(0).fullName();
698  if (alloc_name[alloc_name.size()-1] == '>') alloc_name += " ";
699  alloc_name += ">";
700  }
701  return alloc_name;
702 }
703 
704 
705 } // namespace SG
SG::RootAuxVector::toPtr
virtual void * toPtr() override
Return a pointer to the start of the vector's data.
Definition: RootAuxVectorFactory.cxx:162
SG::RootAuxVector::toVector
virtual void * toVector() override
Return a pointer to the overall object.
Definition: RootAuxVectorFactory.cxx:185
ClassName.h
Recursively separate out template arguments in a C++ class name.
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
RootUtils::Type::swapRange
void swapRange(void *a, size_t a_index, void *b, size_t b_index, size_t n) const
Swap a range of objects between vectors.
Definition: Type.cxx:567
SG::IAuxTypeVector::getDataSpan
const AuxDataSpanBase & getDataSpan() const
Return a reference to a description of this vector's start+size.
Definition: IAuxTypeVector.h:261
SG::AuxVectorData::getDataArray
const void * getDataArray(SG::auxid_t auxid) const
Return a const pointer to the start of an aux data vector.
SG::RootAuxVector::reserve
virtual void reserve(size_t sz) override
Change the capacity of the vector.
Definition: RootAuxVectorFactory.cxx:219
RootUtils::Type::init
void init(const std::string &typname)
Initialize from a type name.
Definition: Type.cxx:154
SG::RootAuxVector::m_ownFlag
bool m_ownFlag
Should be delete the vector object?
Definition: RootAuxVectorFactory.h:256
fitman.sz
sz
Definition: fitman.py:527
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::RootAuxVector::clone
virtual std::unique_ptr< SG::IAuxTypeVector > clone() const override
Make a copy of this vector.
Definition: RootAuxVectorFactory.cxx:153
SG::RootAuxVectorFactory::isDynamic
virtual bool isDynamic() const override
True if the vectors created by this factory work by dynamic emulation (via TVirtualCollectionProxy or...
Definition: RootAuxVectorFactory.cxx:668
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
SG::normalizedTypeinfoName
std::string normalizedTypeinfoName(const std::type_info &info)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
Definition: normalizedTypeinfoName.cxx:120
SG::RootAuxVectorFactory::m_isEL
enum SG::RootAuxVectorFactory::@28 m_isEL
Flag to tell whether we need to do thinning.
ATHCONTAINERS_ERROR
#define ATHCONTAINERS_ERROR(ctx, msg)
Definition: error.h:54
SG::RootAuxVector::shift
virtual bool shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the vector.
Definition: RootAuxVectorFactory.cxx:250
SG::RootAuxVectorFactory::m_type
RootUtils::Type m_type
Wrapper for the ROOT type of the element.
Definition: RootAuxVectorFactory.h:486
SG::RootAuxVector::m_obj
void * m_obj
Pointer to the overall object itself.
Definition: RootAuxVectorFactory.h:250
SG::RootAuxVectorFactory::clear
virtual void clear(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, size_t n) const override
Clear a range of elements within a vector.
Definition: RootAuxVectorFactory.cxx:636
SG::RootAuxVector::insertMove
virtual bool insertMove(size_t pos, void *src, size_t src_pos, size_t src_n, SG::IAuxStore &srcStore) override
Insert elements into the vector via move semantics.
Definition: RootAuxVectorFactory.cxx:304
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
SG::RootAuxVectorFactory::tiAllocName
virtual std::string tiAllocName() const override
Return the (demangled) name of the vector allocator.
Definition: RootAuxVectorFactory.cxx:688
ElementLinkBase
Base class for ElementLinks to vectors of pointers.
Definition: AthLinks/ElementLinkBase.h:59
RootUtils::Type::getSize
size_t getSize() const
Return the size in bytes of an instance of the described type.
Definition: Type.cxx:375
SG::RootAuxVectorFactory::m_offset
size_t m_offset
Offset of the STL vector within the overall object.
Definition: RootAuxVectorFactory.h:483
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
SG::RootAuxVector::m_factory
const RootAuxVectorFactory * m_factory
Pointer back to the factory class for this type.
Definition: RootAuxVectorFactory.h:241
SG::RootAuxVectorFactory::RootAuxVectorFactory
RootAuxVectorFactory(TClass *objClass)
Constructor.
Definition: RootAuxVectorFactory.cxx:371
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::RootAuxVectorFactory::rootType
const RootUtils::Type & rootType() const
Return the ROOT type wrapper.
Definition: RootAuxVectorFactory.h:297
SG::RootAuxVector::size
virtual size_t size() const override
Return the size of the vector.
Definition: RootAuxVectorFactory.cxx:194
SG::IAuxTypeVector::storeDataSpan
void storeDataSpan(void *beg, size_t size)
Update the stored span.
Definition: IAuxTypeVector.h:284
CxxUtils::ClassName::ntargs
size_t ntargs() const
Return number of template arguments.
Definition: CxxUtils/Root/ClassName.cxx:275
CxxUtils::ClassName
Recursively separate out template arguments in a C++ class name.
Definition: CxxUtils/CxxUtils/ClassName.h:101
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
lumiFormat.i
int i
Definition: lumiFormat.py:85
RootUtils::Type::clearRange
void clearRange(void *dst, size_t n) const
Clear a range of objects.
Definition: Type.cxx:420
beamspotman.n
n
Definition: beamspotman.py:731
SG::AuxDataSpanBase::beg
void * beg
Pointer to the start of the variable's vector.
Definition: AuxDataSpan.h:53
SG::RootAuxVectorFactory::offset
size_t offset() const
Return the offset of the vector within the object.
Definition: RootAuxVectorFactory.h:319
CxxUtils::ClassName::fullName
std::string fullName() const
Return the full name of the expression.
Definition: CxxUtils/Root/ClassName.cxx:252
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
error.h
Helper for emitting error messages.
SG::RootAuxVector::storeDataSpan
void storeDataSpan()
Update the stored span.
Definition: RootAuxVectorFactory.cxx:358
SG::RootAuxVectorFactory::tiVec
virtual const std::type_info * tiVec() const override
Return the type_info of the overall object.
Definition: RootAuxVectorFactory.cxx:657
SG::RootAuxVectorFactory::ELEMENT_LINK_VECTOR
@ ELEMENT_LINK_VECTOR
Definition: RootAuxVectorFactory.h:489
AuxVectorData.h
Manage lookup of vectors of auxiliary data.
SG::RootAuxVectorFactory::m_objClass
TClass * m_objClass
The TClass for the overall object.
Definition: RootAuxVectorFactory.h:477
normalizedTypeinfoName.h
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
CxxUtils::ClassName::targ
const ClassName & targ(size_t i) const
Return one template argument.
Definition: CxxUtils/Root/ClassName.cxx:285
SG::RootAuxVector::m_vec
void * m_vec
Pointer to the vector object itself.
Definition: RootAuxVectorFactory.h:253
SG::AuxDataSpanBase
Minimal span-like object describing the range of an auxiliary variable.
Definition: AuxDataSpan.h:39
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
SG::RootAuxVectorFactory::tiAlloc
virtual const std::type_info * tiAlloc() const override
Return the type_info of the vector allocator.
Definition: RootAuxVectorFactory.cxx:679
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SG::RootAuxVectorFactory::getEltSize
virtual size_t getEltSize() const override
Return the size of an element of this vector type.
Definition: RootAuxVectorFactory.cxx:648
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
SG::RootAuxVector::objType
virtual const std::type_info * objType() const override
Return the type of the complete object to be saved.
Definition: RootAuxVectorFactory.cxx:337
SG::RootAuxVectorFactory::m_vecClass
TClass * m_vecClass
The TClass for the std::vector.
Definition: RootAuxVectorFactory.h:480
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
SG::RootAuxVectorFactory::copyForOutput
virtual void copyForOutput(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n) const override
Copy elements between vectors, possibly applying thinning.
Definition: RootAuxVectorFactory.cxx:574
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::RootAuxVectorFactory::create
virtual std::unique_ptr< SG::IAuxTypeVector > create(SG::auxid_t auxid, size_t size, size_t capacity, bool isLinked) const override
Create a vector object of this type.
Definition: RootAuxVectorFactory.cxx:463
SG::RootAuxVectorFactory
Dynamic implementation of IAuxVectorFactory, relying on root's vector proxy.
Definition: RootAuxVectorFactory.h:279
SG::RootAuxVector
Dynamic implementation of IAuxTypeVector, relying on root vector proxy.
Definition: RootAuxVectorFactory.h:48
SG::RootAuxVectorFactory::ELEMENT_LINK
@ ELEMENT_LINK
Definition: RootAuxVectorFactory.h:489
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
RootUtils::Type::copyRange
void copyRange(void *dst, const void *src, size_t n) const
Copy a range of objects.
Definition: Type.cxx:389
CxxUtils::ClassName::match_t
std::map< std::string, ClassName > match_t
Map used to hold variable assignments from matching.
Definition: CxxUtils/CxxUtils/ClassName.h:200
SG::RootAuxVector::getDataSpanImpl
virtual AuxDataSpanBase getDataSpanImpl() const override final
Return a span object describing the current vector.
Definition: RootAuxVectorFactory.cxx:348
SG::RootAuxVectorFactory::swap
virtual void swap(SG::auxid_t auxid, AuxVectorData &a, size_t aindex, AuxVectorData &b, size_t bindex, size_t n) const override
Swap elements between vectors.
Definition: RootAuxVectorFactory.cxx:617
SG::RootAuxVectorFactory::copy
virtual void copy(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n) const override
Copy elements between vectors.
Definition: RootAuxVectorFactory.cxx:551
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
RootAuxVectorFactory.h
Dynamic implementation of IAuxVectorFactory, relying on root's vector proxy.
RootUtils::Type
Wrapper for ROOT types.
Definition: Type.h:40
SG::RootAuxVector::m_proxy
std::unique_ptr< TVirtualCollectionProxy > m_proxy
The collection proxy for the vector.
Definition: RootAuxVectorFactory.h:247
SG::RootAuxVector::RootAuxVector
RootAuxVector(const RootAuxVectorFactory *factory, SG::auxid_t auxid, size_t size, size_t capacity, bool isLinked)
Constructor.
Definition: RootAuxVectorFactory.cxx:63
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:168
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
SG::RootAuxVectorFactory::~RootAuxVectorFactory
virtual ~RootAuxVectorFactory() override
Destructor.
Definition: RootAuxVectorFactory.cxx:450
SG::RootAuxVectorFactory::ELEMENT_LINK_NONPOINTER
@ ELEMENT_LINK_NONPOINTER
Definition: RootAuxVectorFactory.h:489
SG::RootAuxVectorFactory::createFromData
virtual std::unique_ptr< SG::IAuxTypeVector > createFromData(SG::auxid_t auxid, void *data, IAuxTypeVector *linkedVector, bool isPacked, bool ownFlag, bool isLinked) const override
Create a vector object of this type from a data blob.
Definition: RootAuxVectorFactory.cxx:494
checker_macros.h
Define macros for attributes used to control the static checker.
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
SG::RootAuxVector::~RootAuxVector
virtual ~RootAuxVector() override
Destructor.
Definition: RootAuxVectorFactory.cxx:143
xAOD::Utils::rootType
char rootType(char typeidType)
This function is used internally in the code when creating primitive dynamic auxiliary branches.
Definition: Control/xAODRootAccess/Root/Utils.cxx:251
SG::RootAuxVectorFactory::copyImpl
char * copyImpl(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n) const
Helper for copy; returns a pointer to the first destination object, or nullptr if the destination was...
Definition: RootAuxVectorFactory.cxx:509
SG::RootAuxVector::resize
virtual bool resize(size_t sz) override
Change the size of the vector.
Definition: RootAuxVectorFactory.cxx:206
CxxUtils::ClassName::match
bool match(const ClassName &pattern, match_t &matches) const
Match this expression against a pattern.
Definition: CxxUtils/Root/ClassName.cxx:339