TTree::AutoSave()

From: Tom Roberts <tjrob_at_fnal.gov>
Date: Tue, 29 May 2007 14:01:08 -0500


When I use TTree::Autosave() on a tree in a TFile, I get two copies of the TTree as expected (different versions), but the file is roughly twice as large. As I am making files that are quite large, doubling their size is not acceptable. Note my TFile contains many TTree-s, and I call AutoSave() on all of them every N events (N=100000 by default).

Is there any other way to "checkpoint" the output file so if the generating program crashes I can still recover most of the data that was written to the .root file, without doubling the size of the file?

In a related question: how does TFile::Flush() relate to such "checkpoints"? My guess is that partly filled buffers of the TTree are not written to disk, and for consistency this really needs to happen at the TTree level, not the TFile level.

Tom Roberts Received on Tue May 29 2007 - 21:01:32 CEST

This archive was generated by hypermail 2.2.0 : Wed May 30 2007 - 17:50:02 CEST