ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
SG::HandleKeyArray< T_Handle, T_HandleKey, MODE > Class Template Referenceabstract

#include <HandleKeyArray.h>

Inheritance diagram for SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >:
Collaboration diagram for SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >:

Public Member Functions

 HandleKeyArray ()
 default Constructor from a HandleKeyArray More...
 
 HandleKeyArray (const std::vector< T_HandleKey > &v)
 Constructor from a HandleKeyArray that takes a vector of ReadHandleKeys. More...
 
 HandleKeyArray (std::initializer_list< T_HandleKey > l)
 Constructor from a HandleKeyArray that takes an initializer list of HandleKeys. More...
 
 HandleKeyArray (std::initializer_list< std::string > key_names)
 Constructor from a HandleKeyArray that takes an initializer list of std::strings. More...
 
template<class T = T_HandleKey>
requires T::isDecorHandleKey HandleKeyArray (VarHandleKey &contKey, std::initializer_list< std::string > key_names)
 base Constructor that takes an associated container and an initializer list of std::strings. More...
 
template<std::derived_from< IProperty > OWNER>
 HandleKeyArray (OWNER *owner, std::string name, std::initializer_list< std::string > l, std::string doc="")
 auto-declaring Property Constructor from a HandleKeyArray that takes an initializer list of std::strings, and associates the WHKA with the specified Property name More...
 
template<std::derived_from< IProperty > OWNER, class T = T_HandleKey>
requires T::isDecorHandleKey HandleKeyArray (OWNER *owner, std::string name, VarHandleKey &contKey, std::initializer_list< std::string > l, std::string doc="")
 auto-declaring Property Constructor from a HandleKeyArray that takes an initializer list of std::strings, and associates the WHKA with the specified Property name More...
 
virtual Gaudi::DataHandle::Mode mode () const override
 return the type (Read/Write/Update) of handle More...
 
std::vector< T_Handle > makeHandles () const
 create a vector of Handles from the HandleKeys in the array More...
 
std::vector< T_Handle > makeHandles (const EventContext &ctx) const
 create a vector of Handles from the HandleKeys in the array, with explicit EventContext. More...
 
StatusCode initialize (bool used=true)
 forward the initialization to the member VarHandleKeys More...
 
virtual StatusCode assign (const std::vector< std::string > &vs) override
 Set the contents of the VarHandleKeyArray from a vector of std::strings. More...
 
virtual void push_back (const std::string &key) override
 Add a new key to the VarHandleKeyArray. More...
 
virtual std::string toString () const override
 string representation of the VarHandleKeyArray More...
 
virtual std::string toString () const =0
 
virtual std::vector< SG::VarHandleKey * > keys () const override
 create array of all base VarHandleKeys in the Array More...
 
virtual std::vector< SG::VarHandleKey * > keys () const =0
 
virtual void renounce () override
 if called, handles will not be declared in the algorithm I/O More...
 
virtual bool renounced () const override
 query renounced state More...
 
virtual bool renounced () const =0
 
virtual void declare (IDataHandleHolder *) override
 
virtual void setOwner (IDataHandleHolder *o) override
 
virtual const IDataHandleHolder * owner () const override
 
virtual IDataHandleHolder * owner () override
 
virtual const IDataHandleHolder * owner () const =0
 

Public Attributes

elements
 STL member. More...
 

Private Attributes

bool m_isRenounced
 
IDataHandleHolder * m_owner
 

Detailed Description

template<class T_Handle, class T_HandleKey, Gaudi::DataHandle::Mode MODE>
class SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >

Definition at line 45 of file StoreGate/StoreGate/HandleKeyArray.h.

Constructor & Destructor Documentation

◆ HandleKeyArray() [1/7]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::HandleKeyArray ( )
inline

default Constructor from a HandleKeyArray

Definition at line 50 of file StoreGate/StoreGate/HandleKeyArray.h.

50 {}

◆ HandleKeyArray() [2/7]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::HandleKeyArray ( const std::vector< T_HandleKey > &  v)
inline

Constructor from a HandleKeyArray that takes a vector of ReadHandleKeys.

Parameters
vvector of HandleKey

Definition at line 57 of file StoreGate/StoreGate/HandleKeyArray.h.

57  :
58  VarHandleKeyArrayCommon<T_HandleKey> ( v ) {}

