ATLAS Offline Software
Loading...
Searching...
No Matches
PackedLinkVectorFactory.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 */
12
13
14#ifndef ATHCONTAINERS_PACKEDLINKVECTORFACTORY_H
15#define ATHCONTAINERS_PACKEDLINKVECTORFACTORY_H
16
17
20#include "AthLinks/DataLink.h"
21
22
23namespace SG {
24
25
32template <class CONT, class ALLOC = AuxAllocator_t<PackedLink<CONT> > >
34 : public AuxTypeVectorFactoryImpl<PackedLink<CONT>, ALLOC>
35{
36public:
41
42
51 virtual
52 std::unique_ptr<IAuxTypeVector> create (SG::auxid_t auxid,
53 size_t size,
54 size_t capacity,
55 bool isLinked) const override;
56
57
73 virtual
74 std::unique_ptr<IAuxTypeVector> createFromData (SG::auxid_t auxid,
75 void* data,
76 IAuxTypeVector* linkedVector,
77 bool isPacked,
78 bool ownFlag,
79 bool isLinked) const override;
80
81
93 virtual void copy (SG::auxid_t auxid,
94 AuxVectorData& dst, size_t dst_index,
95 const AuxVectorData& src, size_t src_index,
96 size_t n) const override;
97
98
111 virtual void copyForOutput (SG::auxid_t auxid,
112 AuxVectorData& dst, size_t dst_index,
113 const AuxVectorData& src, size_t src_index,
114 size_t n) const override;
115
116
117
130 virtual void swap (SG::auxid_t auxid,
131 AuxVectorData& a, size_t aindex,
132 AuxVectorData& b, size_t bindex,
133 size_t n) const override;
134};
135
136
142template <class CONT, class ALLOC>
151
152
153//**************************************************************************
154
155
162template <class CONT,
163 class VALLOC = AuxAllocator_t<PackedLink<CONT> >,
164 class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type,
165 class ALLOC = AuxAllocator_t<VELT> >
167 : public AuxTypeVectorFactoryImpl<VELT, ALLOC>
168{
169public:
174
175
184 virtual
185 std::unique_ptr<IAuxTypeVector> create (SG::auxid_t auxid,
186 size_t size,
187 size_t capacity,
188 bool isLinked) const override;
189
190
206 virtual
207 std::unique_ptr<IAuxTypeVector> createFromData (SG::auxid_t auxid,
208 void* data,
209 IAuxTypeVector* linkedVector,
210 bool isPacked,
211 bool ownFlag,
212 bool isLinked) const override;
213
214
226 virtual void copy (SG::auxid_t auxid,
227 AuxVectorData& dst, size_t dst_index,
228 const AuxVectorData& src, size_t src_index,
229 size_t n) const override;
230
231
244 virtual void copyForOutput (SG::auxid_t auxid,
245 AuxVectorData& dst, size_t dst_index,
246 const AuxVectorData& src, size_t src_index,
247 size_t n) const override;
248
249
250
263 virtual void swap (SG::auxid_t auxid,
264 AuxVectorData& a, size_t aindex,
265 AuxVectorData& b, size_t bindex,
266 size_t n) const override;
267};
268
269
275template <class CONT, class VALLOC, class ALLOC>
276class AuxTypeVectorFactory<std::vector<PackedLink<CONT>, VALLOC>, ALLOC>
277 : public PackedLinkVVectorFactory<CONT, VALLOC, std::vector<PackedLink<CONT>, VALLOC>, ALLOC>
278{
282 using Base::Base;
283};
284
285
286} // namespace SG
287
288
290
291
292#endif // not ATHCONTAINERS_PACKEDLINKVECTORFACTORY_H
Factory object that creates vectors using AuxTypeVector.
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
static Double_t a
Implementation of IAuxTypeVector for PackedLink types.
Allow customizing how aux data types are treated.
Factory object that creates vectors using AuxTypeVector.
Factory object that creates vectors using AuxTypeVector.
Manage lookup of vectors of auxiliary data.
Abstract interface for manipulating vectors of arbitrary types.
Factory object that creates vectors of vectors of packed links.
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.
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.
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.
PackedLinkVVector< CONT, VALLOC, VELT, ALLOC > AuxTypeVector_t
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.
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.
typename AuxTypeVector_t::vector_value_type vector_value_type
detail::PackedLinkVectorHelper< CONT > Helper
AuxTypeVectorFactoryImpl< VELT, ALLOC > Base
Factory object that creates vectors for packed links.
typename AuxTypeVector_t::vector_value_type vector_value_type
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.
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.
detail::PackedLinkVectorHelper< CONT > Helper
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.
AuxTypeVectorFactoryImpl< PackedLink< CONT >, ALLOC > Base
PackedLinkVector< CONT, ALLOC > AuxTypeVector_t
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.
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.
Helper functions for managing PackedLink variables.
Forward declaration.
PackedLinkVectorT< PackedLinkVVectorHolder< CONT, VALLOC, VELT, ALLOC > > PackedLinkVVector
PackedLinkVectorT< PackedLinkVectorHolder< CONT, ALLOC > > PackedLinkVector
std::allocator< T > AuxAllocator_t
The default allocator type to use for auxiliary variables.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27
STL namespace.