Skip to content

Commit

Permalink
Merge pull request #109 from aminnj/issue108
Browse files Browse the repository at this point in the history
  • Loading branch information
aminnj authored Sep 16, 2021
2 parents faea58a + 7bcc0c1 commit 635ed0e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "UnROOT"
uuid = "3cd96dde-e98d-4713-81e9-a4a1b0235ce9"
authors = ["Tamas Gal", "Jerry Ling", "Johannes Schumann", "Nick Amin"]
version = "0.6.1"
version = "0.6.2"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
4 changes: 4 additions & 0 deletions src/root.jl
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ function auto_T_JaggT(f::ROOTFile, branch; customstructs::Dict{String, Type})
UInt32
elseif elname == "unsigned char"
Char
elseif elname == "unsigned short"
UInt16
elseif elname == "ulong64"
UInt64
else
_type = getfield(Base, Symbol(:C, elname))
end
Expand Down
8 changes: 8 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,14 @@ end
_ = length.(arr);
@test length.(arr.buffer) == length.(arr.buffer_range)
close(rootfile)

# issue 108
# unsigned short -> Int16, ulong64 -> UInt64
# file minified with `rooteventselector --recreate -l 2 "trackntuple.root:trackingNtuple/tree" issue108_small.root`
rootfile = ROOTFile(joinpath(SAMPLES_DIR, "issue108_small.root"))
@test rootfile["tree/trk_algoMask"][2] == [0x0000000000004000, 0x0000000000004000, 0x0000000000004000, 0x0000000000004000]
@test rootfile["tree/pix_ladder"][3][1:5] == UInt16[0x0001, 0x0001, 0x0001, 0x0001, 0x0003]
close(rootfile)
end

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

2 comments on commit 635ed0e

@aminnj
Copy link
Member Author

@aminnj aminnj commented on 635ed0e Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/45040

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.2 -m "<description of version>" 635ed0e46cc72054357a72d52d11aa4eb77a1f2d
git push origin v0.6.2

Please sign in to comment.