Skip to content

Commit 53a419d

Browse files
committed
In all TGeo examples use URL mode to demonstrate model browsing
1 parent ee41e03 commit 53a419d

File tree

1 file changed

+31
-27
lines changed

1 file changed

+31
-27
lines changed

docs/examples.htm

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ <h1 id="version"><a href=".." style="color:green">JSROOT</a></h1>
229229
{ opt: "glcol", file: "histpainter6.root", item: "glvoxel", title: "draw semi-transparent boxes with color derived from bin content" }
230230
],
231231
TTree : [
232-
{ name: "Draw", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px", title: "Histogram data of TBranch object" },
233-
{ name: "2d", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py", title: "Two-dimensional TTree::Draw" },
234-
{ name: "3d", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py:pz", title: "Three-dimensional TTree::Draw" },
235-
{ name: "dump", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px+py+pz>>dump;num:30", title: "Three-dimensional TTree::Draw" },
236-
{ name: "hist", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py>>hist(50,-5,5,50,-5,5)", title: "TTree::Draw into custom histogram" },
237-
{ name: "cut", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py::pz>5", title: "TTree::Draw with cut condition" },
238-
{ name: "player", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py::pz>5;player", title: "Enable player to let change draw expression" },
232+
{ name: "Draw", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px", title: "Histogram data of TBranch object" },
233+
{ name: "2d", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py", title: "Two-dimensional TTree::Draw" },
234+
{ name: "3d", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py:pz", title: "Three-dimensional TTree::Draw" },
235+
{ name: "dump", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px+py+pz>>dump;num:30", title: "Three-dimensional TTree::Draw" },
236+
{ name: "hist", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py>>hist(50,-5,5,50,-5,5)", title: "TTree::Draw into custom histogram" },
237+
{ name: "cut", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py::pz>5", title: "TTree::Draw with cut condition" },
238+
{ name: "player", asurl: true, file: "hsimple.root", item: "ntuple", opt: "px:py::pz>5;player", title: "Enable player to let change draw expression" },
239239
{ name: "lhcb2", asurl: true, file: "https://root.cern/files/lhcb2.root", item: "E;1//Event/Gen/Header/m_evtNumber", title: "Histogram data of sub-sub-branches from lhcb2.root file" },
240240
{ name: "atlas", asurl: true, file: "https://root.cern/files/atlas30new.root", item: "CollectionTree", opt: "TileMuContainer_p1_TileMuObj.vector.m_phi", title: "Histogram data of tree from atlas30new.root file" },
241241
{ name: "expr", asurl: true, file: "WJets.root", opt: "TMath::Abs(lep1_p4.M())", item: "t", title: "Use of expression and object methods" },
@@ -270,17 +270,17 @@ <h1 id="version"><a href=".." style="color:green">JSROOT</a></h1>
270270
{ name:"2d+3d", file: "mix2d3d.root", item: "Canvas;1", title: "Mixture of 2D and 3D drawings on the same canvas (work properly in Firefox and Chrome)" }
271271
],
272272
TGeo : [
273-
{ name:"logo", file: "geom/rootgeom.root", item: "simple1;1", title:"Geometry from rootgeom.C example" },
273+
{ name:"logo", asurl: true, file: "geom/rootgeom.root", item: "simple1;1", title:"Geometry from rootgeom.C example" },
274274
{ name:"prim", url: "?nobrowser&file=" + filepath + "geom/geodemo.root+&layout=vert333&items=[box,para,arb8,trap,gtra,trd1,trd2,xtru]&opts=[a,a,a,a,a,a,a,a,a]", title:"Basic TGeo primitives from tutorials/geom/geodemo.C" },
275275
{ name:"prim2", url: "?nobrowser&file=" + filepath + "geom/geodemo.root+&layout=grid3x3&items=[cone,coneseg,tube,tubeseg,ctub,eltu,pcon,pgon]&opts=[a,a,a,a,a,a,a,a]", title:"Basic TGeo primitives, group 2" },
276276
{ name:"prim3", url: "?nobrowser&file=" + filepath + "geom/geodemo.root+&layout=grid3x2&items=[sphere,torus,parab,hype,comp]&opts=[a,a,a,a,a]", title:"Basic TGeo primitives, group 3" },
277277
{ name:"comp", url: "?nobrowser&file=" + filepath + "geom/geodemo.root+&layout=grid2x2&items=[comp;1/Left,comp;1/Right,comp;1,comp;1]&opts=[axis,axis,compaaxis,axis]", title:"Components of composite shape" },
278-
{ name:"building", file: "geom/building.root", item: "geom;1", opt: "allz", title: "Geometry from tutorials/geom/building.C" },
279-
{ name:"alice", file: "https://root.cern/files/alice2.root", item: "Geometry;1", opt: "macro:https://root.cern/js/files/geomAlice.C", title: "ALICE geometry" },
280-
{ name:"atlas", file: "https://root.cern/files/atlas.root", item: "atlas;1", opt: "dflt_colors", title:"ATLAS geometry" },
281-
{ name:"cms", file: "https://root.cern/files/cms.root", item: "cms;1", opt: "macro:https://root.cern/files/cms_cmse.C;clipxyz", title: "CMS geomtery" },
282-
{ name:"lhcb", file: "https://root.cern/files/lhcbfull.root", item: "Geometry;1", opt: "all;dflt_colors", title: "LHCb geometry" },
283-
{ name:"eve", json: "geom/evegeoshape.json.gz", title: "Example of drawing snapshot of volumes from EVE" },
278+
{ name:"building", asurl: true, file: "geom/building.root", item: "geom;1", opt: "allz", title: "Geometry from tutorials/geom/building.C" },
279+
{ name:"alice", asurl: true, file: "https://root.cern/files/alice2.root", item: "Geometry;1", opt: "macro:https://root.cern/js/files/geomAlice.C", title: "ALICE geometry" },
280+
{ name:"atlas", asurl: true, file: "https://root.cern/files/atlas.root", item: "atlas;1", opt: "dflt_colors", title:"ATLAS geometry" },
281+
{ name:"cms", asurl: true, file: "https://root.cern/files/cms.root", item: "cms;1", opt: "macro:https://root.cern/files/cms_cmse.C;clipxyz", title: "CMS geomtery" },
282+
{ name:"lhcb", asurl: true, file: "https://root.cern/files/lhcbfull.root", item: "Geometry;1", opt: "all;dflt_colors", title: "LHCb geometry" },
283+
{ name:"eve", asurl: true, json: "geom/evegeoshape.json.gz", title: "Example of drawing snapshot of volumes from EVE" },
284284
{ name:"tracks", url: "?nobrowser&json=" + filepath + "geom/evegeoshape.json.gz&file=" + filepath + "geom/eve_tracks.root&item=evegeoshape.json.gz+eve_tracks.root/tracks;1", title:"Overlap of geometry with tracks, read from separate file" },
285285
{ name:"tracks+hits", url: "?nobrowser&json=" + filepath + "geom/simple_alice.json.gz&file=" + filepath + "geom/tracks_hits.root&item=simple_alice.json.gz+tracks_hits.root/tracks;1+tracks_hits.root/hits;1", title:"Overlap of simple ALICE geometry with tracks and hits, read from separate file" }
286286
],
@@ -428,17 +428,17 @@ <h1 id="version"><a href=".." style="color:green">JSROOT</a></h1>
428428
{ name: "multi", file: "general.root", item: "canvas_0;1", title: "many superimposed histograms and graphs" }
429429
],
430430
TGeo : [
431-
{ name: "atlas_cryo", file: "https://root.cern/files/atlas.root", item: "atlas;1", opt: "macro:https://root.cern/files/atlas_cryo.C" },
432-
{ name: "atlas_simple", json: "geom/simple_atlas.json.gz" },
433-
{ name: "star", json: "geom/star_svtt.json.gz" },
434-
{ name: "hades", json: "geom/hades.json.gz" },
435-
{ name: "babar", json: "geom/babar_emca.json.gz" },
436-
{ name: "alice_simple", json: "geom/simple_alice.json.gz", title: "simple alice geomtery" },
431+
{ name: "atlas_cryo", asurl: true, file: "https://root.cern/files/atlas.root", item: "atlas;1", opt: "macro:https://root.cern/files/atlas_cryo.C" },
432+
{ name: "atlas_simple", asurl: true, json: "geom/simple_atlas.json.gz" },
433+
{ name: "star", asurl: true, json: "geom/star_svtt.json.gz" },
434+
{ name: "hades", asurl: true, json: "geom/hades.json.gz" },
435+
{ name: "babar", asurl: true, json: "geom/babar_emca.json.gz" },
436+
{ name: "alice_simple", asurl: true, json: "geom/simple_alice.json.gz", title: "simple alice geomtery" },
437437
{ name: "Dipole", url: "?nobrowser&file=https://root.cern/files/alice2.root&item=Geometry;1/ALIC/Dipole_1", title: "Part of volumes from geo manager" },
438438
{ name: "count", file: "https://root.cern/files/alice2.root", item: "Geometry;1", opt: "count", title: "Count volume in large geomtery" },
439-
{ name: "tank", file: "https://root.cern/files/tank.root", item: "geom;1", opt: "z;rotate", title: "Just for fun" },
440-
{ name: "lego", file: "https://root.cern/files/lego.root", item: "geom;1", opt: "z;rotate", title: "Just for fun" },
441-
{ name: "cheon", file: "https://root.cern/files/cheongwadae.root", item: "geom;1", opt: "", title: "One more building" }
439+
{ name: "tank", asurl: true, file: "https://root.cern/files/tank.root", item: "geom;1", opt: "z;rotate", title: "Just for fun" },
440+
{ name: "lego", asurl: true, file: "https://root.cern/files/lego.root", item: "geom;1", opt: "z;rotate", title: "Just for fun" },
441+
{ name: "cheon", asurl: true, file: "https://root.cern/files/cheongwadae.root", item: "geom;1", opt: "", title: "One more building" }
442442
],
443443
TGraph : [
444444
{ name:"twopad", file:"graph_twopad.root", item: "c1;1", title: "two overlays pads with different axes" },
@@ -689,13 +689,17 @@ <h1 id="version"><a href=".." style="color:green">JSROOT</a></h1>
689689

690690
var prefix = (entry.asurl === "browser") ? "?" : "?nobrowser&";
691691

692-
if (entry.asurl)
693-
url = prefix + "file=" + filename + "&item=" + itemname;
692+
if (entry.asurl) {
693+
if (jsonname)
694+
url = prefix + 'json=' + jsonname;
695+
else
696+
url = prefix + "file=" + filename + "&item=" + itemname;
697+
}
694698

695-
if (url.length>0)
699+
if (url)
696700
aaa.href = jsroot_path + url;
697701
else
698-
if (jsonname.length>0)
702+
if (jsonname)
699703
aaa.href = jsroot_path + prefix + "json=" + jsonname;
700704
else
701705
aaa.href = jsroot_path + prefix + "file=" + filename + "&item=" + itemname;

0 commit comments

Comments
 (0)