167 fTitle->SetToolTipText(
"Enter the histogram title string");
175 fDim->SetToolTipText(
"A 2-d plot of the histogram is dawn");
177 fDim0->SetToolTipText(
"A 3-d plot of the histogram is dawn");
199 fAddArr ->SetToolTipText(
"Shows gradient between adjacent cells");
203 fAddCol ->SetToolTipText(
"A box is drawn for each cell with a color scale varying with contents");
207 fAddText ->SetToolTipText(
"Draw bin contents as text");
223 fContLevels->GetNumberEntry()->SetToolTipText(
"Set number of contours (1..99)");
227 fAddBox ->SetToolTipText(
"A box is drawn for each cell with surface proportional to contents");
231 fAddScat ->SetToolTipText(
"Draw a scatter-plot");
235 fAddPalette ->SetToolTipText(
"Add color palette beside the histogram");
254 fAddFB ->SetToolTipText(
"Supress the drawing of the front box");
257 fAddBB ->SetToolTipText(
"Supress the drawing of the back box");
277 fContLevels1->GetNumberEntry()->SetToolTipText(
"Set number of contours (1..99)");
282 fAddError ->SetToolTipText(
"Add color palette beside the histogram");
285 fAddPalette1 ->SetToolTipText(
"Add color palette beside the histogram");
307 fBarWidth->GetNumberEntry()->SetToolTipText(
"Set bar chart width");
317 fBarOffset->GetNumberEntry()->SetToolTipText(
"Set bar chart offset");
350 gROOT->GetListOfCleanups()->Add(
this);
638 fDelaydraw ->SetToolTipText(
"Draw the new axis range when the Slider is released");
661 gROOT->GetListOfCleanups()->Remove(
this);
678 fTitle->Connect(
"TextChanged(const char *)",
"TH2Editor",
this,
"DoTitle(const char *)");
679 fDimGroup->Connect(
"Clicked(Int_t)",
"TH2Editor",
this,
"DoHistView()");
680 fTypeCombo->Connect(
"Selected(Int_t)",
"TH2Editor",
this,
"DoHistChanges()");
681 fCoordsCombo->Connect(
"Selected(Int_t)",
"TH2Editor",
this,
"DoHistChanges()");
682 fContCombo->Connect(
"Selected(Int_t)",
"TH2Editor",
this,
"DoHistChanges()");
683 fAddArr->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddArr(Bool_t)");
684 fAddBox->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddBox(Bool_t)");
685 fAddCol->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddCol(Bool_t)");
686 fAddScat->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddScat(Bool_t)");
687 fAddText->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddText(Bool_t)");
688 fAddError->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddError(Bool_t)");
689 fAddPalette->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddPalette(Bool_t)");
690 fAddPalette1->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddPalette(Bool_t)");
691 fAddFB->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddFB()");
692 fAddBB->Connect(
"Toggled(Bool_t)",
"TH2Editor",
this,
"DoAddBB()");
693 fContLevels->Connect(
"ValueSet(Long_t)",
"TH2Editor",
this,
"DoContLevel()");
694 (
fContLevels->GetNumberEntry())->Connect(
"ReturnPressed()",
"TH2Editor",
695 this,
"DoContLevel()");
696 fContLevels1->Connect(
"ValueSet(Long_t)",
"TH2Editor",
this,
"DoContLevel1()");
697 (
fContLevels1->GetNumberEntry())->Connect(
"ReturnPressed()",
"TH2Editor",
698 this,
"DoContLevel1()");
699 fBarWidth->Connect(
"ValueSet(Long_t)",
"TH2Editor",
this,
"DoBarWidth()");
700 (
fBarWidth->GetNumberEntry())->Connect(
"ReturnPressed()",
"TH2Editor",
701 this,
"DoBarWidth()");
702 fBarOffset->Connect(
"ValueSet(Long_t)",
"TH2Editor",
this,
"DoBarOffset()");
703 (
fBarOffset->GetNumberEntry())->Connect(
"ReturnPressed()",
"TH2Editor",
704 this,
"DoBarOffset()");
705 fBinXSlider->Connect(
"PositionChanged(Int_t)",
"TH2Editor",
this,
"DoBinMoved()");
706 fBinXSlider->Connect(
"Released()",
"TH2Editor",
this,
"DoBinReleased()");
707 fBinXSlider->Connect(
"Pressed()",
"TH2Editor",
this,
"DoBinPressed()");
708 fBinYSlider->Connect(
"PositionChanged(Int_t)",
"TH2Editor",
this,
"DoBinMoved()");
709 fBinYSlider->Connect(
"Released()",
"TH2Editor",
this,
"DoBinReleased()");
710 fBinYSlider->Connect(
"Pressed()",
"TH2Editor",
this,
"DoBinPressed()");
711 fBinXNumberEntry->Connect(
"ReturnPressed()",
"TH2Editor",
this,
"DoBinLabel()");
712 fBinYNumberEntry->Connect(
"ReturnPressed()",
"TH2Editor",
this,
"DoBinLabel()");
713 fApply->Connect(
"Clicked()",
"TH2Editor",
this,
"DoApply()");
714 fCancel->Connect(
"Pressed()",
"TH2Editor",
this,
"DoCancel()");
715 fBinXSlider1->Connect(
"Released()",
"TH2Editor",
this,
"DoBinReleased1()");
716 fBinXSlider1->Connect(
"PositionChanged(Int_t)",
"TH2Editor",
this,
"DoBinMoved1()");
717 fBinXNumberEntry1->Connect(
"ReturnPressed()",
"TH2Editor",
this,
"DoBinLabel1()");
718 fXBinOffsetSld->Connect(
"PositionChanged(Int_t)",
"TH2Editor",
this,
"DoOffsetMoved()");
719 fXBinOffsetSld->Connect(
"Released()",
"TH2Editor",
this,
"DoOffsetReleased()");
720 fXBinOffsetSld->Connect(
"Pressed()",
"TH2Editor",
this,
"DoOffsetPressed()");
722 fBinYSlider1->Connect(
"Released()",
"TH2Editor",
this,
"DoBinReleased1()");
723 fBinYSlider1->Connect(
"PositionChanged(Int_t)",
"TH2Editor",
this,
"DoBinMoved1()");
724 fBinYNumberEntry1->Connect(
"ReturnPressed()",
"TH2Editor",
this,
"DoBinLabel1()");
725 fYBinOffsetSld->Connect(
"PositionChanged(Int_t)",
"TH2Editor",
this,
"DoOffsetMoved()");
726 fYBinOffsetSld->Connect(
"Released()",
"TH2Editor",
this,
"DoOffsetReleased()");
727 fYBinOffsetSld->Connect(
"Pressed()",
"TH2Editor",
this,
"DoOffsetPressed()");
729 fSliderX->Connect(
"PositionChanged()",
"TH2Editor",
this,
"DoSliderXMoved()");
730 fSliderX->Connect(
"Pressed()",
"TH2Editor",
this,
"DoSliderXPressed()");
731 fSliderX->Connect(
"Released()",
"TH2Editor",
this,
"DoSliderXReleased()");
732 fSldXMin->Connect(
"ReturnPressed()",
"TH2Editor",
this,
"DoXAxisRange()");
733 fSldXMax->Connect(
"ReturnPressed()",
"TH2Editor",
this,
"DoXAxisRange()");
734 fSliderY->Connect(
"PositionChanged()",
"TH2Editor",
this,
"DoSliderYMoved()");
735 fSliderY->Connect(
"Pressed()",
"TH2Editor",
this,
"DoSliderYPressed()");
736 fSliderY->Connect(
"Released()",
"TH2Editor",
this,
"DoSliderYReleased()");
737 fSldYMin->Connect(
"ReturnPressed()",
"TH2Editor",
this,
"DoYAxisRange()");
738 fSldYMax->Connect(
"ReturnPressed()",
"TH2Editor",
this,
"DoYAxisRange()");
739 fFrameColor->Connect(
"ColorSelected(Pixel_t)",
"TH2Editor",
this,
"DoFillColor(Pixel_t)");
740 fFramePattern->Connect(
"PatternSelected(Style_t)",
"TH2Editor",
this,
"DoFillPattern(Style_t)");
752 ((
TH2*)obj)->GetEntries() == 0)) {
817 }
else if (!str.Contains(
"LEGO") && !str.Contains(
"SURF")) {
827 if (str.Contains(
"CONT")){
832 else if (str.Contains(
"CONT0") || str.Contains(
"CONT"))
842 if (str.Contains(
"SCAT")) {
850 if (str.Contains(
"COL") || (str.Contains(
"CONT") &&
851 !str.Contains(
"CONT2") && !str.Contains(
"CONT3"))) {
859 }
else if (str.Contains(
"LEGO") || str.Contains(
"SURF")) {
905 if (str.Contains(
"E")){
907 if (str.Contains(
"LEGO"))
909 if (str.Contains(
"TEXT"))
930 Int_t nxbinmin =
fHist -> GetXaxis() -> GetFirst();
931 Int_t nxbinmax =
fHist -> GetXaxis() -> GetLast();
934 fSldXMin->SetNumber(
fHist->GetXaxis()->GetBinLowEdge(nxbinmin));
935 fSldXMax->SetNumber(
fHist->GetXaxis()->GetBinUpEdge(nxbinmax));
938 Int_t nybinmin =
fHist -> GetYaxis() -> GetFirst();
939 Int_t nybinmax =
fHist -> GetYaxis() -> GetLast();
942 fSldYMin->SetNumber(
fHist->GetYaxis()->GetBinLowEdge(nybinmin));
943 fSldYMax->SetNumber(
fHist->GetYaxis()->GetBinUpEdge(nybinmax));
951 if (str.Contains(
"LEGO2") || str.Contains(
"SURF1") ||
952 str.Contains(
"SURF2") || str.Contains(
"SURF3") ||
981 Int_t upx =0, upy =0;
993 if (divx[0]-1 <= 1) upx = 2;
994 else upx = divx[0]-1;
996 if (divy[0]-1 <= 1) upy = 2;
997 else upy = divy[0]-1;
1003 while ( divx[
i] != nx)
i ++;
1009 while ( divy [j] != ny) j ++;
1032 fHist->GetXaxis()->GetBinWidth(1));
1034 fHist->GetYaxis()->GetBinWidth(1));
1089 if (str==
"" || str==
"SCAT" || str==
fCutString) {
1102 if (!str.Contains(
fCutString) && !str.Contains(ocut))
1130 if (str.Contains(
"LEGO2") || str.Contains(
"SURF1") ||
1131 str.Contains(
"SURF2") || str.Contains(
"SURF3") ||
1132 str.Contains(
"SURF5")) {
1145 if (!str.Contains(
fCutString) && !str.Contains(ocut))
1167 if (str==
"" || str==
"SCAT" || str==
fCutString) {
1212 if (str.Contains(
"LEGO2") || str.Contains(
"SURF1") ||
1213 str.Contains(
"SURF2") || str.Contains(
"SURF3") ||
1214 str.Contains(
"SURF5"))
1222 if (!str.Contains(
fCutString) && !str.Contains(ocut))
1239 if (!str.Contains(
"ARR")) {
1246 if (str.Contains(
"ARR")) {
1247 str.Remove(strstr(str.Data(),
"ARR")-str.Data(),3);
1248 if (str==
"" || str==
"SCAT" || str==
fCutString) {
1271 if (!str.Contains(
"BOX")) {
1278 if (str.Contains(
"BOX")) {
1279 str.Remove(strstr(str.Data(),
"BOX")-str.Data(),3);
1280 if (str==
"" || str==
"SCAT" || str==
fCutString) {
1303 if (!str.Contains(
"COL")) {
1313 if (str.Contains(
"COL")) {
1314 str.Remove(strstr(str.Data(),
"COL")-str.Data(),3);
1319 if (str.Contains(
"Z"))
1320 str.Remove(strstr(str.Data(),
"Z")-str.Data(),1);
1322 if (str==
"" || str==
"SCAT" || str==
fCutString)
1346 if (!str.Contains(
"SCAT")) {
1351 if (str.Contains(
"SCAT")) {
1352 str.Remove(strstr(str.Data(),
"SCAT")-str.Data(),4);
1372 if (!str.Contains(
"TEXT")) {
1379 if (str.Contains(
"TEXT")) {
1380 str.Remove(strstr(str.Data(),
"TEXT")-str.Data(),4);
1381 if (str==
"" || str==
"SCAT" || str==
fCutString)
1404 if (str.Contains(
"LEGO"))
1406 if (str.Contains(
"TEXT"))
1414 if (str.Contains(
"E")) {
1439 if (!str.Contains(
"Z")) {
1445 if (str.Contains(
"Z")) {
1446 str.Remove(strstr(str.Data(),
"Z")-str.Data(),1);
1466 if (str.Contains(
"FB")) {
1467 if (str.Contains(
"SURF") && !(str.Contains(
"1") ||
1468 str.Contains(
"2") || str.Contains(
"3") ||
1469 str.Contains(
"4") || str.Contains(
"5"))) {
1475 }
else str.Remove(strstr(str.Data(),
"FB")-str.Data(),2);
1479 if (!str.Contains(
"FB")) {
1500 if (str.Contains(
"BB")) {
1501 if (str.Contains(
"FB")) {
1506 }
else str.Remove(strstr(str.Data(),
"BB")-str.Data(),2);
1510 if (!str.Contains(
"BB")) {
1583 if (divx[0]==2 && divy[0]==2) {
1593 ny,
fBinHist->GetYaxis()->GetXmin(),
1597 fHist->Rebin2D(divx[numx], divy[numy]);
1605 fSldXMax->GetNumber()-xBinWidth/2);
1617 fSldYMax->GetNumber()-yBinWidth/2);
1643 if (divx[0]==2 && divy[0]==2 && !
fBinHist)
1645 "TH2Editor",
"It is not possible to rebin the histogram",
1664 if (divx[0]==2 && divy[0]==2) {
1679 if (nx < 1 || ny < 1)
return;
1692 if (maxx==1) maxx=2;
1693 if (maxy==1) maxy=2;
1700 ny,
fBinHist->GetYaxis()->GetXmin(),
1704 fHist->Rebin2D(divx[numx], divy[numy]);
1711 fSldXMax->GetNumber()-xBinWidth/2);
1724 fSldYMax->GetNumber()-yBinWidth/2);
1756 else nx =
fHist->GetXaxis()->GetNbins();
1759 else ny =
fHist->GetYaxis()->GetNbins();
1760 if (nx < 2 || ny < 2)
return;
1766 for (
i = 2;
i <= divx[0];
i++) {
1773 for (
i = 2;
i <= divy[0];
i++) {
1779 if (divx[
c]!=
fHist->GetXaxis()->GetNbins() ||
1780 divy[
d]!=
fHist->GetYaxis()->GetNbins()) {
1802 "TH2 Editor",
"Replace origin histogram with rebinned one?",
1813 Int_t upx = 0, upy = 0;
1814 if (divx[0]-1 <= 1) upx = 2;
1815 else upx = divx[0]-1;
1816 if (divy[0]-1 <= 1) upy = 2;
1817 else upy = divy[0]-1;
1820 if (
fBinXSlider->GetMaxPosition()==2 && divx[0]==2 )
1823 if (
fBinYSlider->GetMaxPosition()==2 && divy[0]==2 )
1849 fHist->GetXaxis()->SetRange(
fBinHist->GetXaxis()->GetFirst(),
1851 fHist->GetYaxis()->SetRange(
fBinHist->GetYaxis()->GetFirst(),
1885 if (xnumber==5 && ynumber==5)
return;
1888 Int_t xBinNumber = 0;
1889 Int_t yBinNumber = 0;
1893 if (xnumber >= 5) xfact = xnumber - 4;
1894 else xfact = xnumber - 6;
1895 if (ynumber >= 5) yfact = ynumber - 4;
1896 else yfact = ynumber - 6;
1898 if (!player)
return;
1918 if (xfact > 0) xBinNumber = xfact*nx;
1919 if (xfact < 0) xBinNumber = (
Int_t) ((-1)*nx/xfact+0.5);
1920 if (xBinNumber < 1) xBinNumber = 1;
1921 if (xBinNumber > 1000) xBinNumber= 1000;
1922 if (yfact > 0) yBinNumber = yfact*ny;
1923 if (yfact < 0) yBinNumber = (
Int_t) ((-1)*ny/yfact+0.5);
1924 if (yBinNumber < 1) yBinNumber = 1;
1925 if (yBinNumber > 1000) yBinNumber= 1000;
1930 ((
TH2*)player->
GetHistogram())->SetBins(xBinNumber, minx-oldXOffset+xOffset,
1931 maxx-oldXOffset+xOffset,
1932 yBinNumber, miny-oldYOffset+yOffset,
1933 maxy-oldYOffset+yOffset);
1945 xaxis->
FindBin(rmaxx-xBinWidth/2));
1947 yaxis->
FindBin(rmaxy-yBinWidth/2));
1953 xaxis->
FindBin(rmaxx-xBinWidth/2));
1955 yaxis->
FindBin(rmaxy-yBinWidth/2));
1992 Int_t numx = lastx-firstx+1;
1993 Int_t numy = lasty-firsty+1;
1996 Int_t xBinNumber = 0;
1997 Int_t yBinNumber = 0;
1998 if (xnumber >= 5) xfact = xnumber - 4;
1999 else xfact = xnumber - 6;
2000 if (xfact > 0) xBinNumber = xfact*numx;
2001 if (xfact < 0) xBinNumber = (
Int_t) ((-1)*numx/xfact+0.5);
2002 if (xBinNumber < 1) xBinNumber = 1;
2003 if (xBinNumber > 1000) xBinNumber= 1000;
2007 if (ynumber >= 5) yfact = ynumber - 4;
2008 else yfact = ynumber - 6;
2009 if (yfact > 0) yBinNumber = yfact*numy;
2010 if (yfact < 0) yBinNumber = (
Int_t) ((-1)*numy/yfact+0.5);
2011 if (yBinNumber < 1) yBinNumber = 1;
2012 if (yBinNumber > 1000) yBinNumber= 1000;
2030 if (!player)
return;
2050 Int_t xBinNumber = (
Int_t) ((maxx-minx)/(rmaxx - rminx)*numx + 0.5);
2051 if (xBinNumber < 1) xBinNumber = 1;
2052 if (xBinNumber > 1000) xBinNumber= 1000;
2054 Int_t yBinNumber = (
Int_t) ((maxy-miny)/(rmaxy - rminy)*numy + 0.5);
2055 if (yBinNumber < 1) yBinNumber = 1;
2056 if (yBinNumber > 1000) yBinNumber= 1000;
2059 ((
TH2*)player->
GetHistogram())->SetBins(xBinNumber, minx-oldXOffset+xOffset,
2060 maxx-oldXOffset+xOffset,
2061 yBinNumber, miny-oldYOffset+yOffset,
2062 maxy-oldYOffset+yOffset);
2074 xaxis->
FindBin(rmaxx-xBinWidth/2));
2076 yaxis->
FindBin(rmaxy-yBinWidth/2));
2082 xaxis->
FindBin(rmaxx-xBinWidth/2));
2084 yaxis->
FindBin(rmaxy-yBinWidth/2));
2123 Double_t xOffset = 1.*numx/100*xBinWidth;
2124 Double_t yOffset = 1.*numy/100*yBinWidth;
2131 if (!player)
return;
2150 maxx-oldXOffset+xOffset,
2151 ny, miny-oldYOffset+yOffset,
2152 maxy-oldYOffset+yOffset);
2162 xaxis->
FindBin(rmaxx+xOffset-oldXOffset-xBinWidth/2));
2164 yaxis->
FindBin(rmaxy+yOffset-oldYOffset-yBinWidth/2));
2190 Double_t xOffset = 1.*numx/100*xBinWidth;
2191 Double_t yOffset = 1.*numy/100*yBinWidth;
2199 if (!player)
return;
2218 maxx-oldXOffset+xOffset,
2219 ny, miny-oldYOffset+yOffset,
2220 maxy-oldYOffset+yOffset);
2230 xaxis->
FindBin(rmaxx+xOffset-oldXOffset-xBinWidth/2));
2232 yaxis->
FindBin(rmaxy+yOffset-oldYOffset-yBinWidth/2));
2265 if (!player)
return;
2283 maxx+xOffset-oldXOffset,
2284 ny,miny+yOffset-oldYOffset,
2285 maxy+yOffset-oldYOffset);
2295 xaxis->
FindBin(rmaxx+xOffset-oldXOffset-xBinWidth/2));
2297 yaxis->
FindBin(rmaxy+yOffset-oldYOffset-yBinWidth/2));
2317 Int_t px1,py1,px2,py2;
2323 px1 =
fGedEditor->GetPad()->XtoAbsPixel(xleft);
2325 px2 =
fGedEditor->GetPad()->XtoAbsPixel(xright);
2345 Float_t p1[3], p2[3], p3[3], p4[3], p5[3], p6[3], p7[3], p8[3];
2355 p1[0] = p4[0] = p5[0] = p8[0] =
2357 p2[0] = p3[0] = p6[0] = p7[0] =
2359 p1[1] = p2[1] = p3[1] = p4[1] = rmin[1];
2360 p5[1] = p6[1] = p7[1] = p8[1] = rmax[1];
2361 p1[2] = p2[2] = p5[2] = p6[2] = rmin[2];
2362 p3[2] = p4[2] = p7[2] = p8[2] = rmax[2];
2462 fSldXMin->SetNumber(
fHist->GetXaxis()->GetBinLowEdge(
fHist->GetXaxis()->GetFirst()));
2504 Int_t px1,py1,px2,py2;
2511 py1 =
fGedEditor->GetPad()->YtoAbsPixel(ybottom);
2513 py2 =
fGedEditor->GetPad()->YtoAbsPixel(ytop);
2532 Float_t p1[3], p2[3], p3[3], p4[3], p5[3], p6[3], p7[3], p8[3];
2542 p1[0] = p2[0] = p3[0] = p4[0] = rmin[0];
2543 p5[0] = p6[0] = p7[0] = p8[0] = rmax[0];
2544 p1[1] = p4[1] = p5[1] = p8[1] =
2546 p2[1] = p3[1] = p6[1] = p7[1] =
2548 p1[2] = p2[2] = p5[2] = p6[2] = rmin[2];
2549 p3[2] = p4[2] = p7[2] = p8[2] = rmax[2];
2649 fSldYMin->SetNumber(
fHist->GetYaxis()->GetBinLowEdge(
fHist->GetYaxis()->GetFirst()));
2680 Int_t nybinmin = yaxis -> GetFirst();
2681 Int_t nybinmax = yaxis -> GetLast();
2704 fGedEditor->GetPad()->SetFrameFillStyle(pattern);
2715 case (-1) : {s =
"";
break;}
2740 case (-1) : {s =
"";
break;}
2758 case (-1) : {s =
"";
break;}
2760 case (
kCONT_0) : {s =
"CONT0";
break;}
2761 case (
kCONT_1) : {s =
"CONT1";
break;}
2762 case (
kCONT_2) : {s =
"CONT2";
break;}
2763 case (
kCONT_3) : {s =
"CONT3";
break;}
2764 case (
kCONT_4) : {s =
"CONT4";
break;}
2802 cutopt += opt(scut,ecut);
2884 }
else if (
n == 1) {
ULong_t Pixel_t
Pixel value.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char text
Class to manage histogram axis.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Int_t GetLast() const
Return last bin on the axis i.e.
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
Set the viewing range for the axis from ufirst to ulast (in user coordinates, that is,...
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis using bin numbers.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Int_t GetFirst() const
Return first bin on the axis i.e.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Dragging the slider will generate the event:
TGFrame(const TGFrame &)=delete
Bool_t Contains(Int_t x, Int_t y) const
Concrete class for horizontal slider.
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
A listbox is a box, possibly with scrollbar, containing entries.
void Resize(UInt_t w, UInt_t h) override
Resize the listbox widget.
Defines top level windows that interact with the system Window Manager.
TGNumberEntry is a number entry input widget with up/down buttons.
TGClient * fClient
Connection to display server.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
TGedEditor * fGedEditor
manager of this frame
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
TGedFrame(const TGedFrame &)=delete
Bool_t fInit
init flag for setting signals/slots
virtual void MakeTitle(const char *title)
Create attribute frame title.
void SetDrawOption(Option_t *option="") override
Set drawing option for object.
virtual void Refresh(TObject *model)
Refresh the GUI info about the object attributes.
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Option_t * GetDrawOption() const override
Get draw options of the selected object.
Bool_t fAvoidSignal
flag for executing slots
is a button with pattern area with a little down arrow.
@ kNoAxis
NOTE: Must always be 0 !!!
Editor for changing TH2 histogram attributes, rebinning & fitting.
TGNumberEntryField * fSldXMin
Contains the minimum value of the x-Axis.
TGCheckButton * fAddArr
CheckBox connected to Arr-Option.
TGNumberEntryField * fYOffsetNumberEntry
Shows the offset to the y origin of the histogram.
virtual void DoOffsetPressed()
Slot connected to the OffSetSlider.
TGNumberEntry * fContLevels1
Set number of contour levels.
virtual void DoBarWidth()
Slot connected to the bar width of the bar chart.
TGCompositeFrame * f9
Frame that contains the 3D CheckBox DrawOptions.
virtual void DoBinReleased()
Slot connected to the rebin slider in case of no ntuple histogram.
TGCheckButton * fAddBB
Draw back box (or not)
TGNumberEntryField * fXOffsetNumberEntry
Shows the offset to the x origin of the histogram.
TGCheckButton * fAddFB
Draw front box (or not)
TGCompositeFrame * fBinXCont
Contains the rebin widgets for case 1.
virtual void DoBinPressed()
Slot connected to the rebin slider in case of no ntuple histogram.
TGDoubleHSlider * fSliderY
Slider to set y-axis range.
void CreateBinTab()
Create the Binning tab.
TGTextButton * fApply
Apply-Button to accept the rebinned histogram.
TGCompositeFrame * f6
Frame that contains the 2D CheckBox DrawOptions.
virtual void DoAddError(Bool_t on)
Slot connected to the "Error" check button.
virtual void DoAddArr(Bool_t on)
Slot connected to the "Arrow draw option" check button.
TGCheckButton * fAddError
CheckBox connected to error bars.
TGHSlider * fBinYSlider1
Slider to set y rebinning integer value.
TGNumberEntryField * fBinXNumberEntry1
Label which shows the rebinned x bin number.
virtual void DoAddBB()
Slot connected to the "BB back-box draw option" check button.
TGCheckButton * fAddPalette1
CheckBox connected to Z option (3D)
TGCompositeFrame * f38
Frame that contains the Frame Fill widgets.
virtual void DoFillPattern(Style_t)
Slot connected to the fill area pattern.
TGDoubleHSlider * fSliderX
Slider to set x-axis range.
virtual void DoApply()
Slot connected to the Apply Button in the Rebinned histogram Window.
TGNumberEntryField * fBinYNumberEntry
Label which shows the rebinned bin number.
TGHSlider * fBinYSlider
Slider to set rebinning y integer value.
TGHSlider * fYBinOffsetSld
Add an y-offset to the origin of the histogram.
TGNumberEntryField * fBinXNumberEntry
Label which shows the rebinned bin number.
virtual void DoSliderYPressed()
Slot connected to y-axis slider which initialises the "virtual" box which is drawn in delay draw mode...
TGCheckButton * fAddPalette
CheckBox connected to Z option (2D)
TGCompositeFrame * fBinXCont1
Contains the X Rebin Widgets for case 2.
TString fCutString
Contais info about graphical cuts (if any)
virtual void DoOffsetMoved()
Slot connected to the OffSetSlider.
void PaintBox3D(Float_t *p1, Float_t *p2, Float_t *p3, Float_t *p4)
Paint a square in 3D.
TGRadioButton * fDim
2D-Plot RadioButton
TGNumberEntry * fBarWidth
Set bar width of histogram.
TGNumberEntryField * fSldYMin
Contains the minimum value of the y-Axis.
virtual void DoYAxisRange()
Slot connected to the Max/Min number entry fields showing y-axis range.
virtual void DoContLevel()
Slot connected to the contour level number entry fContLevels.
virtual void DoContLevel1()
Slot connected to the contour level number entry fContLevels1.
TGHSlider * fBinXSlider
Slider to set rebinning x integer value.
TGHSlider * fXBinOffsetSld
Add an x-offset to the origin of the histogram.
void RecursiveRemove(TObject *obj) override
If the contained histogram obj is deleted we must set its pointer to zero.
virtual void DoAddPalette(Bool_t on)
Slot connected to the color palette check button.
TGRadioButton * fDim0
3D-Plot RadioButton
virtual void DoHistChanges()
Slot connected to histogram type, coordinate system, contour combo box.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGLayoutHints * fDimlh
layout hints for 2D-Plot RadioButton
TGCheckButton * fAddScat
CheckBox connected to Scat-Option.
virtual void DoBinLabel1()
Slot connected to the Bin Number Entry for the Rebin.
Int_t fTitlePrec
font precision level
TGLabel * fColContLbl
No. of Contours Label 1.
TGNumberEntry * fContLevels
Set number of contour levels.
TString GetHistTypeLabel()
Return the immediate histogram type (HIST, LEGO1-4, SURF1-5).
TGedPatternSelect * fFramePattern
Select the Frame Pattern Style.
TGCheckButton * fDelaydraw
Delayed drawing of the new axis range.
void SetModel(TObject *obj) override
Pick up the values of current histogram attributes.
TGHSlider * fBinXSlider1
Slider to set x rebinning integer value.
static TGComboBox * BuildHistCoordsComboBox(TGFrame *parent, Int_t id)
Create coordinate system combo box.
TGLayoutHints * fDim0lh
layout hints for 3D-Plot RadioButton
virtual void DoAddScat(Bool_t on)
Slot connected to the "Scat draw option" check button.
virtual void DoSliderXReleased()
Slot connected to the x-axis slider finalizing values after the slider movement.
TGCheckButton * fAddCol
CheckBox connected to Col-Option.
virtual void DoSliderXPressed()
Slot connected to the x axis range slider that initialises the "virtual" box which is drawn in delay ...
TGCheckButton * fAddBox
CheckBox connected to Box-Option.
virtual void DoAddText(Bool_t on)
Slot connected to the "Text draw option" check button.
TH2 * fHist
histogram object
TH2Editor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor of histogram attribute GUI.
virtual void DoHistView()
Slot connected to the 'Plot' button group.
Bool_t AcceptModel(TObject *model) override
Check if object is able to configure with this editor.
virtual void DoXAxisRange()
Slot connected to the Max/Min number entry fields showing x-axis range.
TGCheckButton * fAddText
Draw bin contents as text.
TString GetCutOptionString()
Return draw option string related to graphical cut in use.
Int_t * Dividers(Int_t n)
Give an array of dividers of n (without the trivial divider n)) in the first entry the number of divi...
TString GetHistContLabel()
Returns histogram contour option (None,Cont0..5).
virtual void DoBinReleased1()
Slot connected to the BinNumber Slider in case of a 'ntuple histogram'.
TGColorSelect * fFrameColor
Select the Frame Color.
TString GetHistCoordsLabel()
Return the immediate coordinate system of the histogram.
virtual void DoSliderYMoved()
Slot connected to the x-slider for redrawing the histogram with the new slider Range (immediately).
virtual void DoBinLabel()
Slot connected to the Bin Number Entry for the Rebin.
TGTextButton * fCancel
Cancel-Button to reprobate the rebinned histogram.
TGCompositeFrame * fBin
Contains the Binning Widgets.
TGNumberEntryField * fSldYMax
Contains the maximum value of the y-Axis.
~TH2Editor() override
Destructor.
TGCompositeFrame * f13
Frame that contains the Bar Width/Offset NumberEntries.
TGNumberEntryField * fSldXMax
Contains the maximum value of the x-Axis.
virtual void DoBinMoved1()
Slot connected to the rebin slider in case of an ntuple histogram.
virtual void DoTitle(const char *text)
Slot connected to the histogram title setting.
TGComboBox * fContCombo
Contour selecting combo box.
TGTextEntry * fTitle
histogram title input field
virtual void DoAddCol(Bool_t on)
Slot connected to the "Col draw option" check button.
virtual void DoBarOffset()
Slot connected to the bar offset of the bar chart.
virtual void DoOffsetReleased()
Slot connected to the OffSetSlider that changes the origin of the histogram inbetween a binwidth; reb...
virtual void DoBinOffset()
Slot connected to the OffSetNumberEntry, related to the OffSetSlider changes the origin of the histog...
TGLabel * fColContLbl1
No. of Contours Label 2.
static TGComboBox * BuildHistTypeComboBox(TGFrame *parent, Int_t id)
Create histogram type combo box.
void ActivateBaseClassEditors(TClass *cl) override
Skip TH1Editor in building list of editors.
static TGComboBox * BuildHistContComboBox(TGFrame *parent, Int_t id)
Create contour combo box.
TGNumberEntry * fBarOffset
Set bar offset of histogram.
TGComboBox * fCoordsCombo
Coordinate System combo box.
virtual void DoCancel()
Slot connected to the Cancel Button in the Rebinned histogram Window.
TGCompositeFrame * fBinYCont1
Contains the Y Rebin Widgets for case 2.
virtual void DoSliderYReleased()
Slot connected to the y-axis slider finalizing values after the slider movement.
TGHButtonGroup * fDimGroup
Radiobuttongroup to change 2D <-> 3D-Plot.
virtual void DoBinMoved()
Slot connected to the rebin sliders in case of no ntuple histogram does the rebinning of the selected...
virtual void DoAddFB()
Slot connected to the "FB front-box draw option" check button.
TString GetHistAdditiveLabel()
Return histogram additive options (Arr,Box,Col,Scat,Col,Text,E,Z,FB,BB).
TGNumberEntryField * fBinYNumberEntry1
Label which shows the rebinned y bin number.
TGComboBox * fTypeCombo
histogram type combo box
virtual void DoHistSimple()
Slot connected to the 2D-Plot radio button.
virtual void DoFillColor(Pixel_t)
Slot connected to the fill area color.
virtual void DoAddBox(Bool_t on)
Slot connected to the "Box draw option" check button.
virtual void DoHistComplex()
Slot connected to the 3D-Plot radio button.
virtual void DoSliderXMoved()
Slot connected to the x-Slider that redraws the histogram with the new slider range.
TGCompositeFrame * f12
Frame that contains the Bar-Title.
Service class for 2-D histogram classes.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
A specialized TSelector for TTree::Draw.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
void ToUpper()
Change string to upper case.
TString & Remove(Ssiz_t pos)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Implement some of the functionality of the class TTree requiring access to extra libraries (Histogram...
TH1 * GetHistogram() const override
Int_t GetNfill() const override
TSelector * GetSelector() const override
virtual Double_t * GetRmax()=0
virtual Double_t * GetRmin()=0
static TVirtualTreePlayer * GetCurrentPlayer()
Static function: return the current player (if any)
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.