Skip to content

Commit

Permalink
Add compatibility with EDM4hep 0.10.0 and bump the required version
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jan 8, 2025
1 parent edf41bf commit 798a1db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ if(DD4HEP_USE_LCIO)
endif()

if(DD4HEP_USE_EDM4HEP)
find_package(EDM4HEP REQUIRED)
find_package(EDM4HEP 0.10.0 REQUIRED)
# we need podio with Frame support (>=0.16.3)
# podio is "SameMajorVersion" compatible
find_package(podio 0.16.3) # this will not find 1.0 and newer
Expand Down
7 changes: 5 additions & 2 deletions DDG4/edm4hep/Geant4Output2EDM4hep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
#include <edm4hep/CaloHitContributionCollection.h>
#include <edm4hep/SimCalorimeterHitCollection.h>
#include <edm4hep/EDM4hepVersion.h>
#include <edm4hep/Constants.h>
#if EDM4HEP_VERSION_MAJOR == 0 && EDM4HEP_VERSION_MINOR < 99
#if EDM4HEP_BUILD_VERSION <= EDM4HEP_VERSION(0, 10, 2)
constexpr const char* CellIDEncoding = "CellIDEncoding";
#elif EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 0)
#include <edm4hep/Constants.h>
using edm4hep::CellIDEncoding;
#else
#include <edm4hep/Constants.h>
using edm4hep::labels::CellIDEncoding;
#endif
/// podio include files
Expand Down

0 comments on commit 798a1db

Please sign in to comment.