ATLAS Offline Software
Loading...
Searching...
No Matches
SG::VarHandleKeyArrayCommon< Base > Class Template Referenceabstract

#include <VarHandleKeyArray.h>

Inherits SG::VarHandleKeyArray, and std::vector< T >.

Inherited by SG::HandleKeyArray< ReadCondHandle< T >, CondHandleDefault::Key< ReadCondHandleKey< T > >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< WriteCondHandle< T >, CondHandleDefault::Key< WriteCondHandleKey< T > >, Gaudi::DataHandle::Writer >, SG::HandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< ThinningHandle< T >, ThinningHandleKey< T >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer >, SG::HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer >, SG::HandleKeyArray< SG::UpdateHandle< TgcPrepDataCollection_Cache >, SG::UpdateHandleKey< TgcPrepDataCollection_Cache >, Gaudi::DataHandle::Reader >, and SG::HandleKeyArray< SG::UpdateHandle< TgcCoinDataCollection_Cache >, SG::UpdateHandleKey< TgcCoinDataCollection_Cache >, Gaudi::DataHandle::Reader >.

Collaboration diagram for SG::VarHandleKeyArrayCommon< Base >:

Public Member Functions

 VarHandleKeyArrayCommon ()
 default base Constructor of mixin
 VarHandleKeyArrayCommon (const std::vector< Base > &v)
 base Constructor that takes a vector
 VarHandleKeyArrayCommon (std::initializer_list< Base > l)
 base Constructor that takes an initializer list of VarHandleKeys
 VarHandleKeyArrayCommon (std::initializer_list< std::string > l)
 base Constructor that takes an initializer list of std::strings.
template<class T = Base>
requires T::isDecorHandleKey
 VarHandleKeyArrayCommon (VarHandleKey &contKey, std::initializer_list< std::string > l)
 base Constructor that takes an associated container and an initializer list of std::strings.
StatusCode initialize (bool used=true)
 forward the initialization to the member VarHandleKeys
virtual StatusCode assign (const std::vector< std::string > &vs) override
 Set the contents of the VarHandleKeyArray from a vector of std::strings.
virtual void push_back (const std::string &key) override
 Add a new key to the VarHandleKeyArray.
virtual std::string toString () const override
 string representation of the VarHandleKeyArray
virtual std::vector< SG::VarHandleKey * > keys () const override
 create array of all base VarHandleKeys in the Array
virtual void renounce () override
 if called, handles will not be declared in the algorithm I/O
virtual bool renounced () const override
 query renounced state
virtual void declare (IDataHandleHolder *) override
virtual void setOwner (IDataHandleHolder *o) override
virtual const IDataHandleHolder * owner () const override
virtual IDataHandleHolder * owner () override
virtual Gaudi::DataHandle::Mode mode () const =0

Public Attributes

elements
 STL member.

Private Member Functions

template<class T = Base>
requires T::isDecorHandleKey
Base keyFromString (const std::string &s) const
 Create a HandleKey from a string.
template<class T = Base>
requires (!T::isDecorHandleKey)
Base keyFromString (const std::string &s) const
 Create a HandleKey from a string.

Private Attributes

bool m_isRenounced { false }
IDataHandleHolder * m_owner { nullptr }
const VarHandleKeym_contKey = nullptr
 Optional container on which decorations are applied.

Detailed Description

template<class Base>
class SG::VarHandleKeyArrayCommon< Base >

Definition at line 62 of file StoreGate/StoreGate/VarHandleKeyArray.h.

Constructor & Destructor Documentation

◆ VarHandleKeyArrayCommon() [1/5]

template<class Base>
SG::VarHandleKeyArrayCommon< Base >::VarHandleKeyArrayCommon ( )
inline

default base Constructor of mixin

Definition at line 69 of file StoreGate/StoreGate/VarHandleKeyArray.h.

◆ VarHandleKeyArrayCommon() [2/5]

template<class Base>
SG::VarHandleKeyArrayCommon< Base >::VarHandleKeyArrayCommon ( const std::vector< Base > & v)
inline

base Constructor that takes a vector

Parameters
vvector of Read/Write/UpdateHandleKey

Definition at line 75 of file StoreGate/StoreGate/VarHandleKeyArray.h.

75 :

◆ VarHandleKeyArrayCommon() [3/5]

template<class Base>
SG::VarHandleKeyArrayCommon< Base >::VarHandleKeyArrayCommon ( std::initializer_list< Base > l)
inline

base Constructor that takes an initializer list of VarHandleKeys

Parameters
linitializer list of Read/Write/UpdateHandleKey

Definition at line 82 of file StoreGate/StoreGate/VarHandleKeyArray.h.

82 :

◆ VarHandleKeyArrayCommon() [4/5]

template<class Base>
SG::VarHandleKeyArrayCommon< Base >::VarHandleKeyArrayCommon ( std::initializer_list< std::string > l)
inline

