From 12b86b04be8c22efbd06a38cb54b216a7afeaba6 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 6 Feb 2024 22:05:51 +0100 Subject: [PATCH] Change ROOTFrame{Writer,Reader} to ROOT{Writer,Reader} when possible --- standalone/src/DelphesMain.h | 8 ++++++++ tests/src/compare_delphes_converter_outputs.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/standalone/src/DelphesMain.h b/standalone/src/DelphesMain.h index cccd6c6..6f10334 100644 --- a/standalone/src/DelphesMain.h +++ b/standalone/src/DelphesMain.h @@ -3,7 +3,11 @@ #include "k4SimDelphes/DelphesEDM4HepOutputConfiguration.h" #include "podio/Frame.h" +#if PODIO_VERSION_MAJOR > 0 || (PODIO_VERSION_MAJOR == 0 && PODIO_VERSION_MINOR >= 99) +#include "podio/ROOTReader.h" +#else #include "podio/ROOTFrameWriter.h" +#endif #include "ExRootAnalysis/ExRootConfReader.h" #include "ExRootAnalysis/ExRootProgressBar.h" @@ -16,7 +20,11 @@ static bool interrupted = false; void SignalHandler(int /*si*/) { interrupted = true; } +#if PODIO_VERSION_MAJOR > 0 || (PODIO_VERSION_MAJOR == 0 && PODIO_VERSION_MINOR >= 99) +template int doit(int argc, char* argv[], DelphesInputReader& inputReader) { +#else template int doit(int argc, char* argv[], DelphesInputReader& inputReader) { +#endif using namespace k4SimDelphes; // We can't make this a unique_ptr because it interferes with whatever ROOT is diff --git a/tests/src/compare_delphes_converter_outputs.cpp b/tests/src/compare_delphes_converter_outputs.cpp index d0f6fd7..c23a7c6 100644 --- a/tests/src/compare_delphes_converter_outputs.cpp +++ b/tests/src/compare_delphes_converter_outputs.cpp @@ -6,7 +6,11 @@ #include "edm4hep/utils/kinematics.h" #include "podio/Frame.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 "ExRootAnalysis/ExRootTreeBranch.h" #include "ExRootAnalysis/ExRootTreeReader.h" @@ -329,7 +333,11 @@ void compareMET(const TClonesArray* delphesColl, const edm4hep::ReconstructedPar int main(int argc, char* argv[]) { // do the necessary setup work for podio and delphes first +#if PODIO_VERSION_MAJOR > 0 || (PODIO_VERSION_MAJOR == 0 && PODIO_VERSION_MINOR >= 99) + podio::ROOTReader reader{}; +#else podio::ROOTFrameReader reader{}; +#endif reader.openFile(argv[1]); auto chain = std::make_unique("Delphes");