ROOT Refreshable Application

Hello,

I’m trying to understand how can i build a ROOT based application with refreshable options.
What i mean by refreshable options? I’m on a Test Beam right now and we’re getting a lot of data, this data has to be shown online as it arrives, so for that i have couple of hist that updates every second.
Currently what i did is a Qt-to ROOT app using TQtWidget and letting the qt gui thread control the business, that works just fine.
But my problem is that Qt-ROOT integration is simply bad, and publishing my app to others has become a painful job, so i wish to do a native root app.

So basically i’m starting from zero, and i want a simple app that plot a different hist every second.
I’ve started with

then created the canvas, the hist and plot it, so far so good.
but for running i have to do

but after this it’s goes into root event loop so i can’t do anything to the hist or canvas.

I don’t want to use the root interpreter due to the simple fact of debugging in a nice enviorment (Qt or eclipse)
so how can i use root abilities with a c++ program?

Thank you

Usually a GUI application is event driven. So it’s up to you how and when you access a histogram/canvas etc.
For example, if you update every second - create a timer and handle timeout events.

And do not forget - data access between different threads/processes must be exclusive: if one of them is filling a histogram/updating this data and another is reading or also writing - this requires some kind of synchronisation to avoid race conditions.