 |
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;
568 template <
class T,
class ALLOC = AuxAllocator_t<T> >
571 template <
class T,
class ALLOC = AuxAllocator_t<T> >
574 template <
class T,
class ALLOC = AuxAllocator_t<T> >
586 template <
class T,
class ALLOC = AuxAllocator_t<T> >
601 template <
class T,
class ALLOC = AuxAllocator_t<T> >
605 const std::string& clsname);
617 template <
class T,
class ALLOC = AuxAllocator_t<T> >
633 template <
class T,
class ALLOC = AuxAllocator_t<T> >
637 const std::string& clsname)
const;
648 template <
class T,
class ALLOC = AuxAllocator_t<T> >
663 template <
class T,
class ALLOC = AuxAllocator_t<T> >
667 const std::string& clsname)
const;
679 template <
class T,
class ALLOC = AuxAllocator_t<T> >
682 const std::string& clsname =
"")
const;
694 template <
class T,
class ALLOC = AuxAllocator_t<T> >
697 const std::string& clsname =
"");
709 template <
class T,
class ALLOC = AuxAllocator_t<T> >
712 const std::string& clsname =
"")
const;
727 template <
class T,
class ALLOC = AuxAllocator_t<T> >
746 template <
class T,
class ALLOC = AuxAllocator_t<T> >
750 const std::string& clsname)
const;
775 bool warnUnlocked =
false);
791 bool warnUnlocked =
false);
1064 bool warnUnlocked =
false);
1067 #ifdef ATHCONTAINERS_R21_COMPAT
1082 bool warnUnlocked =
false);
1099 #ifndef XAOD_STANDALONE
1101 #endif // not XAOD_STANDALONE
1104 #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 makePrivateStore(const U1 &other, bool warnUnlocked=false)
Create a new private store for this object and copy aux data.
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.
void assign(const AuxElement &other, bool warnUnlocked=false)
Assignment.
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 copyAux(const ConstAuxElement &other, bool warnUnlocked=false)
Copy aux data from another object.
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.
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
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
void makePrivateStore(const U1 *other, bool warnUnlocked=false)
Create a new private store for this object and copy aux data.
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.
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.
void makePrivateStore1(const void *other, bool warnUnlocked)
Create a new private store for this object and copy aux data.
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.
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
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.