|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef ATHCONTAINERS_AUXELEMENTBASE_H
14 #define ATHCONTAINERS_AUXELEMENTBASE_H
20 #include "AthLinks/DataLink.h"
37 #ifndef XAOD_DEPRECATE_AUXDATA
38 # if defined(XAOD_ANALYSIS)
39 # define XAOD_DEPRECATE_AUXDATA 0
41 # define XAOD_DEPRECATE_AUXDATA 1
44 #if XAOD_DEPRECATE_AUXDATA
45 # define XAOD_AUXDATA_DEPRECATED [[deprecated("auxdata/auxdecor are deprecated in non-analysis builds. Use SG::ConstAccessor/SG::Accessor/SG::Decorator instead.")]]
47 # define XAOD_AUXDATA_DEPRECATED
57 class AuxElementStandaloneData;
58 class AuxVectorData_test;
60 class AuxVectorBase_test;
130 template <
class T,
class ALLOC = AuxAllocator_t<T> >
134 template <
class T,
class ALLOC = AuxAllocator_t<T> >
147 template <
class T,
class ALLOC = AuxAllocator_t<T> >
163 template <
class T,
class ALLOC = AuxAllocator_t<T> >
167 const std::string& clsname)
const;
178 template <
class T,
class ALLOC = AuxAllocator_t<T> >
193 template <
class T,
class ALLOC = AuxAllocator_t<T> >
197 const std::string& clsname)
const;
209 template <
class T,
class ALLOC = AuxAllocator_t<T> >
212 const std::string& clsname =
"")
const;
224 template <
class T,
class ALLOC = AuxAllocator_t<T> >
227 const std::string& clsname =
"")
const;
242 template <
class T,
class ALLOC = AuxAllocator_t<T> >
261 template <
class T,
class ALLOC = AuxAllocator_t<T> >
265 const std::string& clsname)
const;
544 template <
class T,
class ALLOC = AuxAllocator_t<T> >
547 template <
class T,
class ALLOC = AuxAllocator_t<T> >
550 template <
class T,
class ALLOC = AuxAllocator_t<T> >
562 template <
class T,
class ALLOC = AuxAllocator_t<T> >
577 template <
class T,
class ALLOC = AuxAllocator_t<T> >
581 const std::string& clsname);
593 template <
class T,
class ALLOC = AuxAllocator_t<T> >
609 template <
class T,
class ALLOC = AuxAllocator_t<T> >
613 const std::string& clsname)
const;
624 template <
class T,
class ALLOC = AuxAllocator_t<T> >
639 template <
class T,
class ALLOC = AuxAllocator_t<T> >
643 const std::string& clsname)
const;
655 template <
class T,
class ALLOC = AuxAllocator_t<T> >
658 const std::string& clsname =
"")
const;
670 template <
class T,
class ALLOC = AuxAllocator_t<T> >
673 const std::string& clsname =
"");
685 template <
class T,
class ALLOC = AuxAllocator_t<T> >
688 const std::string& clsname =
"")
const;
703 template <
class T,
class ALLOC = AuxAllocator_t<T> >
722 template <
class T,
class ALLOC = AuxAllocator_t<T> >
726 const std::string& clsname)
const;
1023 #ifdef ATHCONTAINERS_R21_COMPAT
1053 #ifndef XAOD_STANDALONE
1055 #endif // not XAOD_STANDALONE
1058 #endif // not ATHCONTAINERS_AUXELEMENTBASE_H
bool trackIndices() const
Return true if index tracking is enabled for this object.
void setConstStore(const SG::IConstAuxStore *store)
Synonym for setStore with IConstAuxStore.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor(const std::string &name) const
Fetch an aux decoration, as a non-const reference.
Flag that a class may have auxiliary data associated with it.
Helper class to provide type-safe access to aux data.
const SG::AuxVectorData * container() const
Return the container holding this element.
XAOD_AUXDATA_DEPRECATED ConstAccessor< T, ALLOC >::const_reference_type auxdata(const std::string &name, const std::string &clsname) const
Fetch an aux data variable, as a const reference.
Base class for elements of a container that can have aux data.
void copyAux(const ConstAuxElement &other)
Copy aux data from another object.
const SG::AuxVectorData * m_container
The container of which this object is an element.
XAOD_AUXDATA_DEPRECATED bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if an aux variable is available for reading.
Exceptions that can be thrown from AthContainers.
XAOD_AUXDATA_DEPRECATED ConstAccessor< T, ALLOC >::const_reference_type auxdataConst(const std::string &name) const
Fetch an aux data variable, as a const reference.
bool hasNonConstStore() const
Return true if this object has an associated non-const store.
Helper class to provide const generic access to aux data.
bool usingStandaloneStore() const
Test to see if this object is currently using a standalone store.
bool setIndexPrivate(size_t index, const SG::AuxVectorData *container)
Set the index/container for this element.
Helper class to provide constant type-safe access to aux data.
Define likely/unlikely macros for branch prediction.
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type auxdata(const std::string &name)
Fetch an aux data variable, as a non-const reference.
ConstAuxElement()
Default constructor.
XAOD_AUXDATA_DEPRECATED ConstAccessor< T, ALLOC >::const_reference_type auxdata(const std::string &name) const
Fetch an aux data variable, as a const reference.
XAOD_AUXDATA_DEPRECATED bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if an aux variable is available for reading.
Manage index tracking and synchronization of auxiliary data.
SG::IAuxStore * getStore() const
Return the current store, as a non-const interface.
Flag that a class may have auxiliary data associated with it.
XAOD_AUXDATA_DEPRECATED bool isAvailableWritableAsDecoration(const std::string &name, const std::string &clsname="") const
Check if an aux variable is available for writing as a decoration.
typename AuxDataTraits< T, ALLOC >::const_reference_type const_reference_type
Type referencing an item.
size_t index() const
Return the index of this element within its container.
void setIndex(size_t index, SG::AuxVectorData *container)
Set the index/container for this element.
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst(const std::string &name, const std::string &clsname) const
Fetch an aux data variable, as a const reference.
XAOD_AUXDATA_DEPRECATED ConstAccessor< T, ALLOC >::const_reference_type auxdataConst(const std::string &name, const std::string &clsname) const
Fetch an aux data variable, as a const reference.
void releasePrivateStoreForDtor()
Out-of-line portion of destructor.
AuxElement(const AuxElement &other)
Copy Constructor.
Helper class to provide type-safe access to aux data.
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
Simplified version of the C++20 std::span.
void clearAux()
Clear all aux data associated with this element.
AuxElement()
Default constructor.
bool usingPrivateStore() const
Test to see if this object is currently using a private store.
typename AuxDataTraits< T, ALLOC >::reference_type reference_type
Type referencing an item.
bool setIndexPrivate(size_t index, SG::AuxVectorData *container)
Set the index/container for this element.
void makePrivateStore(const U1 &other)
Create a new private store for this object and copy aux data.
void makePrivateStore1(const void *)
Create a new private store for this object and copy aux data.
void releasePrivateStore()
Release and free any private store associated with this object.
Allow customizing how aux data types are treated.
friend class SG::AuxVectorBase_test
#define XAOD_AUXDATA_DEPRECATED
SG::TypelessConstAccessor TypelessConstAccessor
Helper class to provide const generic access to aux data.
bool clearDecorations() const
Clear all decorations.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
~ConstAuxElement()
Destructor.
Manage lookup of vectors of auxiliary data.
Const part of AuxElement.
void makePrivateStore(const U1 *other)
Create a new private store for this object and copy aux data.
XAOD_AUXDATA_DEPRECATED bool isAvailableWritableAsDecoration(const std::string &name, const std::string &clsname="") const
Check if an aux variable is available for writing as a decoration.
void clearCache()
Clear the cached aux data pointers.
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor(const std::string &name, const std::string &clsname) const
Fetch an aux decoration, as a non-const reference.
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdata(const std::string &name, const std::string &clsname) const
Fetch an aux data variable, as a const reference.
typename AuxDataTraits< T, ALLOC >::reference_type reference_type
Type referencing an item.
Helper class to provide const generic access to aux data.
Helper class to provide type-safe access to aux data.
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor(const std::string &name) const
Fetch an aux decoration, as a non-const reference.
void makePrivateStore()
Create a new (empty) private store for this object.
Internal data container for standalone store.
AuxElement & operator=(const AuxElement &other)
Assignment.
const SG::IConstAuxStore * getConstStore() const
Return the current store, as a const interface.
#define ATHCONTAINERS_R21_COMPAT
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable(const std::string &name, const std::string &clsname="")
Check if an aux variable is available for writing.
ConstAuxElement & operator=(const ConstAuxElement &other)=delete
No assignment to a const element.
Interface for non-const operations on an auxiliary store.
bool hasStore() const
Return true if this object has an associated store.
SG::AuxVectorData * container()
Return the container holding this element.
void setNonConstStore(SG::IAuxStore *store)
Synonym for setStore with IAuxStore.
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
ConstAuxElement(const SG::AuxVectorData *container, size_t index)
Constructor with explicit container / index.
static constexpr bool supportsThinning
Mark that this type supports thinning operations.
Handle mappings between names and auxid_t.
Interface for non-const operations on an auxiliary store.
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst(const std::string &name) const
Fetch an aux data variable, as a const reference.
A set of aux data identifiers.
Manage lookup of vectors of auxiliary data.
void releasePrivateStoreForDtor()
Out-of-line portion of destructor.
const SG::AuxVectorData * container() const
Return the container holding this element.
Helper class to provide constant type-safe access to aux data.
ConstAuxElement(const ConstAuxElement &other)
Copy Constructor.
Interface for const operations on an auxiliary store.
AuxElement(SG::AuxVectorData *container, size_t index)
Constructor with explicit container / index.
Interface for const operations on an auxiliary store.
void setIndex(size_t index, const SG::AuxVectorData *container)
Set the index/container for this element.
Helper class to provide type-safe access to aux data.
AuxElementStandaloneData * setStore1(const SG::IConstAuxStore *store)
Set the store associated with this object.
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor(const std::string &name, const std::string &clsname) const
Fetch an aux decoration, as a non-const reference.
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type auxdata(const std::string &name, const std::string &clsname)
Fetch an aux data variable, as a non-const reference.
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdata(const std::string &name) const
Fetch an aux data variable, as a const reference.