19 #include "TDirectory.h"
22 #include <QButtonGroup>
27 setObjectName(
"Go4CreateNewHistogram");
46 HisTypeGrp->button(htype % 10)->setChecked(
true);
52 XNoOfBins->setText(QString::number(npoints));
53 Xmin->setText(QString::number(min));
54 Xmax->setText(QString::number(max));
57 YNoOfBins->setText(QString::number(npoints));
58 Ymin->setText(QString::number(min));
59 Ymax->setText(QString::number(max));
62 ZNoOfBins->setText(QString::number(npoints));
63 Zmin->setText(QString::number(min));
64 Zmax->setText(QString::number(max));
71 CreateRemote->setEnabled(on);
76 CreateHistogram->setEnabled(on);
86 QByteArray bname = HisName->text().toLatin1();
87 QByteArray btitle = HisTitle->text().toLatin1();
89 const char* hname = bname.constData();
90 const char* htitle = btitle.constData();
94 int nxbins = XNoOfBins->text().toInt();
95 int nybins = YNoOfBins->text().toInt();
96 int nzbins = ZNoOfBins->text().toInt();
98 double xmin = Xmin->text().toDouble();
99 double xmax = Xmax->text().toDouble();
100 double ymin = Ymin->text().toDouble();
101 double ymax = Ymax->text().toDouble();
102 double zmin = Zmin->text().toDouble();
103 double zmax = Zmax->text().toDouble();
112 TDirectory* savdir = gDirectory;
116 case 11: h =
new TH1S(hname, htitle, nxbins, xmin, xmax);
break;
117 case 12: h =
new TH1D(hname, htitle, nxbins, xmin, xmax);
break;
118 case 13: h =
new TH1F(hname, htitle, nxbins, xmin, xmax);
break;
119 case 14: h =
new TH1I(hname, htitle, nxbins, xmin, xmax);
break;
120 case 15: h =
new TH1C(hname, htitle, nxbins, xmin, xmax);
break;
121 case 21: h =
new TH2S(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax);
break;
122 case 22: h =
new TH2D(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax);
break;
123 case 23: h =
new TH2F(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax);
break;
124 case 24: h =
new TH2I(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax);
break;
125 case 25: h =
new TH2C(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax);
break;
126 case 31: h =
new TH3S(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax, nzbins, zmin, zmax);
break;
127 case 32: h =
new TH3D(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax, nzbins, zmin, zmax);
break;
128 case 33: h =
new TH3F(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax, nzbins, zmin, zmax);
break;
129 case 34: h =
new TH3I(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax, nzbins, zmin, zmax);
break;
130 case 35: h =
new TH3C(hname, htitle, nxbins, xmin, xmax, nybins, ymin, ymax, nzbins, zmin, zmax);
break;
133 if (savdir!=0) savdir->cd();
void SetLocalAvaliable(bool on)
void SetAnalysisAvaliable(bool on)
QButtonGroup * HisClassGrp
void setHistType(int value)
virtual void CreateLocalHist()
QButtonGroup * HisTypeGrp
void getHistAxisPars(int naxis, int &npoints, double &min, double &max)
void setHistAxisPars(int naxis, int npoints, double min, double max)
void setHistName(const QString &value)
void setHistTitle(const QString &value)
virtual void CreateRemoteHis()
TGo4CreateNewHistogram(QWidget *parent=0)