Skip to content

Commit 327a0b4

Browse files
committed
Update JSROOT examples, tag as final 3.4 version
git-svn-id: https://subversion.gsi.de/dabc/trunk/plugins/root/js@3154 bcbf6573-9a26-0410-9ebc-ce4ab7aade96
1 parent c20bdf8 commit 327a0b4

File tree

5 files changed

+77
-44
lines changed

5 files changed

+77
-44
lines changed

demo/chep2015.htm

Lines changed: 66 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,49 +12,47 @@ <h2>THttpServer <a href="chep/httpserver.pdf">poster</a></h2>
1212
<br/>
1313
<hr/>
1414

15-
<a href="https://root.cern.ch/js/3.4/httpserver.C/?layout=grid2x2&items=[Files/job1.root/hpx,Files/job1.root/hpxpy,Files/job1.root/hprof,StreamerInfo]&opts=[hist,hist,e1,any]">User interface</a><br/>
16-
<img src="chep/http_ui.png" width="50%" height="50%"/><br/>
15+
<h3><a href="https://root.cern.ch/js/3.4/httpserver.C/?layout=grid2x2&items=[Files/job1.root/hpx,Files/job1.root/hpxpy,Files/job1.root/hprof,StreamerInfo]&opts=[hist,hist,e1,any]">User interface</a></h3>
16+
<img src="chep/http_ui.png" width="700" height="400"/><br/>
1717
<a href="http://bit.ly/1CsPhCm">http://bit.ly/1CsPhCm</a><br/>
1818
<img src="chep/http_ui_qr.jpg" width="150" height="150"/><br/>
1919
<br/>
2020
<hr/>
2121

22-
<a href="https://root.cern.ch/js/3.4/demo/hpx.json">JSON representation for the TH1</a><br/>
22+
<h3><a href="https://root.cern.ch/js/3.4/demo/hpx.json">JSON representation for the TH1</a></h3>
2323
<a href="http://bit.ly/1xinYu7">http://bit.ly/1xinYu7</a><br/>
2424
<img src="chep/hpx_json_qr.jpg" width="150" height="150"/><br/>
2525
<br/>
2626
<hr/>
2727

28-
<a href="https://root.cern.ch/js/3.4/httpserver.C/Files/job1.root/hpx/draw.htm?monitoring=1000">Draw page for individual object</a><br/>
28+
<h3><a href="https://root.cern.ch/js/3.4/httpserver.C/Files/job1.root/hpx/draw.htm?monitoring=1000">Draw page for individual object</a></h3>
2929
<a href="http://bit.ly/1yiepGM">http://bit.ly/1yiepGM</a><br/>
3030
<img src="chep/draw_qr.jpg" width="150" height="150"/><br/>
3131
<br/>
3232
<hr/>
3333

34-
<a href="https://root.cern.ch/js/3.4/demo/demo.htm">Demo for online monitoring with json files</a><br/>
34+
<h3><a href="https://root.cern.ch/js/3.4/demo/demo.htm">Demo for online monitoring with json files</a></h3>
3535
<a href="http://bit.ly/1EHnFXl">http://bit.ly/1EHnFXl</a><br/>
3636
<img src="chep/demo_qr.jpg" width="150" height="150"/><br/>
3737
<br/>
3838
<hr/>
3939

40-
41-
<a href="https://root.cern.ch/js/3.4/httpserver.C/?item=Files/job1.root/ntuple">TTree::Draw example</a><br/>
42-
<img src="chep/tree_draw.png" width="50%" height="50%"/><br/>
40+
<h3><a href="https://root.cern.ch/js/3.4/httpserver.C/?item=Files/job1.root/ntuple">TTree::Draw example</a></h3>
41+
<img src="chep/tree_draw.png" width="700" height="400"/><br/>
4342
<a href="http://bit.ly/1xk7X6Z">http://bit.ly/1xk7X6Z</a><br/>
4443
<img src="chep/tree_draw_qr.jpg" width="150" height="150"/><br/>
4544
<br/>
4645
<hr/>
4746

