Question about SetCircular method of TTree?

Hi rooters,

I want to use the SetCircular method of TTree in my standalone application. I always met some problem. That is the entry number of tree is not equal to my set one when i online monitor this value. I do a small modification for the example of circular.C to reshow this problem. Please see the attached one.

All of the data in the memory is correct, but the entries of tree when online output. I fell a bit confusion.

Thanks.

Xiaodong
output.txt (2.65 KB)
circular.C (1.2 KB)

It uses a circular buffer.

Xiaodong

Your script produces the expected result. When using a circular buffer, the argument
to TTree::SetCircular(Long64_t maxEntries) is not the number of entries to be kept in the tree, but the maximum number. The current algorithm removes about 10 per cent of the current buffer and shifts the buffer.

Rene

Thanks a lot Rene.

Your explanation let me understand the circular buffer more clearly, thanks.

Xiaodong