- class uproot.reading.ReadOnlyKey(chunk, cursor, context, file, parent, read_strings=False)
context (dict) – Auxiliary data used in deserialization.
file (uproot.ReadOnlyFile) – The open file object.
parent (None or calling object) – The previous
readin the recursive descent.
read_strings (bool) – If True, interpret the fClassName, fName, and fTitle attributes; otherwise, ignore them.
TKeyin a ROOT file, which aren’t often accessed by users.
See the ROOT TKey documentation for a specification of
The object that was deserialized before this one in recursive descent, usually the containing object (or the container’s container).
The name of the object pointed to by this
TKey, with semicolon (
;) and cycle number if
The title of the object pointed to by this
- ReadOnlyKey.classname(encoded=False, version=None)
The classname of the object pointed to by this
encodedis True, the classname is a Python (encoded) classname (optionally with
encodedis False, the classname is a C++ (decoded) classname.
Object path of the object pointed to by this
If an object path is not known (e.g. the object does not reside in a
TDirectory), this returns a message with the raw seek position.
String that uniquely specifies this
TKey, to use as part of object and array cache keys.
True if the object is compressed; False otherwise.
Note: compression is determined by comparing
fNbytes - fKeylen; if they are the same, the object is uncompressed.
Creation date/time as a Python datetime.
uproot.reading.ReadOnlyKey.fDatime presents this in ROOT’s raw integer encoding.
Returns the object pointed to by this
TKey, decompressing it if necessary.
If the first attempt to deserialize the object fails with uproot.DeserializationError and any of the models used in that attempt were predefined (not from streamers), this method will try again with the file’s own streamers.
(Some ROOT files do have classes that don’t match the standard
TStreamerInfo; they may have been produced from private builds of ROOT between official releases.)
The total number of bytes in the compressed object and
Raw integer version of the
The number of bytes in the uncompressed object, not including its
Raw integer date/time when the object was written.
uproot.reading.ReadOnlyKey.created_on presents this as a Python datetime.
The number of bytes in the
TKey, not including the object.
The cycle number of the object, which disambiguates different versions of an object with the same name.
File seek position (int) pointing to a second copy of this
TKey, just before the object itself.
File seek position (int) to the
TDirectoryin which this object resides.