48-
<a href="https://root.cern.ch/js/3.4/httpcontrol.C/?monitoring=0">Command interface example</a><br/>
49-
<img src="chep/httpcontrol.png" width="50%" height="50%"/><br/>
47+
<h3><a href="https://root.cern.ch/js/3.4/httpcontrol.C/?monitoring=0">Command interface example</a></h3>
48+
<img src="chep/httpcontrol.png" width="700" height="400"/><br/>
5049
<a href="http://bit.ly/1BPNouv">http://bit.ly/1BPNouv</a><br/>
5150
<img src="chep/httpcontrol_qr.jpg" width="150" height="150"/><br/>
5251
<br/>
5352
<hr/>
5453

55-
56-
<a href="https://root.cern.ch/js/3.4/Go4ExampleSimple/?layout=grid2x2&items=[Conditions/cHis2,Status/DebugOutput,Conditions/cHis1,Status/EventsRate]&opts=[editor]">Go4 analysis example</a><br/>
57-
<img src="chep/go4analysis.png" width="50%" height="50%"/><br/>
54+
<h3><a href="https://root.cern.ch/js/3.4/Go4ExampleSimple/?layout=grid2x2&items=[Conditions/cHis2,Status/DebugOutput,Conditions/cHis1,Status/EventsRate]&opts=[editor]">Go4 analysis example</a></h3>
55+
<img src="chep/go4analysis.png" width="700" height="400"/><br/>
5856
<a href="http://bit.ly/1FLOHlF">http://bit.ly/1FLOHlF</a><br/>
5957
<img src="chep/go4analysis_qr.jpg" width="150" height="150"/><br/>
6058
<br/>
@@ -67,8 +65,8 @@ <h2>THttpServer <a href="chep/httpserver.pdf">poster</a></h2>
6765
<br/>
6866
<hr/>
6967

70-
<a href="http://go4.gsi.de">Go4 GUI</a> as interface for THttpServer<br/>
71-
<img src="chep/go4gui.png" width="50%" height="50%"/><br/>
68+
<h3><a href="http://go4.gsi.de">Go4 GUI</a> as interface for THttpServer</h3>
69+
<img src="chep/go4gui.png" width="700" height="400"/><br/>
7270
<br/>
7371
<hr/>
7472

@@ -83,90 +81,119 @@ <h2>JSROOT <a href="chep/JSROOT.pdf">poster</a></h2>
8381
<br/>
8482
<hr/>
8583

86-
<a href="https://root.cern.ch/js/3.4/index.htm?file=../files/hsimple.root&layout=grid2x2&items=[hpx,hpxpy,hprof,StreamerInfo]&opts=[hist,colz,e1,any]">User interface</a><br/>
87-
<img src="chep/jsroot_ui.png" width="50%" height="50%"/><br/>
84+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?file=../files/hsimple.root&layout=grid2x2&items=[hpx,hpxpy,hprof,StreamerInfo]&opts=[hist,colz,e1,any]">User interface</a></h3>
85+
<img src="chep/jsroot_ui.png" width="700" height="400"/><br/>
8886
<a href="http://bit.ly/1DOliql">http://bit.ly/1DOliql</a><br/>
8987
<img src="chep/jsroot_ui_qr.jpg" width="150" height="150"/><br/>
9088
<br/>
9189
<hr/>
9290

93-
<a href="https://root.cern.ch/js/3.4/demo/example_file.htm">Example with binary root file</a><br/>
91+
<h3><a href="https://root.cern.ch/js/3.4/demo/example_file.htm">Example with binary root file</a></h3>
9492
<a href="http://bit.ly/1CRt4yk">http://bit.ly/1CRt4yk</a><br/>
9593
<img src="chep/example_file_qr.jpg" width="150" height="150"/><br/>
9694
<br/>
9795
<hr/>
9896

99-
<a href="https://root.cern.ch/js/3.4/demo/example_json.htm">Example with JSON file</a><br/>
97+
<h3><a href="https://root.cern.ch/js/3.4/demo/example_json.htm">Example with JSON file</a></h3>
10098
<a href="http://bit.ly/1EXJl44">http://bit.ly/1EXJl44</a><br/>
10199
<img src="chep/example_json_qr.jpg" width="150" height="150"/><br/>
102100
<br/>
103101
<hr/>
104102

