PAFWeb: A new way to interact with ROOT (and PAF) Javier Delgado - - PowerPoint PPT Presentation

pafweb a new way to interact with root and paf
SMART_READER_LITE
LIVE PREVIEW

PAFWeb: A new way to interact with ROOT (and PAF) Javier Delgado - - PowerPoint PPT Presentation

PAFWeb: A new way to interact with ROOT (and PAF) Javier Delgado Fernandez CERN javier.delgado.fernandez@cern.ch 1 / 20 PAFWeb and PAF PAFWeb PAF It is a web application It is a C++ framework Provides all the tools


slide-1
SLIDE 1

PAFWeb: A new way to interact with ROOT (and PAF)

Javier Delgado Fernandez

CERN

javier.delgado.fernandez@cern.ch

1 / 20

slide-2
SLIDE 2

PAFWeb and PAF

PAFWeb

◮ It is a web application ◮ Provides all the tools

needed for data analysis

◮ Graphical interactive

interface for all common actions

◮ Based on PAF ◮ It is a personal project

developed in my free time PAF

◮ It is a C++ framework ◮ Interaction through C++

code

◮ It only depends on the

ROOT Framework

◮ It provides a framework to

analyze data

◮ Developed in collaboration

with the U. Oviedo and IFCA

2 / 20

slide-3
SLIDE 3

PAF and ROOT (I)

PAF

◮ Defined workflow. The

user only needs to follow the steps

◮ Lazy loading of branches in

an easy way to use it

◮ Different execution

environments (PROOF Lite, PoD, PROOF Cloud, sequential, ...) abstracted and implemented

◮ Modular analysis supported ◮ Message and information

passing mechanism implemented ROOT

◮ Freedom. It allows you to

create your own analysis structure

◮ Steep learning curve ◮ User needs to know and

develop some technical aspects that are not related directly with the analysis process

3 / 20

slide-4
SLIDE 4

PAF and ROOT (and II) - Common parts

4 / 20

slide-5
SLIDE 5

Lets talk about PAFWeb

5 / 20

slide-6
SLIDE 6

PAFWeb briefly (I)

◮ Integrated development environment (Based on web

application) for ROOT data analysis (based on PAF)

◮ Code editor with syntax highlighting and real autocompletion ◮ Project configuration through a graphical user interface ◮ Execution of the project (compiles and runs the code) with

real time feedback

◮ Results (histograms) automatically displayed in the web

browser (thanks to ROOTJS)

6 / 20

slide-7
SLIDE 7

PAFWeb briefly (and II)

◮ Debuger to inspect the code ◮ Integrated profiler to analyse code performance ◮ Version control system: Important also to maintain integrity

for long projects

◮ And everything through a web user interface. Backend

running somewhere else, not in your laptop or desktop

7 / 20

slide-8
SLIDE 8

PAFWeb current technology

◮ Flask (Python) as web framework with SQLAlchemy ◮ WebSockets based on Socket.IO library ◮ ReactJS and jQuery to make the view interactive ◮ Codemirror provides the built-in code editor ◮ D3 to generate some charts ◮ Showing the histograms with ROOTJS ◮ PostgreSQL as database ◮ GDB, Valgrind Callgrind, Docker, PAF and ROOT to execute

the code

8 / 20

slide-9
SLIDE 9

Current system overview

9 / 20

slide-10
SLIDE 10

Inside execution

10 / 20

slide-11
SLIDE 11

Execution

◮ Technology: ROOT, PAF and Docker (And GCC as compiler) ◮ The code runs inside an isolated container (Docker) ◮ You can visualize the current status or the logs of the

execution in real time

◮ Once the execution has ended, the results (diagrams) are

showed thanks to ROOTJS.

◮ A ROOT output file with the results is available for

downloading

11 / 20

slide-12
SLIDE 12

Debugging

◮ Technology: GDB ◮ Allows to inspect only your code, skipping internal objects

(std, ROOT, PAF)

◮ Real time interaction with evaluation of custom expressions ◮ You can close your browser and continue in any other moment

even using other devices with the same debugging session exactly where you left it

12 / 20

slide-13
SLIDE 13

Autocomplete

◮ Technology: libClang ◮ Autocompletion showed in the built-in editor ◮ Uses the real environment where your code is going to run.

This means that you have autocompletion with PAF, ROOT, std or the libraries that you are using.

13 / 20

slide-14
SLIDE 14

Profiler

◮ Technology: Valgrind Callgrind ◮ Profiles the CPU time to execute each part of your code ◮ Draws a zoomable D3 chart ◮ Filters a lot of data to show only useful information

14 / 20

slide-15
SLIDE 15

Where is it going? (I)

◮ Scalable application. ◮ No internet connection required. Just 2 GB of disk space for a

VM running standalone.

◮ More interactivity providing the best user experience possible. ◮ C++ for the backend and AngularJS for the frontend.

Permanent WebSocket connection communicating them.

◮ Documental database (MongoDB, ElasticSearch) instead of a

classical relation schema: they are faster for this application since the data is always denormalized with the same format.

15 / 20

slide-16
SLIDE 16

Where is it going? (and II)

◮ Integration with clasiccal tools: VIM, Emacs, SSHFS? ◮ The physicists don’t need to know about software engineering.

Tools are intended to solve problems, not to create them.

◮ Export: Work may be continued in an old-fashion terminal

way.

◮ Version control integrated with Git ◮ In my opinion, PAFWeb can become a great IDE to

complement ROOT.

16 / 20

slide-17
SLIDE 17

One more thing...

17 / 20

slide-18
SLIDE 18

LaTeX

◮ Integration with LaTeX. Specifying the execution ID you can

manipulate the objects inside the result ROOT file and draw them directly in your papers.

◮ You can use the full power of ROOT since it is based in

  • PyROOT. C++ version also planned.

◮ Always working through a powerful but easy to use web

application. \ begin {pafweb} [EXECUTION ID ] histogram = Get ( ‘MT‘ ) histogram . S e t F i l l C o l o r ( 42 ) Draw( histogram ) \end{pafweb}

18 / 20

slide-19
SLIDE 19

Conclusions

◮ PAFWeb provides a complete and intuitive ROOT data

analysis framework:

◮ Develop your code in the built-in editor ◮ Specify the analysis code and the data sample (set of ROOT

files)

◮ While you are waiting to see the results, see the progression

and the logs in real time

◮ Review your results

◮ Debug your code or profile it. The tools are ready, easy to use

and attractive.

◮ See the history of your code, your project or the samples

keeping always the integrity.

◮ But the application is being completely migrated to provide a

better solution.

19 / 20

slide-20
SLIDE 20

Thanks

Thanks you for your time and your attention. javier.delgado.fernandez@cern.ch Special thanks to Isidro Gonzalez Caballero (CMS-University of Oviedo) because of his motivation, help and support with theese

  • projects. And thanks also to the HEP department of University of

Oviedo for the resources provided.

20 / 20