From a050d2508c7cdb47533ab06366dedcbfd773c985 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 2 Jul 2024 10:56:46 +0200 Subject: [PATCH] Delete the version checks for Podio before 1.0 --- .../k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h | 5 ---- .../k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp | 30 ------------------- standalone/lcio2edm4hep.cpp | 8 ----- tests/compare_contents.cpp | 8 ----- 4 files changed, 51 deletions(-) diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h index 1bde0d0..9c0938f 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h @@ -36,7 +36,6 @@ using TrackerHit3D = edm4hep::TrackerHit; #include #include "podio/Frame.h" -#include "podio/podioVersion.h" // LCIO #include @@ -75,11 +74,7 @@ using ObjectMapT = k4EDM4hep2LcioConv::VecMapT; template using vec_pair [[deprecated("Use a more descriptive alias")]] = ObjectMapT; -#if PODIO_BUILD_VERSION > PODIO_VERSION(0, 99, 0) using CellIDStrType = const std::optional; -#else -using CellIDStrType = const std::string; -#endif struct CollectionsPairVectors { ObjectMapT tracks{}; diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp index c488122..cca799d 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp @@ -71,15 +71,9 @@ std::unique_ptr convertTrackerHits(const edm4hep::Tracker TrackerHitMapT& trackerHitMap) { auto trackerhits = std::make_unique(lcio::LCIO::TRACKERHIT); -#if PODIO_BUILD_VERSION > PODIO_VERSION(0, 99, 0) if (cellIDstr.has_value()) { lcio::CellIDEncoder idEnc(cellIDstr.value(), trackerhits.get()); } -#else - if (!cellIDstr.empty()) { - lcio::CellIDEncoder idEnc(cellIDstr, trackerhits.get()); - } -#endif // Loop over EDM4hep trackerhits converting them to lcio trackerhits for (const auto& edm_trh : (*edmColection)) { @@ -116,15 +110,9 @@ convertTrackerHitPlanes(const edm4hep::TrackerHitPlaneCollection* const edmColle TrackerHitPlaneMapT& trackerHitsMap) { auto trackerHitPlanes = std::make_unique(lcio::LCIO::TRACKERHITPLANE); -#if PODIO_BUILD_VERSION > PODIO_VERSION(0, 99, 0) if (cellIDstr.has_value()) { lcio::CellIDEncoder idEnc(cellIDstr.value(), trackerHitPlanes.get()); } -#else - if (!cellIDstr.empty()) { - lcio::CellIDEncoder idEnc(cellIDstr, trackerHitPlanes.get()); - } -#endif for (const auto& edm_trh : (*edmCollection)) { if (edm_trh.isAvailable()) { @@ -166,15 +154,9 @@ convertSimTrackerHits(const edm4hep::SimTrackerHitCollection* const edmCollectio SimTrHitMapT& simTrHitMap) { auto simtrackerhits = std::make_unique(lcio::LCIO::SIMTRACKERHIT); -#if PODIO_BUILD_VERSION > PODIO_VERSION(0, 99, 0) if (cellIDstr.has_value()) { lcio::CellIDEncoder idEnc(cellIDstr.value(), simtrackerhits.get()); } -#else - if (!cellIDstr.empty()) { - lcio::CellIDEncoder idEnc(cellIDstr, simtrackerhits.get()); - } -#endif // Loop over EDM4hep simtrackerhits converting them to LCIO simtrackerhits for (const auto& edm_strh : (*edmCollection)) { @@ -216,15 +198,9 @@ convertCalorimeterHits(const edm4hep::CalorimeterHitCollection* const edmCollect CaloHitMapT& caloHitMap) { auto calohits = std::make_unique(lcio::LCIO::CALORIMETERHIT); -#if PODIO_BUILD_VERSION > PODIO_VERSION(0, 99, 0) if (cellIDstr.has_value()) { lcio::CellIDEncoder idEnc(cellIDstr.value(), calohits.get()); } -#else - if (!cellIDstr.empty()) { - lcio::CellIDEncoder idEnc(cellIDstr, calohits.get()); - } -#endif for (const auto& edm_calohit : (*edmCollection)) { if (edm_calohit.isAvailable()) { @@ -290,15 +266,9 @@ convertSimCalorimeterHits(const edm4hep::SimCalorimeterHitCollection* const edmC const CellIDStrType& cellIDstr, SimCaloHitMapT& simCaloHitMap) { auto simcalohits = std::make_unique(lcio::LCIO::SIMCALORIMETERHIT); -#if PODIO_BUILD_VERSION > PODIO_VERSION(0, 99, 0) if (cellIDstr.has_value()) { lcio::CellIDEncoder idEnc(cellIDstr.value(), simcalohits.get()); } -#else - if (!cellIDstr.empty()) { - lcio::CellIDEncoder idEnc(cellIDstr, simcalohits.get()); - } -#endif for (const auto& edm_sim_calohit : (*edmCollection)) { if (edm_sim_calohit.isAvailable()) { diff --git a/standalone/lcio2edm4hep.cpp b/standalone/lcio2edm4hep.cpp index dcf763e..0e31ee4 100644 --- a/standalone/lcio2edm4hep.cpp +++ b/standalone/lcio2edm4hep.cpp @@ -6,15 +6,7 @@ #include -#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 #include diff --git a/tests/compare_contents.cpp b/tests/compare_contents.cpp index c8e4d1c..5d6b056 100644 --- a/tests/compare_contents.cpp +++ b/tests/compare_contents.cpp @@ -2,15 +2,7 @@ #include "ComparisonUtils.h" #include "ObjectMapping.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 #include "podio/Frame.h"