In root 5.05/1 (win32 platform, P4):
When I write to a memory resident TTree (gFile is attached to a root file opened with “READ” option) I get a bunch of error message, TTree::Print() produces goofy information, but the TTree appears to be ok (I can Draw(), etc)…
In root 4.02/0, I get no error messages, TTree::Print() behaves properly.
The following demonstrates the problem:
[code]void demo()
{
// create a reaonly root file to demonstrate problem
TFile *f = new TFile(“memresdemo.root”,“recreate”);
TH1F *ph = new TH1F(“ph”,"…",100,-100,100);
f->Write();
f->Close();
delete f;
f = new TFile(“memresdemo.root”,“READ”);
// create the memory resident ntuple
float x,y;
TNtuple *nt = new TNtuple("nt","demo","x:y:z");
TRandom r;
for(int i=0;i<200000;i++)
{
r.Rannor(x,y);
nt->Fill(x,y,x*x+y*y);
}
}
[/code]
Here’s what I get w/ 5.05.1[quote]root [0] .L ntupledemo.cpp
root [1] demo()
Error in TNtuple::Fill: Failed filling branch:nt.x, nbytes=-1
Error in TNtuple::Fill: Failed filling branch:nt.y, nbytes=-1
Error in TNtuple::Fill: Failed filling branch:nt.z, nbytes=-1
Error in TNtuple::Fill: Failed filling branch:nt.x, nbytes=-1
.
.
.
.
root [2] nt->Print()
*Tree :nt : demo *
*Entries : 200000 : Total = 2413498 bytes File Size = -75 *
-
: : Tree compression factor = -32000.00 *
*Br 0 :x : *
*Entries : 200000 : Total Size= 804556 bytes All baskets in memory *
*Baskets : 25 : Basket Size= 32000 bytes Compression= -32000.00 *
…
*Br 1 :y : *
*Entries : 200000 : Total Size= 804556 bytes All baskets in memory *
*Baskets : 25 : Basket Size= 32000 bytes Compression= -32000.00 *
…
*Br 2 :z : *
*Entries : 200000 : Total Size= 804556 bytes All baskets in memory *
*Baskets : 25 : Basket Size= 32000 bytes Compression= -32000.00 *
…
root [3]
[/quote]
I see the same problem wuth TTree or TNtuple. TTree::SetMaxVirtualSize(100000000) does not help…
Also, if gFILE==0 (e.g. also memory resident) there is no problem. Is this new behavior intentional? If so, what is the reasoning? Thanks!
Ed Oltman