Best way to create a simple UI for root

Hello all,

I’ve been tasked with creating a GUI that will be able to interact with a root tuple. The GUI will need to be able to do 3 things:

  1. Call an exe that will convert a .dat to .root file
  2. View that .root file’s histogram
  3. Call a root macro with that root file as a parameter that will integrate over a user specified range and generate a new analyzed root file

Functionally, this all works now. I can execute those three bullet points all command line driven. I’m having trouble finding GUI building framework that will allow me to do this.
-I originally tried Visual Basic, only to realize that I can’t interact with root at all because root runs everything with C++
-Then I tried using Qt Creator, which is a GUI building application that works on C++ but whenever I tried to import root header files I came across this dreaded issue that was unresolvable according to the forum posts I’ve read.

Now I’m not quite sure where to go. I saw that root has it’s own GUI builder and I was wondering if that was both easy to use for an end user and also easy to learn for a freshman summer student. My other option (Although I’m really not too sure about it) is to continue trying to debug my Qt application that has some issue regarding I believe to be the project files.

I have also heard something about trying pyroot and then using TKinter to make a UI. I haven’t really used python though so this would be more of a last hope

Thank you for your support.

Christopher Settles
Fermilab Summer Intern

Hi Christopher,

I would suggest to take a look at the examples in $(ROOTSYS)tutorials/gui
The ROOT GUI builder is not really stable enough to build complex GUIs, but it can help…
And if you want to use Qt, take a look at this page
See also: Root and Qt5

Cheers, Bertrand.