Re: Full control of the tree writting,

From: Rene Brun <>
Date: Fri, 9 Sep 2005 17:59:43 +0200 (MEST)


Could you clarify what you mean exactly by writing a TTree in parallel? Do you mean that several threads try to fill the SAME Tree? or each Thread fill a different Tree?

I/O in ROOT is not thread safe currently. We are planning to implement the same trick with gDirectory/gFile that we did with gPad.


Fri, 9 Sep 2005, Tomasz Bold wrote:

> Dear,
> I am trying to use ROOT in multithread environment. All works fin except
> the TTree writing wich in fact is only one operation which happens in
> parallel.
> How can I get the full control over the AutoSaving operation in order to
> control concurency.
> 1. One of the possibilities is to keep Ntuples in memory until the job ends
> and then at the end write them out. This works fine until the Trees are
> small.
> 2. The solution I have now is to write out every some number of events. This
> is quite bad since no info about size of data in Branch is unused. Then for
> one Branch certain number of events is correct interval for others is not. If
> I knew number of bytes residing in the buffer and its capacity then I would
> save if 90% is filled or so.
> 3. I was trying to play with SetCircular but I can't find a way to save the
> buffers to the files at certain moment. If I call Write each some number of
> entries (buffersize -1) then I am getting large number of trees with
> different cycle numbers.
> 4. I guess I can do something looking at the TBranches and thier TBaskets.
> But it is not clear what is what there.
> Any hint?
> Regards,
> Tomasz Bold
Received on Fri Sep 09 2005 - 17:59:48 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:12 MET