Real time histograms, can't update without "aggregating" the signal

Hi Root team. Facing a different problem this time. Using Root with realtime data and graphs was easy and efficient but this time I’m working with realtime data and histograms and facing a new problem. The signal I’m sampling gets aggregated ( since it’s an histogram, yeah I got that )

calling the regular create hist and fill after iteration works perfectly and on an efficient manner, but the problem is that I need a new frame every time an iteration occurs.

Calling the usual routine after the fill loop like :




Doesn’t do the trick, since the hist seems to keep on aggregating the signal. So it’s clear that we need a new frame for each iteration.

Calling reset after the update hist->Reset(); doesn’t work as expected, the entire pipeline gets sluggish although the effect on the frame is the desired effect ( one frame per iteration and then reset )

What is the common way to achieve this on a performant fashion ?

Thank you

Welcome to the ROOT forum

Let me try to rephrase your question to make sure I understood it.
So, you have an histogram called hist you fill n times and after these n fills you want to display it and reset it (initialise it to zero content) to make it ready for the next n fills.
Is that what you are trying to achieve ? If that’s the case the following should work:


This code should be inside a loop.

it’s working now, thanks !

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.