5#ifndef STOREGATE_HANDLEKEYARRAY_H
6#define STOREGATE_HANDLEKEYARRAY_H 1
9#include "GaudiKernel/EventContext.h"
10#include "GaudiKernel/ThreadLocalContext.h"
44 template <
class T_Handle,
class T_HandleKey, Gaudi::DataHandle::Mode MODE>
87 template <
class T = T_HandleKey>
88 requires T::isDecorHandleKey
90 std::initializer_list<std::string> key_names ):
102 template <std::derived_from<IProperty> OWNER>
105 std::initializer_list<std::string> l,
106 std::string doc=
"") :
108 auto p =
owner->declareProperty(std::move(name), *
this, std::move(doc));
109 p->template setOwnerType<OWNER>();
126 template <std::derived_from<IProperty> OWNER,
class T = T_HandleKey>
127 requires T::isDecorHandleKey
131 std::initializer_list<std::string> l,
132 std::string doc=
"") :
134 auto p =
owner->declareProperty(std::move(name), *
this, std::move(doc));
135 p->template setOwnerType<OWNER>();
142 virtual Gaudi::DataHandle::Mode
mode()
const override {
return MODE; }
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 );
161 std::vector< T_Handle >
makeHandles (
const EventContext& ctx)
const
163 std::vector< T_Handle > hndl;
164 for (
const T_HandleKey& k : *
this) {
165 hndl.emplace_back ( k, ctx);
Base class for VarHandleKeyArray for reading from StoreGate.
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::stri...
HandleKeyArray(VarHandleKey &contKey, std::initializer_list< std::string > key_names)
base Constructor that takes an associated container and an initializer list of std::strings.
HandleKeyArray(const std::vector< T_HandleKey > &v)
Constructor from a HandleKeyArray that takes a vector of ReadHandleKeys.
std::vector< T_Handle > makeHandles(const EventContext &ctx) const
create a vector of Handles from the HandleKeys in the array, with explicit EventContext.
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::stri...
HandleKeyArray()
default Constructor from a HandleKeyArray
std::vector< T_Handle > makeHandles() const
create a vector of Handles from the HandleKeys in the array
HandleKeyArray(std::initializer_list< std::string > key_names)
Constructor from a HandleKeyArray that takes an initializer list of std::strings.
virtual Gaudi::DataHandle::Mode mode() const override
return the type (Read/Write/Update) of handle
HandleKeyArray(std::initializer_list< T_HandleKey > l)
Constructor from a HandleKeyArray that takes an initializer list of HandleKeys.
virtual const IDataHandleHolder * owner() const override
VarHandleKeyArrayCommon()
A property holding a SG store/key/clid from which a VarHandle is made.