fTotBytes is incremented during the filling of the Tree in
TBranch::Fill.
Are you sure that you call TTree::Fill ?
Here is the doc of TTree::AutoSave
Rene Brun
// When large Trees are produced, it is safe to activate the AutoSave
// procedure. Some branches may have buffers holding many entries.
// AutoSave is automatically called by TTree::Fill when the number of
bytes
// generated since the previous AutoSave is greater than fAutoSave
bytes.
// This function may also be invoked by the user, for example every
// N entries.
// Each AutoSave generates a new key on the file.
// Once the key with the tree header has been written, the previous
cycle
// (if any) is deleted.
//
// Note that calling TTree::AutoSave too frequently (or similarly
calling
// TTree::SetAutoSave with a small value) is an expensive operation.
// You should make tests for your own application to find a compromize
// between speed and the quantity of information you may loose in case
of
// a job crash.
//
// In case your program crashes before closing the file holding this
tree,
// the file will be automatically recovered when you will connect the
file
// in UPDATE mode.
// The Tree will be recovered at the status corresponding to the last
AutoSave.
Wensheng Deng wrote:
>
> Hi root experts,
>
> I am learning to use the autosave feature of TTree.
> I call SetAutoSave() right after I create a tree
> with statements like:
> kinkTree = new TTree("kinkAnalysis","STAR kink analysis");
> kinkTree->SetAutoSave(1000); // I use 1000 for testing purpose
>
> But it seems to me that it never autosaves.
>
> Then I looked into the code TTree.h and TREE_Tree.cxx.
> Do 'grep -n fTotBytes' to TREE_Tree.cxx and TTree.h,
> it looks like the member variable 'fTotBytes' never get increased.
>
> Maybe I am wrong somewhere?
>
> Thanks,
> Wensheng
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:22 MET