Reading ROOT files in (almost) any browser.  Use XMLHttpRequest JavaScript class to perform the HTTP HEAD and GET requests  This class is highly browser.

Slides:



Advertisements
Similar presentations
Java Script Session1 INTRODUCTION.
Advertisements

Make your choice from more than 70 templates to get a quick start online!70 templates.
BigBed/bigWig remote file access Hiram Clawson UCSC Center for Biomolecular Science & Engineering.
Do We Really Need Rich-Interface Technologies? Yifan Zhang
Active Server Pages Chapter 1. Introduction Understand how browsers and servers interacted when the Web was young Understand what early Internet and intranet.
CM143 - Web Week 2 Basic HTML. Links and Image Tags.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
STARSOFT A Developers Studio for Ajax. Group Members Özer Gümüş Mehmet Albayrak Ömer Eser Özge Yamasan Fatih Yıldırım.
Definition from Wikipedia.  The Prototype JavaScript Framework  implemented as a single file of JavaScript code  named prototype.js (
© 2010 UEI, Inc. All Rights Reserved UEIPAC HMI.
Session: 11. © Aptech Ltd. 2HTML5 Audio and Video / Session 11  Describe the need for multimedia in HTML5  List the supported media types in HTML5 
Bertrand Bellenot root.cern.ch ROOT I/O in JavaScript Reading ROOT files from any web browser ROOT Users Workshop
Reading ROOT files in any browser ROOT I/O IN JAVASCRIPT Bertrand Bellenot CERN, PH-SFT.
HTML5. What is HTML5? HTML5 will be the new standard for HTML. HTML5 is the next generation of HTML. HTML5 is still a work in progress. However, the major.
Networking Nasrullah. Input stream Most clients will use input streams that read data from the file system (FileInputStream), the network (getInputStream()/getInputStream()),
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Offline Performance Monitoring for Linux Abhishek Shukla.
- Circle markers produced by TAsimage: They do not match was is produced on screen. The line width is too thick. Some other markers need to be tune a bit.
Sakai: Localization & Internationalization Beth Kirschner University of Michigan
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
HTML Structure & syntax
All Web pages are written with some form of HTML (HyperText Markup Language). HTML documents are saved as Text Only files so virtually any computer can.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
06/10/2015AJAX 1. 2 Introduction All material from AJAX – what is it? Traditional web pages and operation Examples of AJAX use Creating.
JavaScript ROOT Bertrand Bellenot (CERN) Sergey Linev (GSI)
Finishing your site HTML and css 2012 Brian Davison.
Java Root IO Part of the FreeHEP Java Library Tony Johnson Mark Dönszelmann
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
WebVizOr: A Fault Detection Visualization Tool for Web Applications Goal: Illustrate and evaluate the uses of WebVizOr, a new tool to aid web application.
Website Development with PHP and MySQL Saving Data.
HTML Structure & syntax. Introduction This presentation introduces the following: Doctype declaration HTML Tags, Elements and Attributes Sections of a.
Developing software and hardware in parallel Vladimir Rubanov ISP RAS.
Selenium and Selenium on Rails. Agenda  Overview of Selenium Simple Selenium Tests Selenium IDE  Overview of Selenium on Rails  Problems with Selenium.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
THttpServer for ROOT Bertrand Bellenot, CERN Sergey Linev, GSI Darmstadt
What is Web Site Administration Tool ? WAT Allow you to Configure Web Site With Simple Interface –Manage Users –Manage Roles –Manage Access Rules.
Wijmo Troy Taylor. What is Wijmo? -Wijmo is a kit of over 40 UI widgets, optimized for client-side web development. -HTML5 -jQuery -CSS3 -SVG.
UPLOAD / DOWNLOAD april  HTML5 is just the next iteration of HTML  Previous version was technically HTML 4.01, which incorporated XHTML 1.0.
1 3 Computing System Fundamentals 3.4 Networked Computer Systems.
CHEP 2013, Amsterdam Reading ROOT files in a browser ROOT I/O IN JAVASCRIPT B. Bellenot, CERN, PH-SFT B. Linev, GSI, CS-EE.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
STAR Event data storage and management in STAR V. Perevoztchikov Brookhaven National Laboratory,USA.
The Problem of State. We will look at… Sometimes web development is just plain weird! Internet / World Wide Web Aspects of their operation The role of.
WebOPI -Bring BOY OPI to the Web and Mobile Xihui Chen, Kay Kasemir Spring 2012 EPICS Meeting.
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
ROOT I/O in JavaScript Browsing ROOT Files on the Web For more information see: For any questions please use following address:
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
PART 2 INTRODUCTION TO DYNAMIC WEB CONTENT AND PHP.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Dave Salinas. What is XML? XML stands for eXtensible Markup Language Markup language, like HTML HTML was designed to display data, whereas XML was designed.
SIN DRILL & Z-DRILL Bhaskar Khaneja Lekha Surasani.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Learning Aim C.  In this section we will look at some simple client-side scripts, browser compatibility, exporting and compressing and suitable file.
ASP.Net ICallback Vijayalakshmi G M Senior Trainer Binary Spectrum.
Wes Preston DEV 202. Audience: Info Workers, Dev A deeper dive into use-cases where client-side rendering (CSR) and SharePoint’s JS Link property can.
Online Data Monitoring Framework Based on Histogram Packaging in Network Distributed Data Acquisition Systems Tomoyuki Konno 1, Anatael Cabrera 2, Masaki.
JavaScript Invented 1995 Steve, Tony & Sharon. A Scripting Language (A scripting language is a lightweight programming language that supports the writing.
Sharing interactive web reports in JMP® 13
JavaScript and Ajax (Ajax Tutorial)
Chapter 4: HTML5 Media - <video> & <audio>
Sharing interactive web reports from JMP®
Application with Cross-Platform GUI
3D graphics in JavaScript ROOT
DWR: Direct Web Remoting
CSE 154 Lecture 22: AJAX.
ISC440: Web Programming 2 AJAX
CIS 133 mashup Javascript, jQuery and XML
Presentation transcript:

Reading ROOT files in (almost) any browser

 Use XMLHttpRequest JavaScript class to perform the HTTP HEAD and GET requests  This class is highly browser dependent:  On IE, the binary data is in its responseBody data member (VBScript format), and has to be converted into a JavaScript string  On other browsers, the data can be in response, mozResponse, mozResponseArrayBuffer, or responseText...  Thanks to Ioannis Charalampidis, who kindly provided a working cross-browser solution

 Using HTTP byte range (available in HTTP/1.1) to download a buffer (and not more) only when user want to display an object (e.g. TH1F)  Apparently, some browsers don’t support this feature yet (e.g. Opera), but major ones do (IE, Firefox, Safari, Chrome)  This saves (potentially large) data transfer and memory usage

 JavaScript has very little support for raw binary data  Avoid to use the “available soon” ArrayBuffers: ped_arrays/ArrayBuffer ped_arrays/ArrayBuffer  So the binary data is stored in a JavaScript string. Accessing a single byte is easy: byte = string.charCodeAt(index);

 The keys are not compressed  They contain basic information on the object they describe  First step was quite easy, starting from already working code written by Axel  Formatting the keys has been done with a JavaScript tree menu (

This is a screenshot of the HTML display showing the file header and the list of keys contained in hsimple.root The hpx key is open, showing the information describing the TH1F object in the file

 Finding a working implementation of zlib in JavaScript was not easy, but finally found a working version of zlib’s inflate function (didn’t check for lzma yet)  Then R__unzip and R__unzip_header have been implemented in JavaScript, using rawinflate.js for the decompression

Screenshot of an inflated buffer as represented in the html test page (here the StreamerInfo). One can clearly see the strings (e.g. Class name and description)

 A TStreamerInfo object describes a persistent version of a class.TStreamerInfo  A ROOT file contains the list of TStreamerInfo objects for all the class versions written to this file.ROOTTStreamerInfo  A TStreamerInfo is a list of TStreamerElement objects (one per data member or base class).TStreamerInfoTStreamerElement

 Most of the development has been achieved by running in parallel the JavaScript debugger and the Visual Studio debugger  After very valuable help from Philippe, the streamer info finally released (almost) all its secrets and is now partially displayed in the test web page

Screenshot of a decoded streamer info structure, as represented in the html test page (only relevant information is displayed)

 For the time being, the object’s streamers are hard-coded and will have to be updated with class version changes  Actually (partially) supported classes are TH1, TH2, TProfile (not displayed yet), and TGraph  A JavaScript charting library (HighCharts) is used to display the histograms and graphs (

Displaying a TH1F with its attributes (e.g. fill color) from fillrandom.root

Displaying a TH2F (scatter plot only) from hsimple.root

Displaying a simple TGraph

 Offering a very simple API to the user:  Could be internally complex (but powerful): f = new JSROOTIO.RootFile(url); histo = f.ReadHistogram(histo_name); if (typeof(histo) != 'undefined') displayHistogram(histo); clRef = streamerInfo.ReadClass(str, o); histo = eval('new JSROOTIO.' + clRef['name'] + '()'); if (typeof histo != 'undefined' && typeof histo.Streamer == 'function') histo.Streamer(str, o);

 Apparently Opera doesn't support byte range HTTP requests, but we can live with(out) it  Safari has several issues (bug report should be filled soon)  Doesn’t work on Android (not yet)...

 Make it working on Android  Directory handling inside files  Implement dynamic streamers (automatically generated from the streamer info)  Support as many browsers as possible  Graphics side: Implement THistPainter?