ATLAS Offline Software
JaggedVecVectorFactory.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
4  */
14 #ifndef ATHCONTAINERS_JAGGEDVECVECTORFACTORY_H
15 #define ATHCONTAINERS_JAGGEDVECVECTORFACTORY_H
16 
17 
20 
21 
22 namespace SG {
23 
24 
31 template <class T, class ALLOC = AuxAllocator_t<JaggedVecElt<T> > >
33  : public AuxTypeVectorFactoryImpl<JaggedVecElt<T>, ALLOC>
34 {
35 public:
37  using Shift = typename Elt::Shift;
38  using index_type = typename Elt::index_type;
39 
43 
44 
53  virtual
54  std::unique_ptr<IAuxTypeVector> create (SG::auxid_t auxid,
55  size_t size,
56  size_t capacity,
57  bool isLinked) const override;
58 
59 
75  virtual
76  std::unique_ptr<IAuxTypeVector> createFromData (SG::auxid_t auxid,
77  void* data,
78  IAuxTypeVector* linkedVector,
79  bool isPacked,
80  bool ownFlag,
81  bool isLinked) const override;
82 
83 
95  virtual void copy (SG::auxid_t auxid,
96  AuxVectorData& dst, size_t dst_index,
97  const AuxVectorData& src, size_t src_index,
98  size_t n) const override;
99 
100 
113  virtual void copyForOutput (SG::auxid_t auxid,
114  AuxVectorData& dst, size_t dst_index,
115  const AuxVectorData& src, size_t src_index,
116  size_t n) const override;
117 
118 
119 
132  virtual void swap (SG::auxid_t auxid,
133  AuxVectorData& a, size_t aindex,
134  AuxVectorData& b, size_t bindex,
135  size_t n) const override;
136 
137 
145  virtual void clear (SG::auxid_t auxid,
146  AuxVectorData& dst, size_t dst_index,
147  size_t n) const override;
148 
149 
150 private:
163  void copyImpl (SG::auxid_t auxid,
164  AuxVectorData& dst, size_t dst_index,
165  const AuxVectorData& src, size_t src_index,
166  size_t n, bool for_output) const;
167 };
168 
169 
170 
176 template <class T, class ALLOC>
178  : public JaggedVecVectorFactory<T, ALLOC>
179 {
183  using Base::Base;
184 };
185 
186 
187 } // namespace SG
188 
189 
191 
192 
193 #endif // not ATHCONTAINERS_JAGGEDVECVECTORFACTORY_H
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
SG::AuxTypeVectorFactory
Factory object that creates vectors using AuxTypeVector.
Definition: AuxTypeVectorFactory.h:219
AuxTypeVectorFactory.h
Factory object that creates vectors using AuxTypeVector.
SG::JaggedVecVectorT::vector_value_type
typename Base::vector_value_type vector_value_type
Definition: JaggedVecVector.h:167
SG::JaggedVecVectorFactory::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.
SG::JaggedVecVectorFactory::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.
SG::JaggedVecVectorFactory::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.
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
SG::JaggedVecEltBase::index_type
uint32_t index_type
Type for the indices.
Definition: JaggedVecImpl.h:56
SG::AuxTypeVectorFactoryImpl::vector_value_type
typename AuxTypeVector_t::vector_value_type vector_value_type
Definition: AuxTypeVectorFactory.h:44
SG::JaggedVecVectorFactory
Factory objects that creates vectors for packed links.
Definition: JaggedVecVectorFactory.h:34
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::AuxTypeVectorFactoryImpl::AuxTypeVector_t
AuxTypeVector< T, ALLOC > AuxTypeVector_t
Definition: AuxTypeVectorFactory.h:42
SG::JaggedVecVectorFactory::create
virtual std::unique_ptr< IAuxTypeVector > create(SG::auxid_t auxid, size_t size, size_t capacity, bool isLinked) const override
Create a vector object of this type.
beamspotman.n
n
Definition: beamspotman.py:731
SG::JaggedVecVectorFactory::Shift
typename Elt::Shift Shift
Definition: JaggedVecVectorFactory.h:37
SG::JaggedVecVectorFactory::createFromData
virtual std::unique_ptr< 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.
SG::AuxTypeVectorFactoryImpl
Factory object that creates vectors using AuxTypeVector.
Definition: AuxTypeVectorFactory.h:40
SG::JaggedVecVectorFactory::copyImpl
void copyImpl(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n, bool for_output) const
Copy elements between vectors.
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
SG::JaggedVecVectorFactory::index_type
typename Elt::index_type index_type
Definition: JaggedVecVectorFactory.h:38
a
TList * a
Definition: liststreamerinfos.cxx:10
SG::JaggedVecVectorFactory::vector_value_type
typename AuxTypeVector_t::vector_value_type vector_value_type
Definition: JaggedVecVectorFactory.h:42
SG::JaggedVecVectorFactory::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.
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
SG::JaggedVecElt
Describe one element of a jagged vector.
Definition: JaggedVecImpl.h:132
JaggedVecVector.h
Implementation of IAuxTypeVector for JaggedVecElt types.
JaggedVecVectorFactory.icc
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:168
SG::JaggedVecVectorT
Implementation of IAuxTypeVector holding a vector of JaggedVec.
Definition: JaggedVecVector.h:162
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
SG::JaggedVecEltBase::Shift
friend struct Shift
Definition: JaggedVecImpl.h:119