Rapid Application Design with the ROOT GUI Classes 24 April 2007 Ilka Antcheva, Bertrand Bellenot, René Brun, Fons Rademakers, Valeriy Onuchin * CERN,

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Chapter 11 Designing the User Interface
Unit 3 Graphical User Interface (GUI) Dr. Magdi AMER.
H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev CHEP 2004 Go4 v2.8 Analysis Design.
Why ROOT?. ROOT ROOT: is an object_oriented frame work aimed at solving the data analysis challenges of high energy physics Object _oriented: by encapsulation,
Data Access Worldwide May 16 – 18, 2007 Copyright 2007, Data Access Worldwide May 16 – 18, 2007 Copyright 2007, Data Access Worldwide Building Great Looking.
Lecture 1 Introduction to the ABAP Workbench
Next Generation MMI Requirements May 4, MMI - High Level Requirements run under UNIX and Windows NT (WNT) use a well defined ASCII definition for.
TAC Vista Security. Target  TAC Vista & Security Integration  Key customer groups –Existing TAC Vista users Provide features and hardware for security.
O. Stézowski IPN Lyon AGATA Week September 2003 Legnaro Data Analysis – Team #3 ROOT as a framework for AGATA.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
1 Introduction to Human Computer Interaction  Livecode Overview  Based on Livecode User Guide from RunRev Ltd. (2010) 
An Overview of Qt - asankar1. Agenda About Qt –A brief intro of Qt Qt development tools –Tools used for building Qt application Qt Architecture –The underlying.
Sept 11, 2003ROOT Day1, Suzanne Panacek39 ROOT An object oriented HEP analysis framework. Day 1.
ROOT An object oriented HEP analysis framework.. Computing in Physics Physics = experimental science =>Experiments (e.g. at CERN) Planning phase Physics.
ROOT: A Data Mining Tool from CERN Arun Tripathi and Ravi Kumar 2008 CAS Ratemaking Seminar on Ratemaking 17 March 2008 Cambridge, Massachusetts.
ROOT Tutorials - Session 51 ROOT Tutorials – Session 8 GUI, Signal/Slots, Image Processing, Carrot Fons Rademakers.
June 2001ROOT 2001 FNAL1 What Else is New Since ROOT 2000? Fons Rademakers.
Bertrand Bellenot ROOT Users Workshop Mar ROOT GUI Builder Status & Plans ROOT & External GUI World MFC, FOX, Qt, PVSS… Snapshot of the Future.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
DataFlex Web Framework Symposium – Part 2 Web Framework Overview John Tuohy Development Team
IE 411/511: Visual Programming for Industrial Applications
Introduction to Matlab & Data Analysis
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
3461A Readings from the Swing Tutorial. 3461A Overview  The follow is the Table of Contents from the trail “Creating a GUI with JFC/Swing” in the “The.
SIMPLE PROBLEM SOLVING in Java: a Problem Set Framework Viera K. Proulx Richard Rasala Jason Jay Rodrigues CCSCNE 2002 Conference.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
LCG AA Meeting 30 June 2004 Valeriy Onuchin GUI Builder.
GUI Design With The Appx Client Presented By: Gary Rogers.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Introduction to ArcGIS for Environmental Scientists Module 3 – GIS Analysis Model Builder.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Overview of PVSS 3.6 Oliver Holme IT-CO. 16/11/2006JCOP Project Team Meeting New features in 3.6 New Installer for PVSS on Windows New Qt User Interface.
MS Visual Basic 6 Walter Milner. VB 6 0 Introduction –background to VB, A hello World program 1 Core language 1 –Projects, data types, variables, forms,
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
CITA 342 Section 2 Visual Programming. Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming.
Chapter Three The UNIX Editors.
Java Beans. Definitions A reusable software component that can be manipulated visually in a ‘builder tool’. (from JavaBean Specification) The JavaBeans.
ROOT Tutorials - Session 51 ROOT Tutorials – Session 5 Dictionary Generation, rootcint, Simple I/O, Hands-on Fons Rademakers.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
ROOT Users Workshop September 2005 Ilka Antcheva GUI Status and Development.
Differences Training BAAN IVc-BaanERP 5.0c: Application Administration, Customization and Exchange BaanERP 5.0c Tools / Exchange.
Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
LCG AA Meeting 31 October 2007 The new dynamically and extensively customizable ROOT browser Bertrand Bellenot.
Sebastian Böser HepMC Visual - an interactive browser for HepMC records 1st Annual ARTEMIS Meeting 27 th September, 2007.
Institute for the Protection and Security of the Citizen HAZAS – Hazard Assessment ECCAIRS Technical Course Provided by the Joint Research Centre - Ispra.
S.Linev: Go4 - J.Adamczewski, H.G.Essel, S.Linev ROOT 2005 New development in Go4.
CHEP06, Mumbai, India February 2006 General Status of ROOT GUI Ilka Antcheva, Bertrand Bellenot, René Brun, Valeriy Onuchin *, Fons Rademakers CERN,
1 G4UIRoot Isidro González ALICE ROOT /10/2002.
Go4 Workshop J.Adamczewski-Musch, S.Linev Go4 advanced features.
LCG AA Meeting 30 June 2004 Ilka Antcheva Graphics User Interface in ROOT.
Online Data Monitoring Framework Based on Histogram Packaging in Network Distributed Data Acquisition Systems Tomoyuki Konno 1, Anatael Cabrera 2, Masaki.
LCG AA Meeting 26 April 2006 User Interface Developments in ROOT Ilka Antcheva on behalf of ROOT GUI Work Package.
E Copyright © 2006, Oracle. All rights reserved. Using SQL Developer.
LCG AA Internal Review 30 March 2005 ROOT Graphical User Interface Ilka Antcheva, Bertrand Bellenot, Valeri Fine, Valeriy Onuchin, Fons Rademakers.
ROOT Event Recording system
CSC 222: Object-Oriented Programming
Working in the Forms Developer Environment
The role of ROOT in the BFEM Event Display
Chapter 2 – Introduction to the Visual Studio .NET IDE
Distributed object monitoring for ROOT analyses with Go4 v.3
User Interface Classes Signals / Slots
The Basic Usage and The Event Handling in Glade.
Go4 GUI and GSI's QtROOT interface
Presentation transcript:

