-
Notifications
You must be signed in to change notification settings - Fork 28
Status bits for a TH1? #99
Comments
In Uproot 3, check all of the attributes that start with In Uproot 4 (which wouldn't be using uproot3-methods), look in There are no convenience methods for accessing these bits (because no one has asked before). uproot3-methods and Uproot 4 behaviors provide convenience methods for the data that are in the
|
Uhm I cannot find anything meaningful: >>> h._
h._arraymethods h._fContour h._fMinimum h._fXaxis h._methods
h._bases h._fEntries h._fName h._fYaxis h._postprocess(
h._classname h._fFillColor h._fNcells h._fZaxis h._pycode
h._classversion h._fFillStyle h._fNormFactor h._fields h._readinto(
h._copycontext h._fFunctions h._fOption h._format h._recarray(
h._dtype h._fLineColor h._fStatOverflows h._format1 h._recarray_dtype(
h._dtype1 h._fLineStyle h._fSumw2 h._format2 h._trymemo(
h._fBarOffset h._fLineWidth h._fTitle h._format3 h._versions
h._fBarWidth h._fMarkerColor h._fTsumw h._format4
h._fBinStatErrOpt h._fMarkerSize h._fTsumw2 h._hasreadobjany
h._fBuffer h._fMarkerStyle h._fTsumwx h._int32
h._fBufferSize h._fMaximum h._fTsumwx2 h._members( I'm not sure I completely understand how these bits are managed in ROOT, are them a more general |
Is it a bit of |
Reading this: https://root.cern.ch/doc/master/classTH1.html#operations-on-histograms it appears that the In Uproot 4, the >>> import uproot # Uproot 4
>>> f = uproot.open("histograms.root")
>>> f.classnames()
{'one;1': 'TH1F', 'two;1': 'TH1F', 'three;1': 'TH1F'}
>>> f["one"]
<TH1F (version 2) at 0x7fd7d1e632e0>
>>> f["one"].all_members["@fBits"]
50331656
>>> f["one"].member("@fBits")
50331656
>>> f["one"].member("@fBits") & (2**18) # my histogram is not an average, apparently
0 where So it would be possible to get this information in Uproot 4, but it is impossible to get it in Uproot 3. (Uproot 4's approach is more inclusive, less hacky, so I didn't just drop data I didn't know what to do with.) |
Great, thanks a lot for looking into this! |
Hi! I was wondering if there is there any way to get status bits for a
TH1
? I'm particularly interested in the value ofkIsAverage
. Thanks!The text was updated successfully, but these errors were encountered: