Re: Full control of the tree writting,

From: Tomasz Bold <bold_at_fatcat.ftj.agh.edu.pl>
Date: Sat, 10 Sep 2005 20:59:10 +0200

Hi,

>
> 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?

The perfect would be if several threads could write the same tree. What I would be satisfied with is
if each thread writes different tree in different file. (However tree names are identical in each thread.)

> 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.

What trick it is? Can it be done without touching ROOT code?

Regards,

    Tomasz Bold

> Rene
>
> On 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 Sat Sep 10 2005 - 20:56:43 MEST

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