Rapid Application Design with the ROOT GUI Classes 24 April 2007 Ilka Antcheva, Bertrand Bellenot, René Brun, Fons Rademakers, Valeriy Onuchin * CERN, Geneva, Switzerland * IHEP, Protvino, Russia

I. Antcheva ACAT07 NIKEF, Amsterdam 2 Overview Main Features Benefits from Using CINT Application Design Signals & Slots Scripting C++ Code Generation Dialogs GUI Builder Automatic Context Menus External Applications Conclusions

I. Antcheva ACAT07 NIKEF, Amsterdam 3 ROOT GUI classes form a rich and complete set of widgets Fully cross platform with the same look and feel on either Unix, Linux, Windows and Mac OS X Fully scriptable allowing fast prototyping via the embedded CINT C++ interpreter The GUI builder (under development) makes the task of designing complex GUI’s easier and faster High level GUI’s in ROOT : the browser, tree viewer, graphics editor, fit panel, session viewer of PROOF, etc. Main Features

I. Antcheva ACAT07 NIKEF, Amsterdam 4 fText = new TGTextEntry(fMain, new TGTextBuffer(100)); fText->SetToolTipText("Enter the label and hit Enter key"); fText->Connect("ReturnPressed()", "MyDialog", this, "DoSetlabel()"); fMain->AddFrame(fText, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5)); fGframe = new TGGroupFrame(fMain, "Last File"); fLabel = new TGLabel(fGframe, "No Intut "); fGframe->AddFrame(fLabel, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5)); fMain->AddFrame(fGframe, new TGLayoutHints(kLHintsExpandX, 2, 2, 1, 1)); … // fText = new TGTextEntry(fMain, new TGTextBuffer(100)); // fText->SetToolTipText("Enter the label and hit Enter key"); // fText->Connect("ReturnPressed()", "MyDialog", this, "DoSetlabel()"); // fMain->AddFrame(fText, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5)); fGframe = new TGGroupFrame(fMain, "Last File"); fLabel = new TGLabel(fGframe, "No Intut "); fGframe->AddFrame(fLabel, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5)); fText = new TGTextEntry(fGframe, new TGTextBuffer(100)); fText->SetToolTipText("Enter the label and hit Enter key"); fText->Connect("ReturnPressed()", "MyDialog", this, "DoSetlabel()"); fText->Resize(150, fText->GetDefaultHeight()); fGframe->AddFrame(fText, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5)); fMain->AddFrame(fGframe, new TGLayoutHints(kLHintsExpandX, 2, 2, 1, 1)); root [0].x myDialog.C root [1] root [0].x myDialog.C root [1].x myDialog.C Prototyping via the CINT C++ interpreter Supports from simple sequence of statements to complex C++ class and method definitions Remove edit compile cycle Macros can be edited and re-executed Transparent interface to native C++ compiler to run macro with native machine performance Benefits from Using CINT