◆ HandleKeyArray() [3/7]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::HandleKeyArray ( std::initializer_list< T_HandleKey >  l)
inline

Constructor from a HandleKeyArray that takes an initializer list of HandleKeys.

Parameters
linitializer list of HandleKey

Definition at line 65 of file StoreGate/StoreGate/HandleKeyArray.h.

65  :
66  VarHandleKeyArrayCommon<T_HandleKey> {l} {}

◆ HandleKeyArray() [4/7]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::HandleKeyArray ( std::initializer_list< std::string >  key_names)
inline

Constructor from a HandleKeyArray that takes an initializer list of std::strings.

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

Definition at line 74 of file StoreGate/StoreGate/HandleKeyArray.h.

74  :
75  VarHandleKeyArrayCommon<T_HandleKey> {key_names} {}

◆ HandleKeyArray() [5/7]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
template<class T = T_HandleKey>
requires T::isDecorHandleKey SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::HandleKeyArray ( VarHandleKey contKey,
std::initializer_list< std::string >  key_names 
)
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 89 of file StoreGate/StoreGate/HandleKeyArray.h.

90  :
91  VarHandleKeyArrayCommon<T_HandleKey> {contKey, key_names} {}

◆ HandleKeyArray() [6/7]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
template<std::derived_from< IProperty > OWNER>
SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::HandleKeyArray ( OWNER *  owner,
std::string  name,
std::initializer_list< std::string >  l,
std::string  doc = "" 
)
inline

auto-declaring Property Constructor from a HandleKeyArray that takes an initializer list of std::strings, and associates the WHKA with the specified Property name

Parameters
namename of Property
linitializer list of std::strings used to create the HandleKeys
docdocumentation string

Definition at line 103 of file StoreGate/StoreGate/HandleKeyArray.h.

106  :
107  VarHandleKeyArrayCommon<T_HandleKey> {l} {
108  auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
109  p->template setOwnerType<OWNER>();
110  }

◆ HandleKeyArray() [7/7]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
template<std::derived_from< IProperty > OWNER, class T = T_HandleKey>
requires T::isDecorHandleKey SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::HandleKeyArray ( OWNER *  owner,
std::string  name,
VarHandleKey contKey,
std::initializer_list< std::string >  l,
std::string  doc = "" 
)
inline

auto-declaring Property Constructor from a HandleKeyArray that takes an initializer list of std::strings, and associates the WHKA with the specified Property name

Parameters
namename of Property
contKeyVarHandleKey of the associated container
linitializer list of std::strings used to create the HandleKeys
docdocumentation string

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

Definition at line 128 of file StoreGate/StoreGate/HandleKeyArray.h.

132  :
133  VarHandleKeyArrayCommon<T_HandleKey> {contKey, l} {
134  auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
135  p->template setOwnerType<OWNER>();
136  }

Member Function Documentation

◆ assign()

virtual StatusCode SG::VarHandleKeyArrayCommon< T_HandleKey >::assign ( const std::vector< std::string > &  vs)
overridevirtualinherited

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

Parameters
vsvector of initializer strings

Implements SG::VarHandleKeyArray.

◆ declare()

virtual void SG::VarHandleKeyArrayCommon< T_HandleKey >::declare ( IDataHandleHolder *  )
overridevirtualinherited

Implements SG::VarHandleKeyArray.

◆ initialize()

StatusCode SG::VarHandleKeyArrayCommon< T_HandleKey >::initialize ( bool  used = true)
inherited

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.

◆ keys() [1/2]

virtual std::vector<SG::VarHandleKey*> SG::VarHandleKeyArray::keys ( ) const
pure virtualinherited

◆ keys() [2/2]

virtual std::vector<SG::VarHandleKey*> SG::VarHandleKeyArrayCommon< T_HandleKey >::keys
overridevirtualinherited

create array of all base VarHandleKeys in the Array

◆ makeHandles() [1/2]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
std::vector< T_Handle > SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::makeHandles ( ) const
inline

create a vector of Handles from the HandleKeys in the array

Definition at line 148 of file StoreGate/StoreGate/HandleKeyArray.h.

148  {
149  const EventContext& ctx = Gaudi::Hive::currentContext();
150  std::vector< T_Handle > hndl;
151  for (const T_HandleKey& k : *this) {
152  hndl.emplace_back ( k, ctx );
153  }
154  return hndl;
155  }

