From 1ac1e445801daed252a5c0acd80d4bda795fcdef Mon Sep 17 00:00:00 2001 From: Tamas Gal Date: Tue, 12 Nov 2024 17:39:53 +0100 Subject: [PATCH] Add THxI support (#365) --- src/bootstrap.jl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/bootstrap.jl b/src/bootstrap.jl index 2dea8162..a84dfea8 100644 --- a/src/bootstrap.jl +++ b/src/bootstrap.jl @@ -945,6 +945,9 @@ end 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) 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) @@ -981,7 +984,6 @@ function TH(io, tkey::TKey, refs) 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) @@ -1025,7 +1027,16 @@ function TH(io, tkey::TKey, refs) 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 + else + error("Unknown histogram of type $(tkey.fClassName)") + end + fields[:fN] = readtype(io, arraytype) fields end