#include <ROOT/RNTuple.hxx>
constexpr char const *kTreeFileName = "http://root.cern.ch/files/HiggsTauTauReduced/GluGluToHToTauTau.root";
constexpr char const *kTreeName = "Events";
constexpr char const *kNTupleFileName = "ntpl008_import.root";
void ntpl008_import()
{
auto importer = RNTupleImporter::Create(kTreeFileName, kTreeName, kNTupleFileName);
importer->Import();
std::cerr << "cannot open " << kNTupleFileName << std::endl;
return;
}
auto ntpl =
file->Get<RNTuple>(
"Events");
auto reader = RNTupleReader::Open(ntpl);
reader->PrintInfo();
df.Histo1D({"Jet_pt", "Jet_pt", 100, 0, 0}, "Jet_pt")->DrawCopy();
}
#define R__LOAD_LIBRARY(LIBRARY)
R__EXTERN TSystem * gSystem
Converts a TTree into an RNTuple.
An RNTuple that is used to read data from storage.
Representation of an RNTuple data set in a ROOT file.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
virtual int Unlink(const char *name)
Unlink, i.e.
RDataFrame FromRNTuple(std::string_view ntupleName, std::string_view fileName)
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...