ATLAS Offline Software
TAuxVectorFactory.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_TAUXVECTORFACTORY_H
6 #define XAODROOTACCESS_TOOLS_TAUXVECTORFACTORY_H
7 
8 // Athena include(s):
11 #include "RootUtils/TSMethodCall.h"
12 
13 // Forward declaration(s):
14 class TClass;
15 class TVirtualCollectionProxy;
16 
17 namespace xAOD {
18 
31 
32  public:
34  TAuxVectorFactory( ::TClass* cl );
36  virtual ~TAuxVectorFactory();
37 
40 
43 
45  virtual std::unique_ptr< SG::IAuxTypeVector >
46  create( SG::auxid_t auxid, size_t size, size_t capacity,
47  bool isLinked ) const override;
48 
50  virtual std::unique_ptr< SG::IAuxTypeVector >
51  createFromData( SG::auxid_t auxid, void* data,
52  SG::IAuxTypeVector* linkedVector,
53  bool isPacked,
54  bool ownFlag,
55  bool isLinked ) const override;
56 
58  virtual void
59  copy( SG::auxid_t auxid,
60  SG::AuxVectorData& dst, size_t dst_index,
61  const SG::AuxVectorData& src, size_t src_index,
62  size_t n) const override;
63 
65  virtual void
67  SG::AuxVectorData& dst, size_t dst_index,
68  const SG::AuxVectorData& src, size_t src_index,
69  size_t n ) const override;
70 
72  virtual void swap( SG::auxid_t auxid,
73  SG::AuxVectorData& a, size_t aindex,
74  SG::AuxVectorData& b, size_t bindex,
75  size_t n ) const override;
76 
78  void clear( void* dst, size_t dst_index, size_t n ) const;
79  virtual void clear( SG::auxid_t auxid,
80  SG::AuxVectorData& dst,
81  size_t dst_index,
82  size_t n ) const override;
83 
85  virtual size_t getEltSize() const override;
86 
88  virtual const std::type_info* tiVec() const override;
89 
91  virtual bool isDynamic() const override { return true; }
92 
98  virtual const std::type_info* tiAlloc() const override;
99 
100 
104  virtual std::string tiAllocName() const override;
105 
106 
108 
109  private:
111  ::TClass* m_class;
113  ::TVirtualCollectionProxy* m_proxy;
117  void* m_defElt;
118 
119  }; // class TAuxVectorFactory
120 
121 } // namespace xAOD
122 
123 #endif // XAODROOTACCESS_TOOLS_TAUXVECTORFACTORY_H
TSMethodCall.h
Helper for thread-safe TMethodCall. Extracted from Type.
xAOD::TAuxVectorFactory::copy
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.
Definition: TAuxVectorFactory.cxx:81
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
xAOD::TAuxVectorFactory::tiVec
virtual const std::type_info * tiVec() const override
Type info of the vector type handled by the factory object.
Definition: TAuxVectorFactory.cxx:244
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
xAOD::TAuxVectorFactory::swap
virtual void swap(SG::auxid_t auxid, SG::AuxVectorData &a, size_t aindex, SG::AuxVectorData &b, size_t bindex, size_t n) const override
Swap the payload of two ranges of elements in memory.
Definition: TAuxVectorFactory.cxx:142
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TAuxVectorFactory::clear
void clear(void *dst, size_t dst_index, size_t n) const
Clear the payload of a given range inside a vector.
Definition: TAuxVectorFactory.cxx:200
xAOD::TAuxVectorFactory::~TAuxVectorFactory
virtual ~TAuxVectorFactory()
Destructor.
Definition: TAuxVectorFactory.cxx:52
xAOD::TAuxVectorFactory::tiAlloc
virtual const std::type_info * tiAlloc() const override
Return the type_info of the vector allocator.
Definition: TAuxVectorFactory.cxx:249
xAOD::TAuxVectorFactory::TAuxVectorFactory
TAuxVectorFactory(const TAuxVectorFactory &)=delete
xAOD::TAuxVectorFactory::m_defElt
void * m_defElt
Pointer to a default element object in memory.
Definition: TAuxVectorFactory.h:117
xAOD::TAuxVectorFactory::create
virtual std::unique_ptr< SG::IAuxTypeVector > create(SG::auxid_t auxid, size_t size, size_t capacity, bool isLinked) const override
Create a new vector in memory with the requested size and capacity.
Definition: TAuxVectorFactory.cxx:61
RootUtils::TSMethodCall
Helper for making a thread-safe function call.
Definition: TSMethodCall.h:33
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
beamspotman.n
n
Definition: beamspotman.py:731
SG::IAuxTypeVectorFactory
Interface for factory objects that create vectors.
Definition: IAuxTypeVectorFactory.h:50
xAOD::TAuxVectorFactory::isDynamic
virtual bool isDynamic() const override
Type of the factory.
Definition: TAuxVectorFactory.h:91
xAOD::TAuxVectorFactory::tiAllocName
virtual std::string tiAllocName() const override
Return the (demangled) name of the vector allocator.
Definition: TAuxVectorFactory.cxx:254
xAOD::TAuxVectorFactory::ATLAS_THREAD_SAFE
RootUtils::TSMethodCall m_assign ATLAS_THREAD_SAFE
Assignment operator.
Definition: TAuxVectorFactory.h:115
xAOD::TAuxVectorFactory::copyForOutput
virtual void copyForOutput(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 one element from one location to another.
Definition: TAuxVectorFactory.cxx:128
xAOD::TAuxVectorFactory
Auxiliary vector factory based on a ROOT dictionary.
Definition: TAuxVectorFactory.h:30
xAOD::TAuxVectorFactory::operator=
TAuxVectorFactory & operator=(const TAuxVectorFactory &)=delete
xAOD::TAuxVectorFactory::m_proxy
::TVirtualCollectionProxy * m_proxy
ROOT's description of the vector type.
Definition: TAuxVectorFactory.h:113
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
xAOD::TAuxVectorFactory::getEltSize
virtual size_t getEltSize() const override
Size of the elements inside the vector type.
Definition: TAuxVectorFactory.cxx:239
IAuxTypeVectorFactory.h
Interface for factory objects that create vectors.
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:40
xAOD::TAuxVectorFactory::m_class
::TClass * m_class
The type that this factory operates on.
Definition: TAuxVectorFactory.h:111
xAOD::TAuxVectorFactory::createFromData
virtual std::unique_ptr< SG::IAuxTypeVector > createFromData(SG::auxid_t auxid, void *data, SG::IAuxTypeVector *linkedVector, bool isPacked, bool ownFlag, bool isLinked) const override
Create a vector object of this type from a data blob.
Definition: TAuxVectorFactory.cxx:71
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:167
checker_macros.h
Define macros for attributes used to control the static checker.
xAOD::TAuxVectorFactory::TAuxVectorFactory
TAuxVectorFactory(::TClass *cl)
Constructor, setting up the object based on a dictionary.
Definition: TAuxVectorFactory.cxx:22
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26