200 likes | 319 Views
The ALICE DQM Software and ROOT. Experiences, limitations and suggested improvements. ROOT Users Workshop. Barthelemy von Haller & Adriana Telesca for the ALICE DAQ Collaboration. ROOT in ALICE Online. ALICE : A Large Ion Collider Experiment 18 detectors Trigger rate : 10 KHz (max)
E N D
The ALICE DQM Software and ROOT Experiences, limitations and suggested improvements ROOT Users Workshop Barthelemy von Haller & Adriana Telesca for the ALICE DAQ Collaboration
ROOT in ALICE Online • ALICE : A Large Ion Collider Experiment • 18 detectors • Trigger rate : 10 KHz (max) • Bandwidth to mass storage : 1.25 GB/s • Online usage of ROOT • « ROOTification » • Detector algorithms • Data Quality Monitoring Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Data Quality Monitoring • Online feedback on the quality of data • Make sure to take and record high quality data • Identify and solve problem(s) early • Data Quality Monitoring (DQM) involves • Online gathering of data • Analysis by user-defined algorithm • Storage of monitoring data • Visualization Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
The AMORE framework • AMORE : Automatic MOnitoring Environment • A DQM framework for the ALICE experiment Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Design & Architecture • Publisher – Subscriber paradigm • Database used for the data pool • Published objects are encapsulated into « MonitorObject » structure Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
MonitorObjects • Dictionaries allow introspection in the client • Standard ROOT interfaces • Easier for users, e.g. call Draw() blindly • MOTObject allows embedding custom types Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
AMORE and ROOT • Data pool implemented as a database • TMessage used to serialize MonitorObjects • TMySQLServer et al. • Plugin architecture using ROOT reflection • Modules are dynamic libraries loaded at runtime • Custom and generic GUI (see next slides) • Macro for quick post-processing without releasing new version of a module Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
User interfaces (1) • Detectors custom GUI • Expert view of the data their agent publishes Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
User interfaces (2) • Generic User Interface • Based on TRootBrowser, custom TGListTree • TXMLEngine for layouts and preferences files
Web access • Web access to images of the plots via the ALICE eLogbook Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Experience • ROOT provided key features • C++ database interface • Plugin mechanism • GUI • Macros • XML • We could have done the same with a palette of tools, here we got it all at once • Quick, kind and effective support • Still, anything can always be improved… Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Difficulties (1) • ROOT not web friendly (Bertrand gives us hope!) • View and manipulate ROOT objects like in a TCanvas/GUI • Others are working on solutions, lack of concertations ? • Axes are not easy to manipulate • Responsibilities are unclear (histo, pad, axis) • Time-based axes should be far easier to use • Objects ownership • E.g. TH1 with « functions » encapsulated in a MOTObject • E.g. THStack (main histo is destroyed, not the others) • CMake: missing FindROOT.cmake or ROOTConfig.cmake • Using ROOT as a simple library (no TApplication) • We want our core files and stack traces Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Difficulties (2) • Histograms hierarchy is wrong • Sometimes obscure or inconsistent class interfaces • E.g. TMessage::EnableSchemaEvolution() does actually nothing if not used in conjunction with TSocket • E.g. Zoom is a property of TH1 != draw option and log scale are properties of TPad • GUI: powerful but writing them is tough, error prone and pretty verbose • Support • Too often the answer is « Why don’t you do it this way? » instead of fixing the issue • C++ standard or ROOT standard ? • STL, Boost, Collections and types
My ideal ROOT 7 Code name « redemption » • No major new features • Fix the (base) classes inheritance and interfaces • Hopefully it can even be backward compatible • Make ROOT web friendly • Make ROOT looks nice • GUI and graphics need a modern look and feel • Simplify GUI programming while you are at it Prepare ROOT for the next 20 years and protect future users from mistakes made 20 years ago. Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Conclusion • The ALICE DQM uses and relies on many features of ROOT • ROOT provided a very complete toolbox which helped us develop effectively AMORE • ROOT is going to be used for many more years and, today, there is an opportunity to fix long-standing issues • Thank you for all the good work ! Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Backup slides Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
TMessage and objects evolution Producer ROOT v. X EnableSchemaEvolution doesn’tactually help.It onlyraises a flag in Tmessagethatisused by TSocket Monitor Object Streamer Incompatible and no Streamer Monitor Object MonitorObject Consumer ROOT v. Y>X Database TMessage EnableSchemaEvolution Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Web ROOT Anotherapproach Client Server An event (click) means a histo must bedrawn HTTP request (AJAX) Ask for data of histo1 Get histo1 Use a special printer or method on the object Send back the JSON or HTML5+JS or SVG+SMIL myDiv.content = JSROOT.Draw(json) JSON data OR myDiv.content = data HTML5+JS SVG+SMIL Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Web ROOT • JSON : close to what BB is doing, still people can easily use the js lib alone. • Need for a performant and complete histograming JS library • Adding DrawWeb() to classes seems a reasonably important effort (?) • Creating a specific printer might even be simpler • If no printer/method available for a certain type, simply degrade to generate an image. • HTML or SWIG is lighter for the client but today clients (browsers) are powerful Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN
Web ROOT • To bedone in the JSON option: • Client • Optionallydevelop a facilityjslibrary to handle the request to server and the drawing in a div • Server / ROOT • Find the best way of generating JSON for anyobject (new Printer or addition method in TObject). If not definedfall back to an image ? • Client • Develop an efficient and completehistogramingjavascriptlibrary (drawing and manipulation). Usable withoutROOT. Barthélémy von Haller & Adriana Telesca, ALICE, PH department, CERN