Skip to content
Snippets Groups Projects
Commit fe5d0a08 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: forward support podio-v1.2 ROOTFrameReader removal

parent dfd5f87b
Branches master
No related tags found
1 merge request!340feat: forward support podio-v1.2 ROOTFrameReader removal
Pipeline #118658 passed with warnings
......@@ -17,6 +17,7 @@
#include <Evaluator/DD4hepUnits.h>
// data model
#include <edm4hep/EDM4hepVersion.h>
#include <edm4hep/SimTrackerHitCollection.h>
#include <edm4hep/utils/kinematics.h>
......@@ -67,7 +68,11 @@ namespace benchmarks {
// -------------------------------------------------------------------------------------
// get photon wavelength
static double GetPhotonWavelength(const edm4hep::SimTrackerHit& hit, std::shared_ptr<spdlog::logger> log) {
#if EDM4HEP_BUILD_VERSION >= EDM4HEP_VERSION(0, 99, 0)
auto phot = hit.getParticle();
#else
auto phot = hit.getMCParticle();
#endif
if(!phot.isAvailable()) {
log->error("no MCParticle in hit");
return -1.0;
......
......@@ -8,7 +8,12 @@
#include <TFile.h>
#include <podio/podioVersion.h>
#if podio_VERSION >= PODIO_VERSION(0, 99, 0)
#include <podio/ROOTReader.h>
#else
#include <podio/ROOTFrameReader.h>
#endif
#include <podio/Frame.h>
#include "SimHitAnalysis.h"
......@@ -264,7 +269,11 @@ int main(int argc, char** argv) {
// -------------------------------------------------------------
// open the input files
#if podio_VERSION >= PODIO_VERSION(0, 99, 0)
podio::ROOTReader podioReader;
#else
podio::ROOTFrameReader podioReader;
#endif
m_log->warn("podio::ROOTFrameReader cannot yet support multiple files; reading only the first");
// podioReader.openFiles(rec_files);
podioReader.openFile(rec_files.front());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment