From 6160986429255294edded85692ed0e0092525749 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 28 May 2024 15:21:35 +0200 Subject: [PATCH] Add note about podio versoin dependency for return type --- k4FWCore/include/k4FWCore/MetaDataHandle.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/k4FWCore/include/k4FWCore/MetaDataHandle.h b/k4FWCore/include/k4FWCore/MetaDataHandle.h index 12c9a2e8..25fb2c8a 100644 --- a/k4FWCore/include/k4FWCore/MetaDataHandle.h +++ b/k4FWCore/include/k4FWCore/MetaDataHandle.h @@ -30,8 +30,14 @@ template class 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 + /// @note The return type of this changes depending on the podio version that + /// has been used to build k4FWCore. For pre 1.0 versions of podio this will + /// return a default initialized (empty) value in case the underlying + /// parameter could not obtained be. For later podio versions this will return + /// a std::optional. + /// + /// @returns Either the (potentially default initialized) value or a + /// std::optional that is engaged in case the value is available as metadata const auto get() const; /// Set the value for this MetaDataHandle