From 16e7c35c3366865fd6349328877edf2116fd4b29 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 28 May 2024 13:02:03 +0200 Subject: [PATCH] Add docstrings for get and set of the MetaDataHandle --- k4FWCore/include/k4FWCore/MetaDataHandle.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/k4FWCore/include/k4FWCore/MetaDataHandle.h b/k4FWCore/include/k4FWCore/MetaDataHandle.h index ba5ef315..12c9a2e8 100644 --- a/k4FWCore/include/k4FWCore/MetaDataHandle.h +++ b/k4FWCore/include/k4FWCore/MetaDataHandle.h @@ -28,12 +28,22 @@ template class MetaDataHandle { MetaDataHandle(const Gaudi::DataHandle& handle, const std::string& descriptor, Gaudi::DataHandle::Mode a); ~MetaDataHandle(); + /// Get the (optional) value that is stored in this MetaDataHandle + /// + /// @returns A std::optional that is engaged if the value was available as + /// metadata const auto get() const; - void put(T); + + /// Set the value for this MetaDataHandle + /// + /// @note This can only be called during initalize and/or finalize but not + /// during execute for algorithms that use it + void put(T); private: std::string fullDescriptor() const; - void checkPodioDataSvc(); + + void checkPodioDataSvc(); private: ServiceHandle m_eds;