12#ifndef STOREGATE_SG_WRITEHANDLE_H
13#define STOREGATE_SG_WRITEHANDLE_H 1
19#include "GaudiKernel/EventContext.h"
106 explicit WriteHandle(
const std::string& sgkey,
const EventContext& ctx);
124 const std::string& storename,
125 const EventContext& ctx);
155 const EventContext& ctx) =
delete;
259 template <class AUXSTORE>
269 template <class AUXSTORE>
280 template <
std::derived_from<DataObject> DOBJ>
281 requires
std::convertible_to<DOBJ*, T*>
291 template <
std::derived_from<DataObject> DOBJ>
292 requires
std::convertible_to<DOBJ*, T*>
311 bool returnExisting = false)
const;
329 bool returnExisting = false)
const;
347 bool returnExisting = false)
const;
367 bool returnExisting = false)
const;
387 bool returnExisting = false)
const;
407 bool returnExisting = false)
const;
422 template <
std::derived_from<DataObject> DOBJ>
423 requires
std::convertible_to<DOBJ*, T*>
440 template <
std::derived_from<DataObject> DOBJ>
441 requires
std::convertible_to<DOBJ*, T*>
459 template <class AUXSTORE>
481 template <class AUXSTORE>
501 template <class AUXSTORE>
525 template <class AUXSTORE>
602 bool returnExisting);
642 template <class AUXSTORE>
663 template <class AUXSTORE>
676 template <class AUXSTORE>
726 const EventContext& ctx);
732#include "StoreGate/WriteHandle.icc"
Base class for VarHandle classes.
Property holding a SG store/key/clid from which a WriteHandle is made.
DataVector adapter that acts like it holds const pointers.
Base class for VarHandle types.
virtual const std::string & key() const override final
std::string store() const
Property holding a SG store/key/clid from which a WriteHandle is made.
WriteHandle & operator=(WriteHandle &&rhs) noexcept
Move operator.
pointer_type checkedCachedPtr()
WriteHandle(const WriteHandle &rhs)
Copy constructor.
SG::DataProxy * m_lockAuxPending
xAOD::CaloClusterContainer & reference_type
WriteHandle(const WriteHandleKey< T > &key)
Constructor from a WriteHandleKey.
const_pointer_type doPut(const EventContext *ctx, U data, bool returnExisting, IProxyDict *&store) const
const_pointer_type cptr() const
Dereference the pointer.
WriteHandle(SG::WriteHandleKey< T > &&key)=delete
WriteHandle(const std::string &sgkey, const EventContext &ctx)
Constructor specifying the key as a string, with context.
StatusCode symLink(const WriteHandleKey< U > &key)
WriteHandle(WriteHandle &&rhs) noexcept
Move constructor.
WriteHandle(const std::string &sgkey, IProxyDict *sg)
Constructor specifying the key as a string, with data store.
xAOD::CaloClusterContainer * pointer_type
WriteHandle()
Default constructor.
WriteHandle & operator=(const WriteHandle &rhs)
Assignment operator.
WriteHandle(const std::string &sgkey, const std::string &storename=StoreID::storeName(StoreID::EVENT_STORE))
Constructor specifying the key as a string.
~WriteHandle()
Destructor.
const xAOD::CaloClusterContainer * const_pointer_type
WriteHandle(SG::WriteHandleKey< T > &&key, const EventContext &ctx)=delete
pointer_type cachedPtr()
Return the cached pointer directly; no lookup.
const xAOD::CaloClusterContainer & const_reference_type
WriteHandle(const std::string &sgkey, const std::string &storename, const EventContext &ctx)
Constructor specifying the key as a string, with context.
StatusCode record(std::unique_ptr< xAOD::CaloClusterContainer > data)
const_pointer_type put(std::unique_ptr< xAOD::CaloClusterContainer > data, bool returnExisting=false) const
StatusCode recordNonConst(std::unique_ptr< xAOD::CaloClusterContainer > data)
pointer_type operator->()
Dereference the pointer.
WriteHandle(const WriteHandleKey< T > &key, const EventContext &ctx)
Constructor from a WriteHandleKey and an explicit event context.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode doRecord(U data, bool isConst, bool returnExisting)
reference_type operator*()
Dereference the pointer.
StatusCode alias(const WriteHandleKey< xAOD::CaloClusterContainer > &key)
pointer_type ptr()
Dereference the pointer.
static const std::string & storeName(const StoreID::type &s)
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())