Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View ROOT files in your browser, with JavaScript #203

Open
RaoOfPhysics opened this issue Sep 14, 2014 · 23 comments
Open

View ROOT files in your browser, with JavaScript #203

RaoOfPhysics opened this issue Sep 14, 2014 · 23 comments

Comments

@RaoOfPhysics
Copy link
Member

@adavidzh pointed me to this: http://root.cern.ch/js/

@katilp, @tiborsimko, @tpmccauley: Do you think it's worth pointing to this from our records that have ROOT files? Could be a separate field. It will allow anyone to visualise the file without needing to download the VM or ROOT, which can be rather advantageous. Alternatively (as a long-term solution, perhaps?), we could potentially work with the developers to integrate a (slimmed-down?) version of this on the ODP, like the event display.

Just thinking out loud here. Feel free to chime in, @adavidzh.

@katilp
Copy link
Member

katilp commented Sep 14, 2014

I've heard of this last November at CHEP, it was really nice! At the time, there were some limitations
(if I'm mistaking, fitting was not possible, and some other elaboration),
which set some constraints on this really nice
possibility. If the things have evolved, we could indeed include it.
However, the point is that looking at the AOD file has little meaning on its own, further analysis
is anyhow required and to do something meaningful, one needs the cmssw framework and vm.

@tpmccauley
Copy link
Member

Yes, as @katilp points out, ROOT files in CMSSW format need CMSSW in order to know how to read and write the objects. This perhaps may be more appropriate for the top sample prepared by the CMS group from Hamburg which distilled down CMSSW data into ROOT ntuples.

@adavidzh
Copy link

I brought this up after looking around the issues and seeing some mention of displaying histograms. I think that in the documentation this would be a good way to avoid yet another layer between what people will see with root and what we show them in the documentation; i.e., the documentation can show exactly what they are supposed to get in their final analysis.

@tiborsimko
Copy link
Member

we could potentially work with the developers to integrate a (slimmed-down?) version of this on the ODP, like the event display

This was in our plans for Invenio (i.e. it may be useful for other Invenio based sites, not only ODP) but we have not got to doing that yet...

@tiborsimko tiborsimko added this to the v1.x milestone Sep 15, 2014
@tiborsimko
Copy link
Member

This perhaps may be more appropriate for the top sample prepared by the CMS group from Hamburg which distilled down CMSSW data into ROOT ntuples.

Now that basic histogramming is there, shall we revive this issue? @tpmccauley @katilp Are Hamborg files something we'd include in the portal?

@katilp
Copy link
Member

katilp commented Oct 3, 2014

All files that CMS has opened (now or earlier) should be available from the portal.
I still do not know where ther Hamburg root files reside... @tpmccauley , do you know?

@tpmccauley
Copy link
Member

If we want the files available I can provide an XML file for the collection.

@tpmccauley
Copy link
Member

The tar file at the bottom of the page:
http://ippog.web.cern.ch/resources/2012/cms-hep-tutorial
contains the .root files as well as some root .C scripts

@tiborsimko
Copy link
Member

Do we have some description? @pherterich Can you take care of creating a record for the Hamburg files?

tiborsimko pushed a commit that referenced this issue Nov 11, 2014
@tiborsimko
Copy link
Member

I'll now add FFT files...

@tiborsimko tiborsimko assigned tiborsimko and unassigned pherterich Nov 11, 2014
tiborsimko added a commit to tiborsimko/opendata.cern.ch that referenced this issue Nov 11, 2014
* Adds data files for Hamburg records and amends installation
  instructions accordingly.  (addresses cernopendata#203) (see PR cernopendata#493)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
@tiborsimko
Copy link
Member

The files are there, so we can start thinking of ROOT file visualisations. CC @jirikuncar

@jirikuncar
Copy link
Member

First step would be releasing “rootjs” as standalone javascript Bower package
(see http://bower.io/search/?q=ispy-online). Can I see the source code repository somewhere? Just be aware that there is already a javascript library called Root.js (https://github.com/optikalefx/RootJS).

During my quick look inside the code I have just seen hardcoded variables that might cause problems in http://root.cern.ch/js/scripts/JSRootInterface.js

// global variables
// source_dir is the variable defining where to take the scripts and the list tree icons
// To use the local ones (e.g. when checking out the files in a web server), just let it
// empty: var source_dir = "";
var source_dir = "http://root.cern.ch/js/";

@tiborsimko
Copy link
Member

Can I see the source code repository somewhere?

I believe this is the canonical home:

(BTW, see also https://github.com/rootpy for Pythonic bindings and WebOOT efforts)

@adavidzh
Copy link

I don't see hardcoded stuff at
https://github.com/root-mirror/root/blob/master/etc/http/scripts/JSRootInterface.js

but I may have not looked hard enough.

@tiborsimko
Copy link
Member

CC @bellenot @FonsRademakers

@jirikuncar
Copy link
Member

I don't see hardcoded stuff at
https://github.com/root-mirror/root/blob/master/etc/http/scripts/JSRootInterface.js

The deployed version is probably older.

@adavidzh are you planning to release it as a Bower package?

@tiborsimko
Copy link
Member

@adavidzh are you planning to release it as a Bower package?

(I CC-ed above @bellenot and @FonsRademakers who created rootjs)

@jirikuncar
Copy link
Member

The blocker for easy integration is here. Can we separate the javascript library to separate github repo and load dependencies using requirejs? (cc @bellenot or @FonsRademakers)

@Axel-Naumann
Copy link

Can you @bellenot and @jirikuncar meet for a hacking hour and get this done? I'll be serving the coffee.

@jirikuncar
Copy link
Member

@karies sure. I am available next week. Please write me an email to discuss details. Thanks

@linev
Copy link

linev commented Jun 18, 2015

Hi,
Development repository for JSROOT is https://github.com/linev/jsroot,
only after some testing code goes into ROOT repository.

Few weeks ago I tried to implement workaround for situation when require.js loaded on
the web page before JSROOT. Like this patch:
root-project/jsroot@e64a629

Open question is - could one use require.js functionality to load all required by JSROOT scripts?
First of all, it could be difficult - one should rewrite loadScript and AssertPrerequisites functions:
https://github.com/linev/jsroot/blob/master/scripts/JSRootCore.js#L404-L631
And second, require.js just one more script which should be loaded in advance (bootstrap?).

In simple case (drawing object from json file or http server) JSROOT loads only three scripts (including JSRootCore.js itself). Like:
http://web-docs.gsi.de/~linev/js/dev/demo/example_json.htm

@tiborsimko tiborsimko modified the milestones: someday, v1.x Jul 16, 2015
@suenjedt
Copy link
Member

@tiborsimko can I close this or do you want to keep it?

@linev
Copy link

linev commented Jul 17, 2017

Just update on JSROOT - now it fully supports require.js for scripts loading.

@suenjedt suenjedt assigned suenjedt and tiborsimko and unassigned suenjedt Aug 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants