ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
DataVector< T, DataModel_detail::NoBase > Class Template Reference

Base specialization for DataVector<T>. More...

#include <DataVector.h>

Inheritance diagram for DataVector< T, DataModel_detail::NoBase >:
Collaboration diagram for DataVector< T, DataModel_detail::NoBase >:

Classes

class  Deleter
 Interface to allow customizing how elements are to be deleted. More...
 

Public Types

typedef DataModel_detail::NoBase DataVector_BASE
 
typedef DataModel_detail::NoBase DVL_BASE
 
typedef std::true_type isSequence
 Mark as a sequence, for DataLink / ElementLink. More...
 
typedef std::vector< T * > PtrVector
 This is the type of the underlying std::vector (what stdcont returns). More...
 
typedef std::vector< T * > BaseContainer
 
typedef T *& reference
 
typedef T *constconst_reference
 
typedef PtrVector::size_type size_type
 
typedef PtrVector::difference_type difference_type
 
typedef T * value_type
 
typedef PtrVector::allocator_type allocator_type
 
typedef T ** pointer
 
typedef T *constconst_pointer
 
typedef const T * const_value_type
 
typedef T base_value_type
 The T value used as the template parameter. More...
 
typedef std::unique_ptr< base_value_typeunique_type
 Type of a unique_ptr that can be used to insert elements into this container. More...
 
typedef DataModel_detail::ElementProxy< DataVectorElementProxy
 This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership. More...
 
typedef DataModel_detail::const_iterator< DataVectorconst_iterator
 Standard const_iterator. More...
 
typedef DataModel_detail::iterator< DataVectoriterator
 Standard iterator. More...
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 Standard const_reverse_iterator. More...
 
typedef std::reverse_iterator< iteratorreverse_iterator
 Standard reverse_iterator. More...
 
typedef DataVector base_data_vector
 
template<class T >
using span = typename AuxDataTraits< T >::span
 Spans over auxiliary variables. More...
 
template<class T >
using const_span = typename AuxDataTraits< T >::const_span
 

Public Member Functions

bool trackIndices () const
 Return true if index tracking is enabled for this container. More...
 
void setStore (SG::IAuxStore *store)
 Set the store associated with this object. More...
 
void setStore (const SG::IConstAuxStore *store)
 Set the store associated with this object. More...
 
void setStore (const DataLink< SG::IConstAuxStore > &store)
 Set the store associated with this object. More...
 
void setConstStore (const SG::IConstAuxStore *store)
 Synonym for setStore with IConstAuxStore. More...
 
void setNonConstStore (SG::IAuxStore *store)
 Synonym for setStore with IAuxStore. More...
 
template<class T >
bool isAvailable (const std::string &name, const std::string &clsname="") const
 Test to see if a variable exists in the store. More...
 
bool isAvailable (auxid_t id) const
 Test to see if a variable exists in the store. More...
 
template<class T >
bool isAvailableWritable (const std::string &name, const std::string &clsname="")
 Test to see if a variable is available for writing. More...
 
bool isAvailableWritable (auxid_t id)
 Test to see if a variable is available for writing. More...
 
template<class T >
bool isAvailableWritableAsDecoration (const std::string &name, const std::string &clsname="") const
 Test to see if a variable is available for writing as a decoration. More...
 
bool isAvailableWritableAsDecoration (auxid_t id) const
 Test to see if a variable is available for writing as a decoration. More...
 
template<class T >
span< T > getDataSpan (const std::string &name)
 Return a span over an aux data item. More...
 
template<class T >
const_span< T > getDataSpan (const std::string &name) const
 Return a span over an aux data item. More...
 
template<class T >
const_span< T > getConstDataSpan (const std::string &name) const
 Return a span over an aux data item. More...
 
template<class T >
span< T > getDecorationSpan (const std::string &name) const
 Return a span over an aux data item for a decoration. More...
 
Aux store management.
const SG::IConstAuxStoregetConstStore () const
 Return the current store, as a const interface. More...
 
const DataLink< SG::IConstAuxStoregetConstStoreLink () const
 Return the data link to the current store, as a const interface. More...
 
SG::IAuxStoregetStore ()
 Return the current store, as a non-const interface. More...
 
const SG::IAuxStoregetStore () const
 Return the current store, as a non-const interface. More...
 
bool hasStore () const
 Return true if this object has an associated store. More...
 
bool hasNonConstStore () const
 Return true if this object has an associated non-const store. More...
 
bool setOption (auxid_t id, const AuxDataOption &option)
 Set an option for an auxiliary data variable. More...
 
bool setOption (const std::string &name, const AuxDataOption &option)
 Set an option for an auxiliary data variable. More...
 
bool setOption (const std::string &name, const std::string &clsname, const AuxDataOption &option)
 Set an option for an auxiliary data variable. More...
 
template<class T >
bool setOption (auxid_t id, const std::string &optname, T arg)
 Set an option for an auxiliary data variable. More...
 
bool setOption (const std::string &name, const std::string &optname, int arg)
 Set an option for an auxiliary data variable. More...
 
bool setOption (const std::string &name, const std::string &optname, float arg)
 
bool setOption (const std::string &name, const std::string &optname, double arg)
 
template<class T >
bool setOption (const std::string &name, const std::string &clsname, const std::string &optname, T arg)
 Set an option for an auxiliary data variable. More...
 