◆ makeHandles() [2/2]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
std::vector< T_Handle > SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::makeHandles ( const EventContext &  ctx) const
inline

create a vector of Handles from the HandleKeys in the array, with explicit EventContext.

Definition at line 161 of file StoreGate/StoreGate/HandleKeyArray.h.

162  {
163  std::vector< T_Handle > hndl;
164  for (const T_HandleKey& k : *this) {
165  hndl.emplace_back ( k, ctx);
166  }
167  return hndl;
168  }

◆ mode()

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
virtual Gaudi::DataHandle::Mode SG::HandleKeyArray< T_Handle, T_HandleKey, MODE >::mode ( ) const
inlineoverridevirtual

return the type (Read/Write/Update) of handle

Implements SG::VarHandleKeyArray.

Definition at line 142 of file StoreGate/StoreGate/HandleKeyArray.h.

142 { return MODE; }

◆ owner() [1/3]

virtual const IDataHandleHolder* SG::VarHandleKeyArray::owner ( ) const
pure virtualinherited

◆ owner() [2/3]

virtual const IDataHandleHolder* SG::VarHandleKeyArrayCommon< T_HandleKey >::owner
inlineoverridevirtualinherited

Implements SG::VarHandleKeyArray.

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

161 { return m_owner; }

◆ owner() [3/3]

virtual IDataHandleHolder* SG::VarHandleKeyArrayCommon< T_HandleKey >::owner
inlineoverridevirtualinherited

Implements SG::VarHandleKeyArray.

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

162 { return m_owner; }

◆ push_back()

virtual void SG::VarHandleKeyArrayCommon< T_HandleKey >::push_back ( const std::string &  key)
inlineoverridevirtualinherited

Add a new key to the VarHandleKeyArray.

Parameters
keyname of the key

Implements SG::VarHandleKeyArray.

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

133  {
134  std::vector<Base>::emplace_back( key );
135  }

◆ renounce()

virtual void SG::VarHandleKeyArrayCommon< T_HandleKey >::renounce
inlineoverridevirtualinherited

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

Implements SG::VarHandleKeyArray.

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

151 { m_isRenounced = true; }

◆ renounced() [1/2]

virtual bool SG::VarHandleKeyArray::renounced ( ) const
pure virtualinherited

◆ renounced() [2/2]

virtual bool SG::VarHandleKeyArrayCommon< T_HandleKey >::renounced
inlineoverridevirtualinherited

query renounced state

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

156 { return m_isRenounced; }

◆ setOwner()

virtual void SG::VarHandleKeyArrayCommon< T_HandleKey >::setOwner ( IDataHandleHolder *  o)
inlineoverridevirtualinherited

Implements SG::VarHandleKeyArray.

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

160 { m_owner = o; }

◆ toString() [1/2]

virtual std::string SG::VarHandleKeyArray::toString ( ) const
pure virtualinherited

◆ toString() [2/2]

virtual std::string SG::VarHandleKeyArrayCommon< T_HandleKey >::toString
overridevirtualinherited

string representation of the VarHandleKeyArray

Member Data Documentation

◆ elements

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

STL member.

◆ m_isRenounced

bool SG::VarHandleKeyArrayCommon< T_HandleKey >::m_isRenounced
privateinherited

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

◆ m_owner

IDataHandleHolder* SG::VarHandleKeyArrayCommon< T_HandleKey >::m_owner
privateinherited

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


The documentation for this class was generated from the following file:
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
SG::VarHandleKeyArrayCommon< T_HandleKey >::owner
virtual const IDataHandleHolder * owner() const override
Definition: StoreGate/StoreGate/VarHandleKeyArray.h:161
MODE
#define MODE
Definition: CellClusterLinkTool.h:24
SG::VarHandleKeyArrayCommon< T_HandleKey >::m_isRenounced
bool m_isRenounced
Definition: StoreGate/StoreGate/VarHandleKeyArray.h:166
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SG::VarHandleKeyArrayCommon< T_HandleKey >::m_owner
IDataHandleHolder * m_owner
Definition: StoreGate/StoreGate/VarHandleKeyArray.h:167
python.PyAthena.v
v
Definition: PyAthena.py:154
fitman.k
k
Definition: fitman.py:528
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37