Download presentation
Presentation is loading. Please wait.
Published byNoel Harrell Modified over 9 years ago
1
Web-based Access to ROOT at D-Zero Joel Snow Langston University/D0 Collaboration CHEP 2001 Displaying histograms dynamically generated by ROOT in a Web BrowserDisplaying histograms dynamically generated by ROOT in a Web Browser –ROOT histogram server program –Proxy CGI program invoked by a Web server from an HTML forms page –Virtual frame buffer X display
2
D-Zero Online Event Monitoring System Three Major ComponentsThree Major Components –Data Acquisition System –Monitoring programs Role Role ROOT use ROOT use Architecture Architecture –Graphical User Interface Joel Snow Langston University/D0 Collaboration CHEP 2001
3
D0 Run II Online Event Monitoring Architecture D0 Run II Online Event Monitoring Architecture
4
Monitoring Executables (Examines) Detector performance Physics Objects - e 's, 's, jets Unpack raw data from DAQUnpack raw data from DAQ Reconstruct each event to the required levelReconstruct each event to the required level Define and fill necessary histogramsDefine and fill necessary histograms Joel Snow Langston University/D0 Collaboration CHEP 2001
5
D-Zero Online Use of ROOT Main analysis tool for the ExaminesMain analysis tool for the Examines The results are stored in memory in ROOT object format ( TFile, TDirectory, THx, TNtuple, TTree, …)The results are stored in memory in ROOT object format ( TFile, TDirectory, THx, TNtuple, TTree, …) The main mode of accessing the results is to browse the objects in the monitoring program's memory with a ROOT GUI via socket connections. ( TGxxx, TSocket, TServerSocket, TMonitor, …)The main mode of accessing the results is to browse the objects in the monitoring program's memory with a ROOT GUI via socket connections. ( TGxxx, TSocket, TServerSocket, TMonitor, …) Joel Snow Langston University/D0 Collaboration CHEP 2001
6
Examine Architecture Examines are built under a fully asynchronous interactive C++ framework.Examines are built under a fully asynchronous interactive C++ framework. An Examine consists of a main analysis thread and a communications thread.An Examine consists of a main analysis thread and a communications thread. The communications thread functions as a histogram server with the possibly numerous GUI's as clients.The communications thread functions as a histogram server with the possibly numerous GUI's as clients. The clients remotely browse available histograms and select which to display.The clients remotely browse available histograms and select which to display. The server makes them available to the clients over the network.The server makes them available to the clients over the network. Joel Snow Langston University/D0 Collaboration CHEP 2001
7
What it is and is not Makes dynamic data available to a larger audience while requiring no exotic software on the user's part.Makes dynamic data available to a larger audience while requiring no exotic software on the user's part. Builds on the capabilities of the existing histogram server of the D-Zero Examines.Builds on the capabilities of the existing histogram server of the D-Zero Examines. Does NOT allow all the wonderful interactive features of a ROOT histogram on a ROOT canvas. It merely allows the histogram image as rendered on a TCanvas to be displayed in a Web browser.Does NOT allow all the wonderful interactive features of a ROOT histogram on a ROOT canvas. It merely allows the histogram image as rendered on a TCanvas to be displayed in a Web browser. Joel Snow Langston University/D0 Collaboration CHEP 2001
8
Scheme Web browser can easily display GIF files.Web browser can easily display GIF files. ROOT conveniently can produce GIF files.ROOT conveniently can produce GIF files. Browser can communicate with a Web server CGI program.Browser can communicate with a Web server CGI program. CGI program can be a client of a histogram server.CGI program can be a client of a histogram server. CGI program can render histograms, produces GIF files, send them to browser.CGI program can render histograms, produces GIF files, send them to browser. CGI program on the web server acts as a proxy for the Web browser when communicating with the histogram server. Joel Snow Langston University/D0 Collaboration CHEP 2001
9
Problem For ROOT to make a GIF file it needs for the histogram to be rendered on a graphical display.For ROOT to make a GIF file it needs for the histogram to be rendered on a graphical display. It is not practical or desirable for a CGI program on a Web server to utilize a graphical console for display to render the histograms.It is not practical or desirable for a CGI program on a Web server to utilize a graphical console for display to render the histograms. For Linux and perhaps other OS there is an X display driver that uses only memory and no hardware.For Linux and perhaps other OS there is an X display driver that uses only memory and no hardware. The Virtual Frame Buffer driver (VFB) is the key to making this scheme work. The Virtual Frame Buffer driver (VFB) is the key to making this scheme work. Joel Snow Langston University/D0 Collaboration CHEP 2001
10
Mechanics The user just needs a graphical Web browser.The user just needs a graphical Web browser. On the web server machine:On the web server machine: –The VFB driver must be running (e.g. Xvfb :1&) –In the web server's CGI directory must be the CGI proxy program. A stand alone ROOT based program that can decode CGI forms and communicate with the histogram server.A stand alone ROOT based program that can decode CGI forms and communicate with the histogram server. –A directory that the CGI proxy program can write to. The HTML image marker looks for a file on disk and ROOT writes the GIF to a file.The HTML image marker looks for a file on disk and ROOT writes the GIF to a file. A machine running a histogram server. Joel Snow Langston University/D0 Collaboration CHEP 2001
11
Implementation Examine programs running on Linux PC’s provide histogram server.Examine programs running on Linux PC’s provide histogram server. Web server is another Linux PC running Apache.Web server is another Linux PC running Apache. In the server's cgi-bin directory is a script which sets up the environment (X display, Path, ROOT) for the C++ CGI proxy program and then exec's it. The script can detect whether the VFB is running and if it is not then inform the user.In the server's cgi-bin directory is a script which sets up the environment (X display, Path, ROOT) for the C++ CGI proxy program and then exec's it. The script can detect whether the VFB is running and if it is not then inform the user. –The CGI proxy program uses the ROOT WriteGif code as a method in a canvas class inheriting from TCanvas. In this way the rendered canvases can “gifify” themselves without user intervention, a must for a CGI program. Netscape or Internet Explorer running on a third machine.Netscape or Internet Explorer running on a third machine. Joel Snow Langston University/D0 Collaboration CHEP 2001
12
Operation I The user points Web browser to an Examine URL. The page contains an HTML form allowing the user to choose which Examine to connect to.The user points Web browser to an Examine URL. The page contains an HTML form allowing the user to choose which Examine to connect to. When the selection is made the CGI program decodes the form and connects to the waiting Examine. If no Examine is listening an error page is sent to the user's browser.When the selection is made the CGI program decodes the form and connects to the waiting Examine. If no Examine is listening an error page is sent to the user's browser. The proxy requests a listing of the available histograms which the server sends to the proxy.The proxy requests a listing of the available histograms which the server sends to the proxy. The proxy receives this info and makes an HTML page with a form containing a series of selection boxes, one for each TDirectory in the TFiles in the Examine. The boxes list the keys in the directory. The keys correspond to histograms, sub-directories, TTrees, and TNuples. The proxy receives this info and makes an HTML page with a form containing a series of selection boxes, one for each TDirectory in the TFiles in the Examine. The boxes list the keys in the directory. The keys correspond to histograms, sub-directories, TTrees, and TNuples. Joel Snow Langston University/D0 Collaboration CHEP 2001
13
Operation II The user selects which histograms in a directory to display and submits the form to the CGI proxy.The user selects which histograms in a directory to display and submits the form to the CGI proxy. This is decoded and a request is sent for those histograms to the histogram server.This is decoded and a request is sent for those histograms to the histogram server. When they arrive at the proxy, the histograms are rendered on canvases in the VFB and those canvases write themselves out as GIF files to the temporary directory.When they arrive at the proxy, the histograms are rendered on canvases in the VFB and those canvases write themselves out as GIF files to the temporary directory. The proxy sends to the browser an HTML page with the just written GIF files as the sources for image markers, thus delivering the ROOT histograms to the user's browser.The proxy sends to the browser an HTML page with the just written GIF files as the sources for image markers, thus delivering the ROOT histograms to the user's browser. Joel Snow Langston University/D0 Collaboration CHEP 2001
14
CFT SMT MUON Netscape Joel Snow Langston University/D0 Collaboration CHEP 2001 Examine Histogram Servers Web Browsers Virtual Frame Buffer Disk Web Server Netscape Internet Explorer Data Flow
15
Presently Only histograms from one directory at a time can be shown on a page. The directory is chosen via radio select buttons in the form.Only histograms from one directory at a time can be shown on a page. The directory is chosen via radio select buttons in the form. TNuples and TTrees cannot be displayed.TNuples and TTrees cannot be displayed. Histogram updating can be accomplished simply by a browser page reload.Histogram updating can be accomplished simply by a browser page reload. The user interface in the Web browser is plain HTML. It could be enhanced with Java or Javascript.The user interface in the Web browser is plain HTML. It could be enhanced with Java or Javascript. The ergonomics of the Web interface could benefit from some time devoted to adding some bells and whistles features.The ergonomics of the Web interface could benefit from some time devoted to adding some bells and whistles features. Joel Snow Langston University/D0 Collaboration CHEP 2001
16
Summary D-Zero online monitoring histograms may be browsed via the WebD-Zero online monitoring histograms may be browsed via the Web Built on the existing Root based histogram serverBuilt on the existing Root based histogram server New CGI Root based client in addition to existing Root based GUI clientNew CGI Root based client in addition to existing Root based GUI client Uses Virtual Frame Buffer X display to render graphicsUses Virtual Frame Buffer X display to render graphics Joel Snow Langston University/D0 Collaboration CHEP 2001
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.