Skip to content

Commit

Permalink
Change ROOTFrame{Writer,Reader} to ROOT{Writer,Reader} when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored and tmadlener committed Feb 22, 2024
1 parent 80ab3d9 commit 215f877
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions standalone/src/DelphesMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 <typename WriterT = podio::ROOTWriter> int doit(int argc, char* argv[], DelphesInputReader& inputReader) {
#else
template <typename WriterT = podio::ROOTFrameWriter> 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
Expand Down
8 changes: 8 additions & 0 deletions tests/src/compare_delphes_converter_outputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<TChain>("Delphes");
Expand Down

0 comments on commit 215f877

Please sign in to comment.