Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ROOTFrame{Writer,Reader} to ROOT{Writer,Reader} when possible #115

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion standalone/src/DelphesMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
#include "k4SimDelphes/DelphesEDM4HepOutputConfiguration.h"

#include "podio/Frame.h"
#include "podio/podioVersion.h"
#if PODIO_BUILD_VERSION >= PODIO_VERSION(0, 99, 0)
#include "podio/ROOTWriter.h"
#else
#include "podio/ROOTFrameWriter.h"
namespace podio {
using ROOTWriter = podio::ROOTFrameWriter;
}
#endif

#include "ExRootAnalysis/ExRootConfReader.h"
#include "ExRootAnalysis/ExRootProgressBar.h"
Expand All @@ -16,7 +24,7 @@
static bool interrupted = false;
void SignalHandler(int /*si*/) { interrupted = true; }

template <typename WriterT = podio::ROOTFrameWriter> int doit(int argc, char* argv[], DelphesInputReader& inputReader) {
template <typename WriterT = podio::ROOTWriter> int doit(int argc, char* argv[], DelphesInputReader& inputReader) {
using namespace k4SimDelphes;

// We can't make this a unique_ptr because it interferes with whatever ROOT is
Expand Down
10 changes: 9 additions & 1 deletion tests/src/compare_delphes_converter_outputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
#include "edm4hep/utils/kinematics.h"

#include "podio/Frame.h"
#include "podio/podioVersion.h"
#if PODIO_BUILD_VERSION >= PODIO_VERSION(0, 99, 0)
#include "podio/ROOTReader.h"
#else
#include "podio/ROOTFrameReader.h"
namespace podio {
using ROOTReader = podio::ROOTFrameReader;
}
#endif

#include "ExRootAnalysis/ExRootTreeBranch.h"
#include "ExRootAnalysis/ExRootTreeReader.h"
Expand Down Expand Up @@ -329,7 +337,7 @@ void compareMET(const TClonesArray* delphesColl, const edm4hep::ReconstructedPar

int main(int argc, char* argv[]) {
// do the necessary setup work for podio and delphes first
podio::ROOTFrameReader reader{};
podio::ROOTReader reader{};
reader.openFile(argv[1]);

auto chain = std::make_unique<TChain>("Delphes");
Expand Down
Loading