You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am naively trying to create a RNTuple inside a TDirectory, and I fail to do so. Moreover, when looking at the produced TFile with TBrowser, I see some weird recursive structure.
Reproducer
I tried a few permutations of the following, all giving me weird results.
#include<TFile.h>
#include<TTree.h>
#include<TDirectory.h>
#include<ROOT/RNTuple.hxx>
#include<ROOT/RNTupleModel.hxx>
#undef NDEBUG
#include<cassert>intwriteTree()
{
TFile* f;
int x = 0;
f = newTFile("foo.root", "RECREATE");
auto* dir = f->mkdir("dir");
dir->cd();
auto* tree = newTTree("T", "a Tree");
tree->Branch("x", &x, "x/D");
for (int i = 0; i < 10; i++) {
x = i;
tree->Fill();
}
tree->Write();
usingnamespaceROOT::Experimental;// Create and fill an RNTupleauto model = RNTupleModel::Create();
auto wrPt = model->MakeField<float>("pt", 42.0);
{
RNTupleWriteOptions options;
options.SetContainerFormat(ENTupleContainerFormat::kBare);
auto* bar = f->mkdir("bar");
bar->cd();
auto ntuple = RNTupleWriter::Append(std::move(model), "f", *f, options);
bool ok = bar->cd();
ntuple->Fill();
ntuple->CommitCluster();
*wrPt = 24.0;
ntuple->Fill();
*wrPt = 12.0;
ntuple->Fill();
ntuple->CommitCluster();
}
return0;
}
ROOT version
------------------------------------------------------------------
| Welcome to ROOT 6.28/04 https://root.cern |
| (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for macosxarm64 on Nov 01 2023, 10:33:00 |
| From tags/v6-28-04-alice3@v6-28-04-3-g186ec88ba4 |
| With Apple clang version 15.0.0 (clang-1500.0.40.1) |
| Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
Installation method
aliBuild
Operating system
macOS Ventura
Additional context
No response
The text was updated successfully, but these errors were encountered:
Check duplicate issues.
Description
I am naively trying to create a RNTuple inside a TDirectory, and I fail to do so. Moreover, when looking at the produced TFile with TBrowser, I see some weird recursive structure.
Reproducer
I tried a few permutations of the following, all giving me weird results.
ROOT version
Installation method
aliBuild
Operating system
macOS Ventura
Additional context
No response
The text was updated successfully, but these errors were encountered: