Hi Elena, The 2 keys are different version of the same object. The highest cycle number is always the most recent version of the object. In your case you have 2 keys because the sequence of events have been .. indirect call to AutoSave .. .... .. indirect call to AutoSave .. direct call to TFile::Write The sequence of AutoSave produce the first 12 cycles, always deleting the previous ones. The last call to TFile::Write caused the saving of the TTree object in a new cycle but did not delete the previous cycle (written by AutoSave). To force the deletion of existing cycles do myfile->Write(0,TObject::kOverwrite); Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Elena Vataga Sent: Thursday, February 28, 2002 5:35 AM To: Rene Brun Cc: roottalk@pcroot.cern.ch Subject: [ROOT] TTree with different cycle numbers Hello, ROOters! Would you be so kind to give me some explanation. I am using program to create TTree where SetAutoSave(1000000); is set. When looking output files inside root I am getting: TFile** zee_tape.root Simple ROOT Ntuple TFile* zee_tape.root Simple ROOT Ntuple KEY: TTree isl;13 ISL test KEY: TTree isl;12 ISL test Why I have 2 keys? I tried to see which is the difference (probably in wrong way) between 2 KEYs: TFile* f1 = new TFile("zee_tape.root"); TTree *a = (TTree*) f1->Get("isl;13"); a->Print(); Here I am getting normal print out and seems that TTree has 120 000 entries. Making after TTree *b = (TTree*) f1->Get("isl;12"); b->Print(); It works fine, but it has 119639 events... I guess that isl;12 is something left by Autosave, but why it was not deleted? Is it a normal behavior? regards, Elena I am using ROOT Version 3.02/07 on Linux R.H. 6.1
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:43 MET