base Constructor that takes an initializer list of std::strings.

Parameters
linitializer list of std::strings used to create the VarHandleKeys

Definition at line 90 of file StoreGate/StoreGate/VarHandleKeyArray.h.

90 {
91 for (const auto &e : l) {
93 }
94 }

◆ VarHandleKeyArrayCommon() [5/5]

template<class Base>
template<class T = Base>
requires T::isDecorHandleKey
SG::VarHandleKeyArrayCommon< Base >::VarHandleKeyArrayCommon ( VarHandleKey & contKey,
std::initializer_list< std::string > l )
inline

base Constructor that takes an associated container and an initializer list of std::strings.

Parameters
contKeyVarHandleKey of the associated container
linitializer list of std::strings used to create the VarHandleKeys

All decorations will be read from the container referenced by @contKey.

Definition at line 108 of file StoreGate/StoreGate/VarHandleKeyArray.h.

110 : m_contKey (&contKey)
111 {
112 for (const auto &e : l) {
114 }
115 }
const VarHandleKey * m_contKey
Optional container on which decorations are applied.

Member Function Documentation

◆ assign()

template<class Base>
virtual StatusCode SG::VarHandleKeyArrayCommon< Base >::assign ( const std::vector< std::string > & vs)
overridevirtual

Set the contents of the VarHandleKeyArray from a vector of std::strings.

Parameters
vsvector of initializer strings

Implements SG::VarHandleKeyArray.

◆ declare()

template<class Base>
virtual void SG::VarHandleKeyArrayCommon< Base >::declare ( IDataHandleHolder * )
overridevirtual

Implements SG::VarHandleKeyArray.

◆ initialize()

template<class Base>
StatusCode SG::VarHandleKeyArrayCommon< Base >::initialize ( bool used = true)

forward the initialization to the member VarHandleKeys

Parameters
usedIf false, then this handle is not to be used. Instead of normal initialization, the key will be cleared.

◆ keyFromString() [1/2]

template<class Base>
template<class T = Base>
requires T::isDecorHandleKey
Base SG::VarHandleKeyArrayCommon< Base >::keyFromString ( const std::string & s) const
private

Create a HandleKey from a string.

Parameters
sString from which to create the HandleKey.

This is for decoration handle keys. If this array was initialized with a container key, then that will be used to for the handle keys.

◆ keyFromString() [2/2]

template<class Base>
template<class T = Base>
requires (!T::isDecorHandleKey)
Base SG::VarHandleKeyArrayCommon< Base >::keyFromString ( const std::string & s) const
private

Create a HandleKey from a string.

Parameters
sString from which to create the HandleKey.

This is for non-decoration handle keys.

◆ keys()

template<class Base>
virtual std::vector< SG::VarHandleKey * > SG::VarHandleKeyArrayCommon< Base >::keys ( ) const
overridevirtual

create array of all base VarHandleKeys in the Array

Implements SG::VarHandleKeyArray.

◆ mode()

virtual Gaudi::DataHandle::Mode SG::VarHandleKeyArray::mode ( ) const
pure virtualinherited

Implemented in SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >, SG::HandleKeyArray< C >, SG::HandleKeyArray< ContainerType >, SG::HandleKeyArray< DataVector< CaloCluster_v1 > >, SG::HandleKeyArray< DataVector< IParticle > >, SG::HandleKeyArray< DataVector< TrigComposite_v1 >, std::vector< SG::sgkey_t > >, SG::HandleKeyArray< DataVector< TrigComposite_v1 >, std::vector< xAOD::TrigComposite::index_type > >, SG::HandleKeyArray< DataVector< TruthParticle_v1 > >, SG::HandleKeyArray< DataVector< TruthParticle_v1 >, float >, SG::HandleKeyArray< DataVector< TruthParticle_v1 >, std::vector< ElementLink< DataVector< TruthParticle_v1 > > > >, SG::HandleKeyArray< DataVector< TruthParticle_v1 >, std::vector< unsigned long long > >, SG::HandleKeyArray< DataVector< xAOD::DiTauJet_v1 > >, SG::HandleKeyArray< DataVector< xAOD::Egamma_v1 > >, SG::HandleKeyArray< DataVector< xAOD::Egamma_v1 >, float >, SG::HandleKeyArray< DataVector< xAOD::Electron_v1 > >, SG::HandleKeyArray< DataVector< xAOD::Electron_v1 >, char >, SG::HandleKeyArray< DataVector< xAOD::Electron_v1 >, float >, SG::HandleKeyArray< DataVector< xAOD::Electron_v1 >, unsigned int >, SG::HandleKeyArray< DataVector< xAOD::FlowElement_v1 > >, SG::HandleKeyArray< DataVector< xAOD::Jet_v1 > >, SG::HandleKeyArray< DataVector< xAOD::Jet_v1 >, int >, SG::HandleKeyArray< DataVector< xAOD::Jet_v1 >, IPLV >, SG::HandleKeyArray< DataVector< xAOD::Muon_v1 > >, SG::HandleKeyArray< DataVector< xAOD::MuonSegment_v1 > >, SG::HandleKeyArray< DataVector< xAOD::Photon_v1 > >, SG::HandleKeyArray< DataVector< xAOD::TauJet_v3 > >, SG::HandleKeyArray< DataVector< xAOD::TrackParticle_v1 > >, SG::HandleKeyArray< DataVector< xAOD::UncalibratedMeasurement_v1 > >, SG::HandleKeyArray< DataVector< xAOD::Vertex_v1 > >, SG::HandleKeyArray< ReadCondHandle< T >, CondHandleDefault::Key< ReadCondHandleKey< T > >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< SG::AuxVectorBase >, SG::HandleKeyArray< SG::UpdateHandle< TgcCoinDataCollection_Cache >, SG::UpdateHandleKey< TgcCoinDataCollection_Cache >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< SG::UpdateHandle< TgcPrepDataCollection_Cache >, SG::UpdateHandleKey< TgcPrepDataCollection_Cache >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< ThinningHandle< T >, ThinningHandleKey< T >, Gaudi::DataHandle::Reader >, SG::HandleKeyArray< WriteCondHandle< T >, CondHandleDefault::Key< WriteCondHandleKey< T > >, Gaudi::DataHandle::Writer >, SG::HandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer >, SG::HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer >, SG::HandleKeyArray< xAOD::EventInfo_v1 >, and SG::HandleKeyArray< xAOD::TruthParticleContainer >.

