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();
auto file = std::unique_ptr<TFile>(
TFile::Open(kNTupleFileName));
if (!file || file->IsZombie()) {
std::cerr << "cannot open " << kNTupleFileName << std::endl;
return;
}
auto ntpl = std::unique_ptr<ROOT::RNTuple>(file->Get<
ROOT::RNTuple>(
"Events"));
auto reader = RNTupleReader::Open(*ntpl);
reader->PrintInfo();
df.Histo1D({"Jet_pt", "Jet_pt", 100, 0, 0}, "Jet_pt")->DrawCopy();
}
R__EXTERN TSystem * gSystem
Converts a TTree into an RNTuple.
An RNTuple that is used to read data from storage.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
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.
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...