# Continuously filling/updating root histogram

**URL:** <https://root-forum.cern.ch/t/continuously-filling-updating-root-histogram/42009>\
**Category:** Newbie\
**Created:** [October 26, 2020, 11:51am UTC](https://root-forum.cern.ch/t/continuously-filling-updating-root-histogram/42009 "2020-10-26T11:51:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paipai](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/e99b99/32.png) [@paipai](https://root-forum.cern.ch/u/paipai)\
**Post date:** [October 26, 2020, 11:51am UTC](https://root-forum.cern.ch/t/continuously-filling-updating-root-histogram/42009/1 "2020-10-26T11:51:35Z")

</div>

Hello,

Say I got a continuous stream of data coming in. Is it possible to fill a root histogram in real time? So that I can display the histogram while it is beeing filled and looking at the entries coming in?

So far I know how to fill histograms when having a static array of data. I am wondering because you have to specify the number of bins in advance. Is there some updating functionality which could help when trying to do it in real time?

Thank you!

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [October 26, 2020, 12:07pm UTC](https://root-forum.cern.ch/t/continuously-filling-updating-root-histogram/42009/2 "2020-10-26T12:07:36Z")

</div>

No problem, you can take a look at the [tutorials](https://root.cern/doc/master/group __tutorial__ hist.html), like for example [`hsimple.C`](https://root.cern/doc/master/hsimple_8C.html) or [`hist/hsum.C`](https://root.cern/doc/master/hsum_8C.html)
