1 / 5

Object Editors and Style Manager for Cross-Platform User Interface in ROOT Framework

This paper presents two sets of classes in the ROOT framework: the graphics editor and the GUI builder. The graphics editor provides an intuitive way to edit objects in a canvas, while the GUI builder allows users to manage different styles in a ROOT session. These classes enhance the cross-platform user interface capabilities of the ROOT framework.

markburnett
Download Presentation

Object Editors and Style Manager for Cross-Platform User Interface in ROOT Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. User Applications Axis Editor Statistics Pad Editor TH2 Editor The Graphical User Interface (GUI) design is an important component of the ROOT framework. Two sets of classes, recently introduced in ROOT v4.01, are presented in this paper: the graphics editor and the GUI builder. ROOT Graphics Editor The graphics editor is split into discrete units of so-called object editors. This makes the GUI easier to design and adapt to the users’ profiles. The only convention to follow is to derive the code object editor from the TGedFrame base class, and to use as a name the class name concatenated with ‘Editor’, i.e. for TGraph objects the editor is the TGraphEditor. Different Object Editors TGraph Editor • They give an intuitive way to edit objects in a • canvas with immediate feedback. • The three-mouse-clicks rule of navigation limits • the number of levels for completing a single task. • The user interface gives full control to users. • Related actions work the same way and reinforce • the understanding of the functions. • Complexity is reduced by hiding some GUI • elements and revealing them when necessary. TGX11 TH1 Editor TVirtualX TGWin32GDK The ROOT widgets (window’s gadgets) are fully cross-platform. The GUI classes interface to the platform-dependent low level graphics system via the abstract class TVirtualX. Concrete versions of this abstract class have been implemented for X11, Win32, and Qt. Thanks to this single graphics interface, porting to a new platform requires only the implementation of TVirtualX. The benefit of applications running on more than one kind of computer is obvious - it increases the program’s robustness, makes their maintenance easier and improves the reusability of the code. TGQt For more information see: http://root.cern.ch For any questions please use following address: rootdev@pcroot.cern.ch

  2. Stats Editor TH2 Editor TH2 Editor TF1 Editor Pad Editor Axis Editor Pave Editor TStyle *tmpStyle = new TStyle("Imported_Style", "Imported from canvas c1"); tmpStyle->SetNdivisions(510, "x"); tmpStyle->SetNdivisions(510, "y"); tmpStyle->SetNdivisions(510, "z"); tmpStyle->SetFillColor(19); tmpStyle->SetFillStyle(1001); tmpStyle->GetAttDate()->SetTextFont(63); tmpStyle->GetAttDate()->SetTextSize(14); tmpStyle->GetAttDate()->SetTextAngle(0); tmpStyle->GetAttDate()->SetTextAlign(11); The ROOT framework offers considerable benefits for developing a fully cross platform object-oriented user interface. Two sets of classes are presented: the Object Editors and the Style Manager. Object Editors The ROOT graphics editor is split into discrete units of so-called object editors. Any object editor provides an object specific user interface that shows up when the corresponding object is selected. This interface design is built with a capacity for growth and can be extended easily by user-defined object editors. Import from a canvas Import from a macro Create a new style Delete a style Edit selected style Export to a macro • Style Manager • This new Graphical User Interface is created to manage different styles in a ROOT session. It allows users to import a style from a canvas or a macro, to select a style for editing, to export it in a C++ macro, to apply a currently selected style on a selected object in a canvas or on all canvases, to set it as the gStyle. • This interface is composed of two parts: • the top level interface manages a list of all available styles for the current ROOT session and shows the currently selected one; • the style editor that deals with the settings of the currently selected style. • A preview of the selected canvas helps for precision work. It can be updated dynamically at run-time or by request to show how the edited style looks. • All changes made in the style editor can be cancelled and the edited style can be restored to the last saved state in a macro. For more information see: http://root.cern.ch For any questions please use the address: rootdev@pcroot.cern.ch

  3. Data Analysis GUI Applications Examples The next ones are data analysis applications, using statistics, i.e. SPC (statistical Process Control) and MVR (multivariate regression). They are used for Quality Insurance and Spectrometry. The included screen captures illustrate the powerful Graphical User Interface capabilities of ROOT. They come from several concrete applications used in aluminium industry (ALCAN Aluminium Valais SA). Data Visualization The following applications are mainly used to visualize data coming from different facilities, on different platforms (Windows NT and QNX). Data are collected on a Windows server, converted into Root format, validated, then archived on CD once a year. The multivariable regression (MVR) calculation is an empirical correction procedure to minimise, in a multicomponent matrix, the influence of interfering elements on an analyte. The MVR's options provide facilities and flexible mathematical algorithms to compute simultaneously the basic curve polynomials and coefficients for additive and/or multiplicative corrections. The calculation is performed on the intensities and concentrations of a set of samples used as standards. The application HFViewer is the main application used in aluminium casting plant, regrouping data from : - liquid metal treatment (Ar + Cl2). - spectrometric analysis (alloy composition). - casting process. - homogenization. It is also used for the validation of the product before expedition. The SPCLab application determines the process capability of spectrometry analysis. Here is another data visualization application, DlgView, used to show data coming from superplastic forming process. Superplastic forming is a process using air pressure to form metal sheets (special aluminium alloys) into specific complicated shapes (as car body parts). For more information see: http://root.cern.ch For any questions please use following address: rootdev@pcroot.cern.ch

  4. ROOT: 2D Graphics This poster shows a plot gallery, illustrating the extensive 2D graphics capabilities of ROOT.

  5. ROOT: 3D Graphics R. Maunder 1) , T.Pocheptsov 4) 1)CERN – European Organization for Nuclear Research, Geneva, Switzerland4) Joint Institute for Nuclear Research (JINR) GL viewer can now be used as a standalone viewer and as built in pad. TPad can render classical 2D graphics, using X11 or Windows graphics and 3D graphics using OpenGL. We intend to exploit this to offer wide new range of data representation techniques. root[0] gStyle->SetCanvasPreferGL(kTRUE); root[1] .x shapes.C shapes.C na49view.C new TGeoCompositeShape("cs", "sphere - torus") - == new TGeoCompositeShape("cs", "box * sphere") == Standalone GL viewr Canvas * Objects can be drawn as solids and solids with outlines: new TGeoCompositeShape("cs", "sphere + torus") + == ROOT ‘s composite shapes (TGeoCompositeShape) can now be visualized with GL viewer: TGeoCompositeShape *cs1 = new TGeoCompositeShape("cs1", "tub1+tub1:r1"); TGeoCompositeShape *cs2 = new TGeoCompositeShape("cs2", "tub2+tub2:r1"); TGeoCompositeShape *cs3 = new TGeoCompositeShape("cs3", "cs1-cs2"); TGeoCompositeShape *cs = new TGeoCompositeShape("cs", "cs3*box:r2");

More Related