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 OWNER , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
 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...
 
Gaudi::DataHandle::Mode mode () const
 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 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 38 of file StoreGate/StoreGate/HandleKeyArray.h.

Constructor & Destructor Documentation

◆ HandleKeyArray() [1/5]

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 43 of file StoreGate/StoreGate/HandleKeyArray.h.

43 {}

◆ HandleKeyArray() [2/5]

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 50 of file StoreGate/StoreGate/HandleKeyArray.h.

50  :
51  VarHandleKeyArrayCommon<T_HandleKey> ( v ) {}

◆ HandleKeyArray() [3/5]

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 58 of file StoreGate/StoreGate/HandleKeyArray.h.

58  :
59  VarHandleKeyArrayCommon<T_HandleKey> {l} {}

◆ HandleKeyArray() [4/5]

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 67 of file StoreGate/StoreGate/HandleKeyArray.h.

67  :
68  VarHandleKeyArrayCommon<T_HandleKey> {key_names} {}

◆ HandleKeyArray() [5/5]

template<class T_Handle , class T_HandleKey , Gaudi::DataHandle::Mode MODE>
template<class OWNER , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
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 81 of file StoreGate/StoreGate/HandleKeyArray.h.

84  :
85  VarHandleKeyArrayCommon<T_HandleKey> {l} {
86  auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
87  p->template setOwnerType<OWNER>();
88  }

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 100 of file StoreGate/StoreGate/HandleKeyArray.h.

100  {
101  const EventContext& ctx = Gaudi::Hive::currentContext();
102  std::vector< T_Handle > hndl;
103  for (const T_HandleKey& k : *this) {
104  hndl.emplace_back ( k, ctx );
105  }
106  return hndl;
107  }

◆ 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 113 of file StoreGate/StoreGate/HandleKeyArray.h.

114  {
115  std::vector< T_Handle > hndl;
116  for (const T_HandleKey& k : *this) {
117  hndl.emplace_back ( k, ctx);
118  }
119  return hndl;
120  }

◆ mode()

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

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

Implements SG::VarHandleKeyArray.

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

94 { 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 135 of file StoreGate/StoreGate/VarHandleKeyArray.h.

135 { return m_owner; }

◆ owner() [3/3]

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

Implements SG::VarHandleKeyArray.

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

136 { return m_owner; }

◆ 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 125 of file StoreGate/StoreGate/VarHandleKeyArray.h.

125 { 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 130 of file StoreGate/StoreGate/VarHandleKeyArray.h.

130 { return m_isRenounced; }

◆ setOwner()

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

Implements SG::VarHandleKeyArray.

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

134 { 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 140 of file StoreGate/StoreGate/VarHandleKeyArray.h.

◆ m_owner

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

Definition at line 141 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:158
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
SG::VarHandleKeyArrayCommon< T_HandleKey >::owner
virtual const IDataHandleHolder * owner() const override
Definition: StoreGate/StoreGate/VarHandleKeyArray.h:135
MODE
#define MODE
Definition: CellClusterLinkTool.h:24
SG::VarHandleKeyArrayCommon< T_HandleKey >::m_isRenounced
bool m_isRenounced
Definition: StoreGate/StoreGate/VarHandleKeyArray.h:140
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SG::VarHandleKeyArrayCommon< T_HandleKey >::m_owner
IDataHandleHolder * m_owner
Definition: StoreGate/StoreGate/VarHandleKeyArray.h:141
python.PyAthena.v
v
Definition: PyAthena.py:154
fitman.k
k
Definition: fitman.py:528