Re: Ring buffer for TTrees in online data analysis

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Aug 19 1998 - 09:45:08 MEST


Jens Paetzold wrote:
> 
> Hello,
> 
> I would like to change for an online analyzer from paw to root.
> We have the HBOOK ring buffer for row wise ntuples used up to now.
> I have already managed to use TMapFile for the shared memory section with
> histogramms. Now I would like to use also TTrees.
> My question: Is there a simple way to implement a feature like this ring
> buffer for TTrees on a TMapFile? Maybe I have not discovered it yet?
> Or is there some idea for the implementation of this?
> 
> Thanks, Jens

The ring buffer technique is not implemented in TTree.
One of the reasons is that the TMapFile class is not real shared
memory. A copy from the real object via TObject::Streamer is necessary
to update the shared memory area.
I think it would be far more efficient to implement a new class
to support a ring buffer in real shared memory with no copy at all
on the producer and consumer(s).
This class would support only simple types (chars, shorts, ints, floats
and doubles). The class could be a variant of the exsiting TNtuple
class.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET