63 virtual void updateKey( std::string key ) {
m_key.updateKey( std::move( key ) ); }
65 virtual const std::string&
objKey()
const {
return m_key.key(); }
71 virtual bool init() {
return true; }
109 virtual const std::vector<DataObjID>&
keys()
const = 0;
113 virtual std::string
type()
const = 0;
131 template <
template <
typename>
class Handle,
typename T>
141 template <
typename Owner>
142 DataHandleVector( Owner* parent, std::string name,
const std::vector<std::string>&
keys, std::string doc =
"" )
144 std::vector<DataObjID> ids;
145 ids.reserve(
keys.size() );
146 for (
const auto& key :
keys ) ids.emplace_back( key );
148 auto p = parent->declareProperty( std::move( name ), *
this, std::move( doc ) );
149 p->template setOwnerType<Owner>();
158 template <
typename Owner>
167 template <
typename Owner,
typename Keys>
175 template <
typename Owner,
typename Name,
typename Keys>
191 const std::vector<DataObjID>&
keys()
const override {
return m_keys; }
DataHandleProperty.h GaudiKernel/DataHandleProperty.h.
DataHandle(DataObjID k, bool isCond, Mode a=Reader, IDataHandleHolder *owner=nullptr)
virtual void setOwner(IDataHandleHolder *o)
static const std::string default_type
virtual std::string pythonRepr() const
friend std::ostream & operator<<(std::ostream &str, const DataHandle &d)
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable,...
virtual bool isCondition() const
IDataHandleHolder * m_owner
virtual IDataHandleHolder * owner() const
virtual const std::string & objKey() const
virtual void updateKey(std::string key)
virtual Mode mode() const
virtual void setKey(DataObjID key)
virtual ~DataHandle()=default
virtual const DataObjID & fullKey() const
DataHandleProperty PropertyType
DataHandle(DataObjID k, Mode a=Reader, IDataHandleHolder *owner=nullptr)
Type-erased interface for a configurable sequence of data handles.
virtual std::string type() const =0
Demangled C++ type of the data accessed by each handle.
std::string semantics() const
GaudiConfig2 semantics name including handle mode and value type.
virtual const std::vector< DataObjID > & keys() const =0
Configured TES keys, in property order.
virtual void setKeys(std::span< const DataObjID > keys)=0
Replace the configured TES keys and rebuild the typed handles.
virtual DataHandle::Mode mode() const =0
Access mode shared by all handles in the vector.
DataHandleVectorProperty PropertyType
std::string pythonPropertyClassName() const
Python class used to represent the property value.
std::string pythonRepr() const
Python expression reproducing the configured value.
virtual ~DataHandleVectorBase()=default
const DataObjID & at(std::size_t i) const
Configured TES key at i.
std::string type() const override
Demangled C++ type accessed by every contained handle.
DataHandle::Mode mode() const override
Access mode shared by every contained handle.
IDataHandleHolder * m_owner
DataHandleVector(std::tuple< Owner, Name, Keys > &&keys)
Adapt the owner/name/default tuple produced internally by DataHandleMixin to the public constructor.
DataHandleVector(std::tuple< Owner, Keys > &&keys)
Adapt the owner/name-and-default tuple produced internally by DataHandleMixin to the public construct...
std::vector< DataObjID > m_keys
const std::vector< Handle< T > > & handles() const
Typed handles, in property order.
void clear()
Remove all configured keys and unregister their typed handles.
auto size() const
Number of configured handles.
DataHandleVector(Owner *parent, std::string name, const std::vector< std::string > &keys, std::string doc="")
Declare a vector data-handle property on an owning component.
DataHandleVector(Owner *parent, const std::pair< std::string, std::vector< std::string > > &keys)
Construct from the property-name/default-value pair used by the Functional algorithm data-handle mach...
void setKeys(std::span< const DataObjID > keys) override
Replace the configured TES keys and their registered typed handles.
std::vector< OutputHandleFor< Tr, Default >::template type< T > > m_handles
const std::vector< DataObjID > & keys() const override
This class is used for returning status codes from appropriate routines.
StatusCode parse(GaudiUtils::HashMap< K, V > &result, std::string_view input)
Basic parser for the types of HashMap used in DODBasicMapper.
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.