105-
<a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/hsimple.root&item=hpx;1&opt=e">TH1 class</a><br/>
106-
<img src="chep/th1e.png" width="50%" height="50%"/><br/>
103+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?file=../files/hsimple.root&item=hpx;1">Example with URL parameters</a></h3>
104+
<a href="http://bit.ly/1De70Oz">http://bit.ly/1De70Oz</a><br/>
105+
<img src="chep/hsimple_qr.jpg" width="150" height="150"/><br/>
106+
<br/>
107+
<hr/>
108+
109+
110+
111+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/zdemo.root&item=zdemo;1&mathjax=1">Canvas with graphs and labels</a></h3>
112+
<img src="chep/zdemo.png" width="700" height="400"/><br/>
113+
<a href="http://bit.ly/1Eqn15J">http://bit.ly/1Eqn15J</a><br/>
114+
<img src="chep/zdemo_qr.jpg" width="150" height="150"/><br/>
115+
<br/>
116+
<hr/>
117+
118+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/stacks.root&item=stacks;1&opt=">Stacked histograms</a></h3>
119+
<img src="chep/thstack.png" width="700" height="400"/><br/>
120+
<a href="http://bit.ly/1IfTMAo">http://bit.ly/1IfTMAo</a><br/>
121+
<img src="chep/thstack_qr.jpg" width="150" height="150"/><br/>
122+
<br/>
123+
<hr/>
124+
125+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/ct.root&item=ct;1&opt=">Drawings on time axis</a></h3>
126+
<img src="chep/ct.png" width="700" height="400"/><br/>
127+
<a href="http://bit.ly/1HWOJrJ">http://bit.ly/1HWOJrJ</a><br/>
128+
<img src="chep/ct_qr.jpg" width="150" height="150"/><br/>
129+
<br/>
130+
<hr/>
131+
132+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/hsimple.root&item=hpx;1&opt=e">TH1 class</a></h3>
133+
<img src="chep/th1e.png" width="700" height="400"/><br/>
107134
<a href="http://bit.ly/1BnyJqv">http://bit.ly/1BnyJqv</a><br/>
108135
<img src="chep/th1e_qr.jpg" width="150" height="150"/><br/>
109136
<br/>
110137
<hr/>
111138

112-
<a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/hsimple.root&item=hpxpy;1&opt=lego">TH2 class</a><br/>
113-
<img src="chep/th2lego.png" width="50%" height="50%"/><br/>
139+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/hsimple.root&item=hpxpy;1&opt=lego">TH2 class</a></h3>
140+
<img src="chep/th2lego.png" width="700" height="400"/><br/>
114141
<a href="http://bit.ly/1xV9NGo">http://bit.ly/1xV9NGo</a><br/>
115142
<img src="chep/th2lego_qr.jpg" width="150" height="150"/><br/>
116143
<br/>
117144
<hr/>
118145

119-
<a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/glbox.root&item=h31;1&opt=">TH3 class</a><br/>
120-
<img src="chep/th3.png" width="50%" height="50%"/><br/>
146+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/glbox.root&item=h31;1&opt=">TH3 class</a></h3>
147+
<img src="chep/th3.png" width="700" height="400"/><br/>
121148
<a href="http://bit.ly/19ffqsA">http://bit.ly/19ffqsA</a><br/>
122149
<img src="chep/th3_qr.jpg" width="150" height="150"/><br/>
123150
<br/>
124151
<hr/>
125152

126-
<a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/legends.root&item=legends;1&mathjax=1">TLegend class</a><br/>
127-
<img src="chep/legend.png" width="50%" height="50%"/><br/>
153+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/legends.root&item=legends;1&mathjax=1">TLegend class</a></h3>
154+
<img src="chep/legend.png" width="700" height="400"/><br/>
128155
<a href="http://bit.ly/19fff0h">http://bit.ly/19fff0h</a><br/>
129156
<img src="chep/legend_qr.jpg" width="150" height="150"/><br/>
130157
<br/>
131158
<hr/>
132159

