From a6c7b8cdf7186b156cb333a31ca0c27a37d211d7 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 6 Feb 2024 22:02:25 +0100 Subject: [PATCH] Change ROOTFrame{Writer,Reader} to ROOT{Writer,Reader} when possible --- standalone/lcio2edm4hep.cpp | 8 ++++++++ tests/compare_contents.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/standalone/lcio2edm4hep.cpp b/standalone/lcio2edm4hep.cpp index cd2136d7..3c0d5289 100644 --- a/standalone/lcio2edm4hep.cpp +++ b/standalone/lcio2edm4hep.cpp @@ -4,7 +4,11 @@ #include #include +#if PODIO_VERSION_MAJOR > 0 || (PODIO_VERSION_MAJOR == 0 && PODIO_VERSION_MINOR >= 99) +#include "podio/ROOTReader.h" +#else #include "podio/ROOTFrameWriter.h" +#endif #include #include @@ -156,7 +160,11 @@ int main(int argc, char* argv[]) std::cout << "Number of events in file: " << lcreader->getNumberOfEvents() << '\n'; std::cout << "Number of runs in file: " << lcreader->getNumberOfRuns() << '\n'; +#if PODIO_VERSION_MAJOR > 0 || (PODIO_VERSION_MAJOR == 0 && PODIO_VERSION_MINOR >= 99) + podio::ROOTReader edmreader; +#else podio::ROOTFrameWriter writer(args.outputFile); +#endif for (auto j = 0u; j < lcreader->getNumberOfRuns(); ++j) { if (j % 1 == 0) { diff --git a/tests/compare_contents.cpp b/tests/compare_contents.cpp index abf265f6..0421a889 100644 --- a/tests/compare_contents.cpp +++ b/tests/compare_contents.cpp @@ -2,7 +2,11 @@ #include "ObjectMapping.h" #include "ComparisonUtils.h" +#if PODIO_VERSION_MAJOR > 0 || (PODIO_VERSION_MAJOR == 0 && PODIO_VERSION_MINOR >= 99) +#include "podio/ROOTReader.h" +#else #include "podio/ROOTFrameReader.h" +#endif #include "podio/Frame.h" #include @@ -22,7 +26,11 @@ int main(int argc, char* argv[]) auto lcreader = IOIMPL::LCFactory::getInstance()->createLCReader(); lcreader->open(argv[1]); +#if PODIO_VERSION_MAJOR > 0 || (PODIO_VERSION_MAJOR == 0 && PODIO_VERSION_MINOR >= 99) + auto edmreader = podio::ROOTReader(); +#else auto edmreader = podio::ROOTFrameReader(); +#endif edmreader.openFile(argv[2]); // loop going over every name of the lcio collection and checking if a