1 / 22

J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel

CHEP 2001. G SI O nline O ffline O bject O riented. G o 4. Multithreaded Inter-Task Communication with ROOT - writing non-blocking GUIs. J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel. Contents. G o 4 : Software layers and architecture G o 4 Requirements

strunkm
Download Presentation

J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel

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. CHEP 2001 GSIOnlineOfflineObjectOriented Go4 Multithreaded Inter-Task Communication with ROOT - writing non-blocking GUIs J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel Go4 - http://go4.gsi.de

  2. Contents • Go4: Software layers and architecture • Go4Requirements • Multithreading (threadmanager library) • Inter task communication (taskhandler library) • Example: GUI task and analysis task • GUI implemetation with ROOT-Qt Interface • Demo (movie) • Summary Go4 - http://go4.gsi.de

  3. Go4 Package Layers Go4 Event Analysis Loop (Client) Go4 GUI (Server) Go4TaskHandler Qt Library Go4ThreadManager Interface TThread ROOT Framework Go4 - http://go4.gsi.de

  4. Requirements ofGo4 • On-line Analysis with non blocking GUI • Analysis based on ROOT • Analysis runs permanently • Analysis updates graphics asynchronously • GUI is never blocked • GUI controls and steers analysis Go4 - http://go4.gsi.de

  5. Problems to solve • Multithreading necessary • ROOT classes not inherently thread save •  lock object creation and ROOT services •  nonblocking GUI and analysis: different tasks • Communication between tasks Threadmanager library Taskhandler library Go4 - http://go4.gsi.de

  6. Go4Multitasking system • Only one working thread per task(object creation, memory allocation, ROOT system calls) • Analysis and GUI in separate tasks(non blocking GUI, continuous analysis) • Communication: • raw socket transport(dedicated threads with TBuffer fields in TGo4Socket) • Object streaming by ROOT(working thread uses TGo4Queue methods) Go4 - http://go4.gsi.de

  7. Functional overview Display Task (Server) GUI LoggingThread DrawingThread Useraction queue queue queue LaunchThread Task Handler CommandThread DataThread StatusThread ConnectorThread IPNetwork DataThread CommandThread StatusThread DataLoop Task Handler queue queue queue Analysis Tasks (Client 1,2,...) WorkThread WatcherThread Go4 - http://go4.gsi.de

  8. Use ROOT and Qt together!no changes to ROOT sources  Qt graphics library professional, powerful, free, tools (QtDesigner), well documented Go4GUI • Complex GUI • Rapid prototyping • Go4 GUI architecture: • signal-slot mechanism (both Qt and ROOT) • gui singleton: registry + dispatcher (modified mediator pattern) • persistent status objects per window Go4 - http://go4.gsi.de

  9. Qt Eventloop QApplication::Exec() ROOT Eventloop QWidget QWidget QTimer TSystem::InnerLoop() QWidget QWidget QWidget TQROOTCanvas TQROOTCanvas TQROOTCanvas TRootGuiFactory TCanvas TCanvas TCanvas TQRootGuiFactory TCanvasImp TQCanvasImp Go4 GUI: Qt-ROOT interface QApplication TApplication QROOTApplication TQApplication TTimer TThread TSocket other... Go4 - http://go4.gsi.de

  10. Go4 GUI: Qt-ROOT interface • Follows the general ROOT GUI ABC • no changes in ROOT source necessary • Inheritance from ROOT base classes • TQRootGuiFactory (TRootGuiFactory) • Qt Factory GUI components • TQCanvasImp (TCanvasImp) • creates a Qt independent main window (QMainWindow) • sets TQRootCanvas as a central widget • TQApplication (TApplication) • ROOT environment set with a Qt GUI factory • Inheritance from Qt base class • QRootApplication (QApplication) • enable Qt evt-loop to drive Qt based GUI applications • call ROOT inner loop repeatedly to enable ROOT system events Go4 - http://go4.gsi.de

  11. Qt Designer screenshot Go4 - http://go4.gsi.de

  12. Using Qt designer Go4 - http://go4.gsi.de

  13. Root GUI IP Qt GUI Qt GUI Qt GUI Widgets Widgets Widgets Widgets Slots Slots Slots Slots Status Status Status Status Go4GUI design GUISingleton registry command dispatcher status mediator commands Display taskhandler server data to analysis • register • (dependency) update Go4 - http://go4.gsi.de

  14. Summary • Go4 thread manager package • Go4 task handler package • Go4 Qt-ROOT interface ready to use for any ROOT application • Client task could be analysis framework, slow ctrl,... • GUI task can use Qt graphics library • Go4 analysis framework and GUI is being under development... • http://go4.gsi.de Go4 - http://go4.gsi.de

  15. Go4 demo monitored histograms ROOT canvas Control panel analysis status local objects remote objects Go4 - http://go4.gsi.de

  16. Go4 demo • Initializing a remote analysis • Control of analysis: run status, list object folders • Monitor remote histograms continuously • Get and update local object copies • Working on local histograms (fit panel, save) • ROOT TBrowser works in parallel • Go4 Browser plots: superimpose, multiwindow Go4 - http://go4.gsi.de

  17. Go4 demo Go4 - http://go4.gsi.de

  18. Go4 demo Go4 - http://go4.gsi.de

  19. Go4 demo Go4 - http://go4.gsi.de

  20. Go4 demo Go4 - http://go4.gsi.de

  21. Go4 demo regular ROOT TBrowser, works together with Qt Go4 - http://go4.gsi.de

  22. Go4 demo Go4 - http://go4.gsi.de

More Related