Skip to content

Commit

Permalink
Delete the version checks for Podio before 1.0 (key4hep#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Jul 26, 2024
1 parent 971ae2d commit aa74c94
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
8 changes: 0 additions & 8 deletions k4FWCore/components/PodioOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,7 @@
#include "Gaudi/Algorithm.h"
#include "k4FWCore/KeepDropSwitch.h"
#include "podio/CollectionBase.h"
#include "podio/podioVersion.h"
#if PODIO_BUILD_VERSION >= PODIO_VERSION(0, 99, 0)
#include "podio/ROOTWriter.h"
#else
#include "podio/ROOTFrameWriter.h"
namespace podio {
using ROOTWriter = podio::ROOTFrameWriter;
}
#endif

#include <vector>

Expand Down
14 changes: 0 additions & 14 deletions k4FWCore/include/k4FWCore/MetaDataHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include "k4FWCore/PodioDataSvc.h"

#include "podio/podioVersion.h"

template <typename T> class MetaDataHandle {
public:
MetaDataHandle();
Expand Down Expand Up @@ -92,19 +90,7 @@ MetaDataHandle<T>::MetaDataHandle(const Gaudi::DataHandle& handle, const std::st
//---------------------------------------------------------------------------
template <typename T> std::optional<T> MetaDataHandle<T>::get_optional() const {
const auto& frame = m_podio_data_service->getMetaDataFrame();
#if PODIO_BUILD_VERSION > PODIO_VERSION(0, 99, 0)
return frame.getParameter<T>(fullDescriptor());
#else
// explicitly make a copy here and move it into the optional below
auto val = frame.getParameter<T>(fullDescriptor());
// This is what happens if we have a non-present key, so we can use it as a
// way to determine if the parameter was (likely) unset. For more details see
// https://github.com/AIDASoft/podio/issues/576
if (val == T{}) {
return std::nullopt;
}
return std::optional<T>(std::move(val));
#endif
}

//---------------------------------------------------------------------------
Expand Down
8 changes: 0 additions & 8 deletions k4FWCore/include/k4FWCore/PodioDataSvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@
#include "podio/CollectionBase.h"
#include "podio/CollectionIDTable.h"
#include "podio/Frame.h"
#include "podio/podioVersion.h"
#if PODIO_BUILD_VERSION >= PODIO_VERSION(0, 99, 0)
#include "podio/ROOTReader.h"
#else
#include "podio/ROOTFrameReader.h"
namespace podio {
using ROOTReader = podio::ROOTFrameReader;
}
#endif
// Forward declarations
#include "k4FWCore/DataWrapper.h"
class DataWrapperBase;
Expand Down

0 comments on commit aa74c94

Please sign in to comment.