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

Add THxI support #365

Merged
merged 1 commit into from
Nov 12, 2024
Merged
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
15 changes: 13 additions & 2 deletions src/bootstrap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,9 @@
fFriends
end

TH1I(io, tkey::TKey, refs) = TH(io, tkey, refs)
TH2I(io, tkey::TKey, refs) = TH(io, tkey, refs)
TH3I(io, tkey::TKey, refs) = TH(io, tkey, refs)

Check warning on line 950 in src/bootstrap.jl

View check run for this annotation

Codecov / codecov/patch

src/bootstrap.jl#L948-L950

Added lines #L948 - L950 were not covered by tests
TH1F(io, tkey::TKey, refs) = TH(io, tkey, refs)
TH2F(io, tkey::TKey, refs) = TH(io, tkey, refs)
TH3F(io, tkey::TKey, refs) = TH(io, tkey, refs)
Expand Down Expand Up @@ -981,7 +984,6 @@
stream!(io, fields, TAttMarker)
fields[:fNcells] = readtype(io, Int32)


for axis in ["fXaxis_", "fYaxis_", "fZaxis_"]
subfields = Dict{Symbol, Any}()
stream!(io, subfields, TAxis, check=false)
Expand Down Expand Up @@ -1025,7 +1027,16 @@
end
end

arraytype = endswith(tkey.fClassName, 'F') ? TArrayF : TArrayD
if endswith(tkey.fClassName, 'F')
arraytype = TArrayF
elseif endswith(tkey.fClassName, 'D')
arraytype = TArrayD
elseif endswith(tkey.fClassName, 'I')
arraytype = TArrayI

Check warning on line 1035 in src/bootstrap.jl

View check run for this annotation

Codecov / codecov/patch

src/bootstrap.jl#L1034-L1035

Added lines #L1034 - L1035 were not covered by tests
else
error("Unknown histogram of type $(tkey.fClassName)")

Check warning on line 1037 in src/bootstrap.jl

View check run for this annotation

Codecov / codecov/patch

src/bootstrap.jl#L1037

Added line #L1037 was not covered by tests
end

fields[:fN] = readtype(io, arraytype)
fields
end
Expand Down
Loading