ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | List of all members
SG::JaggedVecVectorFactory< T, ALLOC > Class Template Referenceabstract

Factory objects that creates vectors for packed links. More...

#include <JaggedVecVectorFactory.h>

Inheritance diagram for SG::JaggedVecVectorFactory< T, ALLOC >:
Collaboration diagram for SG::JaggedVecVectorFactory< T, ALLOC >:

Public Types

using Elt = JaggedVecElt< T >
 
using Shift = typename Elt::Shift
 
using index_type = typename Elt::index_type
 
using Base = AuxTypeVectorFactoryImpl< Elt, ALLOC >
 
using AuxTypeVector_t = JaggedVecVector< T, ALLOC >
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual size_t getEltSize () const override
 Return the size of an element of this vector type. More...
 
virtual size_t getEltSize () const =0
 Return the size of an element of this vector type. More...
 
virtual const std::type_info * tiVec () const override
 Return the type_info of the vector. More...
 
virtual const std::type_info * tiVec () const =0
 Return the type_info of the vector. More...
 
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. More...
 
virtual bool isDynamic () const =0
 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. More...
 
virtual const std::type_info * tiAlloc () const override
 Return the type_info of the vector allocator. More...
 
virtual const std::type_info * tiAlloc () const =0
 Return the type_info of the vector allocator. More...
 
virtual std::string tiAllocName () const override
 Return the (demangled) name of the vector allocator. More...
 
virtual std::string tiAllocName () const =0
 Return the (demangled) name of the vector allocator. More...
 

Private Member Functions

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. More...
 

Detailed Description

template<class T, class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
class SG::JaggedVecVectorFactory< T, ALLOC >

Factory objects that creates vectors for packed links.

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

Definition at line 32 of file JaggedVecVectorFactory.h.

Member Typedef Documentation

◆ AuxTypeVector_t

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
using SG::JaggedVecVectorFactory< T, ALLOC >::AuxTypeVector_t = JaggedVecVector<T, ALLOC>

Definition at line 41 of file JaggedVecVectorFactory.h.

◆ Base

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
using SG::JaggedVecVectorFactory< T, ALLOC >::Base = AuxTypeVectorFactoryImpl<Elt, ALLOC>

Definition at line 40 of file JaggedVecVectorFactory.h.

◆ Elt

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
using SG::JaggedVecVectorFactory< T, ALLOC >::Elt = JaggedVecElt<T>

Definition at line 36 of file JaggedVecVectorFactory.h.

◆ index_type

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
using SG::JaggedVecVectorFactory< T, ALLOC >::index_type = typename Elt::index_type

Definition at line 38 of file JaggedVecVectorFactory.h.

◆ Shift

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
using SG::JaggedVecVectorFactory< T, ALLOC >::Shift = typename Elt::Shift

Definition at line 37 of file JaggedVecVectorFactory.h.

◆ vector_value_type

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
using SG::JaggedVecVectorFactory< T, ALLOC >::vector_value_type = typename AuxTypeVector_t::vector_value_type

Definition at line 42 of file JaggedVecVectorFactory.h.

Member Function Documentation

◆ clear()

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

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.

Reimplemented from SG::AuxTypeVectorFactoryImpl< JaggedVecElt< T >, AuxAllocator_t< JaggedVecElt< T > > >.

◆ 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  }

◆ copy() [2/2]

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
virtual void SG::JaggedVecVectorFactory< T, 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< JaggedVecElt< T >, AuxAllocator_t< JaggedVecElt< T > > >.

◆ copyForOutput()

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
virtual void SG::JaggedVecVectorFactory< T, 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< JaggedVecElt< T >, AuxAllocator_t< JaggedVecElt< T > > >.

◆ copyImpl()

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
void SG::JaggedVecVectorFactory< T, ALLOC >::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
private

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.
for_outputIf true, apply thinning.

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

◆ create()

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
virtual std::unique_ptr<IAuxTypeVector> SG::JaggedVecVectorFactory< T, 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< JaggedVecElt< T >, AuxAllocator_t< JaggedVecElt< T > > >.

◆ createFromData()

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
virtual std::unique_ptr<IAuxTypeVector> SG::JaggedVecVectorFactory< T, 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<SG::JaggedVecElt<T>, ALLOC<...> > object obtained with new. For this method, isPacked and isLinked must both be false.

Reimplemented from SG::AuxTypeVectorFactoryImpl< JaggedVecElt< T >, AuxAllocator_t< JaggedVecElt< T > > >.

◆ getEltSize() [1/2]

virtual size_t SG::IAuxTypeVectorFactory::getEltSize ( ) const
pure virtualinherited

Return the size of an element of this vector type.

Implemented in SG::RootAuxVectorFactory, SG::AuxTypeVectorFactoryImpl< T, ALLOC >, and xAOD::TAuxVectorFactory.

◆ getEltSize() [2/2]

virtual size_t SG::AuxTypeVectorFactoryImpl< JaggedVecElt< T > , AuxAllocator_t< JaggedVecElt< T > > >::getEltSize ( ) const
overridevirtualinherited

Return the size of an element of this vector type.

◆ isDynamic() [1/2]

virtual bool SG::IAuxTypeVectorFactory::isDynamic ( ) const
pure virtualinherited

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.

Implemented in SG::RootAuxVectorFactory, SG::AuxTypeVectorFactoryImpl< T, ALLOC >, and xAOD::TAuxVectorFactory.

◆ isDynamic() [2/2]

virtual bool SG::AuxTypeVectorFactoryImpl< JaggedVecElt< T > , AuxAllocator_t< JaggedVecElt< T > > >::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.

◆ swap()

template<class T , class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
virtual void SG::JaggedVecVectorFactory< T, 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< JaggedVecElt< T >, AuxAllocator_t< JaggedVecElt< T > > >.

◆ tiAlloc() [1/2]

virtual const std::type_info* SG::IAuxTypeVectorFactory::tiAlloc ( ) const
pure virtualinherited

Return the type_info of the vector allocator.

May be nullptr for a dynamic vector.

Implemented in SG::RootAuxVectorFactory, SG::AuxTypeVectorFactoryImpl< T, ALLOC >, and xAOD::TAuxVectorFactory.

◆ tiAlloc() [2/2]

virtual const std::type_info* SG::AuxTypeVectorFactoryImpl< JaggedVecElt< T > , AuxAllocator_t< JaggedVecElt< T > > >::tiAlloc ( ) const
overridevirtualinherited

Return the type_info of the vector allocator.

◆ tiAllocName() [1/2]

virtual std::string SG::IAuxTypeVectorFactory::tiAllocName ( ) const
pure virtualinherited

Return the (demangled) name of the vector allocator.

Implemented in SG::RootAuxVectorFactory, SG::AuxTypeVectorFactoryImpl< T, ALLOC >, and xAOD::TAuxVectorFactory.

◆ tiAllocName() [2/2]

virtual std::string SG::AuxTypeVectorFactoryImpl< JaggedVecElt< T > , AuxAllocator_t< JaggedVecElt< T > > >::tiAllocName ( ) const
overridevirtualinherited

Return the (demangled) name of the vector allocator.

◆ tiVec() [1/2]

virtual const std::type_info* SG::IAuxTypeVectorFactory::tiVec ( ) const
pure virtualinherited

Return the type_info of the vector.

Implemented in SG::RootAuxVectorFactory, SG::AuxTypeVectorFactoryImpl< T, ALLOC >, and xAOD::TAuxVectorFactory.

◆ tiVec() [2/2]

virtual const std::type_info* SG::AuxTypeVectorFactoryImpl< JaggedVecElt< T > , AuxAllocator_t< JaggedVecElt< T > > >::tiVec ( ) const
overridevirtualinherited

Return the type_info of the vector.


The documentation for this class was generated from the following file:
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
beamspotman.n
n
Definition: beamspotman.py:731
SG::IAuxTypeVectorFactory::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 =0
Copy elements between vectors.