Hello
I’m figuring out how to create a root file manually, instead of using a root framework.
I found some documentation in
root_cern/root/htmldoc/guides/users-guide/InputOutput.html
and in source: https_github_com/root-project/root/tree/master/io/doc/TFile,
from there I somehow understood how to write the ROOT file header.
Now I’m trying to figure out how TBasket and TTree are saved to the ROOT-file.
To understand this, I create the simplest uncompressed ROOT-file in the interpreter.
$ TFile *f = TFile::Open("myfyle.root", "RECREATE", "", 100, 0);
$ tree = TTree("mytree", "mytreetitle");
$ float var;
$ tree.Branch("mybranch0", &var);
$ var = 1;
$ tree.Fill();
$ tree.Write();
$ f->Write();
$ f->Map()
20211123/133509 At:100 N=122 TFile
20211123/133640 At:222 N=82 TBasket
20211123/133640 At:304 N=864 TTree
20211123/133650 At:1168 N=864 TTree
20211123/133650 At:2032 N=153 KeysList
20211123/133650 At:2185 N=14193 StreamerInfo
20211123/133650 At:16378 N=57 FreeSegments
20211123/133650 At:16435 N=1 END
A question I didn’t understand from the documentation
what is the way to save TFile byte by byte (with 100 bytes 128 bytes)
what is the way to save TBasket byte by byte (with 228 bytes 82 bytes)
what is the way to save TTree byte by byte (with 304 bytes 864 bytes)