ATLAS Offline Software
Loading...
Searching...
No Matches
SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC > Class Template Reference

Factory object that creates vectors of vectors of packed links. More...

#include <PackedLinkVectorFactory.h>

Inheritance diagram for SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >:
Collaboration diagram for SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >:

Public Types

using Base = AuxTypeVectorFactoryImpl<VELT, ALLOC>
using AuxTypeVector_t = PackedLinkVVector<CONT, VALLOC, VELT, ALLOC>
using Helper = detail::PackedLinkVectorHelper<CONT>
using vector_value_type = typename AuxTypeVector_t::vector_value_type

Public Member Functions

virtual std::unique_ptr< IAuxTypeVectorcreate (SG::auxid_t auxid, size_t size, size_t capacity, bool isLinked) const override
 Create a vector object of this type.
virtual std::unique_ptr< IAuxTypeVectorcreateFromData (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.
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 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 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.
void copy (SG::auxid_t auxid, AuxVectorData &&dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n) const
 Copy elements between vectors.
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.
virtual size_t getEltSize () const override
 Return the size of an element of this vector type.
virtual const std::type_info * tiVec () const override
 Return the type_info of the vector.
virtual bool isDynamic () const override
 True if the vectors created by this factory work by dynamic emulation (via TVirtualCollectionProxy or similar); false if the std::vector code is used directly.
virtual const std::type_info * tiAlloc () const override
 Return the type_info of the vector allocator.
virtual std::string tiAllocName () const override
 Return the (demangled) name of the vector allocator.

Private Member Functions

vector_value_typecopyImpl (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 cleared rather than copied.

Detailed Description

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
class SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >

Factory object that creates vectors of vectors of packed links.

This is an implementation of IAuxTypeVectorFactory that makes vectors using PackedLinkVVector.

Definition at line 166 of file PackedLinkVectorFactory.h.

Member Typedef Documentation

◆ AuxTypeVector_t

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
using SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::AuxTypeVector_t = PackedLinkVVector<CONT, VALLOC, VELT, ALLOC>

Definition at line 171 of file PackedLinkVectorFactory.h.

◆ Base

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
using SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::Base = AuxTypeVectorFactoryImpl<VELT, ALLOC>

Definition at line 170 of file PackedLinkVectorFactory.h.

◆ Helper

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
using SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::Helper = detail::PackedLinkVectorHelper<CONT>

Definition at line 172 of file PackedLinkVectorFactory.h.

◆ vector_value_type

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
using SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::vector_value_type = typename AuxTypeVector_t::vector_value_type

Definition at line 173 of file PackedLinkVectorFactory.h.

Member Function Documentation

◆ clear()

template<class T, class ALLOC = AuxAllocator_t<T>>
virtual void SG::AuxTypeVectorFactoryImpl< T, ALLOC >::clear ( SG::auxid_t auxid,
AuxVectorData & dst,
size_t dst_index,
size_t n ) const
overridevirtualinherited

Clear a range of elements within a vector.

Parameters
auxidThe aux data item being operated on.
dstContainer holding the element
dst_indexIndex of the first element in the vector.
nNumber of elements to clear.

Implements SG::IAuxTypeVectorFactory.

Reimplemented in SG::JaggedVecVectorFactory< T, ALLOC >, and SG::JaggedVecVectorFactory< T, ALLOC >.

◆ copy() [1/2]

void SG::IAuxTypeVectorFactory::copy ( SG::auxid_t auxid,
AuxVectorData && dst,
size_t dst_index,
const AuxVectorData & src,
size_t src_index,
size_t n ) const
inlineinherited

Copy elements between vectors.

Parameters
auxidThe aux data item being operated on.
dstContainer for the destination vector. Declared as a rvalue reference to allow passing a temporary here (such as from AuxVectorInterface).
dst_indexIndex of the first destination element in the vector.
srcContainer for the source vector.
src_indexIndex of the first source element in the vector.
nNumber of elements to copy.

dst and @ src can be either the same or different.

Definition at line 132 of file IAuxTypeVectorFactory.h.

136 {
137 copy (auxid, dst, dst_index, src, src_index, n);
138 }
virtual void copy(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n) const =0
Copy elements between vectors.

◆ copy() [2/2]

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
virtual void SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::copy ( SG::auxid_t auxid,
AuxVectorData & dst,
size_t dst_index,
const AuxVectorData & src,
size_t src_index,
size_t n ) const
overridevirtual

Copy elements between vectors.

Parameters
auxidThe aux data item being operated on.
dstContainer for the destination vector.
dst_indexIndex of the first destination element in the vector.
srcContainer for the source vector.
src_indexIndex of the first source element in the vector.
nNumber of elements to copy.

dst and @ src can be either the same or different.

Reimplemented from SG::AuxTypeVectorFactoryImpl< T, ALLOC >.

◆ copyForOutput()

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
virtual void SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::copyForOutput ( SG::auxid_t auxid,
AuxVectorData & dst,
size_t dst_index,
const AuxVectorData & src,
size_t src_index,
size_t n ) const
overridevirtual

Copy elements between vectors, possibly applying thinning.

Parameters
auxidThe aux data item being operated on.
dstContainer for the destination vector.
dst_indexIndex of the first destination element in the vector.
srcContainer for the source vector.
src_indexIndex of source element in the vector.
src_indexIndex of the first source element in the vector.
nNumber of elements to copy.

dst and @ src can be either the same or different.

Reimplemented from SG::AuxTypeVectorFactoryImpl< T, ALLOC >.

◆ copyImpl()

template<class T, class ALLOC = AuxAllocator_t<T>>
vector_value_type * SG::AuxTypeVectorFactoryImpl< T, ALLOC >::copyImpl ( SG::auxid_t auxid,
AuxVectorData & dst,
size_t dst_index,
const AuxVectorData & src,
size_t src_index,
size_t n ) const
privateinherited

Helper for copy; returns a pointer to the first destination object, or nullptr if the destination was cleared rather than copied.

◆ create()

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
virtual std::unique_ptr< IAuxTypeVector > SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::create ( SG::auxid_t auxid,
size_t size,
size_t capacity,
bool isLinked ) const
overridevirtual

Create a vector object of this type.

Parameters
auxidID for the variable being created.
sizeInitial size of the new vector.
capacityInitial capacity of the new vector.
isLinkedTrue if this variable is linked from another one. Must be false.

Reimplemented from SG::AuxTypeVectorFactoryImpl< T, ALLOC >.

◆ createFromData()

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
virtual std::unique_ptr< IAuxTypeVector > SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::createFromData ( SG::auxid_t auxid,
void * data,
IAuxTypeVector * linkedVector,
bool isPacked,
bool ownFlag,
bool isLinked ) const
overridevirtual

Create a vector object of this type from a data blob.

Parameters
auxidID for the variable being created.
dataThe vector object.
linkedVectorThe interface for another variable linked to this one. (We do not take ownership.)
isPackedIf true, data is a PackedContainer.
ownFlagIf true, the newly-created IAuxTypeVector object will take ownership of data.
isLinkedTrue if this variable is linked from another one.

data should be a pointer to a std::vector<std::vector<SG::PackedLink<CONT>, VALLOC<...> > >, ALLOC<...> > object obtained with new. For this method, isPacked and isLinked must both be false.

Reimplemented from SG::AuxTypeVectorFactoryImpl< T, ALLOC >.

◆ getEltSize()

template<class T, class ALLOC = AuxAllocator_t<T>>
virtual size_t SG::AuxTypeVectorFactoryImpl< T, ALLOC >::getEltSize ( ) const
overridevirtualinherited

Return the size of an element of this vector type.

Implements SG::IAuxTypeVectorFactory.

◆ isDynamic()

template<class T, class ALLOC = AuxAllocator_t<T>>
virtual bool SG::AuxTypeVectorFactoryImpl< T, ALLOC >::isDynamic ( ) const
overridevirtualinherited

True if the vectors created by this factory work by dynamic emulation (via TVirtualCollectionProxy or similar); false if the std::vector code is used directly.

Implements SG::IAuxTypeVectorFactory.

◆ swap()

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
virtual void SG::PackedLinkVVectorFactory< CONT, VALLOC, VELT, ALLOC >::swap ( SG::auxid_t auxid,
AuxVectorData & a,
size_t aindex,
AuxVectorData & b,
size_t bindex,
size_t n ) const
overridevirtual

Swap elements between vectors.

Parameters
auxidThe aux data item being operated on.
aContainer for the first vector.
aindexIndex of the first element in the first vector.
bContainer for the second vector.
bindexIndex of the first element in the second vector.
nNumber of elements to swap.

a and @ b can be either the same or different. However, the ranges should not overlap.

Reimplemented from SG::AuxTypeVectorFactoryImpl< T, ALLOC >.

◆ tiAlloc()

template<class T, class ALLOC = AuxAllocator_t<T>>
virtual const std::type_info * SG::AuxTypeVectorFactoryImpl< T, ALLOC >::tiAlloc ( ) const
overridevirtualinherited

Return the type_info of the vector allocator.

Implements SG::IAuxTypeVectorFactory.

◆ tiAllocName()

template<class T, class ALLOC = AuxAllocator_t<T>>
virtual std::string SG::AuxTypeVectorFactoryImpl< T, ALLOC >::tiAllocName ( ) const
overridevirtualinherited

Return the (demangled) name of the vector allocator.

Implements SG::IAuxTypeVectorFactory.

◆ tiVec()

template<class T, class ALLOC = AuxAllocator_t<T>>
virtual const std::type_info * SG::AuxTypeVectorFactoryImpl< T, ALLOC >::tiVec ( ) const
overridevirtualinherited

Return the type_info of the vector.

Implements SG::IAuxTypeVectorFactory.


The documentation for this class was generated from the following file: