@@ -131,7 +131,22 @@ function readfields!(io, fields, T::Type{TAttAxis_4})
131
131
end
132
132
133
133
abstract type TAxis <: ROOTStreamedObject end
134
+ struct TAxis_9 <: TAxis end
134
135
struct TAxis_10 <: TAxis end
136
+ function readfields! (io, fields, T:: Type{TAxis_9} )
137
+ # overrides things like fName,... that were set from the parent TH1 :(
138
+ stream! (io, fields, TNamed)
139
+ stream! (io, fields, TAttAxis)
140
+ fields[:fNbins ] = readtype (io, Int32)
141
+ fields[:fXmin ] = readtype (io, Float64)
142
+ fields[:fXmax ] = readtype (io, Float64)
143
+ fields[:fXbins ] = readtype (io, TArrayD)
144
+ fields[:fFirst ] = readtype (io, Int16)
145
+ fields[:fLast ] = readtype (io, Int16)
146
+ fields[:fBits2 ] = readtype (io, UInt16)
147
+ fields[:fTimeDisplay ] = readtype (io, Bool)
148
+ fields[:fTimeFormat ] = readtype (io, String)
149
+ end
135
150
function readfields! (io, fields, T:: Type{TAxis_10} )
136
151
# overrides things like fName,... that were set from the parent TH1 :(
137
152
stream! (io, fields, TNamed)
@@ -148,6 +163,8 @@ function readfields!(io, fields, T::Type{TAxis_10})
148
163
end
149
164
150
165
abstract type TH1 <: ROOTStreamedObject end
166
+ struct TH1_7 <: TH1 end
167
+ function readfields! (io, fields, T:: Type{TH1_7} ) end
151
168
struct TH1_8 <: TH1 end
152
169
function readfields! (io, fields, T:: Type{TH1_8} ) end
153
170
@@ -976,6 +993,7 @@ function TH(io, tkey::TKey, refs)
976
993
subfields = Dict {Symbol, Any} ()
977
994
stream! (io, subfields, TAxis, check= false )
978
995
fields[Symbol (axis, :fLabels )] = readobjany! (io, tkey, refs)
996
+ # FIXME : fModLabs only for TAxis v8+ !! We currently don't have access to its version... argh
979
997
fields[Symbol (axis, :fModLabs )] = readobjany! (io, tkey, refs)
980
998
for (k,v) in subfields
981
999
fields[Symbol (axis, k)] = v
@@ -999,7 +1017,11 @@ function TH(io, tkey::TKey, refs)
999
1017
skip (io, 1 ) # speedbump
1000
1018
fields[:fBuffer ] = readtype (io, TArrayD)
1001
1019
fields[:fBinStatErrOpt ] = readtype (io, Int16)
1002
- fields[:fStatOverflows ] = readtype (io, Int16)
1020
+
1021
+ if preamble. version > 7
1022
+ fields[:fStatOverflows ] = readtype (io, Int16)
1023
+ end
1024
+
1003
1025
1004
1026
if is2d
1005
1027
for symb in [:fScalefactor , :fTsumwy , :fTsumwy2 , :fTsumwxy ]
@@ -1221,3 +1243,89 @@ function readfields!(c::Cursor, fields, ::Type{TFriendElement_2})
1221
1243
fields[:fTreeName ] = readtype (c. io, String)
1222
1244
fields[:fOwnFile ] = readtype (c. io, Bool)
1223
1245
end
1246
+
1247
+
1248
+ abstract type TPaveStats <: ROOTStreamedObject end
1249
+ Base. @kwdef struct TPaveStats_4 <: TPaveStats
1250
+ fOptFit:: Int
1251
+ fOptStat:: Int
1252
+ fFitFormat:: String
1253
+ fStatFormat:: String
1254
+ fParent
1255
+ end
1256
+ function readfields! (c:: Cursor , fields, :: Type{TPaveStats_4} )
1257
+ io = c. io
1258
+ tkey = c. tkey
1259
+ refs = c. refs
1260
+
1261
+ fields[:fOptFit ] = readtype (c. io, Int32)
1262
+ fields[:fOptStat ] = readtype (c. io, Int32)
1263
+ fields[:fFitFormat ] = readtype (c. io, String)
1264
+ fields[:fStatFormat ] = readtype (c. io, String)
1265
+
1266
+ fields[:fParent ] = unpack (io, tkey, refs, TObjArray)
1267
+ end
1268
+
1269
+ abstract type TText <: ROOTStreamedObject end
1270
+ Base. @kwdef struct TText_2 <: TText
1271
+ fName
1272
+ fTitle
1273
+ fTextAngle:: Float64
1274
+ fTextSize:: Float64
1275
+ fTextAlign:: Int8
1276
+ fTextColor:: Int8
1277
+ fTextFont:: Int8
1278
+ fX:: Float64
1279
+ fY:: Float64
1280
+ end
1281
+ function readfields! (io:: IO , fields, :: Type{TText_2} )
1282
+ stream! (io, fields, TNamed)
1283
+ stream! (io, fields, TAttText)
1284
+ fields[:fX ] = readtype (io, Float64)
1285
+ fields[:fY ] = readtype (io, Float64)
1286
+ end
1287
+
1288
+ abstract type TAttText <: ROOTStreamedObject end
1289
+ Base. @kwdef struct TAttText_1 <: TText
1290
+ fTextAngle:: Float32
1291
+ fTextSize:: Float32
1292
+ fTextAlign:: Int16
1293
+ fTextColor:: Int16
1294
+ fTextFont:: Int16
1295
+ end
1296
+ function readfields! (io:: IO , fields, :: Type{TAttText_1} )
1297
+ fields[:fTextAngle ] = readtype (io, Float32)
1298
+ fields[:fTextSize ] = readtype (io, Float32)
1299
+ fields[:fTextAlign ] = readtype (io, Int16)
1300
+ fields[:fTextColor ] = readtype (io, Int16)
1301
+ fields[:fTextFont ] = readtype (io, Int16)
1302
+ end
1303
+
1304
+ abstract type TLatex <: ROOTStreamedObject end
1305
+ Base. @kwdef struct TLatex_2 <: TLatex
1306
+ cursor:: Cursor
1307
+ fName
1308
+ fTitle
1309
+ fTextAngle:: Float32
1310
+ fTextSize:: Float32
1311
+ fTextAlign:: Int8
1312
+ fTextColor:: Int8
1313
+ fTextFont:: Int8
1314
+ fX:: Float64
1315
+ fY:: Float64
1316
+
1317
+ # TAttLine
1318
+ fLineColor
1319
+ fLineStyle
1320
+ fLineWidth
1321
+
1322
+ fLimitFactorSize:: Int
1323
+ fOriginSize:: Float64
1324
+ end
1325
+
1326
+ function readfields! (c:: Cursor , fields, :: Type{TLatex_2} )
1327
+ stream! (c. io, fields, TText)
1328
+ stream! (c. io, fields, TAttLine)
1329
+ fields[:fLimitFactorSize ] = readtype (c. io, Int32)
1330
+ fields[:fOriginSize ] = readtype (c. io, Float64)
1331
+ end
0 commit comments