Skip to content

Commit 8031466

Browse files
committed
Use full path in JSROOT reference
1 parent aac93f3 commit 8031466

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

docs/JSROOT.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ To automate files loading and objects drawing, one can provide number of URL par
7676

7777
For instance:
7878

79-
- <https://root.cern/js/latest/?file=../files/hsimple.root&item=hpx;1>
80-
- <https://root.cern/js/latest/?file=../files/hsimple.root&nobrowser&item=hpxpy;1&opt=colz>
81-
- <https://root.cern/js/latest/?file=../files/hsimple.root&noselect&layout=grid2x2&item=hprof;1>
79+
- <https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=hpx;1>
80+
- <https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&nobrowser&item=hpxpy;1&opt=colz>
81+
- <https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&noselect&layout=grid2x2&item=hprof;1>
8282

8383
Following layouts are supported:
8484

@@ -224,9 +224,9 @@ One can change some histograms colors using draw options:
224224

225225
- `line_N` [line color](https://root.cern/js/latest/examples.htm#th1_line_n)
226226
- `fill_N` [fill color](https://root.cern/js/latest/examples.htm#th1_fill_n)
227-
- `htitle:value` [histogram title](https://jsroot.gsi.de/dev/examples.htm#th1_htitle)
228-
- `xaxis_N` [X axis color](https://jsroot.gsi.de/dev/examples.htm#th1_xaxis_n)
229-
- `yaxis_N` [Y axis color](https://jsroot.gsi.de/dev/examples.htm#th1_yaxis_n)
227+
- `htitle:value` [histogram title](https://root.cern/js/latest/examples.htm#th1_htitle)
228+
- `xaxis_N` [X axis color](https://root.cern/js/latest/examples.htm#th1_xaxis_n)
229+
- `yaxis_N` [Y axis color](https://root.cern/js/latest/examples.htm#th1_yaxis_n)
230230

231231
One also can modify histogram axes attributes by following option:
232232
- `ctx` center title of X axis
@@ -245,7 +245,7 @@ One also can modify histogram axes attributes by following option:
245245
- `ytitle:value` set title for Y axis
246246
- `ztitle:value` set title for Z axis
247247

248-
Here N can be existing ROOT color index or hex6/hex8 values like [line_ff00ff](https://jsroot.gsi.de/dev/?nobrowser&file=../files/hsimple.root&item=hpx;1&opt=line_ff00ff) or [fill_7733ff34](https://jsroot.gsi.de/dev/?nobrowser&file=../files/hsimple.root&item=hpx;1&opt=fill_7733ff34).
248+
Here N can be existing ROOT color index or hex6/hex8 values like [line_ff00ff](https://root.cern/js/latest/?nobrowser&file=https://root.cern/js//files/hsimple.root&item=hpx;1&opt=line_ff00ff) or [fill_7733ff34](https://root.cern/js/latest/?nobrowser&file=https://root.cern/js//files/hsimple.root&item=hpx;1&opt=fill_7733ff34).
249249

250250

251251
There are special JSROOT draw options which only can be used with for `TCanvas` or `TPad` objects:
@@ -281,39 +281,39 @@ There are special JSROOT draw options which only can be used with for `TCanvas`
281281

282282
In the URL string one could use "+" sign to specify objects superposition:
283283

284-
- [item=hpx+hprof](https://root.cern/js/latest/?file=../files/hsimple.root&item=hpx+hprof)
284+
- [item=hpx+hprof](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=hpx+hprof)
285285

286286
With similar syntax one could specify individual draw options for superimposed objects
287287

288-
- [item=hpx+hprof&opt=logy+hist](https://root.cern/js/latest/?file=../files/hsimple.root&item=hpx+hprof&opt=logy+hist)
288+
- [item=hpx+hprof&opt=logy+hist](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=hpx+hprof&opt=logy+hist)
289289

290290
Here "logy" option will be used for "hpx1" item and "hist" option for "hprof;1" item.
291291

292292
While draw option can include "+" sign itself, for superposition one could specify arrays of items and draw options like:
293293

294-
- [item=[hpx;1,hprof;1]&opt=[logy,hist]](https://root.cern/js/latest/?file=../files/hsimple.root&item=[hpx;1,hprof;1]&opt=[logy,hist])
294+
- [item=[hpx;1,hprof;1]&opt=[logy,hist]](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=[hpx;1,hprof;1]&opt=[logy,hist])
295295

296296

297297
## TTree draw
298298

299299
JSROOT provides possibility to display TTree data, using [TTree::Draw](https://root.cern/doc/master/classTTree.html) syntax:
300300

301-
- [opt=px](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple;1&opt=px)
302-
- [opt=px:py](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple;1&opt=px:py)
303-
- [opt=px:py:pz](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple;1&opt=px:py:pz)
301+
- [opt=px](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple;1&opt=px)
302+
- [opt=px:py](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple;1&opt=px:py)
303+
- [opt=px:py:pz](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple;1&opt=px:py:pz)
304304

305305
It is also possible to use branch by id number specifying name like "br_0", "br_1" and so on:
306306

307-
- [opt=br_0:br_1](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=br_0:br_1)
307+
- [opt=br_0:br_1](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=br_0:br_1)
308308

309309
Histogram ranges and binning defined after reading first 1000 entries from the tree.
310310
Like in ROOT, one could configure histogram binning and range directly:
311311

312-
- [opt=px:py>>h(50,-5,5,50,-5,5)](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=px:py>>h%2850,-5,5,50,-5,5%29)
312+
- [opt=px:py>>h(50,-5,5,50,-5,5)](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=px:py>>h%2850,-5,5,50,-5,5%29)
313313

314314
One and two dimensional draw expressions can be resulted into TGraph object, using ">>Graph" as output:
315315

316-
- [opt=px:py>>Graph](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=px:py>>Graph)
316+
- [opt=px:py>>Graph](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=px:py>>Graph)
317317

318318
For any integer value one can accumulate histogram with value bits distribution, specifying as output ">>bits(16)" or ">>bits":
319319

@@ -325,34 +325,34 @@ There is special handling of TBits objects:
325325

326326
It is allowed to use different expressions with branch values:
327327

328-
- [opt=px+py:px-py](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=px+py:px-py)
328+
- [opt=px+py:px-py](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=px+py:px-py)
329329

330330
Such expression can include arithmetical operations and all methods, provided in JavaScript [Math](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math) class:
331331

332-
- [opt=Math.abs(px+py)](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=Math.abs%28px+py%29)
332+
- [opt=Math.abs(px+py)](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=Math.abs%28px+py%29)
333333

334334
In the expression one could use "Entry$" and "Entries$" variables.
335335

336336
One also could specify cut condition, separating it with "::" from the rest draw expression like:
337337

338-
- [opt=px:py::pz>5](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=px:py::pz>5)
338+
- [opt=px:py::pz>5](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=px:py::pz>5)
339339

340340
Contrary to the normal ROOT, JSROOT allows to use "(expr?res1:res2)" operator (placed into brackets):
341341

342-
- [opt=px:py::(pz>5?2:1)](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=px:py::%28pz>5?2:1%29)
342+
- [opt=px:py::(pz>5?2:1)](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=px:py::%28pz>5?2:1%29)
343343

344344
It is possible to "dump" content of any branch (by default - first 10 entries):
345345

346-
- [item=ntuple/px&opt=dump](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple/px&opt=dump)
346+
- [item=ntuple/px&opt=dump](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple/px&opt=dump)
347347

348348
Or one could dump values produced with draw expression (also first 10 entries by default):
349349

350-
- [opt=px:py::pz>>dump](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=px:py::pz>>dump)
350+
- [opt=px:py::pz>>dump](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=px:py::pz>>dump)
351351

352352
One also can dump list of entries which match cut expression and use these entries ids to perform other draw operations:
353353

354-
- [opt=::pz>5>>elist](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=::pz>5>>elist)
355-
- [opt=px:py;elist:[7..12,20,35..49]](https://root.cern/js/latest/?file=../files/hsimple.root&item=ntuple&opt=px:py;elist:[7..12,20,35..49])
354+
- [opt=::pz>5>>elist](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=::pz>5>>elist)
355+
- [opt=px:py;elist:[7..12,20,35..49]](https://root.cern/js/latest/?file=https://root.cern/js/files/hsimple.root&item=ntuple&opt=px:py;elist:[7..12,20,35..49])
356356

357357
Working with array indexes is supported. By default, all elements in array are used for the drawing.
358358
One could specify index for any array dimension (-1 means last element in the array). For instance, dump last element from `event.fTracks` array:
@@ -388,8 +388,8 @@ Example - [opt=event.fTracks[].fTriggerBits;entries:1000;first:200;maxrange:25](
388388

389389
JSROOT implements display of TGeo objects like:
390390

391-
- [file=rootgeom.root&item=simple1](https://root.cern/js/latest/?file=../files/geom/rootgeom.root&item=simple1)
392-
- [file=building.root&item=geom&opt=z](https://root.cern/js/latest/?nobrowser&file=../files/geom/building.root&item=geom;1&opt=z)
391+
- [file=rootgeom.root&item=simple1](https://root.cern/js/latest/?file=https://root.cern/js/files/geom/rootgeom.root&item=simple1)
392+
- [file=building.root&item=geom&opt=z](https://root.cern/js/latest/?nobrowser&file=https://root.cern/js/files/geom/building.root&item=geom;1&opt=z)
393393

394394
Following classes are supported by geometry viewer:
395395
- TGeoVolume
@@ -444,11 +444,11 @@ In the URL string several global settings can be changed:
444444

445445
It is possible to display only part of geometry model. For instance, one could select sub-item like:
446446

447-
- [file=rootgeom.root&item=simple1/TOP/REPLICA_1](https://root.cern/js/latest/?file=../files/geom/rootgeom.root&item=simple1/TOP/REPLICA_1)
447+
- [file=rootgeom.root&item=simple1/TOP/REPLICA_1](https://root.cern/js/latest/?file=https://root.cern/js/files/geom/rootgeom.root&item=simple1/TOP/REPLICA_1)
448448

449449
Or one can use simple selection syntax (work only with first-level volumes):
450450

451-
- [item=simple1&opt=-bar1-bar2](https://root.cern/js/latest/?file=../files/geom/rootgeom.root&item=simple1;1&opt=-bar1-bar2)
451+
- [item=simple1&opt=-bar1-bar2](https://root.cern/js/latest/?file=https://root.cern/js/files/geom/rootgeom.root&item=simple1;1&opt=-bar1-bar2)
452452

453453
Syntax uses '+' sign to enable visibility flag of specified volume and '-' sign to disable visibility.
454454
One could use wildcard symbol like '+TUBE1*'.
@@ -489,7 +489,7 @@ Example of major LHC detectors:
489489
* LHCb: [full](https://root.cern/js/latest/?file=https://root.cern/files/lhcbfull.root&item=Geometry;1&opt=all;dflt)
490490

491491
Other detectors examples:
492-
* HADES: [full](https://root.cern/js/latest/?file=https://root.cern/files/hades2.root&item=CBMGeom;1&opt=all;dflt), [preselected](https://root.cern/js/latest/?json=../files/geom/hades.json.gz)
492+
* HADES: [full](https://root.cern/js/latest/?file=https://root.cern/files/hades2.root&item=CBMGeom;1&opt=all;dflt), [preselected](https://root.cern/js/latest/?json=https://root.cern/js/files/geom/hades.json.gz)
493493
* BABAR: [full](https://root.cern/js/latest/?file=https://root.cern/files/babar.root&item=babar;1&opt=macro:https://root.cern/files/babar_all.C), [emca](https://root.cern/js/latest/?file=https://root.cern/files/babar.root&item=babar;1&opt=macro:https://root.cern/files/babar_emca.C)
494494
* STAR: [full](https://root.cern/js/latest/?file=https://root.cern/files/star.root&item=star;1&opt=macro:https://root.cern/files/star_all.C;clipxyz), [svtt](https://root.cern/js/latest/?file=https://root.cern/files/star.root&item=star;1&opt=macro:https://root.cern/files/star_svtt.C)
495495
* D0: [full](https://root.cern/js/latest/?file=https://root.cern/files/d0.root&item=d0;1&opt=clipxyz)
@@ -500,7 +500,7 @@ Other detectors examples:
500500
Together with geometry one could display tracks (TEveTrack) and hits (TEvePointSet, TPolyMarker3D) objects.
501501
Either one do it interactively by drag and drop, or superimpose drawing with `+` sign like:
502502

503-
- [item=simple_alice.json.gz+tracks_hits.root/tracks+tracks_hits.root/hits](https://root.cern/js/latest/?nobrowser&json=../files/geom/simple_alice.json.gz&file=../files/geom/tracks_hits.root&item=simple_alice.json.gz+tracks_hits.root/tracks+tracks_hits.root/hits)
503+
- [item=simple_alice.json.gz+tracks_hits.root/tracks+tracks_hits.root/hits](https://root.cern/js/latest/?nobrowser&json=https://root.cern/js/files/geom/simple_alice.json.gz&file=https://root.cern/js/files/geom/tracks_hits.root&item=simple_alice.json.gz+tracks_hits.root/tracks+tracks_hits.root/hits)
504504

505505

506506
There is a problem of correct rendering of transparent volumes. To solve problem in general is very expensive (in terms of computing power), therefore several approximation solution can be applied:
@@ -623,7 +623,7 @@ therefore there is no guarantee that the file content is not changed/replaced be
623623

624624
If somebody still wants to use monitoring of data from ROOT files, could try link like:
625625

626-
- <https://root.cern/js/latest/?nobrowser&file=../files/hsimple.root+&item=hpx;1&monitoring=2000>
626+
- <https://root.cern/js/latest/?nobrowser&file=https://root.cern/js/files/hsimple.root+&item=hpx;1&monitoring=2000>
627627

628628
In this particular case, the histogram is not changing.
629629

0 commit comments

Comments
 (0)