Re: filtering a tree

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Oct 05 1998 - 17:48:35 MEST


T Auger wrote:
> 
> Hi Rene,
> I tried your suggestion and I still run into the same problem. It
> seems related to memory issue since it works when I fill the new tree
> with only a few events ~10-20 but it still crashes when I try to call
> Draw() after I filled it about 100 times. I did another test directly
> with CloneTree (ROOT version 2.11), it gives the same result:
> 
> root [0] TFile f("/home/crash30/thierry/run12415/run12415_v1.root");
> root [1] TTree *tree = (TTree*)gDirectory->Get("T");
> root [2] TClasEvent *event2;
> root [3] tree->SetBranchAddress("event",&event2);
> root [4] TTree *tree2 = (TTree*) tree->CloneTree(100);
> root [5] tree2.Draw("event.Mm_gp()")
> Warning in <MakeDefCanvas>: creating a default canvas with name c1
> Warning in <TBranchObject::GetBasket>: Estimated keylen too small=2468
> Fatal in <operator new>: storage exhausted
> aborting
> 

Thierry,
In the session above, you are opening the file in READ only mode.
When Cloning the Tree, Root will try to create the baskets buffers
in memory !!
Specify, the second parameter "update" or create a new Root file.
Another source of problem that I keep repeating on this list:
Change:
TClasEvent *event2;
to
TClasEvent *event2 = 0;

If the two suggestions above do not solve your problem,
please contact me directly, tell me on which machine you work
and I will give you my current version to test.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:38 MET