I am seeing the overhead for each tree that a Draw() is applied to.
At the bottom is a little script that illustrates it. When I run it I see the following output:
root [2] TestTree1()
Start: Res Mem=38244 Virt Mem=31172
Creating and Filling 30 trees
Filled: Res Mem=38416 Virt Mem=31312
Drawn: Res Mem=43504 Virt Mem=740784
So it is more like 25 MB per tree than 50, but still for each tree.
Thank you.
Brian
[code]//=======================================
#include “TSystem.h”
#include “TTree.h”
#include “TRandom.h”
TTree **t = 0;
int nt = 30;
ProcInfo_t pi;
void TestTree1();
void FillTree();
void DrawTree();
void TestTree1()
{
gSystem->GetProcInfo(&pi);
printf(“Start: Res Mem=%d Virt Mem=%d\n”,pi.fMemResident, pi.fMemVirtual);
FillTree();
DrawTree();
}
void FillTree()
{
int ne = 10;
int pad = 32;
float x1,x2,x3;
t = new TTree*[nt];
char tName[16];
TRandom r;
printf(“Creating and Filling %d trees\n”,nt);
for(int i=0;i<nt;++i)
{
int branchSize = (pad+ne)sizeof(Float_t);
sprintf(tName,“t%d”,i);
t[i] = new TTree(tName, “Events”);
t[i]->SetDirectory(0);
t[i]->Branch(“x1”,&x1,“x1/F”,branchSize);
t[i]->Branch(“x2”,&x2,“x2/F”,branchSize);
t[i]->Branch(“x3”,&x3,“x3/F”,branchSize);
t[i]->SetBranchStatus("",1);
for(int ie=0;ie<ne;++ie)
{
x1 = r.Rndm();
x2 = r.Rndm();
x3 = r.Rndm();
t[i]->Fill();
}
}
gSystem->GetProcInfo(&pi);
printf(“Filled: Res Mem=%d Virt Mem=%d\n”,pi.fMemResident, pi.fMemVirtual);
}
void DrawTree()
{
for(int i=0;i<nt;++i)
{
t[i]->Draw(“x1:x2”,"",“goff”);
}
gSystem->GetProcInfo(&pi);
printf(“Drawn: Res Mem=%d Virt Mem=%d\n”, pi.fMemResident, pi.fMemVirtual);
}
//=======================================[/code]