JSROOT download ROOT file displayed in a web page

Hello,
we are developing a prototype for a web application that gathers Cosmic Ray data to produce a ROOT file (this with C++ code).

The ROOT file is then displayed with JSROOT in a web page where the user can interact with it using the standard tools provided by JSROOT (browser side).

It would be useful if the user could then be able to save (download) a ROOT file that would represent the original ROOT file plus the all the changes made by the user with JSROOT browser side.

So far we did not find a JSROOT api/function to achieve this, only a “save as PNG” link in the JSROOT menu for the displayed graph.

Please can you give us advice on the matter ?
Thanks a lot,
Cheers,
L.

Hi,

It would be useful if the user could then be able to save (download) a ROOT file that would represent the original ROOT file plus the all the changes made by the user with JSROOT browser side.

Such functionality not yet implemented in JSROOT.
There are many canvas/objects attributes, which could be interactively changed.
All together - one need possibility to store complete canvas after these changes.

Binary storage is not supported in JSROOT.
The only alternative - JSON files.
I could try to implement this for some basic use-cases,
but then you need to store such data on the server.

Regards,
Sergey

Hi,
thanks a lot for your prompt answer !
If with JSON we could collect the information about the original graphs and the main changes made by the user with JSROOT browser side, it would be great.
We look forward to your updates.
Thanks !
L.

Hi,

In JSROOT dev version I introduce new function called JSROOT.StoreJSON().
It allows to store shown objects in JSON. It is pure text representation and can be transferred to/from server, store there and so on.

JSON can be parsed with JSROOT.parse() function and resulted object used for drawing again.
Main canvas attributes (but not all) are preserved by this.

Example is here:

http://jsroot.gsi.de/dev/api.htm#custom_html_store_json

It is very first draft for the functionality - means many features may not work.
If you have any suggestions or problems - please let me know, that I could fix them.

Regards,
Sergey

Hi

thank you very much, reallyappreciated !

Hope this functionality will be implemented and maintained in production releases as weel, as it useful for sure !

Thanks again,

Cheers,

L.

Of course, development code every two-three months merged into master branch and released - once it is tested.

Hi, brilliant !

Thanks again,

Cheers,

L.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.