Re: TTree and TKey

From: Rene BRUN <brun_at_mail.cern.ch>
Date: Thu, 24 Feb 2005 21:17:32 +0100 (MET)


Hi Pierpaolo,

see TTree::Autosave doc at:
http://root.cern.ch/root/htmldoc/TTree.html#TTree:AutoSave

By default the Tree header is saved each time 100 Mbytes (default) of uncompressed data has been written to the file. You can change this default by calling TTree::SetAutoSave, eg   mytree.SetAutoSave(2000000000); to set this limit to 2 Gigabytes

Rene Brun

On Thu,
24 Feb
2005, Pierpaolo Righini wrote:

> Dear Rooters,
> using various version of ROOT I have always the following result:
> writing to an output file a tree, when its dimension become sufficiently
> big, it appears to be contained in the file under 2 different TKey. Is it
> normal?
> Calling the file "myfile" I got with "myfile->ls()":
> TFile** data_2005-02-23.root
> TFile* data_2005-02-23.root
> KEY: TTree T;3 Tree containing user info
> KEY: TTree T;2 Tree containing user info
>
> or with "myfile->GetListOfKeys()->Print()":
> TKey Name = T, Title = Tree containing user info, Cycle = 3
> TKey Name = T, Title = Tree containing user info, Cycle = 2
>
> Note that the dimension of the file is about 40 Mb and that the tree as
> been constructed as follow (using some class User):
>
> TTree *T = new TTree("T","Tree containing user info");
> Int_t split = 99;
> Int_t bsize = 32000;
> User *user = 0;
> TBranch *branch = T->Branch("user", "User", &user,
> bsize, split);
> branch->SetAutoDelete(kFALSE);
> user = new User();
> ...................
> T->Fill();
>
>
> so if the dimension is small enough (the number of "user" is small in the
> tree) I have only 1 key otherwise I got 2 keys...
>
> thanks a lot.
>
> Pierpaolo Righini
>
Received on Thu Feb 24 2005 - 21:18:54 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:05 MET