Skip to content

Commit

Permalink
Revert #44256 - merged too early
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Mar 4, 2024
1 parent decad3d commit 2bcf9bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@

#include <ROOT/RNTuple.hxx>
#include <ROOT/RNTupleModel.hxx>
#include <ROOT/RNTupleOptions.hxx>
#include <ROOT/RPageStorageFile.hxx>
using ROOT::Experimental::RNTupleModel;
using ROOT::Experimental::RNTupleWriteOptions;
using ROOT::Experimental::Detail::RPageSinkFile;
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 31, 0)
using ROOT::Experimental::RNTupleWriter;
using ROOT::Experimental::Detail::RPageSinkFile;
#define MakeRNTupleWriter std::make_unique<RNTupleWriter>
#include <ROOT/RNTupleOptions.hxx>
#else
using ROOT::Experimental::Internal::RPageSinkFile;
#define MakeRNTupleWriter ROOT::Experimental::Internal::CreateRNTupleWriter
#include <ROOT/RNTupleWriteOptions.hxx>
#endif
using ROOT::Experimental::RNTupleWriteOptions;

#include "TObjString.h"

Expand Down
8 changes: 3 additions & 5 deletions PhysicsTools/NanoAOD/plugins/rntuple/NanoAODRNTuples.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@

#include <ROOT/RNTuple.hxx>
#include <ROOT/RNTupleModel.hxx>
#include <ROOT/RNTupleOptions.hxx>
#include <ROOT/RPageStorageFile.hxx>
using ROOT::Experimental::RNTupleModel;
using ROOT::Experimental::RNTupleWriteOptions;
using ROOT::Experimental::Detail::RPageSinkFile;
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 31, 0)
using ROOT::Experimental::RNTupleWriter;
using ROOT::Experimental::Detail::RPageSinkFile;
#define MakeRNTupleWriter std::make_unique<RNTupleWriter>
#include <ROOT/RNTupleOptions.hxx>
#else
using ROOT::Experimental::Internal::RPageSinkFile;
#define MakeRNTupleWriter ROOT::Experimental::Internal::CreateRNTupleWriter
#include <ROOT/RNTupleWriteOptions.hxx>
#endif
using ROOT::Experimental::RNTupleWriteOptions;

#include "RNTupleFieldPtr.h"
#include "SummaryTableOutputFields.h"
Expand Down
14 changes: 0 additions & 14 deletions PhysicsTools/NanoAOD/plugins/rntuple/NanoAODRNTuples.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@

#include "TFile.h"
#include <ROOT/RNTuple.hxx>
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 31, 0)
using ROOT::Experimental::RCollectionNTupleWriter;
#else
#include <ROOT/RNTupleWriter.hxx>
#include <ROOT/RNTupleCollectionWriter.hxx>
using ROOT::Experimental::RNTupleCollectionWriter;
#endif
using ROOT::Experimental::RNTupleWriter;

#include "EventStringOutputFields.h"
Expand Down Expand Up @@ -70,11 +64,7 @@ class PSetNTuple {
// https://github.com/root-project/root/issues/7861
// RNTupleFieldPtr<edm::ParameterSetID> m_psetId;
// RNTupleFieldPtr<edm::ParameterSetBlob> m_psetBlob;
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 31, 0)
std::shared_ptr<RCollectionNTupleWriter> m_collection;
#else
std::shared_ptr<RNTupleCollectionWriter> m_collection;
#endif
RNTupleFieldPtr<std::string> m_psetId;
RNTupleFieldPtr<std::string> m_psetBlob;
std::unique_ptr<RNTupleWriter> m_ntuple;
Expand All @@ -88,11 +78,7 @@ class MetadataNTuple {

private:
void createFields(TFile& file);
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 31, 0)
std::shared_ptr<RCollectionNTupleWriter> m_procHist;
#else
std::shared_ptr<RNTupleCollectionWriter> m_procHist;
#endif

RNTupleFieldPtr<std::string> m_phId;
std::unique_ptr<RNTupleWriter> m_ntuple;
Expand Down
9 changes: 0 additions & 9 deletions PhysicsTools/NanoAOD/plugins/rntuple/TableOutputFields.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@

#include <ROOT/RNTuple.hxx>
#include <ROOT/RNTupleModel.hxx>
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 31, 0)
using ROOT::Experimental::RCollectionNTupleWriter;
#else
#include <ROOT/RNTupleCollectionWriter.hxx>
using ROOT::Experimental::RNTupleCollectionWriter;
#endif
using ROOT::Experimental::RNTupleModel;
using ROOT::Experimental::RNTupleWriter;

Expand Down Expand Up @@ -115,11 +110,7 @@ class TableCollection {

private:
std::string m_collectionName;
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 31, 0)
std::shared_ptr<RCollectionNTupleWriter> m_collection;
#else
std::shared_ptr<RNTupleCollectionWriter> m_collection;
#endif
TableOutputFields m_main;
std::vector<TableOutputFields> m_extensions;
};
Expand Down

0 comments on commit 2bcf9bc

Please sign in to comment.