Hi Anton,
Thanks for reporting this particular case happening when switching between
read and write mode in the same buffer.
The fix is now in CVS. I will rebuild the Windows version on Monday.
Rene Brun
On Sat, 12 May 2001, Anton Fokin wrote:
> Rene:
>
> turning back to our TTree mistery issue.. I see that you have introduced
> some changes: my program started to carsh in a few other places.
>
> I am using ROOT bin of 25 April 2001 on win 98. Whatever #1 or #2 you
> uncomment in the macro below, it kills the tree.
>
> I am sorry if you have something new in CVS. I am using the latest bins
> available on the ROOT site.
>
> Sincerely,
> Anton
>
> www.smartquant.com
>
> {
> gROOT->Reset();
>
> TFile *File = new TFile("c:\\root\\data\\test.root", "RECREATE");
>
> TTrade *Trade = new TTrade();
>
> TTree *Tree = new TTree("TradeTree", "");
>
> TradeTree ->Branch("Trade", "TTrade", &Trade, 4*1024, 1);
>
> TradeTree ->Write();
>
> for(Int_t i=0;i<100;i++) {
> Int_t N = TradeTree->GetEntries();
> //
> // #1
> // for(Int_t l=0;l<N;l++)
> // TradeTree->GetEntry(l);
>
> // #2
> // if (N) {
> // TradeTree->GetEntry(0);
> // TradeTree->GetEntry(N-1);
> // }
>
> Trade->Set(i,i,i,i);
> TradeTree->Fill();
>
>
> }
>
> Tree->AutoSave();
>
> delete Tree;
> delete File;
> }
>
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:45 MET