21#include <ROOT/RNTuple.hxx>
34constexpr char const *kTreeFileName =
"http://root.cern.ch/files/HiggsTauTauReduced/GluGluToHToTauTau.root";
35constexpr char const *kTreeName =
"Events";
36constexpr char const *kNTupleFileName =
"ntpl008_import.root";
48 auto importer = RNTupleImporter::Create(kTreeFileName, kTreeName, kNTupleFileName);
56 std::cerr <<
"cannot open " << kNTupleFileName << std::endl;
59 auto ntpl =
file->Get<RNTuple>(
"Events");
60 auto reader = RNTupleReader::Open(ntpl);
64 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...