![]() |
ATLAS Offline Software
|
Const part of AuxElement
.
More...
#include <AuxElement.h>
Public Types | |
using | TypelessConstAccessor = SG::TypelessConstAccessor |
Helper class to provide const generic access to aux data. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
using | ConstAccessor = SG::ConstAccessor< T, ALLOC > |
Helper class to provide type-safe access to aux data. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
using | Decorator = SG::Decorator< T, ALLOC > |
class to provide type-safe access to aux data. More... | |
Public Member Functions | |
ConstAuxElement () | |
Default constructor. More... | |
ConstAuxElement (const SG::AuxVectorData *container, size_t index) | |
Constructor with explicit container / index. More... | |
ConstAuxElement (const ConstAuxElement &other) | |
Copy Constructor. More... | |
ConstAuxElement & | operator= (const ConstAuxElement &other)=delete |
No assignment to a const element. More... | |
~ConstAuxElement () | |
Destructor. More... | |
const SG::AuxVectorData * | container () const |
Return the container holding this element. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
XAOD_AUXDATA_DEPRECATED ConstAccessor< T, ALLOC >::const_reference_type | auxdata (const std::string &name) const |
Fetch an aux data variable, as a const reference. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
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. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
XAOD_AUXDATA_DEPRECATED ConstAccessor< T, ALLOC >::const_reference_type | auxdataConst (const std::string &name) const |
Fetch an aux data variable, as a const reference. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
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. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
XAOD_AUXDATA_DEPRECATED bool | isAvailable (const std::string &name, const std::string &clsname="") const |
Check if an aux variable is available for reading. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
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. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type | auxdecor (const std::string &name) const |
Fetch an aux decoration, as a non-const reference. More... | |
template<class T , class ALLOC = AuxAllocator_t<T>> | |
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. More... | |
const SG::auxid_set_t & | getAuxIDs () const |
Return a set of identifiers for existing data items for this object. More... | |
const SG::auxid_set_t & | getDecorIDs () const |
Return a set of identifiers for decorations for this object. More... | |
size_t | index () const |
Return the index of this element within its container. More... | |
size_t | index () const |
Return the index of this element within its container. More... | |
Protected Member Functions | |
bool | noPrivateData () const |
True if this element has no private data. More... | |
bool | havePrivateData () const |
True if this element currently has private data. More... | |
bool | hadPrivateData () const |
True if this element had private data before it was added to its current container. More... | |
Private Types | |
enum | PrivateStoreState : uint8_t { PrivateStoreState::NO_PRIVATE = 0, PrivateStoreState::HAVE_PRIVATE = 1, PrivateStoreState::HAD_PRIVATE = 2 } |
The current private data state. More... | |
Private Member Functions | |
void | releasePrivateStoreForDtor () |
Out-of-line portion of destructor. More... | |
void | setIndex (size_t index, const SG::AuxVectorData *container) |
Set the index/container for this element. More... | |
bool | setIndexPrivate (size_t index, const SG::AuxVectorData *container) |
Set the index/container for this element. More... | |
void | setNoPrivateData () |
Record that this element does not have private data. More... | |
void | setHavePrivateData () |
Record that this element currently has private data. More... | |
void | setHadPrivateData () |
Record that this element used to have private data. More... | |
Private Attributes | |
const SG::AuxVectorData * | m_container |
The container of which this object is an element. More... | |
size_t | m_index |
The index of this element within its container. More... | |
PrivateStoreState | m_privateStoreState |
Friends | |
class | AuxElement |
class | SG::AuxVectorBase |
Const part of AuxElement
.
This base class factors out the const portions of AuxElement
(which see for a complete description).
Definition at line 69 of file AuxElement.h.
using SG::ConstAuxElement::ConstAccessor = SG::ConstAccessor<T, ALLOC> |
Helper class to provide type-safe access to aux data.
Definition at line 131 of file AuxElement.h.
using SG::ConstAuxElement::Decorator = SG::Decorator<T, ALLOC> |
class to provide type-safe access to aux data.
Definition at line 135 of file AuxElement.h.
Helper class to provide const generic access to aux data.
Definition at line 127 of file AuxElement.h.
|
strongprivateinherited |
The current private data state.
Enumerator | |
---|---|
NO_PRIVATE | |
HAVE_PRIVATE | |
HAD_PRIVATE |
Definition at line 131 of file IAuxElement.h.
SG::ConstAuxElement::ConstAuxElement | ( | ) |
Default constructor.
SG::ConstAuxElement::ConstAuxElement | ( | const SG::AuxVectorData * | container, |
size_t | index | ||
) |
Constructor with explicit container / index.
container | Container of which this element will be a part. |
index | Index of this element within the container. |
This does not make any changes to aux data.
SG::ConstAuxElement::ConstAuxElement | ( | const ConstAuxElement & | other | ) |
Copy Constructor.
other | Object being copied. |
We do not copy the container/index — the new object is not yet in a container!
In the case of constructing an object with a private store, makePrivateStore
will take care of copying the aux data.
SG::ConstAuxElement::~ConstAuxElement | ( | ) |
Destructor.
Any private store is deleted.
XAOD_AUXDATA_DEPRECATED ConstAccessor<T, ALLOC>::const_reference_type SG::ConstAuxElement::auxdata | ( | const std::string & | name | ) | const |
Fetch an aux data variable, as a const reference.
name | Name of the aux variable. |
This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor
or ConstAccessor
classes.
XAOD_AUXDATA_DEPRECATED ConstAccessor<T, ALLOC>::const_reference_type SG::ConstAuxElement::auxdata | ( | const std::string & | name, |
const std::string & | clsname | ||
) | const |
Fetch an aux data variable, as a const reference.
name | Name of the aux variable. |
clsname | The name of the associated class. May be blank. |
This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor
or ConstAccessor
classes.
XAOD_AUXDATA_DEPRECATED ConstAccessor<T, ALLOC>::const_reference_type SG::ConstAuxElement::auxdataConst | ( | const std::string & | name | ) | const |
Fetch an aux data variable, as a const reference.
name | Name of the aux variable. |
This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor
class.
XAOD_AUXDATA_DEPRECATED ConstAccessor<T, ALLOC>::const_reference_type SG::ConstAuxElement::auxdataConst | ( | const std::string & | name, |
const std::string & | clsname | ||
) | const |
Fetch an aux data variable, as a const reference.
name | Name of the aux variable. |
clsname | The name of the associated class. May be blank. |
This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor
class.
XAOD_AUXDATA_DEPRECATED Decorator<T, ALLOC>::reference_type SG::ConstAuxElement::auxdecor | ( | const std::string & | name | ) | const |
Fetch an aux decoration, as a non-const reference.
name | Name of the aux variable. |
This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor
class.
If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.
XAOD_AUXDATA_DEPRECATED Decorator<T, ALLOC>::reference_type SG::ConstAuxElement::auxdecor | ( | const std::string & | name, |
const std::string & | clsname | ||
) | const |
Fetch an aux decoration, as a non-const reference.
name | Name of the aux variable. |
clsname | The name of the associated class. May be blank. |
This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor
class.
If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.
const SG::AuxVectorData* SG::ConstAuxElement::container | ( | ) | const |
Return the container holding this element.
const SG::auxid_set_t & SG::ConstAuxElement::getAuxIDs | ( | ) | const |
Return a set of identifiers for existing data items for this object.
If this object has a private or standalone store, then information from that will be returned. Otherwise, if this element is part of a container, then information for the container will be returned. Otherwise, return an empty set.
Definition at line 153 of file AuxElement.cxx.
const SG::auxid_set_t & SG::ConstAuxElement::getDecorIDs | ( | ) | const |
Return a set of identifiers for decorations for this object.
If this object has a private or standalone store, then information from that will be returned. Otherwise, if this element is part of a container, then information for the container will be returned. Otherwise, return an empty set.
Definition at line 172 of file AuxElement.cxx.
|
protectedinherited |
True if this element had private data before it was added to its current container.
|
protectedinherited |
True if this element currently has private data.
|
inherited |
Return the index of this element within its container.
size_t SG::IAuxElement::index |
Return the index of this element within its container.
Inherited from IAuxElement.
XAOD_AUXDATA_DEPRECATED bool SG::ConstAuxElement::isAvailable | ( | const std::string & | name, |
const std::string & | clsname = "" |
||
) | const |
Check if an aux variable is available for reading.
name | Name of the aux variable. |
clsname | The name of the associated class. May be blank. |
This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor
class.
XAOD_AUXDATA_DEPRECATED bool SG::ConstAuxElement::isAvailableWritableAsDecoration | ( | const std::string & | name, |
const std::string & | clsname = "" |
||
) | const |
Check if an aux variable is available for writing as a decoration.
name | Name of the aux variable. |
clsname | The name of the associated class. May be blank. |
This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor
class.
|
protectedinherited |
True if this element has no private data.
|
delete |
No assignment to a const element.
|
private |
Out-of-line portion of destructor.
Delete a private store if we have one.
Definition at line 80 of file AuxElement.cxx.
|
privateinherited |
Record that this element used to have private data.
|
privateinherited |
Record that this element currently has private data.
|
private |
Set the index/container for this element.
index | The index of this object within the container. |
container | The container holding this object. May be null if this object is being removed from a container. |
Usually this simply sets the index and container members of this object. However, in the case where this object has an associated private store, then we need to deal with releasing the store if the object is being added to a container, or making a new store if the object is being removed from a container.
|
private |
Set the index/container for this element.
index | The index of this object within the container. |
container | The container holding this object. May be null if this object is being removed from a container. |
This is called from setIndex
when we have a private store to deal with.
Definition at line 97 of file AuxElement.cxx.
|
privateinherited |
Record that this element does not have private data.
|
friend |
Definition at line 292 of file AuxElement.h.
|
friend |
Definition at line 293 of file AuxElement.h.
|
private |
The container of which this object is an element.
Should be null if this object is not within a container, except that it may also point at a private store.
Definition at line 335 of file AuxElement.h.
|
privateinherited |
The index of this element within its container.
Should be 0 if this object is not within a container.
Definition at line 128 of file IAuxElement.h.
|
privateinherited |
Definition at line 137 of file IAuxElement.h.