Skip to content

Commit 968fc20

Browse files
committed
Add testing of TH2 with cut condition
1 parent 8a9cdd3 commit 968fc20

File tree

5 files changed

+521
-0
lines changed

5 files changed

+521
-0
lines changed

test/stressGraphics.cxx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
#include "TScatter.h"
9393
#include "TEfficiency.h"
9494
#include "TGraph.h"
95+
#include "TCutG.h"
9596
#include "TGraphErrors.h"
9697
#include "TGraphAsymmErrors.h"
9798
#include "TGraphBentErrors.h"
@@ -1884,6 +1885,29 @@ void labels1()
18841885
delete hlab1;
18851886
}
18861887

1888+
////////////////////////////////////////////////////////////////////////////////
1889+
/// Testing TH2 drawing with TCutG
1890+
1891+
void th2_cut()
1892+
{
1893+
auto C = StartTest(600, 600);
1894+
1895+
Float_t x[6] = { 1, 2, 1, -1, -2, -1 };
1896+
Float_t y[6] = { 2, 0, -2, -2, 0, 2 };
1897+
TCutG *cut = new TCutG("cut", 6, x, y);
1898+
1899+
TH1 *hpxpy = (TH1*)gHsimple->Get("hpxpy");
1900+
1901+
hpxpy->Draw("col [cut]");
1902+
cut->Draw("l");
1903+
1904+
TestReport(C, "TH2 with TCutG cut", "", 0, "th2_cut");
1905+
}
1906+
1907+
////////////////////////////////////////////////////////////////////////////////
1908+
/// Testing TH2 with custom axis labels
1909+
1910+
18871911
void th2_custom_axis_labels()
18881912
{
18891913
auto C = StartTest(600, 600);
@@ -4148,6 +4172,7 @@ void stressGraphics(Int_t verbose = 0, Bool_t generate = kFALSE, Bool_t keep_fil
41484172
tgaxis6 ();
41494173
padticks ();
41504174
labels1 ();
4175+
th2_cut ();
41514176
th2_custom_axis_labels();
41524177
tellipse ();
41534178
feynman ();

test/stressGraphics.ref

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
2727
22 5086 600 14193 150 16812 6300 11900 9000 5156 600
2828
22 22400 600 19650 150 37913 15000 18122 8000 22300 600
2929
23 4866 600 14162 100 30889 10050 21311 1800 4845 600
30+
23 14774 600 16179 300 19511 5000 11533 4000 16039 600
3031
24 4878 600 14375 100 17419 5000 11709 1800 5770 600
3132
25 4131 40 15272 100 34038 2500 12258 1400 4162 40
3233
26 7813 300 23840 150 11085 6000 6973 3100 8081 300

test/stressGraphics_builtinzlib.ref

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
2727
22 5086 600 14193 150 16812 6300 11900 9000 5156 600
2828
22 22400 600 19650 150 37913 15000 18122 8000 22300 600
2929
23 4875 600 14112 100 31268 10050 22053 1800 4849 600
30+
23 14774 600 16179 300 19511 5000 11533 4000 16039 600
3031
24 4878 600 14375 100 17419 5000 11709 1800 5770 600
3132
25 4130 40 15193 50 34790 2500 12156 1400 4161 40
3233
26 7825 300 23672 100 11087 6000 7008 3100 8097 300

test/stressGraphics_web.ref

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Test# SVG1Ref# SVG1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
2727
22 5021 190 10944 173 45000 11000 37464 7000 5021 290
2828
22 22020 200 37300 700 71900 30000 58600 20000 22020 200
2929
23 5904 50 11373 225 91649 15966 46000 20000 5892 50
30+
23 9915 50 21851 400 50000 20000 35399 11000 9919 50
3031
24 5830 50 10700 400 42000 10000 35922 11000 5850 100
3132
25 2572 50 9271 50 109238 42213 49000 17000 2572 50
3233
26 16403 50 25282 50 25505 3408 23000 8000 16403 50

0 commit comments

Comments
 (0)