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

only show TTrees with the highest cycle number #99

Merged
merged 3 commits into from
Sep 12, 2021

Conversation

aminnj
Copy link
Member

@aminnj aminnj commented Sep 12, 2021

Since we don't provide a way to get a specific cycle number like f["Events;2"] we might as well hide all but the latest ttree. This assumes that TTree TKeys are in order of descending cycle number. We already use this assumption because f["Events"] goes to the first fName match. Can someone confirm this assumption is safe?

before

julia> UnROOT.samplefile("tree_cycles_hist.root")
ROOTFile with 6 entries and 23 streamers.
/Users/namin/.julia/dev/UnROOT/test/samples/tree_cycles_hist.root
├─ Events (TTree)
│  └─ "Jet_pt"
├─ Events (TTree)
│  └─ "Jet_pt"
├─ myTH1F (TH1F)
├─ myTH1D (TH1D)
├─ myTH2F (TH2F)
└─ myTH2D (TH2D)

after

julia> UnROOT.samplefile("tree_cycles_hist.root")
ROOTFile with 6 entries and 23 streamers.
/Users/namin/.julia/dev/UnROOT/test/samples/tree_cycles_hist.root
├─ Events (TTree)
│  └─ "Jet_pt"
├─ myTH1F (TH1F)
├─ myTH1D (TH1D)
├─ myTH2F (TH2F)
└─ myTH2D (TH2D)

@codecov
Copy link

codecov bot commented Sep 12, 2021

Codecov Report

Merging #99 (011de72) into master (b8042cf) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   87.14%   87.18%   +0.03%     
==========================================
  Files          11       11              
  Lines        1330     1334       +4     
==========================================
+ Hits         1159     1163       +4     
  Misses        171      171              
Impacted Files Coverage Δ
src/displays.jl 97.95% <100.00%> (+0.18%) ⬆️
src/iteration.jl 78.10% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8042cf...011de72. Read the comment docs.

src/displays.jl Outdated Show resolved Hide resolved
Co-authored-by: Jerry Ling <proton@jling.dev>
@Moelf Moelf merged commit 94a2828 into JuliaHEP:master Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants