From a06983bbed75c664392e0d7659e0907a04effdda Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:46:48 +0100 Subject: [PATCH] Use the new edm4hep::CellIDEncoding (#34) * Use the new edm4hep::CellIDEncoding * Add a minimum version of EDM4hep --------- Co-authored-by: jmcarcell --- CMakeLists.txt | 2 +- k4EDM4hep2LcioConv/src/k4EDM4hep2LcioConv.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44da4387..494cb327 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ include(cmake/compiler_output.cmake) find_package(LCIO REQUIRED) find_package(podio REQUIRED) -find_package(EDM4HEP REQUIRED) +find_package(EDM4HEP 0.10.1 REQUIRED) add_subdirectory(k4EDM4hep2LcioConv) add_subdirectory(standalone) diff --git a/k4EDM4hep2LcioConv/src/k4EDM4hep2LcioConv.cpp b/k4EDM4hep2LcioConv/src/k4EDM4hep2LcioConv.cpp index 9da6717c..657d5a0a 100644 --- a/k4EDM4hep2LcioConv/src/k4EDM4hep2LcioConv.cpp +++ b/k4EDM4hep2LcioConv/src/k4EDM4hep2LcioConv.cpp @@ -1,4 +1,5 @@ #include "k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h" +#include "edm4hep/Constants.h" #include "EVENT/MCParticle.h" namespace EDM4hep2LCIOConv { @@ -33,7 +34,8 @@ namespace EDM4hep2LCIOConv { for (const auto& name : collections) { const auto edmCollection = edmEvent.get(name); - const auto& cellIDStr = metadata.getParameter(podio::collMetadataParamName(name, "CellIDEncoding")); + const auto& cellIDStr = + metadata.getParameter(podio::collMetadataParamName(name, edm4hep::CellIDEncoding)); if (auto coll = dynamic_cast(edmCollection)) { auto lcColl = convTracks(coll, objectMappings.tracks, objectMappings.trackerHits);