root
root copied to clipboard
[ntuple] Missing importer support for leaf count arrays in leaf list
Check duplicate issues.
- [ ] Checked for duplicates
Description
As discussed in #16478, the TTree feature of using a count leaf inside a leaf list is currently unsupported by the importer.
Reproducer
The following file cannot be imported:
std::unique_ptr<TFile> file(TFile::Open("tree.root", "RECREATE"));
auto tree = std::make_unique<TTree>("tree", "");
int count = 1;
struct {
float foo = 2.0;
Int_t values[20]; // is controled by [count]
} leafList;
leafList.values = new Int_t[1];
leafList.values[0] = 1;
tree->Branch("count", &count);
tree->Branch("leaflist", &leafList, "foo/F:values[count]/I");
tree->Fill();
tree->Write();
As well as having the count leaf inside the leaf list as well as "manually" encoding the leaf count arrays (see comments)
ROOT version
master
Installation method
n/a
Operating system
n/a
Additional context
No response