14#ifndef ATHCONTAINERS_AUXVECTORBASE_H
15#define ATHCONTAINERS_AUXVECTORBASE_H
217 const std::string& clsname =
"")
const;
227 const std::string& clsname =
"");
237 const std::string& clsname =
"")
const;
356 template <
class ForwardIterator>
369 template <
class ForwardIterator>
381 template <
class ForwardIterator>
431 void shift (DVL& cont,
size_t pos, ptrdiff_t offs);
452 bool skipDestClear =
false);
470 bool skipDestClear =
false);
494 template <
class ForwardIterator>
497 bool skipDestClear =
false);
553 template <
class ForwardIterator>
556 ForwardIterator end);
597 template <
class ForwardIterator>
614 template <
class ForwardIterator>
628 template <
class ForwardIterator>
638 template <
class ForwardIterator>
649 template <
class ForwardIterator>
662 template <
class ForwardIterator>
665 ForwardIterator end);
675 void resize1 (
const std::false_type&,
size_t size);
684 void resize1 (
const std::true_type&,
size_t size);
693 void reserve1 (
const std::false_type&,
size_t size);
702 void reserve1 (
const std::true_type&,
size_t size);
715 DVL& cont,
size_t pos, ptrdiff_t offs);
747 DVL& cont,
size_t pos, ptrdiff_t offs);
765 template <
class ForwardIterator>
771 bool skipDestClear =
false);
794 template <
class ForwardIterator>
800 bool skipDestClear =
false);
811 template <
class ForwardIterator>
815 ForwardIterator end);
831 template <
class ForwardIterator>
873#ifndef XAOD_STANDALONE
An overridable variant of assert.
Allow customizing how aux data types are treated.
Base class for elements of a container that can have aux data.
Associate AuxStore classes with EDM container classes.
Handle mappings between names and auxid_t.
Manage lookup of vectors of auxiliary data.
std::vector< size_t > vec
Exceptions that can be thrown from AthContainers.
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Interface for non-const operations on an auxiliary store.
CxxUtils::span< container_value_type > span
CxxUtils::span< const container_value_type > const_span
Base class for elements of a container that can have aux data.
Helper to factor out template-independent part of resortAux.
std::vector< size_t > m_imap
std::vector< SG::auxid_t > m_auxids
ResortAuxHelper(size_t sz, size_t index, AuxVectorBase &vec)
Set up for resorting.
void resortElement(size_t idx, SG::AuxElement *elt)
std::vector< void * > m_auxdata
std::vector< size_t > m_rmap
Manage index tracking and synchronization of auxiliary data.
const_span< T > getDataSpan(const std::string &name) const
Return a span over an aux data item.
AuxVectorBase()
Default constructor.
void moveAux(size_t index, SG::AuxElement *p, bool clear=false, bool skipDestClear=false)
Set index on an element and copy auxiliary data.
void clearIndex1(const std::true_type &, ForwardIterator elt)
Clear the container / index for element elt.
void initAuxVectorBase1(const std::false_type &, SG::OwnershipPolicy, SG::IndexTrackingPolicy)
Initialize index tracking mode — no-auxdata specialization.
static constexpr bool supportsThinning
Mark that this type supports thinning operations.
void swap(AuxVectorBase &other)
Swap with another container.
void clearIndices1(const std::true_type &, ForwardIterator beg, ForwardIterator end)
Clear the container / index for a range of elements.
void clearIndex(ForwardIterator elt)
Clear the container / index for element elt.
void setIndices1(const std::false_type &, ForwardIterator beg, ForwardIterator end, size_t first)
Set container/index for all elements within a range.
void * getDataArrayForResort(SG::auxid_t auxid)
bool isAvailableWritableAsDecoration(const std::string &name, const std::string &clsname="") const
Test to see if a variable is available for writing as a decoration.
void swapElementsAux(size_t aindex, size_t bindex, SG::AuxElement *a, SG::AuxElement *b, AuxVectorBase *bcont)
Swap indices and auxiliary data between two elements.
void setIndexForResort(SG::AuxElement *elt, size_t idx)
span< T > getDecorationSpan(const std::string &name) const
Return a span over an aux data item for a decoration.
void swapElementsAux(size_t aindex, size_t bindex, const void *a, const void *b, AuxVectorBase *bcont)
Swap indices and auxiliary data between two elements.
bool m_trackIndices
Flag if index tracking is enabled.
void setNonConstStore(SG::IAuxStore *store)
Synonym for setStore with IAuxStore.
void resize(size_t size)
Resize the aux data associated with this container.
void setStore(SG::IAuxStore *store)
Set the store associated with this object.
void moveAux1(const std::false_type &, size_t index, ForwardIterator beg, ForwardIterator end, bool clear=false, bool skipDestClear=false)
Set index on a range of elements and copy auxiliary data.
void resize1(const std::false_type &, size_t size)
Resize the aux data associated with this container.
void setIndices1(const std::true_type &, ForwardIterator beg, ForwardIterator end, size_t first)
Set container/index for all elements within a range.
void moveAux(size_t index, const void *p, bool clear=false, bool skipDestClear=false)
Set index on an element and copy auxiliary data.
void moveAux(size_t index, ForwardIterator beg, ForwardIterator end, bool clear=false, bool skipDestClear=false)
Set index on a range of elements and copy auxiliary data.
void resortAux1(const std::true_type &, size_t index, ForwardIterator a, ForwardIterator b)
Reset indices / reorder aux data after elements have been permuted.
span< T > getDataSpan(const std::string &name)
Return a span over an aux data item.
void shift1(const std::false_type &, DVL &cont, size_t pos, ptrdiff_t offs)
Shift the elements of the container.
void setConstStore(const SG::IConstAuxStore *store)
Synonym for setStore with IConstAuxStore.
virtual ~AuxVectorBase()
Destructor.
void reserve(size_t size)
Change the capacity of the aux data associated with this container.
void shift(DVL &cont, size_t pos, ptrdiff_t offs)
Shift the elements of the container.
void resortAux1(const std::false_type &, size_t index, ForwardIterator beg, ForwardIterator end)
Reset indices / reorder aux data after elements have been permuted.
void clearIndex1(const std::false_type &, ForwardIterator elt)
Clear the container / index for element elt.
bool isAvailable(const std::string &name, const std::string &clsname="") const
Test to see if a variable exists in the store.
AuxVectorBase & operator=(AuxVectorBase &&rhs)
Move assignment.
void shift1(const std::true_type &, DVL &cont, size_t pos, ptrdiff_t offs)
Shift the elements of the container.
typename AuxDataTraits< T >::span span
Spans over auxiliary variables.
typename AuxDataTraits< T >::const_span const_span
void moveAux1(const std::true_type &, size_t index, ForwardIterator beg, ForwardIterator end, bool clear=false, bool skipDestClear=false)
Set index on a range of elements and copy auxiliary data.
void reserve1(const std::false_type &, size_t size)
Change the capacity of the aux data associated with this container.
void clearIndices(ForwardIterator beg, ForwardIterator end)
Clear the container / index for a range of elements.
const_span< T > getConstDataSpan(const std::string &name) const
Return a span over an aux data item.
bool trackIndices() const
Return true if index tracking is enabled for this container.
bool isAvailableWritable(const std::string &name, const std::string &clsname="")
Test to see if a variable is available for writing.
void resortAux(size_t index, ForwardIterator beg, ForwardIterator end)
Reset indices / reorder aux data after elements have been permuted.
void setIndices(ForwardIterator beg, ForwardIterator end, size_t first=0)
Set container/index for all elements within a range.
void initAuxVectorBase(SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy indexTrackingPolicy)
Initialize index tracking mode.
void clearIndices1(const std::false_type &, ForwardIterator, ForwardIterator)
Clear the container / index for a range of elements.
bool isAvailableWritableAsDecoration(auxid_t id) const
Test to see if a variable is available for writing as a decoration.
bool isAvailable(auxid_t id) const
Test to see if a variable exists in the store.
AuxVectorData()
Constructor.
bool isAvailableWritable(auxid_t id)
Test to see if a variable is available for writing.
Interface for non-const operations on an auxiliary store.
Interface for const operations on an auxiliary store.
size_t auxid_t
Identifier for a particular aux data item.