From 80e118b00145c348720e214e05a028949d0fc762 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 11 Mar 2024 10:00:55 +0100 Subject: [PATCH 1/2] [skip-ci] [io] Collapse data format details of TFile class. Supersedes https://github.com/root-project/root/pull/9616 --- io/io/src/TFile.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/io/io/src/TFile.cxx b/io/io/src/TFile.cxx index 560a069d1fdc7..e5aad2dffb296 100644 --- a/io/io/src/TFile.cxx +++ b/io/io/src/TFile.cxx @@ -13,6 +13,11 @@ \file TFile.cxx \class TFile \ingroup IO +\brief A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-like logical structure, possibly including subdirectory hierarchies. +\sa \ref IO + +
+ROOT file data format specification A ROOT file is composed of a header, followed by consecutive data records (`TKey` instances) with a well defined format. @@ -21,6 +26,7 @@ The first data record starts at byte fBEGIN (currently set to kBEGIN). Bytes 1->kBEGIN contain the file description, when fVersion >= 1000000 it is a large file (> 2 GB) and the offsets will be 8 bytes long and fUnits will be set to 8: + Byte Range | Record Name | Description ----------------|-------------|------------ 1->4 | "root" | Root file identifier @@ -69,7 +75,10 @@ Byte Range | Member Name | Description Begin_Macro ../../../tutorials/io/file.C End_Macro + The structure of a directory is shown in TDirectoryFile::TDirectoryFile + +
*/ #include From a7045f5d5eb4488241ef1fb47c0f1cd17eb7aad9 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 11 Mar 2024 10:08:16 +0100 Subject: [PATCH 2/2] [skip-ci] cross-reference markdown docu with link as well as human-readable as requested by pcanal --- io/io/src/TFile.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/io/io/src/TFile.cxx b/io/io/src/TFile.cxx index e5aad2dffb296..4acb335a7511e 100644 --- a/io/io/src/TFile.cxx +++ b/io/io/src/TFile.cxx @@ -15,6 +15,7 @@ \ingroup IO \brief A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-like logical structure, possibly including subdirectory hierarchies. \sa \ref IO +\sa \ref rootio (or `io/doc/TFile` folder in your codebase)
ROOT file data format specification