Skip to content

Commit

Permalink
Return branch element if end of braching reached
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasgal committed Dec 23, 2022
1 parent ec5c883 commit 0fead00
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/displays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ function children(t::TTree)
end
end
children(t::Union{TTree, TBranchElement}) = t.fBranches
Base.show(io::IO, ::MIME"text/plain", b::Union{TTree, TBranchElement}) = print_tree(io, b)
function Base.show(io::IO, ::MIME"text/plain", b::Union{TTree, TBranchElement})
if isempty(b.fBranches)
print(io, b)
else
print_tree(io, b)
end
end
printnode(io::IO, t::TBranchElement) = print(io, "$(t.fName)")
printnode(io::IO, t::TTree) = print(io, "$(t.fName) (TTree)")
printnode(io::IO, f::ROOTFile) = print(io, f.filename)
Expand Down

0 comments on commit 0fead00

Please sign in to comment.