I. Antcheva ACAT07 NIKEF, Amsterdam 5 Application Design Map user requirements and logically organize the GUI Application window is handled by TGMainFrame Select widgets from ROOT GUI classes Layout the GUI components Parent-children relationship Different layout managers Program them to perform actions Signal/slot mechanism Conventional model of event processing Run and validate … or iterate to improve

I. Antcheva ACAT07 NIKEF, Amsterdam 6 Signal/Slot communication mechanism is integrated into ROOT core by TQObject, TQConnection, TQClass Uses dictionary information and the CINT interpreter to connect signal methods to slot methods Total independence of the interacting classes (easy programming) Signals & Slots

I. Antcheva ACAT07 NIKEF, Amsterdam 7 Scripting Macros via the ROOT Object Browser

I. Antcheva ACAT07 NIKEF, Amsterdam 8 TGTextEditor - basic editor for compiling and executing macros More Scripting Drag & Drop macros from the browser

I. Antcheva ACAT07 NIKEF, Amsterdam 9 C++ Code Generation Using ctrl+S any GUI can be saved as a C++ macro file thanks to the SavePrimitive methods implemented in all GUI classes. The generated macro can be modified and executed It restores the complete original GUI and all existing signal/slot connections // transient frame TGTransientFrame *frame2 = new TGTransientFrame(gClient->GetRoot(),760,590); // group frame TGButtonGroupe *frame3 = new TGGroupFrame(frame2,“Operation"); TGRadioButton *frame4 = new TGRadioButton(frame3,“Nop",10); frame3->AddFrame(frame4); root [0].x example.C

I. Antcheva ACAT07 NIKEF, Amsterdam 10 Dialogs Standard set of common dialogs Files selection (multiple files) TGFileInfo fi; new TGFileDialog(fClient->GetDefaultRoot(), this, kFDOpen,&fi); if (fi.fMultipleSelection && fi.fFileNamesList) { TObjString *el; TIter next(fi.fFileNamesList); while ((el = (TObjString *) next())) { new TFile(el->GetString(), "update"); } } else if (fi.fFilename) { new TFile(fi.fFilename, "update"); } Input dialog Message window Search dialog Print dialog

I. Antcheva ACAT07 NIKEF, Amsterdam 11 More Dialogs // Change background color via color selector. TGFrame *fr; TGColorDialog *cd = GetGlobalColorDialog(); cd->SetCurrentColor(fr->GetBackground()); cd->Connect("ColorSelected(Pixel_t)", "TGFrame", fr, ChangeBackground(Pixel_t)"); fClient->WaitForUnmap(cd); TQObject::Disconnect(cd); // Change text font via font selection dialog. TGGroupFrame *gfr; TGFontDialog *fd = GetGlobalFontDialog(); TGResourcePool *rc = gc=fClient->GetResourcePool(); TGGC *gc = rc->GetGCPool()->FindGC(fr->GetNormGC()); TGFont *font = 0; Font = rc->GetFontPool()->FindFont(fr->GetFontStruct()); fd->SetColor(gc->GetForeground()); fd->SetFont(font); fd->Connect("FontSelected(char*)", "TGGroupFrame", gfr, "SetTextFont(char*)"); fd->Connect("ColorSelected(Pixel_t)", "TGGroupFrame", gfr, "SetTextColor(Pixel_t)"); fClient->WaitForUnmap(fd); TQObject::Disconnect(fd);

I. Antcheva ACAT07 NIKEF, Amsterdam 12 Complex Dialogs

I. Antcheva ACAT07 NIKEF, Amsterdam 13 GUI Builder Visual design without coding Design process Mainly based on Drag & Drop Flexible layout settings Ends up as C++ source code reflecting parents-children relationship Establish signal/slot connections and their concrete implementation (to be done)

I. Antcheva ACAT07 NIKEF, Amsterdam 14 Context sensitive popup menu Automatically generated by ROOT Gives direct access to class member functions Any context menu can be retrieved Can be extended with user- defined entries Automatic Context Menus TClass *cl = Graph->IsA(); TList *mnl = cl->GetMenuList();

I. Antcheva ACAT07 NIKEF, Amsterdam 15 TCanvas can be embedded into any 3rd party GUI environment when it is possible to: Obtain a Window ID (XID on X11, HWND on Windows) Create a timer to handle ROOT events Forward events to the ROOT canvas External Applications

I. Antcheva ACAT07 NIKEF, Amsterdam 16 Conclusions The ROOT GUI classes form a rich and powerful scriptable cross-platform GUI library Solid basis for the development of additional GUIs: help browser, object editors, fit panel, event displays The GUI builder makes designing GUIs easier Easy application distribution by storing the GUIs with data in the same ROOT file The future - to provide users with access through multiple interfaces from any location, with any device at any time.