◆ owner() [1/2]

template<class Base>
virtual const IDataHandleHolder * SG::VarHandleKeyArrayCommon< Base >::owner ( ) const
inlineoverridevirtual

◆ owner() [2/2]

template<class Base>
virtual IDataHandleHolder * SG::VarHandleKeyArrayCommon< Base >::owner ( )
inlineoverridevirtual

Implements SG::VarHandleKeyArray.

Definition at line 164 of file StoreGate/StoreGate/VarHandleKeyArray.h.

164{ return m_owner; }

◆ push_back()

template<class Base>
virtual void SG::VarHandleKeyArrayCommon< Base >::push_back ( const std::string & key)
inlineoverridevirtual

Add a new key to the VarHandleKeyArray.

Parameters
keyname of the key

Implements SG::VarHandleKeyArray.

Definition at line 135 of file StoreGate/StoreGate/VarHandleKeyArray.h.

135 {
137 }
Base keyFromString(const std::string &s) const
Create a HandleKey from a string.

◆ renounce()

template<class Base>
virtual void SG::VarHandleKeyArrayCommon< Base >::renounce ( )
inlineoverridevirtual

if called, handles will not be declared in the algorithm I/O

Implements SG::VarHandleKeyArray.

Definition at line 153 of file StoreGate/StoreGate/VarHandleKeyArray.h.

◆ renounced()

template<class Base>
virtual bool SG::VarHandleKeyArrayCommon< Base >::renounced ( ) const
inlineoverridevirtual

query renounced state

Implements SG::VarHandleKeyArray.

Definition at line 158 of file StoreGate/StoreGate/VarHandleKeyArray.h.

158{ return m_isRenounced; }

◆ setOwner()

template<class Base>
virtual void SG::VarHandleKeyArrayCommon< Base >::setOwner ( IDataHandleHolder * o)
inlineoverridevirtual

Implements SG::VarHandleKeyArray.

Definition at line 162 of file StoreGate/StoreGate/VarHandleKeyArray.h.

162{ m_owner = o; }

◆ toString()

template<class Base>
virtual std::string SG::VarHandleKeyArrayCommon< Base >::toString ( ) const
overridevirtual

string representation of the VarHandleKeyArray

Implements SG::VarHandleKeyArray.

Member Data Documentation

◆ elements

T std::vector< T >::elements
inherited

STL member.

◆ m_contKey

template<class Base>
const VarHandleKey* SG::VarHandleKeyArrayCommon< Base >::m_contKey = nullptr
private

Optional container on which decorations are applied.

Definition at line 194 of file StoreGate/StoreGate/VarHandleKeyArray.h.

◆ m_isRenounced

template<class Base>
bool SG::VarHandleKeyArrayCommon< Base >::m_isRenounced { false }
private

Definition at line 190 of file StoreGate/StoreGate/VarHandleKeyArray.h.

190{ false };

◆ m_owner

template<class Base>
IDataHandleHolder* SG::VarHandleKeyArrayCommon< Base >::m_owner { nullptr }
private

Definition at line 191 of file StoreGate/StoreGate/VarHandleKeyArray.h.

191{ nullptr };

The documentation for this class was generated from the following file: