Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

early return missing in streamer #247

Merged
merged 2 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/root.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ function streamerfor(f::ROOTFile, branch::TBranchElement)
if fID == -1
fID = 0
end
streamerfor(f, branch.fClassName).streamer.fElements.elements[fID + 1] # one-based indexing in Julia
next_streamer = streamerfor(f, branch.fClassName)
if ismissing(next_streamer)
return missing
else
return next_streamer.streamer.fElements.elements[fID + 1] # one-based indexing in Julia
end
end


Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,10 @@ end
rootfile = ROOTFile(joinpath(SAMPLES_DIR, "issue116.root"))
@test length(rootfile["fTree"].fBranches.elements) == 112
close(rootfile)

# issue 246
arr = LazyTree(joinpath(SAMPLES_DIR, "issue246.root"), "tree_NOMINAL").v_mcGenWgt
@test all(reduce(vcat, arr) .== 1.0)
end

@testset "jagged subbranch type by leaf" begin
Expand Down
Binary file added test/samples/issue246.root
Binary file not shown.