Display histogram

Fig. 2 shows HistPresent's startup window, a file list , a list of a file contents and a widget displayed for a NTuple. All these widgets are implemented using TButton objects. Pressing the buttons triggers the obvious actions like showing the content of a ROOT file or displaying a histogram. The grey button left of a name is used as a selection. It turns green if it is active. This is used in operations like Show all selected hists or with the arithmetics operators. E.g. Selecting hpx and hpy2 then pressing + would addup histograms hpx and hpy2 resulting in a histogram hpx_plus_hpy2 which is displayed and added to the objects in memory.







Showing values of a Tree can be done is several ways:

-
Just pressing a name fills and shows a 1-dim histogram
-
Selecting 2 or 3 names and pressing Show leaves fills and shows a 2 or 3-dim histogram
-
With Edit expression any legal expression may be formed. The input widget used for that implements a history (see fig. 2) and text completion (tab key) for variable names and frequently used functions like TMath::Sqrt

Figure 2: A sample session
Image hpr_start

A histogram is displayed in a special canvas inheriting from TCanvas with extra popup menus providing actions like Expand, Superimpose, Projections etc. Note: Up to now all operations only require the left mouse button whereas the standard ROOT actions from context dependent popup menus triggered by the right mouse button are still available.

The following picture shows examples: Show selected hists in same range, and a 2-dim histogram with a graphical cut (TCutG) applied projected on both axes.

Figure 3: Show selected hists, Display_both option with graphical cut
Image display_all Image display_both

Johannes.Elmsheuser 2014-04-07