Hi Rene,
I've noticed a mistery in a simple tree behaviour which I can not stand.
I've spend a couple of days trying to catch the problem or its tails but
nothing helps. I ended up with a simple example below which I hope you
can
run in a minute.
The macro reads a tree two times. On the first pass you will see a lot
of zeroes in the beginning of the output but on the second pass you will
suddenly get good data.
Objects in the tree are very simple: a few int and float fields in the
class. The tree was created and filled in several steps: open a file in
UPDATE mode, compression is 3, create trees in split mode, set branch
buffers to 8*1024 and save trees with AutoSave(). Then close the file
with delete.
Then I reopened the same file in UPDATE mode several times to add new
data.
Could you please try to reproduce the problem and give me some hints on
the further debugging.
You will need libFinance where TTrade, TQuote, etc. classes are defined,
the aapl_ ROOT file with the data. They are both around 1 meg so I put
them on the web server. A simple test macro you find at the end of this
message.
ROOT 3.00/06 on windows
Regards,
Anton
the libFinance.dll from
svedaq.tsl.uu.se\~anton\libFinance.dll
the aapl_ ROOT file from
svedaq.tsl.uu.se\~anton\aapl_
and the macro is
{
gROOT->Reset();
TFile File("c:\\root\\data\\aapl_");
TTrade *Trade = new TTrade();
TTree *Tree = (TTree*)File.Get("TradeTree");
Tree->SetBranchAddress("Trade", &Trade);
Int_t N = Tree->GetEntries();
for(Int_t i=0;i<N;i++) {
Tree->GetEntry(i);
Trade->Print();
}
Trade->Set(0,0,0,0);
printf("Printing the second time ... \n");
for(Int_t i=0;i<10;i++) {
Tree->GetEntry(i);
Trade->Print();
}
}
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:43 MET