Constructors, destructors, assignment.
 DataVector (SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 Default constructor. More...
 
 DataVector (size_type n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 Sized constructor. More...
 
 DataVector (const DataVector &rhs)
 Copy constructor. More...
 
 DataVector (DataVector &&rhs) noexcept
 Move constructor. More...
 
template<class InputIterator >
 DataVector (InputIterator first, InputIterator last, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES, SG::IAuxStore *store=0)
 Constructor from iterators. More...
 
 DataVector (std::initializer_list< value_type > l, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES, SG::IAuxStore *store=0)
 Constructor from iterators. More...
 
DataVectoroperator= (const DataVector &rhs)
 Assignment operator. More...
 
DataVectoroperator= (DataVector &&rhs) noexcept
 Move assignment. More...
 
DataVectoroperator= (std::initializer_list< value_type > l)
 Assignment operator, from an initializer list. More...
 
template<class InputIterator >
void assign (InputIterator first, InputIterator last)
 Assign from iterators. More...
 
void assign (std::initializer_list< value_type > l)
 Assign from an initializer list. More...
 
virtual ~DataVector ()
 Destructor. More...
 
Size and capacity.
size_type size () const noexcept
 Returns the number of elements in the collection. More...
 
virtual size_type size_v () const
 Returns the number of elements in the collection. More...
 
size_type max_size () const noexcept
 Returns the size() of the largest possible collection. More...
 
void resize (size_type sz)
 Resizes the collection to the specified number of elements. More...
 
size_type capacity () const noexcept
 Returns the total number of elements that the collection can hold before needing to allocate more memory. More...
 
virtual size_type capacity_v () const
 Returns the total number of elements that the collection can hold before needing to allocate more memory. More...
 
bool empty () const noexcept
 Returns true if the collection is empty. More...
 
void reserve (size_type n)
 Attempt to preallocate enough memory for a specified number of elements. More...
 
void shrink_to_fit ()
 Change the vector capacity to match the current size. More...
 
Element access.
const T * operator[] (size_type n) const
 Access an element, as an rvalue. More...
 
const T * get (size_type n) const
 Access an element, as an rvalue. More...
 
ElementProxy operator[] (size_type n)
 Access an element, as an lvalue. More...
 
const T * at (size_type n) const
 Access an element, as an rvalue. More...
 
ElementProxy at (size_type n)
 Access an element, as an lvalue. More...
 
const T * front () const
 Access the first element in the collection as an rvalue. More...
 
const T * back () const
 Access the last element in the collection as an rvalue. More...
 
ElementProxy front ()
 Access the first element in the collection as an lvalue. More...
 
ElementProxy back ()
 Access the last element in the collection as an lvalue. More...
 
Iterator creation.
const_iterator begin () const noexcept
 Return a const_iterator pointing at the beginning of the collection. More...
 
const_iterator end () const noexcept
 Return a const_iterator pointing past the end of the collection. More...
 
iterator begin () noexcept
 Return an iterator pointing at the beginning of the collection. More...
 
iterator end () noexcept
 Return an iterator pointing past the end of the collection. More...
 
const_reverse_iterator rbegin () const noexcept
 Return a const_reverse_iterator pointing past the end of the collection. More...
 
const_reverse_iterator rend () const noexcept
 Return a const_reverse_iterator pointing at the beginning of the collection. More...
 
reverse_iterator rbegin () noexcept
 Return a reverse_iterator pointing past the end of the collection. More...
 
reverse_iterator rend () noexcept
 Return a reverse_iterator pointing at the beginning of the collection. More...
 
const_iterator cbegin () const noexcept
 Return a const_iterator pointing at the beginning of the collection. More...
 
const_iterator cend () const noexcept
 Return a const_iterator pointing past the end of the collection. More...
 
const_reverse_iterator crbegin () const noexcept
 Return a const_reverse_iterator pointing past the end of the collection. More...
 
const_reverse_iterator crend () const noexcept
 Return a const_reverse_iterator pointing at the beginning of the collection. More...
 
Insertion operations.
value_type push_back (value_type pElem)
 Add an element to the end of the collection. More...
 
value_type push_back (std::unique_ptr< base_value_type > pElem)
 Add an element to the end of the collection. More...
 
value_type emplace_back (value_type pElem)
 Add an element to the end of the collection. More...
 
iterator insert (iterator position, value_type pElem)
 Add a new element to the collection. More...
 
iterator insert (iterator position, std::unique_ptr< base_value_type > pElem)
 Add a new element to the collection. More...
 
iterator emplace (iterator position, value_type pElem)
 Add a new element to the collection. More...
 
template<class InputIterator , DataVector_detail::enable_if_ptr_itr< InputIterator, T > = true>
void insert (iterator position, InputIterator first, InputIterator last)
 Add a group of new elements to the collection. More...
 
template<class InputIterator , DataVector_detail::enable_if_up_itr< InputIterator, T > = true>
void insert (iterator position, InputIterator first, InputIterator last)
 Add a group of new elements to the collection. More...
 
void insert (iterator position, std::initializer_list< value_type > l)
 Add a group of new elements to the collection. More...
 
void insertMove (iterator position, DataVector &other)
 Insert the contents of another DataVector, with auxiliary data copied via move semantics. More...
 
Erasure operations.
iterator erase (iterator position)
 Remove element at a given position. More...
 
iterator erase (iterator first, iterator last)
 Remove a range of elements. More...
 
void pop_back ()
 Remove the last element from the collection. More...
 
void clear ()
 Erase all the elements in the collection. More...
 
Aux store management.
const SG::IConstAuxStoregetConstStore () const
 Return the current store, as a const interface. More...
 
const DataLink< SG::IConstAuxStoregetConstStoreLink () const
 Return the data link to the current store, as a const interface. More...
 
SG::IAuxStoregetStore ()
 Return the current store, as a non-const interface. More...
 
const SG::IAuxStoregetStore () const
 Return the current store, as a non-const interface. More...
 
bool hasStore () const
 Return true if this object has an associated store. More...
 
bool hasNonConstStore () const
 Return true if this object has an associated non-const store. More...
 
bool setOption (auxid_t id, const AuxDataOption &option)
 Set an option for an auxiliary data variable. More...
 
bool setOption (const std::string &name, const AuxDataOption &option)
 Set an option for an auxiliary data variable. More...
 
bool setOption (const std::string &name, const std::string &clsname, const AuxDataOption &option)
 Set an option for an auxiliary data variable. More...
 
template<class T >
bool setOption (auxid_t id, const std::string &optname, T arg)
 Set an option for an auxiliary data variable. More...
 
bool setOption (const std::string &name, const std::string &optname, int arg)
 Set an option for an auxiliary data variable. More...
 
bool setOption (const std::string &name, const std::string &optname, float arg)
 
bool setOption (const std::string &name, const std::string &optname, double arg)
 
template<class T >
bool setOption (const std::string &name, const std::string &clsname, const std::string &optname, T arg)
 Set an option for an auxiliary data variable. More...
 

Static Public Attributes

static const bool has_virtual = false
 This is true for any DataVector class if we need to use virtual derivation to get to the base DataVector class. More...
 
static constexpr bool must_own = false
 If true, then this type must own its contents. More...
 
static constexpr bool supportsThinning = true
 Mark that this type supports thinning operations. More...
 

Protected Member Functions

template<class DVL >
void initAuxVectorBase (SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy indexTrackingPolicy)
 Initialize index tracking mode. More...
 
void swap (AuxVectorBase &other)
 Swap with another container. More...
 
template<class ForwardIterator >
void setIndices (ForwardIterator beg, ForwardIterator end, size_t first=0)
 Set container/index for all elements within a range. More...
 
template<class ForwardIterator >
void clearIndex (ForwardIterator elt)
 Clear the container / index for element elt. More...
 
template<class ForwardIterator >
void clearIndices (ForwardIterator beg, ForwardIterator end)
 Clear the container / index for a range of elements. More...
 
template<class DVL >
void resize (size_t size)
 Resize the aux data associated with this container. More...
 
template<class DVL >
void reserve (size_t size)
 Change the capacity of the aux data associated with this container. More...
 
template<class DVL >
void shift (DVL &cont, size_t pos, ptrdiff_t offs)
 Shift the elements of the container. More...
 
void moveAux (size_t index, SG::AuxElement *p, bool clear=false, bool skipDestClear=false)
 Set index on an element and copy auxiliary data. More...
 
void moveAux (size_t index, const void *p, bool clear=false, bool skipDestClear=false)
 Set index on an element and copy auxiliary data. More...
 
template<class ForwardIterator >
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. More...
 
void swapElementsAux (size_t aindex, size_t bindex, SG::AuxElement *a, SG::AuxElement *b, AuxVectorBase *bcont)
 Swap indices and auxiliary data between two elements. More...
 
void swapElementsAux (size_t aindex, size_t bindex, const void *a, const void *b, AuxVectorBase *bcont)
 Swap indices and auxiliary data between two elements. More...
 
template<class ForwardIterator >
void resortAux (size_t index, ForwardIterator beg, ForwardIterator end)
 Reset indices / reorder aux data after elements have been permuted. More...
 

Private Member Functions

void initAuxVectorBase1 (const std::false_type &, SG::OwnershipPolicy, SG::IndexTrackingPolicy)
 Initialize index tracking mode — no-auxdata specialization. More...
 
void initAuxVectorBase1 (const std::true_type &, SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy indexTrackingPolicy)
 Initialize index tracking mode — auxdata specialization. More...
 
template<class ForwardIterator >
void setIndices1 (const std::false_type &, ForwardIterator beg, ForwardIterator end, size_t first)
 Set container/index for all elements within a range. More...
 
template<class ForwardIterator >
void setIndices1 (const std::true_type &, ForwardIterator beg, ForwardIterator end, size_t first)
 Set container/index for all elements within a range. More...
 
template<class ForwardIterator >
void clearIndex1 (const std::false_type &, ForwardIterator elt)
 Clear the container / index for element elt. More...
 
template<class ForwardIterator >
void clearIndex1 (const std::true_type &, ForwardIterator elt)
 Clear the container / index for element elt. More...
 
template<class ForwardIterator >
void clearIndices1 (const std::false_type &, ForwardIterator, ForwardIterator)
 Clear the container / index for a range of elements. More...
 
template<class ForwardIterator >
void clearIndices1 (const std::true_type &, ForwardIterator beg, ForwardIterator end)
 Clear the container / index for a range of elements. More...
 
void resize1 (const std::false_type &, size_t size)
 Resize the aux data associated with this container. More...
 
void resize1 (const std::true_type &, size_t size)
 Resize the aux data associated with this container. More...
 
void reserve1 (const std::false_type &, size_t size)
 Change the capacity of the aux data associated with this container. More...
 
void reserve1 (const std::true_type &, size_t size)
 Change the capacity of the aux data associated with this container. More...
 
template<class DVL >
void shift1 (const std::false_type &, DVL &cont, size_t pos, ptrdiff_t offs)
 Shift the elements of the container. More...
 
template<class DVL >
void shift1 (const std::true_type &, DVL &cont, size_t pos, ptrdiff_t offs)
 Shift the elements of the container. More...
 
template<class ForwardIterator >
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. More...
 
template<class ForwardIterator >
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. More...
 
template<class ForwardIterator >
void resortAux1 (const std::false_type &, size_t index, ForwardIterator beg, ForwardIterator end)
 Reset indices / reorder aux data after elements have been permuted. More...
 
template<class ForwardIterator >
void resortAux1 (const std::true_type &, size_t index, ForwardIterator a, ForwardIterator b)
 Reset indices / reorder aux data after elements have been permuted. More...
 
void * getDataArrayForResort (SG::auxid_t auxid)
 
void setIndexForResort (SG::AuxElement *elt, size_t idx)
 

Private Attributes

bool m_trackIndices
 Flag if index tracking is enabled. More...
 

Data access.

bool isAvailable (auxid_t id) const
 Test to see if a variable exists in the store. More...
 
bool isAvailableWritable (auxid_t id)
 Test to see if a variable is available for writing. More...
 
bool isAvailableWritableAsDecoration (auxid_t id) const
 Test to see if a variable is available for writing as a decoration. More...
 
const AuxDataSpanBase * getDataSpan (SG::auxid_t auxid) const
 Return a reference to a description of this vector's start+size. More...
 
const SG::auxid_set_tgetAuxIDs () const
 Return a set of identifiers for existing data items in store associated with this object. More...
 
const SG::auxid_set_tgetDecorIDs () const
 Return a set of identifiers for decorations for this object. More...
 
const SG::auxid_set_tgetWritableAuxIDs () const
 Return a set of identifiers for writable data items in this store. More...
 
template<class T >
AuxDataTraits< T >::reference_type getData (SG::auxid_t auxid, size_t ndx)
 Return reference to an aux data item. More...
 
template<class T >
AuxDataTraits< T >::const_reference_type getData (SG::auxid_t auxid, size_t ndx) const
 Return const reference to an aux data item. More...
 
template<class T >
AuxDataTraits< T >::reference_type getDecoration (SG::auxid_t auxid, size_t ndx) const
 Return reference to an aux decoration item. More...
 
const void * getDataArray (SG::auxid_t auxid) const
 Return a const pointer to the start of an aux data vector. More...
 
void * getDataArray (SG::auxid_t auxid)
 Return a pointer to the start of an aux data vector. More...
 
const void * getDataArrayAllowMissing (SG::auxid_t auxid) const
 Return a const pointer to the start of an aux data vector. More...
 
void * getDecorationArray (SG::auxid_t auxid) const
 Return a pointer to the start of an aux data vector for a decoration. More...
 
static size_t s_minCacheLen ATLAS_THREAD_SAFE
 Minimum length to use for the cache vector. More...
 

Other operations.

typedef AthContainers_detail::mutex mutex_t
 Mutex used to synchronize modifications to the cache vector. More...
 
typedef AthContainers_detail::lock_guard< mutex_tguard_t
 
Cache m_cache ATLAS_THREAD_SAFE
 Cached pointers to the start of aux data vectors, non-const. More...
 
Cache m_constCache ATLAS_THREAD_SAFE
 Cached pointers to the start of aux data vectors, const. More...
 
Cache m_decorCache ATLAS_THREAD_SAFE
 Cached pointers to the start of aux data vectors, decorations. More...
 
Cache m_spanCache ATLAS_THREAD_SAFE
 Cached pointers to span descriptors. More...
 
SG::IAuxStorem_store
 Associated store, non-const. More...
 
const SG::IConstAuxStorem_constStore
 Associated store, const. More...
 
DataLink< SG::IConstAuxStorem_constStoreLink
 Associated store link, const. More...
 
mutex_t m_mutex
 
void swap (AuxVectorData &other)
 Swap this instance with another. More...
 
void clearCache ()
 Clear the cached aux data pointers. More...
 
void clearCache (SG::auxid_t auxid)
 Clear the cached aux data pointers for a single variable. More...
 
void clearDecorCache (SG::auxid_t auxid)
 Clear the cached decoration pointer for a single variable. More...
 
virtual void lock () override
 Lock the container. More...
 
bool clearDecorations () const
 Clear all decorations. More...
 
void lockDecoration (SG::auxid_t auxid)
 Explicitly lock a decoration. More...
 
const SG::IConstAuxStoregetConstStoreOol () const
 Same as getConstStore. More...
 
bool isAvailableOol (auxid_t id) const
 Out-of-line portion of isAvailable. More...
 
bool isAvailableWritableOol (auxid_t id)
 Out-of-line portion of isAvailableWritable. More...
 
bool isAvailableWritableAsDecorationOol (auxid_t id) const
 Out-of-line portion of isAvailableWritableAsDecoration. More...
 
void * getDataOol (SG::auxid_t auxid, bool allowMissing)
 Out-of-line portion of data access. More...
 
const void * getDataOol (SG::auxid_t auxid, bool allowMissing) const
 Out-of-line portion of data access (const version). More...
 
void * getDecorationOol (SG::auxid_t auxid) const
 Out-of-line portion of data access (decorator version). More...
 
const AuxDataSpanBase * getDataSpanOol (SG::auxid_t auxid, bool allowMissing) const
 Return a reference to a description of this vector's start+size, out-of-line portion. More...
 
void setCache (SG::auxid_t auxid, void *ptr)
 Explicitly set a cache pointer. More...
 
void setCache (SG::auxid_t auxid, const void *ptr)
 Explicitly set a cache pointer. More...
 
static const SG::auxid_set_t s_emptySet
 Empty auxid set, used for a return value when we have no associated store. More...
 

Swap and sort.

void swap (DataVector &rhs)
 Swap this collection with another. More...
 
void sort ()
 Sort the container. More...
 
template<class COMPARE >
void sort (COMPARE comp)
 Sort the container with a user-specified comparison operator. More...
 
static void iter_swap (iterator a, iterator b)
 Swap the referents of two DataVector iterators. More...
 

Non-standard operations.

void swapElement (size_type index, value_type newElem, reference oldElem)
 Swap one element out of the container. More...
 
void swapElement (iterator pos, value_type newElem, reference oldElem)
 Swap one element out of the container. More...
 
void swapElement (size_type index, std::unique_ptr< base_value_type > newElem, std::unique_ptr< base_value_type > &oldElem)
 Swap one element out of the container. More...
 
void swapElement (iterator pos, std::unique_ptr< base_value_type > newElem, std::unique_ptr< base_value_type > &oldElem)
 Swap one element out of the container. More...
 
const PtrVectorstdcont () const
 Return the underlying std::vector of the container. More...
 
SG::OwnershipPolicy ownPolicy () const
 Return the ownership policy setting for this container. More...
 
void clear (SG::OwnershipPolicy ownPolicy)
 Erase all the elements in the collection, and reset the ownership mode. More...
 
void clear (SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy trackIndices)
 Erase all the elements in the collection, and reset the ownership mode. More...
 
void clear (std::unique_ptr< Deleter > deleter)
 Erase all the elements in the collection, and change how elements are to be deleted. More...
 
virtual const DataModel_detail::DVLInfoBasedvlinfo_v () const
 Return the DV/DL info struct for this class. More...
 
const SG::AuxVectorBaseauxbase () const
 Convert to AuxVectorBase. More...
 
static const DataModel_detail::DVLInfoBasedvlinfo ()
 Return the DV/DL info struct for this class. More...
 
static int baseOffset (const std::type_info &ti)
 Return the offset of a base DataVector class. More...
 

Internal operations.

typedef ROOT::Meta::Selection::DataVector< T, DataVector_BASE >::self self
 
class DataModel_detail::ElementProxy< DataVector >
 
template<class DV >
class ConstDataVector
 
template<class DV , class ALLOC >
class DataVectorWithAlloc
 
void test2_assignelement1a ()
 
void test2_assignelement1 ()
 
void test2_assignelement2 ()
 
SG::OwnershipPolicy m_ownPolicy
 The ownership policy of this container — either SG::OWNS_ELEMENTS or SG::VIEW_ELEMENTS. More...
 
PtrVector m_pCont
 This actually holds the elements. More...
 
Deleterm_deleter = nullptr
 Interface telling us how to delete objects. More...
 
SG::IsMostDerivedFlag m_isMostDerived
 This flag is true if this DV instance is the most-derived one. More...
 
void resortAux (iterator beg, iterator end)
 Reset indices / reorder aux data after elements have been permuted. More...
 
void testInsert (const char *op)
 Test if we can insert; raise an exception if not. More...
 
void testInsertOol (const char *op)
 Test if we can insert; raise an exception if not. More...
 
static int baseOffset1 (const char *p, const DataVector &dv, const std::type_info &ti)
 Helper for baseOffset. More...
 
static const T * do_cast (const typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast. More...
 
static T * do_cast_nc (typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast. More...
 
void assignElement (typename BaseContainer::iterator pos, value_type newElem)
 Handle element assignment. More...
 
void assignElement (typename BaseContainer::iterator pos, std::unique_ptr< base_value_type > newElem)
 Handle element assignment. More...
 
void assignBaseElement (typename BaseContainer::iterator pos, typename BaseContainer::value_type newElem)
 Handle element assignment from a base pointer. More...
 
void shift (size_t pos, ptrdiff_t offs)
 Shift the auxiliary elements of the container. More...
 
virtual const std::type_info & dv_typeid () const
 Find the most-derived DataVector class in the hierarchy. More...
 
PtrVector::iterator erase_base (typename PtrVector::iterator position)
 Helper for erase(). More...
 
PtrVector::iterator erase_base (typename PtrVector::iterator first, typename PtrVector::iterator last)
 Helper for erase(). More...
 
void doDelete (value_type p)
 Delete an element. More...
 
void doDelete (typename PtrVector::iterator first, typename PtrVector::iterator last)
 Delete a range of elements. More...
 
void clearMostDerived ()
 Clear m_isMostDerived for this instance and for all bases. More...
 
virtual void setMostDerived ()
 Set m_isMostDerived for this instance and clear it for all bases. More...
 

Detailed Description

template<class T>
class DataVector< T, DataModel_detail::NoBase >

Base specialization for DataVector<T>.

This is used for the case where T does not derive from other classes. This is the class which actually holds the vector of pointers.

See the file comments for full details.

Definition at line 2059 of file DataVector.h.

Member Typedef Documentation

◆ allocator_type

template<class T >
typedef PtrVector::allocator_type DataVector< T, DataModel_detail::NoBase >::allocator_type

Definition at line 2086 of file DataVector.h.

◆ base_data_vector

Definition at line 2125 of file DataVector.h.

◆ base_value_type

template<class T >
typedef T DataVector< T, DataModel_detail::NoBase >::base_value_type

The T value used as the template parameter.

Note that this is different from value_type (that's T*).

Definition at line 2094 of file DataVector.h.

◆ BaseContainer

template<class T >
typedef std::vector<T*> DataVector< T, DataModel_detail::NoBase >::BaseContainer

Definition at line 2072 of file DataVector.h.

◆ const_iterator

Standard const_iterator.

Definition at line 2107 of file DataVector.h.

◆ const_pointer

template<class T >
typedef T* const* DataVector< T, DataModel_detail::NoBase >::const_pointer

Definition at line 2088 of file DataVector.h.

◆ const_reference

template<class T >
typedef T* const& DataVector< T, DataModel_detail::NoBase >::const_reference

Definition at line 2082 of file DataVector.h.

◆ const_reverse_iterator

Standard const_reverse_iterator.

Definition at line 2118 of file DataVector.h.

◆ const_span

template<class T >
using SG::AuxVectorBase::const_span = typename AuxDataTraits<T>::const_span
inherited

Definition at line 102 of file AuxVectorBase.h.

◆ const_value_type

template<class T >
typedef const T* DataVector< T, DataModel_detail::NoBase >::const_value_type

Definition at line 2090 of file DataVector.h.

◆ DataVector_BASE

Definition at line 2063 of file DataVector.h.

◆ difference_type

template<class T >
typedef PtrVector::difference_type DataVector< T, DataModel_detail::NoBase >::difference_type

Definition at line 2084 of file DataVector.h.

◆ DVL_BASE

Definition at line 2064 of file DataVector.h.

◆ ElementProxy

This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership.

Definition at line 2102 of file DataVector.h.

◆ guard_t

typedef AthContainers_detail::lock_guard<mutex_t> SG::AuxVectorData::guard_t
privateinherited

Definition at line 989 of file AuxVectorData.h.

◆ isSequence

template<class T >
typedef std::true_type DataVector< T, DataModel_detail::NoBase >::isSequence

Mark as a sequence, for DataLink / ElementLink.

Definition at line 2067 of file DataVector.h.

◆ iterator

Standard iterator.

Note that lvalue references here will yield an ElementProxy, not a reference.

Definition at line 2111 of file DataVector.h.

◆ mutex_t

typedef AthContainers_detail::mutex SG::AuxVectorData::mutex_t
privateinherited

Mutex used to synchronize modifications to the cache vector.

Definition at line 988 of file AuxVectorData.h.

◆ pointer

template<class T >
typedef T** DataVector< T, DataModel_detail::NoBase >::pointer

Definition at line 2087 of file DataVector.h.

◆ PtrVector

template<class T >
typedef std::vector<T*> DataVector< T, DataModel_detail::NoBase >::PtrVector

This is the type of the underlying std::vector (what stdcont returns).

Definition at line 2071 of file DataVector.h.

◆ reference

template<class T >
typedef T*& DataVector< T, DataModel_detail::NoBase >::reference

Definition at line 2081 of file DataVector.h.

◆ reverse_iterator

template<class T >
typedef std::reverse_iterator<iterator> DataVector< T, DataModel_detail::NoBase >::reverse_iterator

Standard reverse_iterator.

Note that lvalue references here will yield an ElementProxy, not a reference.

Definition at line 2123 of file DataVector.h.

◆ self

Definition at line 3359 of file DataVector.h.

◆ size_type

template<class T >
typedef PtrVector::size_type DataVector< T, DataModel_detail::NoBase >::size_type

Definition at line 2083 of file DataVector.h.

◆ span

template<class T >
using SG::AuxVectorBase::span = typename AuxDataTraits<T>::span
inherited

Spans over auxiliary variables.

Definition at line 101 of file AuxVectorBase.h.

◆ unique_type

template<class T >
typedef std::unique_ptr<base_value_type> DataVector< T, DataModel_detail::NoBase >::unique_type

Type of a unique_ptr that can be used to insert elements into this container.

Definition at line 2098 of file DataVector.h.

◆ value_type

template<class T >
typedef T* DataVector< T, DataModel_detail::NoBase >::value_type

Definition at line 2085 of file DataVector.h.

Constructor & Destructor Documentation

◆ DataVector() [1/6]

Default constructor.

Parameters
ownPolicyThe ownership mode for the container.
trackIndicesThe index tracking policy.

By default, a DataVector will own its elements. To avoid this, pass SG::VIEW_ELEMENTS for ownPolicy.

◆ DataVector() [2/6]

Sized constructor.

Parameters
nThe size of the container.
ownPolicyThe ownership mode for the container.
trackIndicesThe index tracking policy.

Note that unlike the standard vector constructor, you can't specify an initial value here. The container will be initialized with 0's.

By default, a DataVector will own its elements. To avoid this, pass SG::VIEW_ELEMENTS for ownPolicy.

◆ DataVector() [3/6]

Copy constructor.

Parameters
rhsThe container from which to copy.

This is a ‘shallow’ copy; the new container will not own its elements.

◆ DataVector() [4/6]

template<class T >
DataVector< T, DataModel_detail::NoBase >::DataVector ( DataVector< T, DataModel_detail::NoBase > &&  rhs)
noexcept

Move constructor.

Parameters
rhsThe container from which to move.

Any auxiliary data will be moved along with the container contents.

◆ DataVector() [5/6]

template<class T >
template<class InputIterator >
DataVector< T, DataModel_detail::NoBase >::DataVector ( InputIterator  first,
InputIterator  last,
SG::OwnershipPolicy  ownPolicy = SG::VIEW_ELEMENTS,
SG::IndexTrackingPolicy  trackIndices = SG::DEFAULT_TRACK_INDICES,
SG::IAuxStore store = 0 
)

Constructor from iterators.

Parameters
firstThe start of the range to put in the new container.
lastThe end of the range to put in the new container.
ownPolicyThe ownership mode for the container.
trackIndicesThe index tracking policy.
storeAn associated auxiliary data store.

By default, a view container is made, which does not own its elements. To have the container take ownership of the pointers passed to this constructor, pass SG::OWN_ELEMENTS for ownPolicy.

◆ DataVector() [6/6]

template<class T >
DataVector< T, DataModel_detail::NoBase >::DataVector ( std::initializer_list< value_type l,
SG::OwnershipPolicy  ownPolicy = SG::VIEW_ELEMENTS,
SG::IndexTrackingPolicy  trackIndices = SG::DEFAULT_TRACK_INDICES,
SG::IAuxStore store = 0 
)

Constructor from iterators.

Parameters
lAn initializer list.
ownPolicyThe ownership mode for the container.
trackIndicesThe index tracking policy.
storeAn associated auxiliary data store.

A DataVector constructed this way will not own its elements by default. To change this, pass SG::OWN_ELEMENTS for ownPolicy.

◆ ~DataVector()

template<class T >
virtual DataVector< T, DataModel_detail::NoBase >::~DataVector ( )
virtual

Destructor.

If this container owns its elements, the contained elements will be deleted as well. Before doing this, the destructor will scan for duplicate pointers (takes \(n \log n\) time); duplicates are only destroyed once. Duplicates should, however, be considered an error; don't rely on this behavior.

Member Function Documentation

◆ assign() [1/2]

template<class T >
template<class InputIterator >
void DataVector< T, DataModel_detail::NoBase >::assign ( InputIterator  first,
InputIterator  last 
)

Assign from iterators.

Parameters
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

Any existing owned elements will be released. The DataVector's ownership policy determines whether it will take ownership of the new elements.

◆ assign() [2/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::assign ( std::initializer_list< value_type l)

Assign from an initializer list.

Parameters
lAn initializer list.

Any existing owned elements will be released. The DataVector's ownership policy determines whether it will take ownership of the new elements.

◆ assignBaseElement()

template<class T >
void DataVector< T, DataModel_detail::NoBase >::assignBaseElement ( typename BaseContainer::iterator  pos,
typename BaseContainer::value_type  newElem 
)
private

Handle element assignment from a base pointer.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.

◆ assignElement() [1/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::assignElement ( typename BaseContainer::iterator  pos,
std::unique_ptr< base_value_type newElem 
)
private

Handle element assignment.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The container must own its elements. Auxiliary data are copied if appropriate.

◆ assignElement() [2/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::assignElement ( typename BaseContainer::iterator  pos,
value_type  newElem 
)
private

Handle element assignment.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.

◆ at() [1/2]

template<class T >
ElementProxy DataVector< T, DataModel_detail::NoBase >::at ( size_type  n)

Access an element, as an lvalue.

Parameters
nArray index to access.
Returns
Proxy to the element at n.

Will raise std::out_of_range if the index is out-of-bounds. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ at() [2/2]

template<class T >
const T* DataVector< T, DataModel_detail::NoBase >::at ( size_type  n) const

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

Will raise std::out_of_range if the index is out-of-bounds. Note that we return a const T* rather than a reference.

◆ auxbase()

template<class T >
const SG::AuxVectorBase& DataVector< T, DataModel_detail::NoBase >::auxbase ( ) const

Convert to AuxVectorBase.

Needed to get @x AuxVectorBase from a ConstDataVector. Present in DataVector as well for consistency.

◆ back() [1/2]

template<class T >
ElementProxy DataVector< T, DataModel_detail::NoBase >::back ( )

Access the last element in the collection as an lvalue.

Returns
Proxy to the last element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ back() [2/2]

template<class T >
const T* DataVector< T, DataModel_detail::NoBase >::back ( ) const

Access the last element in the collection as an rvalue.

Returns
The last element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a const T* rather than a reference.

◆ baseOffset()

template<class T >
static int DataVector< T, DataModel_detail::NoBase >::baseOffset ( const std::type_info &  ti)
static

Return the offset of a base DataVector class.

Parameters
tistd::type_info of the desired class.

If ti represents a DataVector base class of this one, then return the offset of that base class. Otherwise, return -1.

This function is here due to limitations of root 6, which can't calculate these offsets correctly from the dictionary if virtual derivation is used.

◆ baseOffset1()

template<class T >
static int DataVector< T, DataModel_detail::NoBase >::baseOffset1 ( const char *  p,
const DataVector< T, DataModel_detail::NoBase > &  dv,
const std::type_info &  ti 
)
static

Helper for baseOffset.

Parameters
pPointer to the start of the top-level object.
dvReference to the DataVector object.
tistd::type_info of the desired class.

If ti represents a DataVector base class of this one, then return the offset of that base class. Otherwise, return -1.

◆ begin() [1/2]

template<class T >
const_iterator DataVector< T, DataModel_detail::NoBase >::begin ( ) const
noexcept

Return a const_iterator pointing at the beginning of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ begin() [2/2]

template<class T >
iterator DataVector< T, DataModel_detail::NoBase >::begin ( )
noexcept

Return an iterator pointing at the beginning of the collection.

Returns
An iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ capacity()

template<class T >
size_type DataVector< T, DataModel_detail::NoBase >::capacity ( ) const
noexcept

Returns the total number of elements that the collection can hold before needing to allocate more memory.

◆ capacity_v()

template<class T >
virtual size_type DataVector< T, DataModel_detail::NoBase >::capacity_v ( ) const
virtual

Returns the total number of elements that the collection can hold before needing to allocate more memory.

This version is virtual, to be callable from the AuxData base class.

Implements SG::AuxVectorData.

◆ cbegin()

template<class T >
const_iterator DataVector< T, DataModel_detail::NoBase >::cbegin ( ) const
noexcept

Return a const_iterator pointing at the beginning of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ cend()

template<class T >
const_iterator DataVector< T, DataModel_detail::NoBase >::cend ( ) const
noexcept

Return a const_iterator pointing past the end of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ clear() [1/4]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::clear ( )

Erase all the elements in the collection.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ clear() [2/4]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::clear ( SG::OwnershipPolicy  ownPolicy)

Erase all the elements in the collection, and reset the ownership mode.

Parameters
ownPolicyThe new ownership policy of the container.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ clear() [3/4]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::clear ( SG::OwnershipPolicy  ownPolicy,
SG::IndexTrackingPolicy  trackIndices 
)

Erase all the elements in the collection, and reset the ownership mode.

Parameters
ownPolicyThe new ownership policy of the container.
trackIndicesThe index tracking policy.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ clear() [4/4]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::clear ( std::unique_ptr< Deleter deleter)

Erase all the elements in the collection, and change how elements are to be deleted.

Parameters
deleterObject to be used to delete object. Passing nullptr will change back to the default.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this. After the current elements are deleted, the Deleter object is changed.

◆ clearCache() [1/2]

void SG::AuxVectorData::clearCache ( )
inherited

Clear the cached aux data pointers.

You should call this any time something changes in the aux store that could invalidate the vector pointers.

◆ clearCache() [2/2]

void SG::AuxVectorData::clearCache ( SG::auxid_t  auxid)
inherited

Clear the cached aux data pointers for a single variable.

Parameters
auxidID of the variable to clear.

Not really safe to use if another thread may be accessing the same decoration.

◆ clearDecorations()

bool SG::AuxVectorData::clearDecorations ( ) const
inherited

Clear all decorations.

Erase all decorations from the store, restoring the state to when lock was called.

Returns true if there were any decorations that were cleared, false if the store did not contain any decorations.

Definition at line 653 of file AuxVectorData.cxx.

654 {
655  bool ret = false;
656  if (m_store) {
657  // Avoid warning about calling non-const function. OK here.
658  IAuxStore* store ATLAS_THREAD_SAFE = m_store;
659  ret = store->clearDecorations();
660  m_cache.clear();
661  m_constCache.clear();
662  m_decorCache.clear();
663  }
664  else if (getConstStore()) {
665  // The whole point of decorations is to allow adding information to
666  // something that's otherwise const. So we have the const_cast here.
667  // The store object is responsible for determining whether the
668  // modification is really allowed or not.
669  IConstAuxStore* store ATLAS_THREAD_SAFE =
670  const_cast<IConstAuxStore*> (getConstStore());
671  ret = store->clearDecorations();
672  }
673  else
674  throw SG::ExcNoAuxStore ("lock");
675  return ret;
676 }

◆ clearDecorCache()

void SG::AuxVectorData::clearDecorCache ( SG::auxid_t  auxid)
inherited

Clear the cached decoration pointer for a single variable.

Parameters
auxidID of the variable to clear.

Not really safe to use if another thread may be accessing the same decoration.

◆ clearIndex()

template<class ForwardIterator >
void SG::AuxVectorBase::clearIndex ( ForwardIterator  elt)
protectedinherited

Clear the container / index for element elt.

Parameters
eltIterator to the element to clear.

ForwardIterator should be an iterator over the DataVector (not a base iterator).

◆ clearIndex1() [1/2]

template<class ForwardIterator >
void SG::AuxVectorBase::clearIndex1 ( const std::false_type &  ,
ForwardIterator  elt 
)
privateinherited

Clear the container / index for element elt.

Parameters
eltIterator to the element to clear.

This is the no-auxdata case; doesn't do anything other than checking m_trackIndices.

◆ clearIndex1() [2/2]

template<class ForwardIterator >
void SG::AuxVectorBase::clearIndex1 ( const std::true_type &  ,
ForwardIterator  elt 
)
privateinherited

Clear the container / index for element elt.

Parameters
eltIterator to the element to clear.

This is the auxdata case.

◆ clearIndices()

template<class ForwardIterator >
void SG::AuxVectorBase::clearIndices ( ForwardIterator  beg,
ForwardIterator  end 
)
protectedinherited

Clear the container / index for a range of elements.

Parameters
begBeginning of the range.
endEnd of the range.

ForwardIterator should be an iterator over the DataVector (not a base iterator).

◆ clearIndices1() [1/2]

template<class ForwardIterator >
void SG::AuxVectorBase::clearIndices1 ( const std::false_type &  ,
ForwardIterator  ,
ForwardIterator   
)
privateinherited

Clear the container / index for a range of elements.

Parameters
begBeginning of the range.
endEnd of the range.

No-auxdata case; a no-op except for checking m_trackIndices.

◆ clearIndices1() [2/2]

template<class ForwardIterator >
void SG::AuxVectorBase::clearIndices1 ( const std::true_type &  ,
ForwardIterator  beg,
ForwardIterator  end 
)
privateinherited

Clear the container / index for a range of elements.

Parameters
begBeginning of the range.
endEnd of the range.

Auxdata case.

◆ clearMostDerived()

template<class T >
void DataVector< T, DataModel_detail::NoBase >::clearMostDerived ( )
protected

Clear m_isMostDerived for this instance and for all bases.

Called from the constructor after setting m_isMostDerived.

◆ crbegin()

template<class T >
const_reverse_iterator DataVector< T, DataModel_detail::NoBase >::crbegin ( ) const
noexcept

Return a const_reverse_iterator pointing past the end of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ crend()

template<class T >
const_reverse_iterator DataVector< T, DataModel_detail::NoBase >::crend ( ) const
noexcept

Return a const_reverse_iterator pointing at the beginning of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ do_cast()

template<class T >
static const T* DataVector< T, DataModel_detail::NoBase >::do_cast ( const typename PtrVector::value_type  p)
static

Helper to shorten calls to DataModel_detail::DVLCast.

Parameters
pThe value to convert.
Returns
The value as a const T*.

This is a no-op for the base class.

◆ do_cast_nc()

template<class T >
static T* DataVector< T, DataModel_detail::NoBase >::do_cast_nc ( typename PtrVector::value_type  p)
static

Helper to shorten calls to DataModel_detail::DVLCast.

Parameters
pThe value to convert.
Returns
The value as a T*.

This is a no-op for the base class.

◆ doDelete() [1/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::doDelete ( typename PtrVector::iterator  first,
typename PtrVector::iterator  last 
)
protected

Delete a range of elements.

Parameters
firstStart of range to delete.
lastEnd of range to delete.

◆ doDelete() [2/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::doDelete ( value_type  p)
protected

Delete an element.

Parameters
pThe element to delete.

◆ dv_typeid()

template<class T >
virtual const std::type_info& DataVector< T, DataModel_detail::NoBase >::dv_typeid ( ) const
privatevirtual

Find the most-derived DataVector class in the hierarchy.

Returns
The type_info for the class for which this method gets run.

This is used to generate a nice error message when the most-derived check for insertions fails. Every DataVector defines this virtual method, so when it's called, the one corresponding to the most-derived DataVector gets run.

◆ dvlinfo()

template<class T >
static const DataModel_detail::DVLInfoBase& DataVector< T, DataModel_detail::NoBase >::dvlinfo ( )
static

Return the DV/DL info struct for this class.

This can be used to make sure that it's instantiated.

◆ dvlinfo_v()

template<class T >
virtual const DataModel_detail::DVLInfoBase& DataVector< T, DataModel_detail::NoBase >::dvlinfo_v ( ) const
virtual

Return the DV/DL info struct for this class.

This can be used to make sure that it's instantiated.

◆ emplace()

template<class T >
iterator DataVector< T, DataModel_detail::NoBase >::emplace ( iterator  position,
value_type  pElem 
)

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

For DataVector, this is just the same as insert. It's included just for interface compatibility with std::vector.

◆ emplace_back()

template<class T >
value_type DataVector< T, DataModel_detail::NoBase >::emplace_back ( value_type  pElem)

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

For DataVector, this is like the same as push_back, and it returns the pushed element. It's included just for interface compatibility with std::vector.

◆ empty()

template<class T >
bool DataVector< T, DataModel_detail::NoBase >::empty ( ) const
noexcept

Returns true if the collection is empty.

◆ end() [1/2]

template<class T >
const_iterator DataVector< T, DataModel_detail::NoBase >::end ( ) const
noexcept

Return a const_iterator pointing past the end of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ end() [2/2]

template<class T >
iterator DataVector< T, DataModel_detail::NoBase >::end ( )
noexcept

Return an iterator pointing past the end of the collection.

Returns
An iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ erase() [1/2]

template<class T >
iterator DataVector< T, DataModel_detail::NoBase >::erase ( iterator  first,
iterator  last 
)

Remove a range of elements.

Parameters
firstIterator pointing to the first element to be removed.
lastIterator pointing one past the last element to be removed.
Returns
An iterator pointing to the element pointed to by last prior to erasing (or end()).

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ erase() [2/2]

template<class T >
iterator DataVector< T, DataModel_detail::NoBase >::erase ( iterator  position)

Remove element at a given position.

Parameters
positionIterator pointing to the element to be removed.
Returns
An iterator pointing to the next element (or end()).

If the container owns its elements, then the pointed-to element will be deleted.

◆ erase_base() [1/2]

template<class T >
PtrVector::iterator DataVector< T, DataModel_detail::NoBase >::erase_base ( typename PtrVector::iterator  first,
typename PtrVector::iterator  last 
)
protected

Helper for erase().

Remove a range of elements.

Parameters
firstIterator pointing to the first element to be removed.
lastIterator pointing one past the last element to be removed.
Returns
An iterator pointing to the element pointed to by last prior to erasing (or end()).

This function factors out common code between erase() in the base and derived DataVector classes. It deals with the std::vector iterators directly.

◆ erase_base() [2/2]

template<class T >
PtrVector::iterator DataVector< T, DataModel_detail::NoBase >::erase_base ( typename PtrVector::iterator  position)
protected

Helper for erase().

Remove element at a given position.

Parameters
positionIterator pointing to the element to be removed.
Returns
An iterator pointing to the next element (or end()).

This function factors out common code between erase() in the base and derived DataVector classes. It deals with the std::vector iterators directly.

◆ front() [1/2]

template<class T >
ElementProxy DataVector< T, DataModel_detail::NoBase >::front ( )

Access the first element in the collection as an lvalue.

Returns
Proxy to the first element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ front() [2/2]

template<class T >
const T* DataVector< T, DataModel_detail::NoBase >::front ( ) const

Access the first element in the collection as an rvalue.

Returns
The first element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a const T* rather than a reference.

◆ get()

template<class T >
const T* DataVector< T, DataModel_detail::NoBase >::get ( size_type  n) const

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

This is a synonym for operator[] const, to be used when calling from root (where we can't readily call just the const version of a method).

◆ getAuxIDs()

const SG::auxid_set_t & SG::AuxVectorData::getAuxIDs ( ) const
inherited

Return a set of identifiers for existing data items in store associated with this object.

This will include identifiers for all items, const and non-const. If no store is associated with this object, this will return an empty set.

Definition at line 203 of file AuxVectorData.cxx.

204 {
206  if (store)
207  return store->getAuxIDs();
208  return s_emptySet;
209 }

◆ getConstDataSpan()

template<class T >
const_span<T> SG::AuxVectorBase::getConstDataSpan ( const std::string &  name) const
inherited

Return a span over an aux data item.

Parameters
auxidThe desired aux data item.

This will return a span containing the value of the requested auxiliary variable for all elements in the container. If the item doesn't exist, it will be created. Errors are signaled by raising an exception. Note that the value_type of the span is not necessarily T; an example is bool for which we return a span of char.

◆ getConstStore()

const SG::IConstAuxStore* SG::AuxVectorData::getConstStore ( ) const
inherited

Return the current store, as a const interface.

This will be non-zero if either a const or non-const store is associated with this object.

◆ getConstStoreLink()

const DataLink<SG::IConstAuxStore> SG::AuxVectorData::getConstStoreLink ( ) const
inherited

Return the data link to the current store, as a const interface.

This is set by persistency when reading an object, but it may be overridden by setting the store pointer directly.

◆ getConstStoreOol()

const SG::IConstAuxStore * SG::AuxVectorData::getConstStoreOol ( ) const
inherited

Same as getConstStore.

But out-of-line, as sometimes the debugger has problems calling inline functions.

Definition at line 704 of file AuxVectorData.cxx.

705 {
706  return getConstStore();
707 }

◆ getData() [1/2]

template<class T >
AuxDataTraits<T>::reference_type SG::AuxVectorData::getData ( SG::auxid_t  auxid,
size_t  ndx 
)
inherited

Return reference to an aux data item.

Parameters
auxidThe desired aux data item.
ndxIndex of the element to return.

This will return a reference to element ndx of aux data item auxid. If the aux data item does not exist, it will be created. Errors are signaled by raising an exception.

Warning: no type checking is done. You should usually access the data via Accessor or ConstAccessor.

◆ getData() [2/2]

template<class T >
AuxDataTraits<T>::const_reference_type SG::AuxVectorData::getData ( SG::auxid_t  auxid,
size_t  ndx 
) const
inherited

Return const reference to an aux data item.

Parameters
auxidThe desired aux data item.
ndxIndex of the element to return.

This will return a reference to element ndx of aux data item auxid. Errors are signaled by raising an exception.

Warning: no type checking is done. You should usually access the data via Accessor or ConstAccessor.

◆ getDataArray() [1/2]

void* SG::AuxVectorData::getDataArray ( SG::auxid_t  auxid)
inherited

Return a pointer to the start of an aux data vector.

Parameters
auxidThe desired aux data item.

This will return a pointer to the start of the data for aux data item auxid. If the item doesn't exist, it will be created. Errors are signaled by raising an exception.

◆ getDataArray() [2/2]

const void* SG::AuxVectorData::getDataArray ( SG::auxid_t  auxid) const
inherited

Return a const pointer to the start of an aux data vector.

Parameters
auxidThe desired aux data item.

This will return a pointer to the start of the data for aux data item auxid. Errors are signaled by raising an exception.

◆ getDataArrayAllowMissing()

const void* SG::AuxVectorData::getDataArrayAllowMissing ( SG::auxid_t  auxid) const
inherited

Return a const pointer to the start of an aux data vector.

Parameters
auxidThe desired aux data item.

This will return a pointer to the start of the data for aux data item auxid. If the item does not exist, this will return nullptr rather than raising an exception.

◆ getDataArrayForResort()

void* SG::AuxVectorBase::getDataArrayForResort ( SG::auxid_t  auxid)
privateinherited

◆ getDataOol() [1/2]

void * SG::AuxVectorData::getDataOol ( SG::auxid_t  auxid,
bool  allowMissing 
)
privateinherited

Out-of-line portion of data access.

Parameters
auxidaux data item being accessed.
allowMissingIf true, then return nullptr if the variable is missing rather than throwing an exception.

When this function returns, the cache entry m_cache[auxid] will be valid. That entry is also returned. If there's an error, the function will throw an exception rather than returning.

Definition at line 308 of file AuxVectorData.cxx.

309 {
310  guard_t guard (m_mutex);
311 
312  // Fetch the pointer from the store, or raise an exception if we don't
313  // have a non-const store.
314  void* ptr = 0;
315  if (m_store) {
316  if (SG::AuxTypeRegistry::instance().isLinked (auxid)) {
317  ptr = m_store->getData (auxid, 0, 0);
318  }
319  else {
320  ptr = m_store->getData (auxid, this->size_v(), this->capacity_v());
321  }
322  }
323  else if (getConstStore())
324  throw SG::ExcConstAuxData ("fetch item", auxid);
325  else
326  throw SG::ExcNoAuxStore (auxid);
327 
328  // Check that we got a good pointer back, otherwise throw.
329  if (ptr) {
330  m_cache.store (auxid, ptr);
331 
332  // Set the same entry in the other caches as well.
333  m_constCache.store (auxid, ptr);
334  m_decorCache.store (auxid, ptr);
335  }
336  else if (!allowMissing)
337  throw SG::ExcBadAuxVar (auxid);
338 
339  return ptr;
340 }

◆ getDataOol() [2/2]

const void * SG::AuxVectorData::getDataOol ( SG::auxid_t  auxid,
bool  allowMissing 
) const
privateinherited

Out-of-line portion of data access (const version).

Parameters
auxidaux data item being accessed.
allowMissingIf true, then return nullptr if the variable is missing rather than throwing an exception.

When this function returns, the cache entry m_constCache[auxid] will be valid. That entry is also returned. If there's an error, the function will throw an exception rather than returning.

Definition at line 353 of file AuxVectorData.cxx.

355 {
356  guard_t guard (m_mutex);
357 
358  // Fetch the pointer from the store, or raise an exception if we don't
359  // have a const store.
360  const void* ptr = 0;
362  if (store)
363  ptr = store->getData (auxid);
364  else
365  throw SG::ExcNoAuxStore (auxid);
366 
367  // Check that we got a good pointer back, otherwise throw.
368  if (ptr) {
369  // We could avoid the const_cast here by having distinct const and
370  // non-const Cache types, holding const void* and void*, respectively.
371  // However, since this is a purely internal class that users don't
372  // deal with directly, that's not worth the bother (and the extra code).
373  void* vp ATLAS_THREAD_SAFE = const_cast<void*> (ptr);
374  m_constCache.store (auxid, vp);
375  }
376  else if (!allowMissing)
377  throw SG::ExcBadAuxVar (auxid);
378 
379  return ptr;
380 }

◆ getDataSpan() [1/3]

template<class T >
span<T> SG::AuxVectorBase::getDataSpan ( const std::string &  name)
inherited

Return a span over an aux data item.

Parameters
auxidThe desired aux data item.

This will return a span containing the value of the requested auxiliary variable for all elements in the container. If the item doesn't exist, it will be created. Errors are signaled by raising an exception. Note that the value_type of the span is not necessarily T; an example is bool for which we return a span of char.

◆ getDataSpan() [2/3]

template<class T >
const_span<T> SG::AuxVectorBase::getDataSpan ( const std::string &  name) const
inherited

Return a span over an aux data item.

Parameters
auxidThe desired aux data item.

This will return a span containing the value of the requested auxiliary variable for all elements in the container. If the item doesn't exist, it will be created. Errors are signaled by raising an exception. Note that the value_type of the span is not necessarily T; an example is bool for which we return a span of char.

◆ getDataSpan() [3/3]

const AuxDataSpanBase* SG::AuxVectorData::getDataSpan ( SG::auxid_t  auxid) const
inherited

Return a reference to a description of this vector's start+size.

Parameters
auxidThe desired aux data item.

This low-overhead method of getting the start+size of an auxiliary variable. The returned object will be updated if the variable's vector changes. Raises an exception if the variable does not exist.

This is in principle a const-correctness violation, since AuxDataSpanBase has a non-const pointer to the start of the vector. But doing it properly is kind of painful, and as this interface is only meant to be used internally, it's likely not a real problem.

◆ getDataSpanOol()

const AuxDataSpanBase * SG::AuxVectorData::getDataSpanOol ( SG::auxid_t  auxid,
bool  allowMissing 
) const
privateinherited

Return a reference to a description of this vector's start+size, out-of-line portion.

Parameters
auxidThe desired aux data item.
allowMissingIf true, then return nullptr if the variable is missing rather than throwing an exception.

When this function returns, the cache entry m_spanCache[auxid] will be valid. That entry is also returned. If there's an error, the function will throw an exception rather than returning.

Definition at line 456 of file AuxVectorData.cxx.

457 {
458  guard_t guard (m_mutex);
459 
460  // Fetch the pointer from the store, or raise an exception if we don't
461  // have a const store.
462  const IAuxTypeVector* v = 0;
464  if (store)
465  v = store->getVector (auxid);
466  else
467  throw SG::ExcNoAuxStore (auxid);
468 
469  // Check that we got a good pointer back, otherwise throw.
470  const AuxDataSpanBase* ptr = nullptr;
471  if (v) {
472  ptr = &v->getDataSpan();
473  // We could avoid the const_cast here by having distinct const and
474  // non-const Cache types, holding const void* and void*, respectively.
475  // However, since this is a purely internal class that users don't
476  // deal with directly, that's not worth the bother (and the extra code).
477  AuxDataSpanBase* vp ATLAS_THREAD_SAFE = const_cast<AuxDataSpanBase*> (ptr);
478  m_spanCache.store (auxid, vp);
479  }
480  else if (!allowMissing)
481  throw SG::ExcBadAuxVar (auxid);
482 
483  return ptr;
484 }

◆ getDecoration()

template<class T >
AuxDataTraits<T>::reference_type SG::AuxVectorData::getDecoration ( SG::auxid_t  auxid,
size_t  ndx 
) const
inherited

Return reference to an aux decoration item.

Parameters
auxidThe desired aux decoration item.
ndxIndex of the element to return.

This will return a reference to element ndx of aux decoration item auxid. If the aux data item does not exist, it will be created. Errors are signaled by raising an exception.

Warning: no type checking is done. You should usually access the data via Decorator.

The difference between getDecoration and getData is that getDecoration takes a const container as input, but returns a non-const reference. This will only succeed if either the container is not locked or the item was first accessed as a decoration.

◆ getDecorationArray()

void* SG::AuxVectorData::getDecorationArray ( SG::auxid_t  auxid) const
inherited

Return a pointer to the start of an aux data vector for a decoration.

Parameters
auxidThe desired aux data item.

This will return a pointer to the start of the data for aux data item auxid. If the item doesn't exist, it will be created. Errors are signaled by raising an exception.

The difference between getDecorationArray and getDataArray is that getDecorationArray takes a const container as input, but returns a non-const pointer. This will only succeed if either the container is not locked or the item was first accessed as a decoration.

◆ getDecorationOol()

void * SG::AuxVectorData::getDecorationOol ( SG::auxid_t  auxid) const
privateinherited

Out-of-line portion of data access (decorator version).

Parameters
auxidaux data item being accessed.

When this function returns, the cache entry m_cache[auxid] will be valid. That entry is also returned. If there's an error, the function will throw an exception rather than returning.

The difference between getDecorationOol and getDataOol is that getDecorationOol takes a const container as input, but returns a non-const pointer. This will only succeed if either the container is not locked or the item was first accessed as a decoration.

Definition at line 397 of file AuxVectorData.cxx.

398 {
399  guard_t guard (m_mutex);
400 
401  // Fetch the pointer from the store, or raise an exception if we don't
402  // have a non-const store.
403  void* ptr = 0;
404  if (m_store) {
405  // Avoid warning about calling non-const function. OK here.
406  IAuxStore* store ATLAS_THREAD_SAFE = m_store;
407  if (SG::AuxTypeRegistry::instance().isLinked (auxid)) {
408  ptr = store->getDecoration (auxid, 0, 0);
409  }
410  else {
411  ptr = store->getDecoration (auxid, this->size_v(), this->capacity_v());
412  }
413  }
414  else if (getConstStore()) {
415  // The whole point of decorations is to allow adding information to
416  // something that's otherwise const. So we have the const_cast here.
417  // The store object is responsible for determining whether the
418  // modification is really allowed or not.
419  IConstAuxStore* store ATLAS_THREAD_SAFE =
420  const_cast<IConstAuxStore*> (getConstStore());
421  if (SG::AuxTypeRegistry::instance().isLinked (auxid)) {
422  ptr = store->getDecoration (auxid, 0, 0);
423  }
424  else {
425  ptr = store->getDecoration (auxid, this->size_v(), this->capacity_v());
426  }
427  }
428  else
429  throw SG::ExcNoAuxStore (auxid);
430 
431  // Check that we got a good pointer back, otherwise throw.
432  if (!ptr)
433  throw SG::ExcBadAuxVar (auxid);
434 
435  m_decorCache.store (auxid, ptr);
436 
437  // Set the same entry in the const cache as well.
438  m_constCache.store (auxid, ptr);
439 
440  return ptr;
441 }

◆ getDecorationSpan()

template<class T >
span<T> SG::AuxVectorBase::getDecorationSpan ( const std::string &  name) const
inherited

Return a span over an aux data item for a decoration.

Parameters
auxidThe desired aux data item.

This will return a span containing the value of the requested auxiliary variable for all elements in the container. If the item doesn't exist, it will be created. Errors are signaled by raising an exception. Note that the value_type of the span is not necessarily T; an example is bool for which we return a span of char.

The difference between getDecorationSpan and getDataSpan is that getDecorationSpan takes a const container as input, but returns a span over non-const objects. This will only succeed if either the container is not locked or the item was first accessed as a decoration.

◆ getDecorIDs()

const SG::auxid_set_t & SG::AuxVectorData::getDecorIDs ( ) const
inherited

Return a set of identifiers for decorations for this object.

Definition at line 215 of file AuxVectorData.cxx.

216 {
217  if (getConstStore())
218  return getConstStore()->getDecorIDs();
219  return s_emptySet;
220 }

◆ getStore() [1/2]

SG::IAuxStore* SG::AuxVectorData::getStore ( )
inherited

Return the current store, as a non-const interface.

This will be non-zero if a non-const store is associated with this object.

◆ getStore() [2/2]

const SG::IAuxStore* SG::AuxVectorData::getStore ( ) const
inherited

Return the current store, as a non-const interface.

This will be non-zero if a non-const store is associated with this object.

◆ getWritableAuxIDs()

const SG::auxid_set_t & SG::AuxVectorData::getWritableAuxIDs ( ) const
inherited

Return a set of identifiers for writable data items in this store.

This will include only non-const identifiers. If no store is associated with this object, this will return an empty set.

Definition at line 231 of file AuxVectorData.cxx.

232 {
233  if (m_store)
234  return m_store->getWritableAuxIDs();
235  return s_emptySet;
236 }

◆ hasNonConstStore()

bool SG::AuxVectorData::hasNonConstStore ( ) const
inherited

Return true if this object has an associated non-const store.

◆ hasStore()

bool SG::AuxVectorData::hasStore ( ) const
inherited

Return true if this object has an associated store.

◆ initAuxVectorBase()

template<class DVL >
void SG::AuxVectorBase::initAuxVectorBase ( SG::OwnershipPolicy  ownPolicy,
SG::IndexTrackingPolicy  indexTrackingPolicy 
)
protectedinherited

Initialize index tracking mode.

Parameters
ownPolicyThe container ownership policy.
indexTrackingPolicyThe requested index tracking policy.

DVL should be the most-derived class for this container.

This handles the logic for setting the state of index tracking. If this container does not handle aux data, then index tracking is always off. Otherwise, it depends on the requested policies. In any case, it is an error to turn off index tracking for a container that has an associated aux store.

◆ initAuxVectorBase1() [1/2]

void SG::AuxVectorBase::initAuxVectorBase1 ( const std::false_type &  ,
SG::OwnershipPolicy  ,
SG::IndexTrackingPolicy   
)
privateinherited

Initialize index tracking mode — no-auxdata specialization.

Parameters
ownPolicyThe container ownership policy.
indexTrackingPolicyThe requested index tracking policy.

Since this is the no-auxdata case, it always sets index tracking to false. An exception is raised if the container has an associated store (but that should never actually happen).

Definition at line 132 of file AuxVectorBase.cxx.

135 {
136  m_trackIndices = false;
137  if (this->hasStore())
138  throw SG::ExcUntrackedSetStore();
139 }

◆ initAuxVectorBase1() [2/2]

void SG::AuxVectorBase::initAuxVectorBase1 ( const std::true_type &  ,
SG::OwnershipPolicy  ownPolicy,
SG::IndexTrackingPolicy  indexTrackingPolicy 
)
privateinherited

Initialize index tracking mode — auxdata specialization.

Parameters
ownPolicyThe container ownership policy.
indexTrackingPolicyThe requested index tracking policy.

Sets index tracking based on the requested policies. An exception is raised if index tracking is disabled and the container has an associated store.

Definition at line 152 of file AuxVectorBase.cxx.

155 {
156  if (indexTrackingPolicy == SG::ALWAYS_TRACK_INDICES)
157  m_trackIndices = true;
158  else if (indexTrackingPolicy == SG::NEVER_TRACK_INDICES)
159  m_trackIndices = false;
160  else if (ownPolicy == SG::OWN_ELEMENTS)
161  m_trackIndices = true;
162  else
163  m_trackIndices = false;
164 
165  if (!m_trackIndices && this->hasStore())
166  throw SG::ExcUntrackedSetStore();
167 }

◆ insert() [1/5]

template<class T >
template<class InputIterator , DataVector_detail::enable_if_ptr_itr< InputIterator, T > = true>
void DataVector< T, DataModel_detail::NoBase >::insert ( iterator  position,
InputIterator  first,
InputIterator  last 
)

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

This overload is for the case where the iterator value type is convertible to T*.

◆ insert() [2/5]

template<class T >
template<class InputIterator , DataVector_detail::enable_if_up_itr< InputIterator, T > = true>
void DataVector< T, DataModel_detail::NoBase >::insert ( iterator  position,
InputIterator  first,
InputIterator  last 
)

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

This overload is for the case where the iterator value type is convertible to unique_ptr<T>.

◆ insert() [3/5]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::insert ( iterator  position,
std::initializer_list< value_type l 
)

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
lAn initializer list.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insert() [4/5]

template<class T >
iterator DataVector< T, DataModel_detail::NoBase >::insert ( iterator  position,
std::unique_ptr< base_value_type pElem 
)

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container must be an owning container.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insert() [5/5]

template<class T >
iterator DataVector< T, DataModel_detail::NoBase >::insert ( iterator  position,
value_type  pElem 
)

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insertMove()

template<class T >
void DataVector< T, DataModel_detail::NoBase >::insertMove ( iterator  position,
DataVector< T, DataModel_detail::NoBase > &  other 
)

Insert the contents of another DataVector, with auxiliary data copied via move semantics.

Parameters
positionIterator before which the new elements will be added.
otherThe vector to add.

The ownership mode of this vector must be the same as other; otherwise, an exception will be thrown.

If both vectors are view vectors, then this is the same as insert (position, other.begin(), other.end()) .

Otherwise, the elements from other will be inserted into this vector. This vector will take ownership of the elements, and the ownership mode of other will be changed to VIEW_ELEMENTS. Auxiliary data for these elements will be transferred, using move semantics if possible. (Thus, the auxiliary store for other may be modified and must not be locked.) Finally, the auxiliary store pointer for other will be cleared (but the store itself will not be deleted since it's not owned by the vector).

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ isAvailable() [1/3]

bool SG::AuxVectorData::isAvailable
inherited

Test to see if a variable exists in the store.

Parameters
idThe variable to test.

◆ isAvailable() [2/3]

bool SG::AuxVectorData::isAvailable ( auxid_t  id) const
inherited

Test to see if a variable exists in the store.

Parameters
idThe variable to test.

◆ isAvailable() [3/3]

template<class T >
bool SG::AuxVectorBase::isAvailable ( const std::string &  name,
const std::string &  clsname = "" 
) const
inherited

Test to see if a variable exists in the store.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

◆ isAvailableOol()

bool SG::AuxVectorData::isAvailableOol ( auxid_t  id) const
privateinherited

Out-of-line portion of isAvailable.

Parameters
idThe variable to test.

Definition at line 243 of file AuxVectorData.cxx.

244 {
245  guard_t guard (m_mutex);
246 
248  if (!store) return false;
249 
250  // Don't rely on getAuxIDs() --- the store can lie.
251  // Explicitly try to fetch the data.
252  const void* ptr = store->getData (id);
253  if (ptr) {
254  // We could avoid the const_cast here by having distinct const and
255  // non-const Cache types, holding const void* and void*, respectively.
256  // However, since this is a purely internal class that users don't
257  // deal with directly, that's not worth the bother (and the extra code).
258  void* vp ATLAS_THREAD_SAFE = const_cast<void*> (ptr);
259  m_constCache.store (id, vp);
260  return true;
261  }
262  return false;
263 }

◆ isAvailableWritable() [1/3]

bool SG::AuxVectorData::isAvailableWritable
inherited

Test to see if a variable is available for writing.

Parameters
idThe variable to test.

◆ isAvailableWritable() [2/3]

bool SG::AuxVectorData::isAvailableWritable ( auxid_t  id)
inherited

Test to see if a variable is available for writing.

Parameters
idThe variable to test.

◆ isAvailableWritable() [3/3]

template<class T >
bool SG::AuxVectorBase::isAvailableWritable ( const std::string &  name,
const std::string &  clsname = "" 
)
inherited

Test to see if a variable is available for writing.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

◆ isAvailableWritableAsDecoration() [1/3]

bool SG::AuxVectorData::isAvailableWritableAsDecoration
inherited

Test to see if a variable is available for writing as a decoration.

Parameters
idThe variable to test.

◆ isAvailableWritableAsDecoration() [2/3]

bool SG::AuxVectorData::isAvailableWritableAsDecoration ( auxid_t  id) const
inherited

Test to see if a variable is available for writing as a decoration.

Parameters
idThe variable to test.

◆ isAvailableWritableAsDecoration() [3/3]

template<class T >
bool SG::AuxVectorBase::isAvailableWritableAsDecoration ( const std::string &  name,
const std::string &  clsname = "" 
) const
inherited

Test to see if a variable is available for writing as a decoration.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

◆ isAvailableWritableAsDecorationOol()

bool SG::AuxVectorData::isAvailableWritableAsDecorationOol ( auxid_t  id) const
privateinherited

Out-of-line portion of isAvailableWritableAsDecoration.

Parameters
idThe variable to test.

Definition at line 282 of file AuxVectorData.cxx.

283 {
284  if (!isAvailableOol (id)) return false;
285 
286  // Not nice, but not sure we can do otherwise without changing interfaces.
287  // I think the case of a caught exception should be rare.
288  try {
289  this->getDecorationArray (id);
290  }
291  catch (const SG::ExcStoreLocked&) {
292  return false;
293  }
294  return true;
295 }

◆ isAvailableWritableOol()

bool SG::AuxVectorData::isAvailableWritableOol ( auxid_t  id)
privateinherited

Out-of-line portion of isAvailableWritable.

Parameters
idThe variable to test.

Definition at line 270 of file AuxVectorData.cxx.

271 {
272  const SG::IAuxStore* store = getStore();
273  if (!store) return false;
274  return store->getWritableAuxIDs().test(id);
275 }

◆ iter_swap()

template<class T >
static void DataVector< T, DataModel_detail::NoBase >::iter_swap ( iterator  a,
iterator  b 
)
static

Swap the referents of two DataVector iterators.

Parameters
aThe first iterator for the swap.
bThe second iterator for the swap.

◆ lock()

void SG::AuxVectorData::lock ( )
overridevirtualinherited

Lock the container.

After this, only decorations can be changed/modified. If the container is already locked, this is a no-op.

Implements ILockable.

Definition at line 633 of file AuxVectorData.cxx.

634 {
635  if (m_store) {
636  m_store->lock();
637  clearCache();
638  }
639 
640  // No error if no store or no writable store.
641 }

◆ lockDecoration()

void SG::AuxVectorData::lockDecoration ( SG::auxid_t  auxid)
inherited

Explicitly lock a decoration.

Parameters
auxidID of the decoration to lock.

This is only safe if no other thread can be accessing this decoration. It is strongly preferred to do this via a WriteDecorHandle, where the dependencies can help ensure this.

Definition at line 687 of file AuxVectorData.cxx.

688 {
689  const IConstAuxStore* store = this->getConstStore();
690  if (store) {
691  // Casting away const ok if no other thread is accessing this decoration.
692  IConstAuxStore* store_nc ATLAS_THREAD_SAFE = const_cast<IConstAuxStore*> (store);
693  store_nc->lockDecoration (auxid);
694  this->clearDecorCache (auxid);
695  }
696 }

◆ max_size()

template<class T >
size_type DataVector< T, DataModel_detail::NoBase >::max_size ( ) const
noexcept

Returns the size() of the largest possible collection.

◆ moveAux() [1/3]

void SG::AuxVectorBase::moveAux ( size_t  index,
const void *  p,
bool  clear = false,
bool  skipDestClear = false 
)
protectedinherited

Set index on an element and copy auxiliary data.

Parameters
indexContainer index at which the new element is being added.
pThe new element being added.
clearIf true, then any auxiliary data initially associated with p are cleared after being copied.
skipDestClearNormally, if p does not have auxiliary data, then the variables of the destination are cleared. If this flag is true, then this clear is skipped. This can be appropriate as part of a push_back, where the destination is already known to be clear.

Overload for the no-auxdata case.

◆ moveAux() [2/3]

template<class ForwardIterator >
void SG::AuxVectorBase::moveAux ( size_t  index,
ForwardIterator  beg,
ForwardIterator  end,
bool  clear = false,
bool  skipDestClear = false 
)
protectedinherited

Set index on a range of elements and copy auxiliary data.

Parameters
indexContainer index at which the first new element is being added.
begThe start of the range of new elements.
endThe end of the range of new elements.
clearIf true, then any auxiliary data initially associated with the elements are cleared after being copied.
skipDestClearNormally, if the elements do not have auxiliary data, then the variables of the destination are cleared. If this flag is true, then this clear is skipped. This can be appropriate as part of a push_back, where the destination is already known to be clear.

The elements in the range are being a added to the container at index. If the new elements have associated auxiliary data, copy it to the container starting at index. Then set the container / index on the elements in the range.

ForwardIterator should be an iterator over the DataVector (not a base iterator).

◆ moveAux() [3/3]

void SG::AuxVectorBase::moveAux ( size_t  index,
SG::AuxElement p,
bool  clear = false,
bool  skipDestClear = false 
)
protectedinherited

Set index on an element and copy auxiliary data.

Parameters
indexContainer index at which the new element is being added.
pThe new element being added.
clearIf true, then any auxiliary data initially associated with p are cleared after being copied.
skipDestClearNormally, if p does not have auxiliary data, then the variables of the destination are cleared. If this flag is true, then this clear is skipped. This can be appropriate as part of a push_back, where the destination is already known to be clear.

Element p is being added to the container at index. If p has associated auxiliary data, copy it to the container at index. Then set the container / index on p.

Definition at line 223 of file AuxVectorBase.cxx.

226 {
227  if (!m_trackIndices)
228  return;
229 
230  SG::AuxElement to (this, index);
231  if (!p) {
232  if (!skipDestClear) to.clearAux();
233  return;
234  }
235 
236  if (p->hasStore() || !skipDestClear)
237  to.copyAux (*p);
238  if (clear)
239  p->clearAux();
240  p->setIndex (index, this);
241 }

◆ moveAux1() [1/2]

template<class ForwardIterator >
void SG::AuxVectorBase::moveAux1 ( const std::false_type &  ,
size_t  index,
ForwardIterator  beg,
ForwardIterator  end,
bool  clear = false,
bool  skipDestClear = false 
)
privateinherited

Set index on a range of elements and copy auxiliary data.

Parameters
indexContainer index at which the first new element is being added.
begThe start of the range of new elements.
endThe end of the range of new elements.
clearIf true, then any auxiliary data initially associated with the elements are cleared after being copied.
skipDestClearNormally, if the elements do not have auxiliary data, then the variables of the destination are cleared. If this flag is true, then this clear is skipped. This can be appropriate as part of a push_back, where the destination is already known to be clear.

No-auxdata version; a no-op except for checking m_trackIndices.

◆ moveAux1() [2/2]

template<class ForwardIterator >
void SG::AuxVectorBase::moveAux1 ( const std::true_type &  ,
size_t  index,
ForwardIterator  beg,
ForwardIterator  end,
bool  clear = false,
bool  skipDestClear = false 
)
privateinherited

Set index on a range of elements and copy auxiliary data.

Parameters
indexContainer index at which the first new element is being added.
begThe start of the range of new elements.
endThe end of the range of new elements.
clearIf true, then any auxiliary data initially associated with the elements are cleared after being copied.
skipDestClearNormally, if the elements do not have auxiliary data, then the variables of the destination are cleared. If this flag is true, then this clear is skipped. This can be appropriate as part of a push_back, where the destination is already known to be clear.

The elements in the range are being a added to the container at index. If the new elements have associated auxiliary data, copy it to the container starting at index. Then set the container / index on the elements in the range.

The auxdata case.

◆ operator=() [1/3]

template<class T >
DataVector& DataVector< T, DataModel_detail::NoBase >::operator= ( const DataVector< T, DataModel_detail::NoBase > &  rhs)

Assignment operator.

Parameters
rhsThe DataVector from which to assign.
Returns
This object.

This is a ‘shallow’ copy; after the completion of this, the DataVector will not own its elements. Any elements it owned prior to this call will be released.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ operator=() [2/3]

template<class T >
DataVector& DataVector< T, DataModel_detail::NoBase >::operator= ( DataVector< T, DataModel_detail::NoBase > &&  rhs)
noexcept

Move assignment.

Parameters
rhsThe container from which to move.

Any auxiliary data will be moved along with the container contents.

◆ operator=() [3/3]

template<class T >
DataVector& DataVector< T, DataModel_detail::NoBase >::operator= ( std::initializer_list< value_type l)

Assignment operator, from an initializer list.

Parameters
lAn initializer list.
Returns
This object.

This is equivalent to assign. Any existing owned elements will be released. The DataVector's ownership policy determines whether it will take ownership of the new elements.

◆ operator[]() [1/2]

template<class T >
ElementProxy DataVector< T, DataModel_detail::NoBase >::operator[] ( size_type  n)

Access an element, as an lvalue.

Parameters
nArray index to access.
Returns
Proxy to the element at n.

No bounds checking is done. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ operator[]() [2/2]

template<class T >
const T* DataVector< T, DataModel_detail::NoBase >::operator[] ( size_type  n) const

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

No bounds checking is done. Note that we return a const T* rather than a reference.

◆ ownPolicy()

template<class T >
SG::OwnershipPolicy DataVector< T, DataModel_detail::NoBase >::ownPolicy ( ) const

Return the ownership policy setting for this container.

◆ pop_back()

template<class T >
void DataVector< T, DataModel_detail::NoBase >::pop_back ( )

Remove the last element from the collection.

If the container owns its elements, then the removed element will be deleted.

◆ push_back() [1/2]

template<class T >
value_type DataVector< T, DataModel_detail::NoBase >::push_back ( std::unique_ptr< base_value_type pElem)

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container must be an owning container.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the pushed pointer.

◆ push_back() [2/2]

template<class T >
value_type DataVector< T, DataModel_detail::NoBase >::push_back ( value_type  pElem)

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the pushed pointer.

◆ rbegin() [1/2]

template<class T >
const_reverse_iterator DataVector< T, DataModel_detail::NoBase >::rbegin ( ) const
noexcept

Return a const_reverse_iterator pointing past the end of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ rbegin() [2/2]

template<class T >
reverse_iterator DataVector< T, DataModel_detail::NoBase >::rbegin ( )
noexcept

Return a reverse_iterator pointing past the end of the collection.

Returns
A reverse_iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ rend() [1/2]

template<class T >
const_reverse_iterator DataVector< T, DataModel_detail::NoBase >::rend ( ) const
noexcept

Return a const_reverse_iterator pointing at the beginning of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ rend() [2/2]

template<class T >
reverse_iterator DataVector< T, DataModel_detail::NoBase >::rend ( )
noexcept

Return a reverse_iterator pointing at the beginning of the collection.

Returns
A reverse_iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ reserve() [1/2]

template<class DVL >
void SG::AuxVectorBase::reserve ( size_t  size)
protectedinherited

Change the capacity of the aux data associated with this container.

Parameters
sizeThe new container size.

DVL should be the most-derived class for this container.

◆ reserve() [2/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::reserve ( size_type  n)

Attempt to preallocate enough memory for a specified number of elements.

Parameters
nNumber of elements required.

◆ reserve1() [1/2]

void SG::AuxVectorBase::reserve1 ( const std::false_type &  ,
size_t  size 
)
privateinherited

Change the capacity of the aux data associated with this container.

Parameters
sizeThe new container size.

The no-auxdata case; a no-op except for checking m_trackIndices.

◆ reserve1() [2/2]

void SG::AuxVectorBase::reserve1 ( const std::true_type &  ,
size_t  size 
)
privateinherited

Change the capacity of the aux data associated with this container.

Parameters
sizeThe new container size.

The auxdata case.

Definition at line 195 of file AuxVectorBase.cxx.

196 {
197  if (this->hasNonConstStore()) {
198  this->getStore()->reserve (size);
199  clearCache();
200  }
201  else if (this->hasStore())
202  throw SG::ExcConstAuxData ("reserve");
203 }

◆ resize() [1/2]

template<class DVL >
void SG::AuxVectorBase::resize ( size_t  size)
protectedinherited

Resize the aux data associated with this container.

Parameters
sizeThe new container size.

DVL should be the most-derived class for this container.

◆ resize() [2/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::resize ( size_type  sz)

Resizes the collection to the specified number of elements.

Parameters
szThe new size of the collection.

Note that this function differs from the standard in that it does not allow specifying the value of any inserted elements. They will always be 0.

If the container is shrunk, elements will be deleted as with erase().

◆ resize1() [1/2]

void SG::AuxVectorBase::resize1 ( const std::false_type &  ,
size_t  size 
)
privateinherited

Resize the aux data associated with this container.

Parameters
sizeThe new container size.

The no-auxdata case; a no-op except for checking m_trackIndices.

◆ resize1() [2/2]

void SG::AuxVectorBase::resize1 ( const std::true_type &  ,
size_t  size 
)
privateinherited

Resize the aux data associated with this container.

Parameters
sizeThe new container size.

The auxdata case.

Definition at line 176 of file AuxVectorBase.cxx.

177 {
178  if (this->hasNonConstStore()) {
179  if (!this->getStore()->resize (size)) {
180  // Only clear the cache if iterators have been invalidated.
181  clearCache();
182  }
183  }
184  else if (this->hasStore())
185  throw SG::ExcConstAuxData ("resize");
186 }

◆ resortAux() [1/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::resortAux ( iterator  beg,
iterator  end 
)

Reset indices / reorder aux data after elements have been permuted.

Parameters
begStart of the range of elements to process.
endEnd of the range of elements to process.

Call this after some operation that has permuted the elements in the container (such as sort). The index information in the elements will be used to permute all auxiliary data in the same way. Finally, all the indices will be reset in the correct order.

◆ resortAux() [2/2]

template<class ForwardIterator >
void SG::AuxVectorBase::resortAux ( size_t  index,
ForwardIterator  beg,
ForwardIterator  end 
)
protectedinherited

Reset indices / reorder aux data after elements have been permuted.

Parameters
indexIndex in the container of the start of the range.
begStart of the range of elements to process.
endEnd of the range of elements to process.

Call this after some operation that has permuted the elements in the container (such as sort). The index information in the elements will be used to permute all auxiliary data in the same way. Finally, all the indices will be reset in the correct order.

ForwardIterator should be an iterator over the DataVector (not a base iterator).

◆ resortAux1() [1/2]

template<class ForwardIterator >
void SG::AuxVectorBase::resortAux1 ( const std::false_type &  ,
size_t  index,
ForwardIterator  beg,
ForwardIterator  end 
)
privateinherited

Reset indices / reorder aux data after elements have been permuted.

Parameters
indexIndex in the container of the start of the range.
begStart of the range of elements to process.
endEnd of the range of elements to process.

No-auxdata version; a no-op except for checking m_trackIndices.

◆ resortAux1() [2/2]

template<class ForwardIterator >
void SG::AuxVectorBase::resortAux1 ( const std::true_type &  ,
size_t  index,
ForwardIterator  a,
ForwardIterator  b 
)
privateinherited

Reset indices / reorder aux data after elements have been permuted.

Parameters
indexIndex in the container of the start of the range.
begStart of the range of elements to process.
endEnd of the range of elements to process.

Call this after some operation that has permuted the elements in the container (such as sort). The index information in the elements will be used to permute all auxiliary data in the same way. Finally, all the indices will be reset in the correct order.

The auxdata case.

◆ setCache() [1/2]

void SG::AuxVectorData::setCache ( SG::auxid_t  auxid,
const void *  ptr 
)
protectedinherited

Explicitly set a cache pointer.

Parameters
auxidVariable ID to set.
ptrPointer to which the cache entry should be set.

For internal use; do not use from user code. This does not acquire the lock — it's mostly meant to be used from a constructor.

◆ setCache() [2/2]

void SG::AuxVectorData::setCache ( SG::auxid_t  auxid,
void *  ptr 
)
protectedinherited

Explicitly set a cache pointer.

Parameters
auxidVariable ID to set.
ptrPointer to which the cache entry should be set.

For internal use; do not use from user code. This does not acquire the lock — it's mostly meant to be used from a constructor.

◆ setConstStore()

void SG::AuxVectorBase::setConstStore ( const SG::IConstAuxStore store)
inherited

Synonym for setStore with IConstAuxStore.

Parameters
storeThe new store.

◆ setIndexForResort()

void SG::AuxVectorBase::setIndexForResort ( SG::AuxElement elt,
size_t  idx 
)
privateinherited

◆ setIndices()

template<class ForwardIterator >
void SG::AuxVectorBase::setIndices ( ForwardIterator  beg,
ForwardIterator  end,
size_t  first = 0 
)
protectedinherited

Set container/index for all elements within a range.

Parameters
begBeginning of the range.
endEnd of the range.
firstIndex to set for the first element in the range.

For all elements in the range, the container will be set to this container, and indices will be set sequentially, starting with first.

ForwardIterator should be an iterator over the DataVector (not a base iterator).

◆ setIndices1() [1/2]

template<class ForwardIterator >
void SG::AuxVectorBase::setIndices1 ( const std::false_type &  ,
ForwardIterator  beg,
ForwardIterator  end,
size_t  first 
)
privateinherited

Set container/index for all elements within a range.

Parameters
begBeginning of the range.
endEnd of the range.
firstIndex to set for the first element in the range.

This is the no-auxdata case; doesn't do anything other than checking m_trackIndices.

◆ setIndices1() [2/2]

template<class ForwardIterator >
void SG::AuxVectorBase::setIndices1 ( const std::true_type &  ,
ForwardIterator  beg,
ForwardIterator  end,
size_t  first 
)
privateinherited

Set container/index for all elements within a range.

Parameters
begBeginning of the range.
endEnd of the range.
firstIndex to set for the first element in the range.

This is the auxdata case. For all elements in the range, the container will be set to this container, and indices will be set sequentially, starting with first.

◆ setMostDerived()

template<class T >
virtual void DataVector< T, DataModel_detail::NoBase >::setMostDerived ( )
protectedvirtual

Set m_isMostDerived for this instance and clear it for all bases.

Called from testInsert if the test fails. The flag may not have been set if this container was made via copy construction, so set it appropriately now so we can test again.

◆ setNonConstStore()

void SG::AuxVectorBase::setNonConstStore ( SG::IAuxStore store)
inherited

Synonym for setStore with IAuxStore.

Parameters
storeThe new store.

◆ setOption() [1/8]

bool SG::AuxVectorData::setOption ( auxid_t  id,
const AuxDataOption option 
)
inherited

Set an option for an auxiliary data variable.

Parameters
idThe variable for which we want to set the option.
optionThe option setting to make.

The interpretation of option depends on the associated auxiliary store. See PackedParameters.h for option settings for writing packed data. Returns true on success, false otherwise.

Definition at line 150 of file AuxVectorData.cxx.

151 {
152  if (id == null_auxid) return false;
154  if (!store) return false;
155  return store->setOption (id, option);
156 }

◆ setOption() [2/8]

template<class T >
bool SG::AuxVectorData::setOption ( auxid_t  id,
const std::string &  optname,
arg 
)
inherited

Set an option for an auxiliary data variable.

Parameters
idThe variable for which we want to set the option.
optnameThe name of the option to set.
argThe option value to set.

The interpretation of option depends on the associated auxiliary store. See PackedParameters.h for option settings for writing packed data. Returns true on success, false otherwise.

◆ setOption() [3/8]

bool SG::AuxVectorData::setOption ( const std::string &  name,
const AuxDataOption option 
)
inherited

Set an option for an auxiliary data variable.

Parameters
nameThe name of the variable.
optionThe option setting to make.

The interpretation of option depends on the associated auxiliary store. See PackedParameters.h for option settings for writing packed data. Returns true on success, false otherwise.

Definition at line 168 of file AuxVectorData.cxx.

170 {
172  return setOption (id, option);
173 }

◆ setOption() [4/8]

bool SG::AuxVectorData::setOption ( const std::string &  name,
const std::string &  clsname,
const AuxDataOption option 
)
inherited

Set an option for an auxiliary data variable.

Parameters
nameThe name of the variable.
clsnameThe name of the associated class. May be blank.
optionThe option setting to make.

The interpretation of option depends on the associated auxiliary store. See PackedParameters.h for option settings for writing packed data. Returns true on success, false otherwise.

Definition at line 186 of file AuxVectorData.cxx.

189 {
191  return setOption (id, option);
192 }

◆ setOption() [5/8]

template<class T >
bool SG::AuxVectorData::setOption ( const std::string &  name,
const std::string &  clsname,
const std::string &  optname,
arg 
)
inherited

Set an option for an auxiliary data variable.

Parameters
nameThe name of the variable.
clsnameThe name of the associated class. May be blank.
optnameThe name of the option to set.
argThe option value to set.

The interpretation of option depends on the associated auxiliary store. See PackedParameters.h for option settings for writing packed data. Returns true on success, false otherwise.

◆ setOption() [6/8]

bool SG::AuxVectorData::setOption ( const std::string &  name,
const std::string &  optname,
double  arg 
)
inherited

◆ setOption() [7/8]

bool SG::AuxVectorData::setOption ( const std::string &  name,
const std::string &  optname,
float  arg 
)
inherited

◆ setOption() [8/8]

bool SG::AuxVectorData::setOption ( const std::string &  name,
const std::string &  optname,
int  arg 
)
inherited

Set an option for an auxiliary data variable.

Parameters
nameThe name of the variable.
optnameThe name of the option to set.
argThe option value to set.

The interpretation of option depends on the associated auxiliary store. See PackedParameters.h for option settings for writing packed data. Returns true on success, false otherwise.

◆ setStore() [1/3]

void SG::AuxVectorBase::setStore ( const DataLink< SG::IConstAuxStore > &  store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

This will clear the non-const store pointer, and also clear the cache.

It is an error to set a store for a container for which index tracking is disabled. That will raise an ExcUntrackedSetStore exception.

Definition at line 114 of file AuxVectorBase.cxx.

115 {
116  if (!m_trackIndices)
117  throw SG::ExcUntrackedSetStore();
119 }

◆ setStore() [2/3]

void SG::AuxVectorBase::setStore ( const SG::IConstAuxStore store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

This will clear the non-const store pointer, and also clear the cache.

It is an error to set a store for a container for which index tracking is disabled. That will raise an ExcUntrackedSetStore exception.

Definition at line 78 of file AuxVectorBase.cxx.

79 {
80  if (store && !m_trackIndices)
83 }

◆ setStore() [3/3]

void SG::AuxVectorBase::setStore ( SG::IAuxStore store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

This will set both the const and non-const store pointers, and also clear the cache.

It is an error to set a store for a container for which index tracking is disabled. That will raise an ExcUntrackedSetStore exception.

nb. List the non-const overload before the const one; otherwise, we can't call the const one from python.

Parameters
storeThe new store.

This will set both the const and non-const store pointers, and also clear the cache.

It is an error to set a store for a container for which index tracking is disabled. That will raise an ExcUntrackedSetStore exception.

Definition at line 96 of file AuxVectorBase.cxx.

97 {
98  if (store && !m_trackIndices)
101 }

◆ shift() [1/2]

template<class DVL >
void SG::AuxVectorBase::shift ( DVL &  cont,
size_t  pos,
ptrdiff_t  offs 
)
protectedinherited

Shift the elements of the container.

Parameters
contThe container that's being shifted.
posThe starting index for the shift.
offsThe (signed) amount of the shift.

The container should be the derived container. The elements in the container should have already been shifted; this operation will then adjust the element indices and also shift the elements in the vectors for all aux data items. offs may be either positive or negative.

If offs is positive, then the container is growing. The container size should be increased by offs, the element at pos moved to pos + offs, and similarly for following elements. The elements between pos and pos + offs should be default-initialized.

If offs is negative, then the container is shrinking. The element at pos should be moved to pos + offs, and similarly for following elements. The container should then be shrunk by -offs elements (running destructors as appropriate).

◆ shift() [2/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::shift ( size_t  pos,
ptrdiff_t  offs 
)
private

Shift the auxiliary elements of the container.

Parameters
posThe starting index for the shift.
offsThe (signed) amount of the shift.

The elements in the container should have already been shifted; this operation will then adjust the element indices and also shift the elements in the vectors for all aux data items. offs may be either positive or negative.

If offs is positive, then the container is growing. The container size should be increased by offs, the element at pos moved to pos + offs, and similarly for following elements. The elements between pos and pos + offs should be default-initialized.

If offs is negative, then the container is shrinking. The element at pos should be moved to pos + offs, and similarly for following elements. The container should then be shrunk by -offs elements (running destructors as appropriate).

◆ shift1() [1/2]

template<class DVL >
void SG::AuxVectorBase::shift1 ( const std::false_type &  ,
DVL &  cont,
size_t  pos,
ptrdiff_t  offs 
)
privateinherited

Shift the elements of the container.

Parameters
contThe container that's being shifted.
posThe starting index for the shift.
offsThe (signed) amount of the shift.

No-auxdata version; a no-op except for checking m_trackIndices.

◆ shift1() [2/2]

template<class DVL >
void SG::AuxVectorBase::shift1 ( const std::true_type &  ,
DVL &  cont,
size_t  pos,
ptrdiff_t  offs 
)
privateinherited

Shift the elements of the container.

Parameters
contThe container that's being shifted.
posThe starting index for the shift.
offsThe (signed) amount of the shift.

Auxdata version.

The container should be the derived container. The elements in the container should have already been shifted; this operation will then adjust the element indices and also shift the elements in the vectors for all aux data items. offs may be either positive or negative.

If offs is positive, then the container is growing. The container size should be increased by offs, the element at pos moved to pos + offs, and similarly for following elements. The elements between pos and pos + offs should be default-initialized.

If offs is negative, then the container is shrinking. The element at pos should be moved to pos + offs, and similarly for following elements. The container should then be shrunk by -offs elements (running destructors as appropriate).

◆ shrink_to_fit()

template<class T >
void DataVector< T, DataModel_detail::NoBase >::shrink_to_fit ( )

Change the vector capacity to match the current size.

Note: this does not affect auxiliary data.

◆ size()

template<class T >
size_type DataVector< T, DataModel_detail::NoBase >::size ( ) const
noexcept

Returns the number of elements in the collection.

◆ size_v()

template<class T >
virtual size_type DataVector< T, DataModel_detail::NoBase >::size_v ( ) const
virtual

Returns the number of elements in the collection.

   This version is virtual, to be callable from the AuxData
   base class.

Implements SG::AuxVectorData.

◆ sort() [1/2]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::sort ( )

Sort the container.

This just sorts by pointer value, so it's probably not very useful.

◆ sort() [2/2]

template<class T >
template<class COMPARE >
void DataVector< T, DataModel_detail::NoBase >::sort ( COMPARE  comp)

Sort the container with a user-specified comparison operator.

Parameters
compFunctional to compare two values.

◆ stdcont()

template<class T >
const PtrVector& DataVector< T, DataModel_detail::NoBase >::stdcont ( ) const

Return the underlying std::vector of the container.

Returns
Reference to the std::vector actually holding the collection.

Note that DataVector<T>::stdcont does not necessarily return a std::vector<T*> if DataVector inheritance is being used.

◆ swap() [1/3]

void SG::AuxVectorBase::swap ( AuxVectorBase other)
protectedinherited

Swap with another container.

Parameters
otherThe container with which to swap.

◆ swap() [2/3]

void SG::AuxVectorData::swap ( AuxVectorData other)
inherited

Swap this instance with another.

Parameters
otherThe other instance with which to swap.

◆ swap() [3/3]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::swap ( DataVector< T, DataModel_detail::NoBase > &  rhs)

Swap this collection with another.

Parameters
rhsThe collection with which to swap.

Ownership is swapped along with the collection content.

Note: this method may only be called using the most-derived DataVector in the hierarchy. The rhs must also be referenced using the most-derived DataVector.

◆ swapElement() [1/4]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::swapElement ( iterator  pos,
std::unique_ptr< base_value_type newElem,
std::unique_ptr< base_value_type > &  oldElem 
)

Swap one element out of the container.

Parameters
posThe element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element pos of the collection (no bounds checking). Then element index is set to newElem. The collection must own its elements to use its interface. The collection will take ownership of newElem and will return ownership of oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ swapElement() [2/4]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::swapElement ( iterator  pos,
value_type  newElem,
reference  oldElem 
)

Swap one element out of the container.

Parameters
posThe element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element pos of the collection (no bounds checking). Then element index is set to newElem. If the collection owns its elements, then it will take ownership of newElem and release (without deleting) the element returned through oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ swapElement() [3/4]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::swapElement ( size_type  index,
std::unique_ptr< base_value_type newElem,
std::unique_ptr< base_value_type > &  oldElem 
)

Swap one element out of the container.

Parameters
indexIndex of the element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element index of the collection (no bounds checking). Then element index is set to newElem.

The collection must own its elements to use its interface. The collection will take ownership of newElem and will return ownership of oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ swapElement() [4/4]

template<class T >
void DataVector< T, DataModel_detail::NoBase >::swapElement ( size_type  index,
value_type  newElem,
reference  oldElem 
)

Swap one element out of the container.

Parameters
indexIndex of the element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element index of the collection (no bounds checking). Then element index is set to newElem. If the collection owns its elements, then it will take ownership of newElem and release (without deleting) the element returned through oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ swapElementsAux() [1/2]

void SG::AuxVectorBase::swapElementsAux ( size_t  aindex,
size_t  bindex,
const void *  a,
const void *  b,
AuxVectorBase bcont 
)
protectedinherited

Swap indices and auxiliary data between two elements.

Parameters
aindexIndex of the first element, in this container.
bindexIndex of the second element, in bcont.
aPointer to the first element.
bPointer to the second element.
bcontContainer holding the second element. (May be the same as this, but doesn't have to be.)

This is the no-auxdata case; it is a no-op except for checking m_trackIndices.

◆ swapElementsAux() [2/2]

void SG::AuxVectorBase::swapElementsAux ( size_t  aindex,
size_t  bindex,
SG::AuxElement a,
SG::AuxElement b,
AuxVectorBase bcont 
)
protectedinherited

Swap indices and auxiliary data between two elements.

Parameters
aindexIndex of the first element, in this container.
bindexIndex of the second element, in bcont.
aPointer to the first element.
bPointer to the second element.
bcontContainer holding the second element. (May be the same as this, but doesn't have to be.)

Elements a at aindex in this and b at bindex in bcont are being swapped. Swap the index / container references between the elements and also swap the auxiliary data if it exists.

Definition at line 257 of file AuxVectorBase.cxx.

262 {
263  AuxVectorBase* acont = this;
264 
265  // If one of the elements is null, then this is just a @c moveAux.
266  if (!b) {
267  if (!a) return;
268  acont->moveAux (aindex, a, true);
269  return;
270  }
271  if (!a) {
272  bcont->moveAux (bindex, b, true);
273  return;
274  }
275 
276  // Reset indices.
277  if (b && bcont->trackIndices())
278  b->setIndex (bindex, bcont);
279  if (a && acont->trackIndices())
280  a->setIndex (aindex, acont);
281 
282  // Check stores.
283  if (!this->hasNonConstStore()) {
284  if (this->hasStore()) {
285  throw SG::ExcConstAuxData ("swapElementsAux");
286  }
287  return;
288  }
289 
290  // Swap aux data.
291 
293 
294  SG::auxid_set_t a_ids = acont->getAuxIDs();
295  for (SG::auxid_t auxid : a_ids) {
296  r.swap (auxid, *acont, aindex, *bcont, bindex, 1);
297  }
298  for (SG::auxid_t auxid : bcont->getAuxIDs()) {
299  if (!a_ids.test (auxid)) {
300  r.swap (auxid, *acont, aindex, *bcont, bindex, 1);
301  }
302  }
303 }

◆ testInsert()

template<class T >
void DataVector< T, DataModel_detail::NoBase >::testInsert ( const char *  op)

Test if we can insert; raise an exception if not.

Parameters
opDescription of the attempted operation.

In order to maintain type-safety, we can only allow insertions using the most-derived instance of DataVector. This checks this by testing the m_isMostDerived, which is set by the constructors to true only for the most-derived instance. If the test fails, we call to potentially out-of-line code to continue.

◆ testInsertOol()

template<class T >
void DataVector< T, DataModel_detail::NoBase >::testInsertOol ( const char *  op)

Test if we can insert; raise an exception if not.

Parameters
opDescription of the attempted operation.

This continues the test of testInsert. There is one case where m_isMostDerived may not be set correctly. If this container was made via copy construction, then all the m_isMostDerived flags will be false. So we call setMostDerived to set the flags correctly and test again. If the test fails again, then we raise an exception.

◆ trackIndices()

bool SG::AuxVectorBase::trackIndices ( ) const
inherited

Return true if index tracking is enabled for this container.

Friends And Related Function Documentation

◆ ConstDataVector

template<class T >
template<class DV >
friend class ConstDataVector
friend

Definition at line 3162 of file DataVector.h.

◆ DataModel_detail::ElementProxy< DataVector >

template<class T >
friend class DataModel_detail::ElementProxy< DataVector >
friend

Definition at line 3156 of file DataVector.h.

◆ DataVectorWithAlloc

template<class T >
template<class DV , class ALLOC >
friend class DataVectorWithAlloc
friend

Definition at line 3164 of file DataVector.h.

◆ test2_assignelement1

template<class T >
void test2_assignelement1 ( )
friend

◆ test2_assignelement1a

template<class T >
void test2_assignelement1a ( )
friend

◆ test2_assignelement2

template<class T >
void test2_assignelement2 ( )
friend

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/5]

size_t s_minCacheLen SG::AuxVectorData::ATLAS_THREAD_SAFE
staticprotectedinherited

Minimum length to use for the cache vector.

Only changed by unit tests.

Definition at line 593 of file AuxVectorData.h.

◆ ATLAS_THREAD_SAFE [2/5]

Cache m_cache SG::AuxVectorData::ATLAS_THREAD_SAFE
mutableprivateinherited

Cached pointers to the start of aux data vectors, non-const.

Definition at line 963 of file AuxVectorData.h.

◆ ATLAS_THREAD_SAFE [3/5]

Cache m_constCache SG::AuxVectorData::ATLAS_THREAD_SAFE
mutableprivateinherited

Cached pointers to the start of aux data vectors, const.

Definition at line 966 of file AuxVectorData.h.

◆ ATLAS_THREAD_SAFE [4/5]

Cache m_decorCache SG::AuxVectorData::ATLAS_THREAD_SAFE
mutableprivateinherited

Cached pointers to the start of aux data vectors, decorations.

Definition at line 969 of file AuxVectorData.h.

◆ ATLAS_THREAD_SAFE [5/5]

Cache m_spanCache SG::AuxVectorData::ATLAS_THREAD_SAFE
mutableprivateinherited

Cached pointers to span descriptors.

Definition at line 972 of file AuxVectorData.h.

◆ has_virtual

template<class T >
const bool DataVector< T, DataModel_detail::NoBase >::has_virtual = false
static

This is true for any DataVector class if we need to use virtual derivation to get to the base DataVector class.

Since this is the base DataVector class, set this unconditionally to false.

Definition at line 2078 of file DataVector.h.

◆ m_constStore

const SG::IConstAuxStore* SG::AuxVectorData::m_constStore
privateinherited

Associated store, const.

Definition at line 980 of file AuxVectorData.h.

◆ m_constStoreLink

DataLink< SG::IConstAuxStore > SG::AuxVectorData::m_constStoreLink
privateinherited

Associated store link, const.

Definition at line 984 of file AuxVectorData.h.

◆ m_deleter

template<class T >
Deleter* DataVector< T, DataModel_detail::NoBase >::m_deleter = nullptr
protected

Interface telling us how to delete objects.

If null, just use the C++ default.

Definition at line 3327 of file DataVector.h.

◆ m_isMostDerived

template<class T >
SG::IsMostDerivedFlag DataVector< T, DataModel_detail::NoBase >::m_isMostDerived
private

This flag is true if this DV instance is the most-derived one.

We set this to true in the top-level constructor; the constructor then calls clearMostDerived on the base classes.

Definition at line 3355 of file DataVector.h.

◆ m_mutex

mutex_t SG::AuxVectorData::m_mutex
mutableprivateinherited

Definition at line 990 of file AuxVectorData.h.

◆ m_ownPolicy

template<class T >
SG::OwnershipPolicy DataVector< T, DataModel_detail::NoBase >::m_ownPolicy
protected

The ownership policy of this container — either SG::OWNS_ELEMENTS or SG::VIEW_ELEMENTS.

Definition at line 3318 of file DataVector.h.

◆ m_pCont

template<class T >
PtrVector DataVector< T, DataModel_detail::NoBase >::m_pCont
protected

This actually holds the elements.

Definition at line 3321 of file DataVector.h.

◆ m_store

SG::IAuxStore* SG::AuxVectorData::m_store
privateinherited

Associated store, non-const.

Definition at line 976 of file AuxVectorData.h.

◆ m_trackIndices

bool SG::AuxVectorBase::m_trackIndices
privateinherited

Flag if index tracking is enabled.

Definition at line 866 of file AuxVectorBase.h.

◆ must_own

template<class T >
constexpr bool DataVector< T, DataModel_detail::NoBase >::must_own = false
staticconstexpr

If true, then this type must own its contents.

Definition at line 2144 of file DataVector.h.

◆ s_emptySet

const SG::auxid_set_t SG::AuxVectorData::s_emptySet
staticprivateinherited

Empty auxid set, used for a return value when we have no associated store.

Definition at line 993 of file AuxVectorData.h.

◆ supportsThinning

constexpr bool SG::AuxVectorBase::supportsThinning = true
staticconstexprinherited

Mark that this type supports thinning operations.

See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.

Definition at line 315 of file AuxVectorBase.h.


The documentation for this class was generated from the following file:
SG::AuxVectorData::getConstStore
const SG::IConstAuxStore * getConstStore() const
Return the current store, as a const interface.
SG::AuxVectorData::isAvailableOol
bool isAvailableOol(auxid_t id) const
Out-of-line portion of isAvailable.
Definition: AuxVectorData.cxx:243
SGTest::store
TestStore store
Definition: TestStore.cxx:23
beamspotman.r
def r
Definition: beamspotman.py:676
SG::AuxVectorData::ATLAS_THREAD_SAFE
static size_t s_minCacheLen ATLAS_THREAD_SAFE
Minimum length to use for the cache vector.
Definition: AuxVectorData.h:593
SG::AuxVectorData::clearDecorCache
void clearDecorCache(SG::auxid_t auxid)
Clear the cached decoration pointer for a single variable.
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:639
SG::ExcUntrackedSetStore
Exception — Attempt to set aux data store on container that doesn't track indices,...
Definition: Control/AthContainers/AthContainers/exceptions.h:95
SG::AuxTypeRegistry::findAuxID
SG::auxid_t findAuxID(const std::string &name, const std::string &clsname="") const
Look up a name -> auxid_t mapping.
Definition: AuxTypeRegistry.cxx:756
index
Definition: index.py:1
SG::AuxVectorData::guard_t
AthContainers_detail::lock_guard< mutex_t > guard_t
Definition: AuxVectorData.h:989
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
SG::NEVER_TRACK_INDICES
@ NEVER_TRACK_INDICES
Never track indices, regardless of the setting of the ownership policy.
Definition: IndexTrackingPolicy.h:46
SG::ExcStoreLocked
Exception — Attempted to modify auxiliary data in a locked store.
Definition: Control/AthContainers/AthContainers/exceptions.h:183
SG::AuxVectorData::hasNonConstStore
bool hasNonConstStore() const
Return true if this object has an associated non-const store.
SG::ALWAYS_TRACK_INDICES
@ ALWAYS_TRACK_INDICES
Always track indices, regardless of the setting of the ownership policy.
Definition: IndexTrackingPolicy.h:43
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
SG::ExcConstAuxData
Exception — Non-const operation performed on const aux data.
Definition: Control/AthContainers/AthContainers/exceptions.h:77
SG::AuxVectorData::getDecorationArray
void * getDecorationArray(SG::auxid_t auxid) const
Return a pointer to the start of an aux data vector for a decoration.
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:61
SG::AuxVectorBase::resize
void resize(size_t size)
Resize the aux data associated with this container.
SG::AuxVectorData::setStore
void setStore(SG::IAuxStore *store)
Set the store associated with this object.
Definition: AuxVectorData.cxx:116
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
SG::AuxVectorData::s_emptySet
static const SG::auxid_set_t s_emptySet
Empty auxid set, used for a return value when we have no associated store.
Definition: AuxVectorData.h:993
SG::ExcBadAuxVar
Exception — Attempt to retrieve nonexistent aux data item.
Definition: Control/AthContainers/AthContainers/exceptions.h:59
SG::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: OwnershipPolicy.h:17
SG::AuxVectorData::m_mutex
mutex_t m_mutex
Definition: AuxVectorData.h:990
SG::AuxVectorData::getStore
SG::IAuxStore * getStore()
Return the current store, as a non-const interface.
SG::AuxVectorData::hasStore
bool hasStore() const
Return true if this object has an associated store.
SG::AuxVectorBase::m_trackIndices
bool m_trackIndices
Flag if index tracking is enabled.
Definition: AuxVectorBase.h:866
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SG::AuxTypeRegistry::isLinked
bool isLinked(SG::auxid_t auxid) const
Test whether this is a linked variable.
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
SG::AuxVectorData::clearCache
void clearCache()
Clear the cached aux data pointers.
SG::AuxVectorData::m_store
SG::IAuxStore * m_store
Associated store, non-const.
Definition: AuxVectorData.h:976
CxxUtils::to
CONT to(RANGE &&r)
Definition: ranges.h:39
SG::IAuxStore::getWritableAuxIDs
virtual const SG::auxid_set_t & getWritableAuxIDs() const =0
Return a set of identifiers for writable data items in this store.
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
python.PyAthena.v
v
Definition: PyAthena.py:154
a
TList * a
Definition: liststreamerinfos.cxx:10
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
SG::AuxVectorBase::AuxVectorBase
AuxVectorBase()
Default constructor.
Definition: AuxVectorBase.cxx:29
SG::IAuxStore::getData
virtual void * getData(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data item.
SG::IConstAuxStore::getDecorIDs
virtual const SG::auxid_set_t & getDecorIDs() const =0
Return a set of identifiers for decorations in this store.
SG::IConstAuxStore::lock
virtual void lock()=0
Lock the container.
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
SG::IConstAuxStore
Interface for const operations on an auxiliary store.
Definition: IConstAuxStore.h:64
SG::ExcNoAuxStore
Exception — Aux data requested from object with no store.
Definition: Control/AthContainers/AthContainers/exceptions.h:34
SG::AuxVectorData::capacity_v
virtual size_t capacity_v() const =0
Return the capacity of the container.
SG::AuxVectorData::size_v
virtual size_t size_v() const =0
Return the size of the container.
SG::IAuxStore::reserve
virtual void reserve(size_t sz)=0
Change the capacity of all aux data vectors.
SG::AuxVectorData::setOption
bool setOption(auxid_t id, const AuxDataOption &option)
Set an option for an auxiliary data variable.
Definition: AuxVectorData.cxx:150