Skip to content

Commit

Permalink
Use the new edm4hep::CellIDEncoding (#34)
Browse files Browse the repository at this point in the history
* Use the new edm4hep::CellIDEncoding

* Add a minimum version of EDM4hep

---------

Co-authored-by: jmcarcell <[email protected]>
  • Loading branch information
jmcarcell and jmcarcell authored Nov 8, 2023
1 parent cf521b5 commit a06983b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion k4EDM4hep2LcioConv/src/k4EDM4hep2LcioConv.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h"
#include "edm4hep/Constants.h"
#include "EVENT/MCParticle.h"

namespace EDM4hep2LCIOConv {
Expand Down Expand Up @@ -33,7 +34,8 @@ namespace EDM4hep2LCIOConv {
for (const auto& name : collections) {
const auto edmCollection = edmEvent.get(name);

const auto& cellIDStr = metadata.getParameter<std::string>(podio::collMetadataParamName(name, "CellIDEncoding"));
const auto& cellIDStr =
metadata.getParameter<std::string>(podio::collMetadataParamName(name, edm4hep::CellIDEncoding));

if (auto coll = dynamic_cast<const edm4hep::TrackCollection*>(edmCollection)) {
auto lcColl = convTracks(coll, objectMappings.tracks, objectMappings.trackerHits);
Expand Down

0 comments on commit a06983b

Please sign in to comment.