I have a root file with a custom-type branch whose elements contain structs that contain vectors of custom structs, e.g.
struct Foo
{
long a;
std::vector<short> b;
};
struct Bar
{
long c;
std::vector<Foo> d;
};
The file uses standard ROOT autogenerated streamers. I'm trying to read it using
struct Foo
a::Clong
b::Vector{Cshort}
end
struct Bar
d::Clong
e::Vector{Foo}
end
f = ROOTFile("myfile.root", customstructs = Dict("Foo" => Foo, "Bar" => Bar))
tree = LazyTree(f, "TreeOnFire", ["bar_branch"]);
tree[1].bar_branch; # fails
but I get
julia> tree[1].bar_branch;
ERROR: MethodError: no method matching -(::Nothing, ::Int64)
[...]
Stacktrace:
[1] _localindex_newbasket!(ba::LazyBranch{Plane, UnROOT.Nojagg, Vector{Plane}}, idx::Int64, tid::Int64)
[...]
Should this work or can't we handle custom structs like that automatically yet?
I have a root file with a custom-type branch whose elements contain structs that contain vectors of custom structs, e.g.
The file uses standard ROOT autogenerated streamers. I'm trying to read it using
but I get
Should this work or can't we handle custom structs like that automatically yet?