Skip to content

Commit

Permalink
Resolve merge conflict (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuan-Ru-Lin authored Apr 29, 2023
1 parent aaae1df commit 7f5b2e6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bootstrap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ function TNtuple(io, tkey::TKey, refs)
tree = TTree(io, tkey, refs; top=false) #embeded tree
end

TNtupleD(io, tkey::TKey, refs) = TNtuple(io, tkey::TKey, refs)

"""
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ end
close(rootfile)
end

@testset "TNtupleD" begin
ntupled = LazyTree(joinpath(SAMPLES_DIR, "TNtupleD.root"), "n1")
@test ntupled.x == [0.0, 1.0]
@test ntupled.y == [0.0, 1.0]
end

@testset "Singly jagged branches" begin
# 32bits T
rootfile = ROOTFile(joinpath(SAMPLES_DIR, "tree_with_jagged_array.root"))
Expand Down
12 changes: 12 additions & 0 deletions test/samples/TNtupleD.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python

import ROOT

t = ROOT.TNtupleD('n1', '', 'x:y')
t.Fill(0.0, 0.0)
t.Fill(1.0, 1.0)

f = ROOT.TFile('TNtupleD.root', 'recreate')
t.Write()
f.Close()

Binary file added test/samples/TNtupleD.root
Binary file not shown.

0 comments on commit 7f5b2e6

Please sign in to comment.