RFile is a modern, minimal interface to ROOT files with a focus on simplicity. It allows to perform the basic actions of getting objects from a file, putting objects into it and query the file for metadata. Here is a typical use of RFile: The Put method will raise an error if an object is already present at the given path; if you want to overwrite an existing object use the Overwrite method instead: When overwriting, you may specify a title and whether to keep a backup cycle of a potentially-overwritten object. Note that Overwrite will work just like Put if there is no object to overwrite. You can iterate the metadata of all objects inside an RFile using the ListKeys method: ListKeys is recursive by default. If you want non-recursive behavior, you can specify it with a keyword argument: See the documentation of ListKeys for more options. Objects in an RFile are organized in a hierarchical structure represented by their "path". A path is the string you pass to Get or Put (like in the examples above) and it uses '/' as the directory separator. A directory is useful to group multiple related objects and it can be used alongside ListKeys: RNTuple may be read from and written to RFile via the appropriate RNTupleReader/RNTupleWriter methods. See the RFile tutorials for examples. For most use cases, however, we recommend the use of RDataFrame to deal with RNTuple (and TTree) data. TTree may be read from RFile but not written through it. To write TTree, keep using TFile (or, better if possible, RDataFrame).
Python interface
Directories and paths
RNTuple
TTree