|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef STOREGATE_HANDLEKEYARRAY_H
6 #define STOREGATE_HANDLEKEYARRAY_H 1
9 #include "GaudiKernel/EventContext.h"
10 #include "GaudiKernel/ThreadLocalContext.h"
37 template <
class T_Handle,
class T_HandleKey, Gaudi::DataHandle::Mode MODE>
79 template <
class OWNER,
83 std::initializer_list<std::string>
l,
86 auto p =
owner->declareProperty(std::move(
name), *
this, std::move(
doc));
87 p->template setOwnerType<OWNER>();
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 );
113 std::vector< T_Handle >
makeHandles (
const EventContext& ctx)
const
115 std::vector< T_Handle > hndl;
116 for (
const T_HandleKey&
k : *
this) {
117 hndl.emplace_back (
k, ctx);
HandleKeyArray(const std::vector< T_HandleKey > &v)
Constructor from a HandleKeyArray that takes a vector of ReadHandleKeys.
Base class for VarHandleKeyArray for reading from StoreGate.
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
virtual const IDataHandleHolder * owner() const override
HandleKeyArray(std::initializer_list< std::string > key_names)
Constructor from a HandleKeyArray that takes an initializer list of std::strings.
Gaudi::DataHandle::Mode mode() const
return the type (Read/Write/Update) of handle
std::vector< T_Handle > makeHandles(const EventContext &ctx) const
create a vector of Handles from the HandleKeys in the array, with explicit EventContext.
std::vector< T_Handle > makeHandles() const
create a vector of Handles from the HandleKeys in the array
HandleKeyArray(std::initializer_list< T_HandleKey > l)
Constructor from a HandleKeyArray that takes an initializer list of HandleKeys.