My program writes out a rootfile, but it crashes when it switches to a new file, due to the file getting too large (1.8 GB by default).
To debug this, I would like to set the limit to 5 MB, so that the program arrives at the problem much sooner. How do I change this limit?
(I seem to remember there was some global variable, but I can’t find it anywhere anymore…)
PS Using root 3.05/00 on Red Hat 7.3.
see comments in TTree::ChangeFile at:
root.cern.ch/root/htmldoc/TTree. … ChangeFile
That helps, thank you.
But now I have two additional questions:
- Is there a way to disable the file size limit?
- The largest file size I can enter appears to be 4.2 GB, but when I do this, I get a very large number unreadable files (see below). What’s the largest file size possible? (independent from OS limitations)
The reason I’m looking for the largest possible file size, is that my interface to rootfiles is through HepTuple and HepTuple seems to be unable to unable to deal with trees that switch to a new file. I’m e-mailing Philippe about this.
root  TChain tc(“Global”)
root  tc.Add(“AAvtx_set1-20_0706_100k_aa.root”)
root  tc.Add(“AAvtx_set1-20_0706_100k_ab.root”)
root  tc.Add(“AAvtx_set1-20_0706_100k_ac.root”)
root  tc.Add(“AAvtx_set1-20_0706_100k_ah.root”)
root  tc.SetMaxTreeSize(4200000000)
root  tc.Merge("/data/dzero/balm/largest_file_ever.root")
Fill: Switching to new file: /data/dzero/balm/largest_file_ever_1.root
Fill: Switching to new file: /data/dzero/balm/largest_file_ever_2.root
Fill: Switching to new file: /data/dzero/balm/largest_file_ever_3.root
Fill: Switching to new file: /data/dzero/balm/largest_file_ever_4.root
*** Break *** keyboard interrupt
Root > .q
parces:/stage/orion/dzero/balm/data/rootfiles/AAvtx/files 23>root /data/dzero/balm/largest_file_ever_76.root
Attaching file /data/dzero/balm/largest_file_ever_76.root…
Error in TFile::ReadKeys: reading illegal key, exiting after 0 keys
R__unzip: discrepancy (51920) with initial size: 10311, tgtsize=10311
The current max file size is 2Gbytes
HepTuple has not been updated to deal the consequence of TTree::Change. Use the HepFileManager interface to work
around this issue.