Re: [ROOT] Re:Re: TTree::Autosave

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Oct 11 2000 - 18:13:44 MEST


Hi Anton,

KOSU_FOKIN@garbo.lucas.lu.se wrote:
> 
> Hi Rene,
> 
> perhaps I wrote a bit missleading message. No, I do not call autosave
> after each event but rather after a predefined number of events set by
> a user. What I wanted to say tis that at high event rates I update
> event file quite frequently and it causes collisions.
> 

Well, this is your choice. Choose an update frequency that does not penalize
your application, still preserving security.

> I do know that autosave as well as TFile::Write() is a very time
> consuming procedure. On the other hand what I want to do is to
> write and physically flush the latest hundred events at the end
> of an existing file. Why it is so time consuming? Also ... I have
> noticed that it slows down with file size growing. In  our cases
> (with Susan) we do not want to overwrite the whole file or do something
> except writing things at the end of file. How can we do so?
> 

AutoSave writes a copy of the Tree header + all the branch buffers.
If you have many branches and/or large buffer sizes, the amount of I/O
per AutoSave can be large. For example, if you have a Tree with 100 branches,
each with 32K, you have to write the compressed result of these buffers.
Could be 3.2 MBytes.

Autosave time should not grow with the file size. You must have something else
happening!  Could you send me the output of tree->Print()
and also of gDirectory->ls() ?

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:35 MET