133-
<a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/exclusion.root&item=exclusion;1&opt=">TGraph exclusion</a><br/>
134-
<img src="chep/exclusion.png" width="50%" height="50%"/><br/>
160+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/exclusion.root&item=exclusion;1&opt=">TGraph exclusion</a></h3>
161+
<img src="chep/exclusion.png" width="700" height="400"/><br/>
135162
<a href="http://bit.ly/1xrThD2">http://bit.ly/1xrThD2</a><br/>
136163
<img src="chep/exclusion_qr.jpg" width="150" height="150"/><br/>
137164
<br/>
138165
<hr/>
139166

140-
<a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=https://web-docs.gsi.de/~linev/js/files/latex.root&item=ex3;1&mathjax=1">TPaveText with MathJax</a><br/>
141-
<img src="chep/pavetext.png" width="50%" height="50%"/><br/>
167+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=https://web-docs.gsi.de/~linev/js/files/latex.root&item=ex3;1&mathjax=1">TPaveText with MathJax</a></h3>
168+
<img src="chep/pavetext.png" width="700" height="400"/><br/>
142169
<a href="http://bit.ly/19ff1Xc">http://bit.ly/19ff1Xc</a><br/>
143170
<img src="chep/pavetext_qr.jpg" width="150" height="150"/><br/>
144171
<br/>
145172
<hr/>
146173

147-
<a href="https://root.cern.ch/js/3.4/index.htm?file=../files/fillrandom.root&item=h1f;1+sqroot;1&nobrowser">Superimpose TH1 and TF1</a><br/>
148-
<img src="chep/th1_tf1.png" width="50%" height="50%"/><br/>
174+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?file=../files/fillrandom.root&item=h1f;1+sqroot;1&nobrowser">Superimpose TH1 and TF1</a></h3>
175+
<img src="chep/th1_tf1.png" width="700" height="400"/><br/>
149176
<a href="http://bit.ly/19feLHB">http://bit.ly/19feLHB</a><br/>
150177
<img src="chep/th1_tf1_qr.jpg" width="150" height="150"/><br/>
151178
<br/>
152179
<hr/>
153180

154-
<a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/rf107.root&item=rf107_plotstyles;1&opt=">RooFit canvas</a><br/>
155-
<img src="chep/roofit.png" width="50%" height="50%"/><br/>
181+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&file=../files/rf107.root&item=rf107_plotstyles;1&opt=">RooFit canvas</a></h3>
182+
<img src="chep/roofit.png" width="700" height="400"/><br/>
156183
<a href="http://bit.ly/1C4wcoG">http://bit.ly/1C4wcoG</a><br/>
157184
<img src="chep/roofit_qr.jpg" width="150" height="150"/><br/>
158185
<br/>
159186
<hr/>
160187

161-
<a href="https://root.cern.ch/js/3.4/index.htm?layout=grid1x3&path=../files/&files=[temp44.root,temp35.root,temp28.root]&items=[temp44.root/Histograms/TDC_C100/Ch3/TDC_C100_Ch3_RisingRef;1,temp35.root/_same_,temp28.root/_same_]&opts=[autozoom,autozoom,autozoom]">Draw same histogram from three files</a><br/>
162-
<img src="chep/three.png" width="50%" height="50%"/><br/>
188+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?layout=grid1x3&path=../files/&files=[temp44.root,temp35.root,temp28.root]&items=[temp44.root/Histograms/TDC_C100/Ch3/TDC_C100_Ch3_RisingRef;1,temp35.root/_same_,temp28.root/_same_]&opts=[autozoom,autozoom,autozoom]">Draw same histogram from three files</a></h3>
189+
<img src="chep/three.png" width="700" height="400"/><br/>
163190
<a href="http://bit.ly/1FRfYSr">http://bit.ly/1FRfYSr</a><br/>
164191
<img src="chep/three_qr.jpg" width="150" height="150"/><br/>
165192
<br/>
166193
<hr/>
167194

168-
<a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&path=../files/&files=[temp44.root,temp35.root,temp28.root]&item=temp44.root/Histograms/TDC_C100/Ch1/TDC_C100_Ch1_RisingCalibr;1+temp35.root/_same_+temp28.root/_same_&opt=autocol,nostat">Superimpose same histogram from three files</a><br/>
169-
<img src="chep/superimpose.png" width="50%" height="50%"/><br/>
195+
<h3><a href="https://root.cern.ch/js/3.4/index.htm?nobrowser&path=../files/&files=[temp44.root,temp35.root,temp28.root]&item=temp44.root/Histograms/TDC_C100/Ch1/TDC_C100_Ch1_RisingCalibr;1+temp35.root/_same_+temp28.root/_same_&opt=autocol,nostat">Superimpose same histogram from three files</a></h3>
196+
<img src="chep/superimpose.png" width="700" height="400"/><br/>
170197
<a href="http://bit.ly/1B8VijD">http://bit.ly/1B8VijD</a><br/>
171198
<img src="chep/superimpose_qr.jpg" width="150" height="150"/><br/>
172199
<br/>

demo/jslinks.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h2>All supported draw options</h2>
1515
<li><a href="drawoptions.htm?minimal">Only list</a></li>
1616
<li><a href="drawoptions.htm?default&w=800&h=600">Default draw options</a></li>
1717
<li><a href="drawoptions.htm?all&w=1400&h=800">All drawing at once (many large canvases)</a></li>
18-
<li>Text/Latex/MathText <a href="latex.htm?mathjax">with</a> and <a href="latex.htm">without</a> MathJax rendering</li>
18+
<li>Drawing TLatex/TPaveText/TMathText <a href="latex.htm?mathjax">with</a> or <a href="latex.htm">without</a> MathJax.js rendering</li>
1919
</ul>
2020

2121
<h2>Loading ROOT files</h2>

demo/latex.htm

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@
4444

4545
document.getElementById('debug').innerHTML = '';
4646

47-
document.getElementById('debug').innerHTML += "<h2>JavaScript ROOT version " + JSROOT.version + "</h2>";
47+
if (JSROOT.GetUrlOption('mathjax')!=null)
48+
document.getElementById('debug').innerHTML += "<h1>Drawing with <a href='https://www.mathjax.org/'>MathJax.js</a> rendering</h1>";
49+
else
50+
document.getElementById('debug').innerHTML += "<h1>Drawing without <a href='https://www.mathjax.org/'>MathJax.js</a> rendering</h1>";
51+
52+
document.getElementById('debug').innerHTML += "<h3>JavaScript ROOT version " + JSROOT.version + "</h3>";
53+
4854

4955
JSROOT.Painter.readStyleFromURL();
5056

@@ -64,7 +70,7 @@
6470
<body>
6571

6672
<div id="debug">loading...</div>
67-
<span>Drawing <a href="latex.htm?mathjax">with</a> and <a href="latex.htm">without</a> MathJax</span>
73+
<br/>
6874

6975
<h3>Example from <a href="https://root.cern.ch/root/html/TLatex.html#L10">TLatex</a> docu</h3>
7076
<div id="lat1_draw"></div>

index.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
file - name of the file(s), which will be automatically open with page loading
2323
item - object name(s) in the file to display
2424
opt - draw option(s) for the item(s)
25-
layout - can be 'collapsible', 'tabs' or gridNxM where N and M are integer values
25+
layout - can be 'simple', 'collapsible', 'tabs' or gridNxM where N and M are integer values
2626
nobrowser - only file item(s) will be displayed, browser will be disabled
2727
load - name of JavaScript(s), automatically loaded at the beginning
2828
mathjax - use MathJax for Latex output (automatically loaded for TMathText objects)

scripts/JSRootCore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
JSROOT = {};
1616

17-
JSROOT.version = "3.4 dev 30/03/2015";
17+
JSROOT.version = "3.4 31/03/2015";
1818

1919
JSROOT.source_dir = "";
2020
JSROOT.source_min = false;

0 commit comments

Comments
 (0)