20 #include "qheaderview.h"
22 #include <QtCore/QSignalMapper>
25 #include <QFocusEvent>
27 #include <QMessageBox>
28 #include <QApplication>
32 #include <QFileDialog>
33 #include <QInputDialog>
38 #include "TObjArray.h"
48 #include "TPaveStats.h"
51 #include "Riostream.h"
53 #include "TGo4LockGuard.h"
121 TArrow(), fxType(at_none), fxModel(0), fxOther(0), fdLineAmpl(0.), fxComp(0), fiRangeNum(0),
122 fdRangeY(0.), fdShiftX(0.), fxItem(0), fxPanel(0)
127 TArrow(0.,0.,0.,0.,arrowsize,option), fxType(at_none), fxModel(0), fxOther(0), fdLineAmpl(0.), fxComp(0), fiRangeNum(0),
128 fdRangeY(0.), fdShiftX(0.), fxItem(0), fxPanel(0)
133 TArrow(x1,y1,x2,y2,arrowsize,option), fxType(at_none), fxModel(0), fxOther(0), fdLineAmpl(0.), fxComp(0), fiRangeNum(0),
134 fdRangeY(0.), fdShiftX(0.), fxItem(0), fxPanel(0)
173 Double_t x1 = GetX1(), x2 = GetX2();
174 Double_t y1 = GetY1(), y2 = GetY2();
186 SetX1(ppp-width); SetX2(ppp+width);
193 Double_t left, right;
196 case 0: SetX1(left); SetX2(right);
break;
197 case 1: SetX1(left); SetX2(right);
break;
198 case 2: SetX1(left); SetX2(left+
fdShiftX);
break;
199 case 3: SetX1(right-
fdShiftX); SetX2(right);
break;
206 return (x1 != GetX1()) || (x2 != GetX2()) || (y1 != GetY1()) || (y2 != GetY2());
222 TArrow::ExecuteEvent(event,px,py);
223 if (event!=kButton1Up)
return;
229 fdLineAmpl = (GetY1()>GetY2()) ? GetY1() : GetY2();
236 Double_t pos =
fxOther->GetX2();
238 Double_t w0 = (GetX2()-GetX1())/2;
239 Double_t w1 = pos-GetX1();
240 Double_t w2 = GetX2()-pos;
242 if (TMath::Abs(w0-width)>1e-10) {
244 if (TMath::Abs(w1-width)>1e-10) w=w1;
else w=w2;
255 Double_t left, right;
258 left = GetX1()<GetX2() ? GetX1() : GetX2();
259 right = GetX1()>GetX2() ? GetX1() : GetX2();
294 FitList->setContextMenuPolicy(Qt::CustomContextMenu);
313 QTableWidgetItem* item =
new QTableWidgetItem;
314 item->setFlags(item->flags() & ~
Qt::ItemIsEditable);
315 Wiz_DataSlotsTable->setItemPrototype(item);
316 Wiz_DataSlotsTable->setContextMenuPolicy(Qt::CustomContextMenu);
321 MenuBar =
new QMenuBar(MenuFrame);
324 #if (QT_VERSION >= 0x040600)
325 MenuBar->setNativeMenuBar(kFALSE);
334 ViewMap =
new QSignalMapper(
this);
339 SettMap =
new QSignalMapper(
this);
375 ItemMap =
new QSignalMapper(
this);
379 Wiz_DataSlotsTable->horizontalHeader()->setStretchLastSection(
true);
380 Wiz_ParTable->horizontalHeader()->setStretchLastSection(
true);
388 gridLayout->setMargin(3);
389 gridLayout->setSpacing(1);
417 if (cl==0)
return false;
419 return (cl->InheritsFrom(TGo4Fitter::Class())) ||
420 (cl->InheritsFrom(TH1::Class())) ||
421 (cl->InheritsFrom(TGraph::Class()));
428 if (cl->InheritsFrom(TGo4Fitter::Class())) {
433 if (event==0)
return;
435 QWidget* w = childAt(event->pos());
437 if (w == Wiz_DataSlotsTable) {
438 QPoint pnt = Wiz_DataSlotsTable->mapFrom(
this, event->pos());
439 QTableWidgetItem* item = Wiz_DataSlotsTable->itemAt(pnt);
441 int nrow = item ? item->row() : -1;
443 if ((nrow<0) || (nrow>
fxWizSlots->GetLast()))
return;
455 if(w == (QWidget*)FitList->viewport()) {
456 QPoint pnt = FitList->viewport()->mapFrom(
this, event->pos());
484 if (strcmp(linkname,
"Fitter")==0) {
547 if ((panel==0) || (pad==0))
return;
578 if ((panel!=0) && (pad!=0)) {
601 if (panel==0)
return;
651 AddLink(itemname.toLatin1().constData(),
"Fitter");
670 if (fitter==0)
return 0;
674 return dynamic_cast<TGo4Fitter*
> (fitter->Clone());
705 if ((panel!=0) && (pad!=0)) {
708 if (!overwrite && (fitterslot!=0))
722 if ( QMessageBox::information(0,
723 QString(
"Delete fitter"),
724 QString(
"Are you sure?"),
725 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
774 QTableWidget* tab = ParsTable;
780 for(
int ncol=0;ncol<tab->columnCount();ncol++) {
782 str+=tab->horizontalHeaderItem(ncol)->text();
786 for(
int nrow=0;nrow<tab->rowCount();nrow++) {
787 str = tab->verticalHeaderItem(nrow)->text();
788 for(
int ncol=0;ncol<tab->columnCount();ncol++) {
790 str+=tab->item(nrow, ncol)->text();
830 if (fitter==0)
return;
832 if (fitter->
GetNumData()!=1) { std::cout <<
" Incorrect data" << std::endl;
return; }
850 fitter->
AddPolynoms(data->GetName(),
"Pol", Smp_PolOrderSpin->value(), NumDim);
866 if (model && ((nmodel==1) || (nmodel==2)))
LocateModel(model, data,
false);
877 if (fitter==0)
return;
888 if (fitter==0)
return;
891 if (finder==0)
return;
895 else data = fitter->
GetData(0);
926 if (fitter==0)
return;
933 while (n<fitter->GetNumActions()) {
935 if (action==finder) n++;
942 QString cmd(
"MIGRAD ");
945 minuit->
AddCommand(cmd.toLatin1().constData());
990 if (selecteddata && (data!=selecteddata))
continue;
1008 if (selecteddata==0) NeedPads = fitter->
GetNumData();
1012 int DivX = (int)TMath::Sqrt(NeedPads*1.);
1014 while (DivX*DivY<NeedPads) DivY++;
1022 if (selecteddata && (data!=selecteddata))
continue;
1024 const char* drawopt = 0;
1038 if ((panel==0) || (pad==0))
continue;
1061 Double_t x1 = x2 - gStyle->GetStatW();
1062 Double_t y1 = y2 - gStyle->GetStatH();
1064 if (LineParsChk->isChecked()) {
1065 x1 = 0.6; x2 = 0.95;
1066 y1 = 0.8; y2 = 0.88;
1069 TPaveStats* stats =
dynamic_cast<TPaveStats*
> (pad->GetPrimitive(
"stats"));
1071 x1 = stats->GetX1NDC();
1072 x2 = stats->GetX2NDC();
1073 y2 = stats->GetY1NDC() - 0.03;
1074 y1 = y2 - (stats->GetY2NDC() - stats->GetY1NDC());
1075 if (y1<0.02) y1 = 0.02;
1078 TLegend* leg =
dynamic_cast<TLegend*
> (pad->GetPrimitive(
"fitlegend"));
1080 x1 = leg->GetX1NDC();
1081 x2 = leg->GetX2NDC();
1082 y2 = leg->GetY1NDC() - 0.03;
1083 y1 = y2 - (leg->GetY2NDC() - leg->GetY1NDC());
1084 if (y1<0.02) y1 = 0.02;
1087 TPaveStats* info =
dynamic_cast<TPaveStats*
>
1090 bool infocreated =
false;
1097 info =
new TPaveStats(x1,y1,x2,y2,
"brNDC");
1098 info->SetFillColor(gStyle->GetStatColor());
1099 info->SetFillStyle(gStyle->GetStatStyle());
1100 info->SetBorderSize(gStyle->GetStatBorderSize());
1101 info->SetTextFont(gStyle->GetStatFont());
1102 if (gStyle->GetStatFont()%10 > 2)
1103 info->SetTextSize(gStyle->GetStatFontSize());
1104 info->SetFitFormat(gStyle->GetFitFormat());
1105 info->SetStatFormat(gStyle->GetStatFormat());
1106 info->SetTextColor(gStyle->GetStatTextColor());
1107 info->SetTextAlign(12);
1108 info->SetName(
"fitinfo");
1111 info->AddText(data->GetName());
1112 info->AddLine(0,0,0,0);
1114 if (LineParsChk->isChecked())
1119 if (!model->
IsAssignTo(data->GetName()))
continue;
1121 if (LineParsChk->isChecked()) {
1122 Double_t ampl, pos, width;
1126 if (!model->
GetWidth(0,width)) width = 0.;
1128 bool recalculatew = (model->InheritsFrom(TGo4FitModelGauss1::Class()) ||
1129 model->InheritsFrom(TGo4FitModelGauss2::Class()) ||
1130 model->InheritsFrom(TGo4FitModelGaussN::Class())) &&
1132 double widthk = recalculatew ? 2.3548 : 1.0;
1134 TString tt = TString::Format(
"%7s | %s%s | %s%s %s%s",
1136 "%", gStyle->GetStatFormat(),
1137 "%", gStyle->GetStatFormat(),
1138 "%", gStyle->GetStatFormat());
1140 info->AddText(Form(tt.Data(), ampl, pos, width*widthk));
1143 for(Int_t np=0;np<model->
NumPars();np++) {
1145 if (len>maxparlen) maxparlen = len;
1147 TString tt = TString::Format(
"%s%ds = %s%s",
"%",maxparlen,
"%",gStyle->GetStatFormat());
1149 for(Int_t np=0;np<model->
NumPars();np++)
1159 TObject* model = fitter->
CreateDrawObject(
"Model", data->GetName(), kTRUE);
1164 TObject* model = fitter->
CreateDrawObject(
"Background", data->GetName(), kTRUE,
"Background");
1171 if (!model->
IsAssignTo(data->GetName()))
continue;
1173 TObject* comp = fitter->
CreateDrawObject(model->GetName(), data->GetName(), kTRUE, model->GetName());
1174 if (comp==0)
continue;
1202 if ( QMessageBox::information(0,
1203 QString(
"Clear fitter"),
1204 QString(
"Are you sure?"),
1205 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1217 if (fitter==0)
return;
1220 if ( QMessageBox::information(0,
1221 QString(
"Clear fitter"),
1222 QString(
"Are you sure?"),
1223 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1233 if (fitter==0)
return;
1235 QString fname(fitter->GetName());
1239 fname = QFileDialog::getSaveFileName(
this,
1240 "Save fitter dialog",
1242 "Root file (*.root)");
1243 if (fname==QString::null)
return;
1248 TFile f(fname.toLatin1().constData(),
"recreate");
1254 TObject* obj = item->
Object();
1259 if (obj->InheritsFrom(TGo4Fitter::Class()))
1260 str = QInputDialog::getText(
this,
1261 QString(
"Go4 Fit Panel"),
1262 QString(
"Enter parameters for Print() command"),
1263 QLineEdit::Normal, str, &ok);
1271 ListStack->addWidget(widget);
1274 ListStack->setCurrentWidget(widget);
1288 if ((data==0) || (fitter==0))
return;
1291 if ( QMessageBox::information(0,
1292 QString(
"Delete data"),
1293 QString(
"Are you sure to delete ") + data->GetName(),
1294 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1310 if (fitter==0)
return;
1313 if ( QMessageBox::information(0,
1314 QString(
"Delete all data"),
1315 QString(
"Are you sure to delete all data objects"),
1316 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1331 if ((item==0) || (item->
Parent()==0))
return;
1335 if ((data==0) || (fitter==0))
return;
1338 if ( QMessageBox::information(0,
1339 QString(
"Delete models"),
1340 QString(
"Are you sure to delete models, assosiated to ") + data->GetName(),
1341 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1365 if ((model==0) || (fitter==0))
return;
1368 if ( QMessageBox::information(0,
1369 QString(
"Delete model"),
1370 QString(
"Are you sure to delete ") + model->GetName(),
1371 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1383 if (fitter==0)
return;
1386 if ( QMessageBox::information(0,
1387 QString(
"Delete all models"),
1388 QString(
"Are you sure to delete all models objects"),
1389 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1405 if ((fitter==0) || (model==0))
return;
1420 if (fitter==0)
return;
1423 if (data==0)
return;
1435 FitList->setCurrentItem(curr, QItemSelectionModel::Select);
1445 if (fitter==0)
return;
1458 FitList->setCurrentItem(curr, QItemSelectionModel::Select);
1464 if (item==0)
return;
1466 if (model==0)
return;
1478 if (model==0)
return;
1491 if ((model==0) || (fitter==0))
return;
1504 if ((model==0) || (fitter==0))
return;
1515 if (item==0)
return;
1521 int num = item->
Tag();
1526 if ( QMessageBox::information(0,
1527 QString(
"Remove condition"),
1528 QString(
"Are you sure to delete condition ") + item->text(0),
1529 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1545 if ( QMessageBox::information(0,
1546 QString(
"Delete conditions"),
1547 QString(
"Are you sure to delete all conditions"),
1548 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1562 if (item->
Object()->InheritsFrom(TGo4FitData::Class()))
1563 data = dynamic_cast<TGo4FitData*> (item->
Object());
1567 if ((model!=0) && (fitter!=0))
1574 Double_t minx = 0., maxx = 100., miny = 0., maxy = 100;
1578 minx = pad->GetUxmin(); maxx = pad->GetUxmax();
1579 miny = pad->GetUymin(); maxy = pad->GetUymax();
1584 Double_t ddx = 0.1*(maxx-minx);
1587 Double_t ddy = 0.1*(maxy-miny);
1594 if (
id==0) comp->
SetRange(0, minx, maxx);
else
1600 TCutG* cut =
new TCutG(name, 5);
1601 cut->SetTitle(
"range cut of X and Y axis");
1602 cut->SetPoint(0, minx, miny);
1603 cut->SetPoint(1, maxx, miny);
1604 cut->SetPoint(2, maxx, maxy);
1605 cut->SetPoint(3, minx, maxy);
1606 cut->SetPoint(4, minx, miny);
1615 if (item==0)
return;
1619 if(action && fitter) {
1621 if ( QMessageBox::information(0,
1622 QString(
"Delete action"),
1623 QString(
"Are you sure to delete ") + item->text(0),
1624 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1633 if ((item==0) || (item->
Parent()==0))
return;
1638 if(action && fitter) {
1644 FitList->setCurrentItem(item, QItemSelectionModel::Select);
1651 if ((item==0) || (fitter==0))
return;
1654 if (action==0)
return;
1668 if ((item==0) || (fitter==0))
return;
1686 if ( QMessageBox::information(0,
1687 QString(
"Delete output actions"),
1688 QString(
"Are you sure to delete all output actions") + item->text(0),
1689 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1701 if ( QMessageBox::information(0,
1702 QString(
"Delete all actions"),
1703 QString(
"Are you sure to delete all actions"),
1704 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1730 TObjArray* lst =
dynamic_cast<TObjArray*
> (item->
Parent()->
Object());
1732 if((depen==0) || (lst==0))
return;
1735 if ( QMessageBox::information(0,
1736 QString(
"Delete dependency item"),
1737 QString(
"Are you sure to delete ") + item->text(0),
1738 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1749 if (item==0)
return;
1750 TObjArray* lst =
dynamic_cast<TObjArray*
> (item->
Object());
1754 if ( QMessageBox::information(0,
1755 QString(
"Delete all"),
1756 QString(
"Are you sure to delete all items from ") + item->text(0),
1757 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1766 if (item==0)
return;
1768 TObjArray* lst =
dynamic_cast<TObjArray*
> (item->
Object());
1781 if (item==0)
return;
1784 if (pars==0)
return;
1791 if (item==0)
return;
1794 if (pars==0)
return;
1805 if (item==0)
return;
1807 if (pars==0)
return;
1810 if ( QMessageBox::information(0,
1811 QString(
"Delete all"),
1812 QString(
"Are you sure to delete all items"),
1813 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1822 if (item==0)
return;
1831 if (item==0)
return;
1844 if (item==0)
return;
1847 if (pars==0)
return;
1852 name = TString::Format(
"Par%d", num++);
1853 }
while (pars->
FindPar(name.Data()));
1854 pars->
CreatePar(name.Data(),
"additional parameter",0.);
1861 if (item==0)
return;
1865 if ((pars==0) || (par==0))
return;
1868 if ( QMessageBox::information(0,
1869 QString(
"Delete item"),
1870 QString(
"Are you sure to delete ") + par->GetName(),
1871 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1880 if (item==0)
return;
1884 if ((res==0) || (minuit==0))
return;
1887 if ( QMessageBox::information(0,
1888 QString(
"Delete result"),
1889 QString(
"Are you sure to delete ") + res->GetName(),
1890 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
1900 if (item==0)
return;
1904 for (
int n=0; n < item->childCount(); n++)
1905 UpdateItem(dynamic_cast<QFitItem*>(item->child(n)),
true);
1915 if (fititem==0)
return;
1917 QSignalMapper map(
this);
1924 menu.exec(FitList->viewport()->mapToGlobal(pnt));
1935 if (fititem==0)
return;
1965 QWidget* w = PageEmpty;
1967 case 1: w = PageSimple;
break;
1968 case 2: w = PageWizard;
break;
1969 case 3: w = PageExtended;
break;
1970 case 100: w = PageParameters;
break;
1972 if (w!=WidgetStack->currentWidget())
1973 WidgetStack->setCurrentWidget(w);
1981 if (info!=0) status=info;
else {
1983 status = QString(
"Active: ") +
ActivePad()->GetName();
1985 status +=
". Muiltifit";
1987 }
else status =
"Workspace";
1988 if (fitter==0) status+=
". No fitter";
1989 else status = status +
". Fitter: "+fitter->GetName();
1991 MainStatusLbl->setText(status);
1992 MainStatusLbl->update();
1993 MainStatusLbl->repaint();
1995 MainAttachBtn->setEnabled(
true);
1998 MainParsBtn->setText(
"Back");
1999 MainParsBtn->setToolTip(
"Back to last selected page");
2001 MainParsBtn->setText(
"Pars");
2002 MainParsBtn->setToolTip(
"Show list of fitter parameters");
2006 MainFitBtn->setEnabled(
false);
2007 MainDrawBtn->setEnabled(
false);
2008 MainFindBtn->setEnabled(
false);
2009 MainParsBtn->setEnabled(
false);
2011 MainFitBtn->setEnabled((fitter->
GetNumData()>0) &&
2013 MainDrawBtn->setEnabled(fitter->
GetNumData()>0);
2016 MainParsBtn->setEnabled(
true);
2029 itemtext = item->text(0);
2121 if (panel!=0) padname = QString(
"panel \"") + panel->windowTitle() +
"\"";
2152 case 99: close();
break;
2159 if ((
ItemMenu==0) || (item==0))
return;
2167 if (item==0) item =
dynamic_cast<QFitItem*
> (FitList->currentItem());
2168 if (item==0)
return;
2230 QWidget::focusInEvent(event);
2236 QWidget::changeEvent(event);
2249 PF_AmplLbl->setText(QString(
"Threshold: ")+QString::number(finder->
Get0MaxAmplFactor()*100)+
"%");
2251 PF_AmplLbl->setText(
"Threshold:");
2252 PF_AmplLbl->adjustSize();
2260 PF_RelNoiseLbl->setText(QString(
"Noise factor: ")+QString::number(finder->
Get2NoiseFactor()));
2262 PF_RelNoiseLbl->setText(
"Noise factor: ");
2263 PF_RelNoiseLbl->adjustSize();
2270 double zn = str.toDouble(&ok);
2282 double zn = str.toDouble(&ok);
2294 double zn = str.toDouble(&ok);
2335 double zn = str.toDouble(&ok);
2361 bool updatestack =
false, updatepaint =
false;
2363 Wiz_DataList->clear();
2375 QListWidgetItem* item =
new QListWidgetItem(data->GetName());
2376 if (strcmp(data->GetName(),
fxWizDataName.toLatin1().constData())==0) {
2378 item->setSelected(
true);
2380 Wiz_DataList->addItem(item);
2401 Wiz_PFSetupBtn->setEnabled(data!=0);
2404 Wiz_RebuildDataBtn->setVisible(
false);
2405 Wiz_AddDataBtn->setVisible(
true);
2406 Wiz_DelDataBtn->setVisible(
true);
2407 Wiz_AddDataBtn->setEnabled(fitter!=0);
2408 Wiz_DelDataBtn->setEnabled(data!=0);
2410 Wiz_RebuildDataBtn->setVisible(
true);
2411 Wiz_RebuildDataBtn->setEnabled(fitter!=0);
2412 Wiz_AddDataBtn->setVisible(
false);
2413 Wiz_DelDataBtn->setVisible(
false);
2421 Wiz_ModelList->clear();
2433 if (!model->
IsAssignTo(data->GetName()))
continue;
2435 bool assign =
false;
2436 if (data && model->
IsAssignTo(data->GetName())) assign =
true;
2437 QListWidgetItem* item =
new QListWidgetItem(model->GetName());
2438 item->setCheckState(assign ? Qt::Checked : Qt::Unchecked );
2439 if (strcmp(model->GetName(),
fxWizModelName.toLatin1().constData())==0) {
2441 item->setSelected(
true);
2443 Wiz_ModelList->addItem(item);
2448 Wiz_ModelList->setCurrentRow(selindx);
2475 Wiz_AddModelBtn->setEnabled(
true);
2476 Wiz_DelModelBtn->setEnabled(model!=0);
2477 Wiz_CloneModelBtn->setEnabled(model!=0);
2478 Wiz_ShowAllMod->setEnabled(
true);
2480 Wiz_AddModelBtn->setEnabled(
false);
2481 Wiz_DelModelBtn->setEnabled(
false);
2482 Wiz_CloneModelBtn->setEnabled(
false);
2483 Wiz_ShowAllMod->setEnabled(
false);
2496 QWidget* target = 0;
2500 target = Wiz_EmptyPage;
2503 target = Wiz_FitterPage;
2507 Wiz_FitFuncCmb->setCurrentIndex(typ);
2517 if (model==0)
break;
2519 target = Wiz_ModelPage;
2523 Wiz_ModelInfoLbl->setText(modelinfo);
2539 target = Wiz_DataPage;
2541 QString datainfo(
"Data: ");
2542 datainfo += data->GetName();
2543 datainfo +=
" of class: ";
2544 datainfo += data->ClassName();
2546 datainfo +=
"\nCounts=";
2548 datainfo += QString::number(v);
2551 datainfo +=
"\nIntegral=";
2553 datainfo += QString::number(v);
2555 Wiz_DataInfoLbl->setText(datainfo);
2557 QString models(
"Models:");
2561 if (models.length()>45) {
2566 models += model->GetName();
2569 Wiz_DataModelsLbl->setText(models);
2571 Wiz_DataBufChk->setChecked(
2579 Wiz_DataSlotsTable->setRowCount(
fxWizSlots->GetLast()+1);
2583 if (slot==0)
continue;
2585 Wiz_DataSlotsTable->setVerticalHeaderItem(n,
new QTableWidgetItem(slot->GetName()));
2589 Wiz_DataSlotsTable->setItem(n, 0,
new QTableWidgetItem(
" --- "));
2590 Wiz_DataSlotsTable->setItem(n, 1,
new QTableWidgetItem(slot->
GetClass()->GetName()));
2591 Wiz_DataSlotsTable->setItem(n, 2,
new QTableWidgetItem(
"false"));
2593 Wiz_DataSlotsTable->setItem(n, 0,
new QTableWidgetItem(obj->GetName()));
2594 Wiz_DataSlotsTable->setItem(n, 1,
new QTableWidgetItem(obj->ClassName()));
2595 if (slot->
GetOwned()) Wiz_DataSlotsTable->setItem(n, 2,
new QTableWidgetItem(
"true"));
2596 else Wiz_DataSlotsTable->setItem(n, 2,
new QTableWidgetItem(
"false"));
2602 Wiz_DataSlotsTable->resizeColumnsToContents ();
2607 Wiz_DrawDataBtn->setEnabled(data!=0);
2612 target = Wiz_PFPage;
2615 if (finder==0)
break;
2625 PF_MinWidthEdt->setText(QString::number(finder->
Get0MinWidth()));
2626 PF_MaxWidthEdt->setText(QString::number(finder->
Get0MaxWidth()));
2630 PF_WidthEdit->setText(QString::number(finder->
Get1LineWidth()));
2633 PF_RelNoiseSlider->setValue(101 - zn);
2642 if (target) Wiz_Stack->setCurrentWidget(target);
2643 else Wiz_Stack->setCurrentWidget(Wiz_EmptyPage);
2660 if ((fitter!=0) && (data!=0) && (
fiPaintMode==1)) {
2668 if ((fitter!=0) && (model!=0) && (
fiPaintMode==2)) {
2682 QString name = item->text();
2697 QString name = item->text();
2707 if ((fitter!=0) && (data!=0) && (model!=0)) {
2708 bool wasassigned = model->
IsAssignTo(data->GetName());
2709 bool isassigned = (item->checkState() == Qt::Checked);
2711 if (wasassigned != isassigned) {
2713 else fitter->
AssignModelTo(model->GetName(), data->GetName());
2729 QSignalMapper map(
this);
2734 QAction* act = menu.exec(Wiz_AddDataBtn->mapToGlobal(QPoint(5,5)));
2738 for(
id=0;
id<100;
id++)
2739 if (act == (QAction*) map.mapping(
id))
break;
2772 QSignalMapper map(
this);
2777 QAction* act = menu.exec(Wiz_AddModelBtn->mapToGlobal(QPoint(5,5)));
2780 for(
id=0;
id<100;
id++)
2781 if (act == (QAction*) map.mapping(
id))
break;
2795 if (fitter==0)
return;
2798 if ( QMessageBox::information(0,
"Delete models",
2799 QString(
"Are you sure to delete selected models"),
2800 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
2802 for(uint n=0; n<Wiz_ModelList->count();n++) {
2803 if (!Wiz_ModelList->item(n)->isSelected())
continue;
2804 QString name = Wiz_ModelList->item(n)->text();
2805 fitter->
RemoveModel(name.toLatin1().constData(), kTRUE);
2819 if (fitter==0)
return;
2821 for(uint n=0; n<Wiz_ModelList->count();n++) {
2822 if (!Wiz_ModelList->item(n)->isSelected())
continue;
2823 QString name = Wiz_ModelList->item(n)->text();
2824 fitter->
CloneModel(name.toLatin1().constData());
2853 fitter->SetName(name.toLatin1().constData());
2873 if ((data==0) || (fitter==0))
return;
2875 QString newname = QInputDialog::getText(
this,
"Change data name",
"Input new name", QLineEdit::Normal, data->GetName(), &ok);
2876 if (ok && (newname.length()>0) && (newname!=data->GetName())) {
2877 if (fitter->
FindData(newname.toLatin1().constData())) {
2878 QMessageBox::information(
this,
"Fit panel",
"Unable to rename data.\n Name " +
2879 newname +
" already exists",
"return");
2883 data->SetName(newname.toLatin1().constData());
2895 if ((model==0) || (fitter==0))
return;
2897 QString newname = QInputDialog::getText(
this,
"Change model name",
"Input new name", QLineEdit::Normal, model->GetName(), &ok);
2898 if (ok && (newname.length()>0) && (newname!=model->GetName())) {
2899 if (fitter->
FindModel(newname.toLatin1().constData())) {
2900 QMessageBox::information(
this,
"Fit panel", QString(
"Unable to rename model.\n Name ")+
2901 newname +
" already exists\n",
"Return");
2904 model->SetName(newname.toLatin1().constData());
2915 QString name = item->text();
2917 bool checked = (item->checkState() == Qt::Checked);
2927 if ((fitter!=0) && (data!=0) && (model!=0)) {
2928 bool wasassigned = model->
IsAssignTo(data->GetName());
2930 if (wasassigned!=checked) {
2932 else fitter->
AssignModelTo(model->GetName(), data->GetName());
2975 QTableWidgetItem* item = Wiz_DataSlotsTable->itemAt(pnt);
2977 int nrow = item ? item->row() : -1;
2979 if ((nrow<0) || (nrow>
fxWizSlots->GetLast()))
return;
2982 if (slot==0)
return;
2984 QSignalMapper map(
this);
2988 QAction* act = menu.exec(Wiz_DataSlotsTable->mapToGlobal(pnt));
2990 for (
int id=0;
id<10000;
id++)
2991 if (act == (QAction*) map.mapping(
id))
3029 QApplication::setOverrideCursor(Qt::WaitCursor);
3033 QApplication::restoreOverrideCursor();
3057 if (fitter==0)
return;
3062 if ((FF==0) && (NDF==0)) Par_FitterResLbl->hide();
3064 Par_FitterResLbl->setText(
"Result: Fit func = " + QString::number(FF) +
3065 " NDF = " + QString::number(NDF));
3066 Par_FitterResLbl->show();
3078 if (fitter==0)
return;
3081 WidgetStack->setCurrentWidget(PageParameters);
3094 if ((table==0) || (fitter==0) || (TableList==0))
return;
3096 if (model && LinesView)
return;
3115 for (
int naxis=0;naxis<10;naxis++)
3120 table->setColumnCount(nfcol+(MaxAxis+1)*2);
3121 table->setHorizontalHeaderItem(0,
new QTableWidgetItem(
"Amplitude"));
3127 if (!capt.isEmpty())
3128 table->setHorizontalHeaderItem(1,
new QTableWidgetItem(capt));
3130 for (
int naxis=0;naxis<=MaxAxis;naxis++) {
3131 capt = QString(
"Position ") + QString::number(naxis);
3132 table->setHorizontalHeaderItem(nfcol + naxis*2,
new QTableWidgetItem(capt));
3134 capt = QString(
"FWHM ");
3136 capt = QString(
"Sigma ");
3137 capt += QString::number(naxis);
3138 table->setHorizontalHeaderItem(nfcol+1 + naxis*2,
new QTableWidgetItem(capt));
3147 bool recalculatew = (m->InheritsFrom(TGo4FitModelGauss1::Class()) ||
3148 m->InheritsFrom(TGo4FitModelGauss2::Class()) ||
3149 m->InheritsFrom(TGo4FitModelGaussN::Class())) &&
3151 double widthk = recalculatew ? 2.3548 : 1.0;
3153 table->setVerticalHeaderItem(n,
new QTableWidgetItem(m->GetName()));
3155 QTableWidgetItem* item0 =
new QTableWidgetItem(QString::number(m->
GetAmplValue()));
3157 item0->setFlags(item0->flags() & ~
Qt::ItemIsEnabled);
3158 table->setItem(n, 0, item0);
3180 QTableWidgetItem* item1;
3182 item1 =
new QTableWidgetItem(
"---");
3184 item1 =
new QTableWidgetItem(QString::number(v));
3185 item1->setFlags(item1->flags() & ~
Qt::ItemIsEnabled);
3186 table->setItem(n, 1, item1);
3189 for (
int naxis=0;naxis<=MaxAxis;naxis++) {
3191 Double_t pos, width;
3193 QTableWidgetItem* item;
3196 item =
new QTableWidgetItem(QString::number(pos));
3198 item =
new QTableWidgetItem(
"---");
3199 item->setFlags(item->flags() & ~
Qt::ItemIsEnabled);
3202 table->setItem(n, nfcol+naxis*2, item);
3205 item =
new QTableWidgetItem(QString::number(width*widthk));
3207 item =
new QTableWidgetItem(
"---");
3208 item->setFlags(item->flags() & ~
Qt::ItemIsEnabled);
3210 table->setItem(n, nfcol+1+naxis*2, item);
3216 TGo4FitParsList* pars = (model==0) ? dynamic_cast<TGo4FitParsList*> (fitter) :
3218 if (pars==0)
return;
3220 for(Int_t n=0; n<pars->
NumPars();n++)
3221 TableList->Add(pars->
GetPar(n));
3223 table->setColumnCount(6);
3224 table->setHorizontalHeaderItem(0,
new QTableWidgetItem(
"Fixed"));
3225 table->setHorizontalHeaderItem(1,
new QTableWidgetItem(
"Value"));
3226 table->setHorizontalHeaderItem(2,
new QTableWidgetItem(
"Error"));
3227 table->setHorizontalHeaderItem(3,
new QTableWidgetItem(
"Epsilon"));
3228 table->setHorizontalHeaderItem(4,
new QTableWidgetItem(
"Min"));
3229 table->setHorizontalHeaderItem(5,
new QTableWidgetItem(
"Max"));
3231 table->setRowCount(TableList->GetLast()+1);
3233 for(Int_t n=0;n<=TableList->GetLast();n++) {
3235 if (par==0)
continue;
3237 if (model) table->setVerticalHeaderItem(n,
new QTableWidgetItem(par->GetName()));
3238 else table->setVerticalHeaderItem(n,
new QTableWidgetItem(par->
GetFullName()));
3240 QTableWidgetItem* checkitem =
new QTableWidgetItem(
"fix");
3241 checkitem->setCheckState(par->
GetFixed() ? Qt::Checked : Qt::Unchecked);
3242 table->setItem(n, 0, checkitem);
3244 QTableWidgetItem* item =
new QTableWidgetItem(QString::number(par->
GetValue()));
3246 item->setFlags(item->flags() & ~
Qt::ItemIsEnabled);
3247 table->setItem(n, 1, item);
3249 table->setItem(n, 2,
new QTableWidgetItem(QString::number(par->
GetError())));
3251 Double_t eps, min, max;
3252 if (par->
GetEpsilon(eps)) table->setItem(n, 3,
new QTableWidgetItem(QString::number(eps)));
3253 else table->setItem(n, 3,
new QTableWidgetItem(
""));
3256 table->setItem(n, 4,
new QTableWidgetItem(QString::number(min)));
3257 table->setItem(n, 5,
new QTableWidgetItem(QString::number(max)));
3259 table->setItem(n, 4,
new QTableWidgetItem(
""));
3260 table->setItem(n, 5,
new QTableWidgetItem(
""));
3264 table->resizeColumnsToContents();
3265 table->resizeRowsToContents();
3275 if ((nrow<0) || (nrow>TableList->GetLast()))
return;
3279 if (model==0)
return;
3281 bool recalculatew = (model->InheritsFrom(TGo4FitModelGauss1::Class()) ||
3282 model->InheritsFrom(TGo4FitModelGauss2::Class()) ||
3283 model->InheritsFrom(TGo4FitModelGaussN::Class())) &&
3285 double widthk = recalculatew ? 2.3548 : 1.0;
3288 double zn = table->item(nrow, ncol)->text().toDouble(&ok);
3293 int naxis = (ncol-nfcol) /2;
3294 if ((ncol-nfcol) % 2 == 0) model->
SetPosition(naxis, zn);
3295 else model->
SetWidth(naxis, zn/widthk);
3305 if (table->item(nrow,0)->checkState()==Qt::Checked) par->
SetFixed(kTRUE);
else
3306 if (table->item(nrow,0)->checkState()==Qt::Unchecked) par->
SetFixed(kFALSE);
3308 table->item(nrow,1)->setFlags(table->item(nrow,1)->flags() & ~
Qt::ItemIsEnabled);
3310 table->item(nrow,1)->setFlags(table->item(nrow,1)->flags() | Qt::ItemIsEnabled);
3316 double zn = table->item(nrow,1)->text().toDouble(&ok);
3326 double zn = table->item(nrow,2)->text().toDouble(&ok);
3331 double zn = table->item(nrow,3)->text().toDouble(&ok);
3336 std::cout <<
"Changing col " << ncol << std::endl;
3339 bool range_changed =
false;
3340 double zn = table->item(nrow, ncol)->text().toDouble(&ok);
3343 bool changemin =
false;
3344 bool changemax =
false;
3351 if (min<vvv) max = 2*vvv - min;
3356 if (max>vvv) min = 2*vvv - max;
3363 if (max<min) { max = min; changemax =
true; }
3367 if (min>max) { min = max; changemin =
true; }
3370 range_changed =
true;
3373 table->item(nrow, 4)->setText(QString::number(min));
3375 table->item(nrow, 5)->setText(QString::number(max));
3378 if ((table->item(nrow, ncol)->text().length()==0) &&
3379 (table->item(nrow, 9-ncol)->text().length()==0)) {
3381 range_changed =
true;
3386 if (range_changed) {
3388 table->item(nrow,0)->
3389 setCheckState(par->
GetFixed() ? Qt::Checked : Qt::Unchecked);
3391 table->item(nrow,1)->setFlags(table->item(nrow,1)->flags() & ~
Qt::ItemIsEnabled);
3393 table->item(nrow,1)->setFlags(table->item(nrow,1)->flags() | Qt::ItemIsEnabled);
3394 table->item(nrow,1)->setText(QString::number(par->
GetValue()));
3430 Wiz_PFPolynSpin->setEnabled(zn);
3521 if ((panel==0) || (pad==0))
return 0;
3538 if ((fitter==0) || (panel==0) || (pad==0))
return;
3542 for (Int_t n=0;n<npads;n++) {
3543 TPad* subpad = panel->
GetSubPad(pad, n,
false);
3546 if (obj==0)
continue;
3550 if (obj->InheritsFrom(TH1::Class()))
3553 if (obj->InheritsFrom(TGraph::Class()))
3603 if (fitter) Wiz_FitNameEdt->setText(QString(fitter->GetName()));
3604 else Wiz_FitNameEdt->setText(QString(
""));
3626 FitList->setSortingEnabled(
false);
3634 fitteritem->setExpanded(
true);
3635 FitList->setCurrentItem(fitteritem, QItemSelectionModel::Select);
3649 if (fitter==0)
return;
3651 for(Int_t n = 0; n<fitter->
NumSlots();n++) {
3653 if (pad==0)
continue;
3662 if((item==0) || (menu==0))
return false;
3667 AddIdAction(menu, map,
"Create appropriate fitter", 9);
3677 AddIdAction(menu, map,
"Memorize parameters", 706);
3678 AddIdAction(menu, map,
"Remember parameters", 707);
3685 AddIdAction(menu, map,
"Remove assosiated models", 102);
3712 if (fitter && model) {
3713 AddIdAction(menu, map,
"Clear all assignments", 301);
3714 AddIdAction(menu, map,
"Assign to all data", 302);
3715 menu->addSeparator();
3723 AddIdAction(menu, map, QString(
"Clear assignment to ") + item->text(0), 303);
3726 AddIdAction(menu, map,
"Remove range condition", 401);
3729 AddIdAction(menu, map,
"Remove range condition", 401);
3736 menu->addSeparator();
3742 menu->addSeparator();
3759 AddIdAction(menu, map,
"Execute norm actions", 504);
3760 AddIdAction(menu, map,
"Execute all actions", 507);
3762 AddIdAction(menu, map,
"Delete output actions", 506);
3763 menu->addSeparator();
3767 AddIdAction(menu, map,
"Add amplitude estimation", 511);
3795 AddIdAction(menu, map,
"Memorize parameters", 706);
3796 AddIdAction(menu, map,
"Remember parameters", 707);
3800 AddIdAction(menu, map,
"Delete result entry", 801);
3812 AddIdAction(menu, map,
"Update slots from sources", 904);
3815 return ! menu->isEmpty();
3820 if ((slot==0) || (menu==0))
return false;
3823 AddIdAction(menu, map,
"Clone object in slot", 1000);
3826 AddIdAction(menu, map,
"Clear object in slot", 1001);
3831 if (!menu->isEmpty()) menu->addSeparator();
3834 AddIdAction(menu, map,
"Brake connection to slot", 1004);
3837 for(Int_t n=0;n<fitter->
NumSlots();n++) {
3843 if (!menu->isEmpty()) menu->addSeparator();
3847 if (slot->
GetClass() == TGo4FitAxisTrans::Class()) {
3848 AddIdAction(menu, map, TGo4FitLinearTrans::Class()->GetName(), 1300);
3849 AddIdAction(menu, map, TGo4FitMatrixTrans::Class()->GetName(), 1301);
3852 return ! menu->isEmpty();
3860 if ((slot==0) || (fitter==0))
return;
3872 if ( QMessageBox::information(0,
3873 QString(
"Clear slot"),
3874 QString(
"Are you sure to clear object from slot ") + slot->GetName(),
3875 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
3880 for(Int_t i=0;i<fitter->
NumSlots();i++) {
3899 if ((
id>=1100) && (
id<1200)) obj =
CreateData(
id-1100,
"Data");
else
3900 if ((
id>=1200) && (
id<1300)) obj =
CreateModel(
id-1200,
"Model", 0, 0);
else
3901 if (
id==1300) obj =
new TGo4FitLinearTrans(
"Trans",
"Linear axis transformation");
else
3902 if (
id==1301) obj =
new TGo4FitMatrixTrans(
"Trans",
"Matrix axis transformation");
else
3915 item->setExpanded(
true);
3922 if (item==0)
return;
3927 while (item->childCount() > 0)
3928 delete item->child(0);
3959 if (model==0)
break;
3993 if (fitter==0)
break;
3997 if (action->InheritsFrom(TGo4FitterConfig::Class())) ot =
FitGui::ot_config;
else
4022 if (minuit==0)
break;
4033 if (pars==0)
return;
4034 for (Int_t n = pars->
NumPars()-1; n>=0;n--)
4045 if (obj->InheritsFrom(TGo4FitData::Class()))
4049 if (obj->InheritsFrom(TGo4FitModel::Class()))
4053 if (obj->InheritsFrom(TGo4FitLinearTrans::Class()))
4057 if (obj->InheritsFrom(TGo4FitMatrixTrans::Class()))
4061 if (obj->InheritsFrom(TGo4FitAxisTrans::Class()))
4070 if (fitter==0)
break;
4089 if (trace && (item->
Object()!=0)) {
4091 if (topitem==0)
return;
4094 QTreeWidgetItemIterator iter(topitem);
4098 if ((it!=0) && (it!=item) &&
4108 if (item==0)
return;
4121 if (par) text +=
" = " + QString::number(par->
GetValue());
4134 Double_t left, right;
4136 text = QString::number(naxis) +
": ";
4139 case 0: text+=
"[" + QString::number(left) +
"..." + QString::number(right) +
"]";
break;
4140 case 1: text+=
"... " + QString::number(left) +
"] [" + QString::number(right) +
" ...";
break;
4141 case 2: text+=
"[" + QString::number(left) +
" ...";
break;
4142 case 3: text+=
"... " + QString::number(right) +
"]";
break;
4158 if (depen==0)
break;
4177 item->setText(0, text);
4179 if (trace && (item->
Object()!=0)) {
4181 if (topitem==0)
return;
4183 QTreeWidgetItemIterator iter(topitem);
4187 if ((it!=0) && (it!=item) &&
4190 it->setText(0, text);
4201 std::cout <<
"Did not found " << std::endl;
4205 QTreeWidgetItemIterator iter(parent);
4225 QTreeWidgetItemIterator iter(parent);
4230 if ((obj==0) || (item->
Object()==obj))
4258 if ((oldwidget!=0) && (oldwidget->
GetItem()==widgetitem)) {
4267 if (widgetitem==0)
return true;
4300 widget->
SetItem(
this, widgetitem);
4301 ListStack->addWidget(widget);
4302 ListStack->setCurrentWidget(widget);
4310 if (item==0)
return false;
4314 if (gritem==0)
return false;
4317 if (fitter==0)
return false;
4335 if (model==0)
return false;
4355 if (comp==0)
return false;
4356 int nrange = gritem->
Tag();
4362 if (comp==0)
return false;
4368 if (child==0)
return false;
4396 if (item==0)
return;
4398 if (pars==0)
return;
4399 for (Int_t n = pars->
NumPars()-1; n>=0;n--)
4405 if ((parent==0) || (lst==0))
return;
4406 for(Int_t n = lst->GetLast();n>=0;n--) {
4408 if (slot && ((slot->
GetOwner()==owner) || (owner==0)))
4415 if (parent==0)
return;
4417 TObjArray* lst =
dynamic_cast<TObjArray*
> (parent->
Object());
4419 for(Int_t n=lst->GetLast();n>=0;n--)
4425 if (! menu->isEmpty()) menu->addSeparator();
4430 AddIdAction(menu, map,
"Add 1-order polynom",
id+21);
4431 AddIdAction(menu, map,
"Add 3-order polynom",
id+22);
4432 AddIdAction(menu, map,
"Add 7-order polynom",
id+23);
4433 menu->addSeparator();
4436 AddIdAction(menu, map, QString(
"Make ") + TGo4FitModelPolynom::Class()->GetName(),
id+0);
4437 AddIdAction(menu, map, QString(
"Make ") + TGo4FitModelGauss1::Class()->GetName(),
id+1);
4438 AddIdAction(menu, map, QString(
"Make ") + TGo4FitModelGauss2::Class()->GetName(),
id+2);
4439 AddIdAction(menu, map, QString(
"Make ") + TGo4FitModelGaussN::Class()->GetName(),
id+3);
4440 AddIdAction(menu, map, QString(
"Make ") + TGo4FitModelFormula::Class()->GetName(),
id+4);
4441 AddIdAction(menu, map, QString(
"Make ") + TGo4FitModelFunction::Class()->GetName(),
id+5);
4442 AddIdAction(menu, map, QString(
"Make ") + TGo4FitModelFromData::Class()->GetName(),
id+6);
4447 if (!menu->isEmpty()) menu->addSeparator();
4448 AddIdAction(menu, map, QString(
"Make ") + TGo4FitDataHistogram::Class()->GetName(),
id+0);
4449 AddIdAction(menu, map, QString(
"Make ") + TGo4FitDataGraph::Class()->GetName(),
id+1);
4450 AddIdAction(menu, map, QString(
"Make ") + TGo4FitDataProfile::Class()->GetName(),
id+2);
4451 AddIdAction(menu, map, QString(
"Make ") + TGo4FitDataRidge::Class()->GetName(),
id+3);
4466 if ((histo==0) || (histo->GetDimension()!=1))
return false;
4468 Double_t pos, width, ampl;
4472 Int_t nbin = histo->GetXaxis()->FindBin(pos);
4473 ampl = histo->GetBinContent(nbin);
4475 Double_t limit = pad->GetUymin()*.7 + pad->GetUymax()*.3;
4476 if (ampl<limit) ampl = limit;
4479 arr->SetLineColor(2);
4480 arr->SetLineWidth(1);
4486 warr->SetLineColor(2);
4487 warr->SetLineWidth(1);
4510 if ((fitter==0) || (data==0))
return false;
4529 if ((histo==0) || (histo->GetDimension()!=1))
return false;
4531 double range = 0.1 * (histo->GetXaxis()->GetXmax() - histo->GetXaxis()->GetXmin());
4533 double ampl = (0.07 + nrange*0.02) * (histo->GetMaximum() - histo->GetMinimum()) + histo->GetMinimum();
4535 double size = 0.015;
4538 Double_t left, right;
4542 if (naxis!=0)
return false;
4554 arr->SetLineColor(3);
4555 arr->SetLineWidth(3);
4570 if (fitter==0)
return 0;
4573 if (finder!=0)
return finder;
4602 if (fitter==0)
return 0;
4615 if (fitter==0)
return 0;
4618 if (data==0)
return 0;
4630 if (fitter==0)
return;
4632 if ( QMessageBox::information(0,
4633 QString(
"Remake data list"),
4634 QString(
"Remove all current data?"),
4635 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return;
4648 if ((data==0) || (fitter==0))
return false;
4651 if ( QMessageBox::information(0,
4652 QString(
"Delete data"),
4653 QString(
"Are you sure to delete ") + data->GetName(),
4654 QMessageBox::Yes, QMessageBox::No) == QMessageBox::No )
return false;
4671 if ((pad==0) || (data==0))
return;
4674 if (
ActivePanel()->GetVisibleRange(pad, 0, xmin, xmax))
4689 if ((pad!=0) && (data!=0)) {
4692 if (
ActivePanel()->GetVisibleRange(pad, 0, xmin, xmax))
4700 if ((model==0) || (info==0))
return;
4702 *info += model->GetName();
4703 *info +=
" of class: ";
4704 *info += model->ClassName();
4706 if (model->InheritsFrom(TGo4FitModelFormula::Class())) {
4709 *info +=
"\nFormula: ";
4714 if (model->InheritsFrom(TGo4FitModelFunction::Class())) {
4717 *info +=
"\nFunction: ";
4726 if ((mode==1) || (mode==2)) {
4730 if (!model->
IsAssignTo(data->GetName())) data = 0;
4731 if ((data!=0) && (fitter!=0)) {
4732 if (mode==1) *info +=
"\nCounts=";
else *info +=
"\nIntegral=";
4734 *info += QString::number(v);
4741 *info +=
"\nGauss integral=";
4742 *info += QString::number(v);
4752 if (slot==0)
return res;
4758 res =
"internal object";
4763 res =
"reference without pad";
4769 res += pad->GetName();
4775 linkname.sprintf(
"FitSlotLink_%d", slotindex);
4776 const char* itemname =
GetLinkedName(linkname.toLatin1().constData());
4778 if (itemname!=0) res = itemname;
4779 else res =
"reference to external object";
4789 if ((arr==0) || (fitter==0))
return;
4791 bool ismodified =
false;
4792 for(Int_t n=0;n<fitter->
NumSlots();n++) {
4794 if (pad==0)
continue;
4800 for (Int_t k=0;k<=lst.GetLast();k++) {
4803 if (a->
Locate()) res =
true;
4836 if (model==0)
return;
4848 if ((slot==0) || (fitter==0))
return -1;
4851 for (
int n=0;n<fitter->
NumSlots();n++) {
4853 bool needpad = !subslot->
GetOwned() &&
4854 (subslot->
GetClass()->InheritsFrom(TH1::Class()) ||
4855 subslot->
GetClass()->InheritsFrom(TGraph::Class()));
4856 if (needpad) indx++;
4858 return needpad ? indx : -1;
4873 if (fitter==0)
return 0;
4874 for(Int_t n = 0; n<fitter->
NumSlots();n++) {
4876 if (slot->
GetOwner()!=data)
continue;
4878 if (pad!=0)
return pad;
4886 if ((fitter==0) || (model==0))
return 0;
4891 if (pad!=0)
return pad;
4898 if (comp==0)
return 0;
4899 if (comp->InheritsFrom(TGo4FitData::Class()))
4911 if (fitter==0)
return 0;
4913 }
else dataname = name;
4932 if (NumDim<=0) NumDim = 1;
4938 case 1:
id = 1;
break;
4939 case 2:
id = 2;
break;
4940 default:
id = 3;
break;
4943 case 21: order = 1;
id = 7;
break;
4944 case 22: order = 3;
id = 7;
break;
4945 case 23: order = 7;
id = 7;
break;
4948 if (namebase) NameBase = namebase;
else
4950 case 0: NameBase =
"Pol";
break;
4953 case 3: NameBase =
"Gauss";
break;
4954 case 4: NameBase =
"Form";
break;
4955 case 5: NameBase =
"Func";
break;
4956 case 6: NameBase =
"FromData";
break;
4957 case 7: NameBase =
"Pol";
break;
4958 case 24: NameBase =
"Lor";
break;
4959 case 25: NameBase =
"Exp";
break;
4960 default: NameBase =
"Model";
4965 if (fitter && (
id!=7)) ModelName = fitter->
FindNextName(NameBase.Data(), 0);
4966 else ModelName = NameBase;
4978 case 7: fitter->
AddPolynoms(data ? data->GetName() : 0, NameBase.Data(), order, NumDim);
break;
4994 if (fitter && model) {
5006 if ((fitter==0) || (model==0))
return;
5013 if (data==0)
return;
5020 model->
SetPosition(0, (pad->GetUxmin() + pad->GetUxmax())/2.);
5021 model->
SetWidth(0, TMath::Abs(pad->GetUxmax() - pad->GetUxmin())*.05);
5022 model->
SetPosition(1, (pad->GetUymin() + pad->GetUymax())/2.);
5023 model->
SetWidth(1, TMath::Abs(pad->GetUymax() - pad->GetUymin())*.05);
5026 Double_t mid, width;
5049 if ((slot==0) || (itemname==0))
return;
5053 if (slotindex<0)
return;
5056 linkname.sprintf(
"FitSlotLink_%d", slotindex);
5060 AddLink(itemname, linkname.toLatin1().constData());
5062 GetLinked(linkname.toLatin1().constData(), 1);
5070 if (slot==0)
return true;
5085 if ((obj!=0) && createlink) {
5086 TString linkname =
"data_";
5087 linkname+=slot->GetName();
5093 linkname.sprintf(
"FitSlotLink_%d", slotindex);
5094 obj =
GetLinked(linkname.toLatin1().constData(), 0);
5097 if (obj==0) res =
false;
5110 if (fitter==0)
return false;
5121 for(Int_t n=0; n<fitter->
NumSlots(); n++) {
5123 if (slot->
GetClass()->InheritsFrom(TH1::Class()) ||
5124 slot->
GetClass()->InheritsFrom(TGraph::Class()))
5138 if (fitter==0)
return;
5140 for(Int_t n = 0; n<fitter->
NumSlots();n++) {
5143 if (slot->
GetClass()->InheritsFrom(TH1::Class()) ||
5144 slot->
GetClass()->InheritsFrom(TGraph::Class()))
5155 if (fitter==0)
return;
5159 for(Int_t n = 0; n<fitter->
NumSlots();n++) {
5161 if (pad==0)
continue;
5182 w->
ClassNameLbl->setText(QString(
"Class name: ") + obj->ClassName());
5184 w->
NameEdt->setText(obj->GetName());
5185 w->
TitleEdt->setText(obj->GetTitle());
5186 TNamed* n =
dynamic_cast<TNamed*
> (obj);
5187 w->
NameEdt->setReadOnly(n==0);
5199 if ((mw!=0) && (model!=0)) {
5211 if ((item==0) || (strlen(newname)==0))
return;
5212 TNamed* obj =
dynamic_cast<TNamed*
> (item->
Object());
5221 if (pars->
FindPar(newname))
return;
5228 if ((fitter==0) || (fitter->
FindData(newname)))
return;
5237 if ((fitter==0) || (fitter->
FindModel(newname)))
return;
5240 obj->SetName(newname);
5255 TNamed* n =
dynamic_cast<TNamed*
> (w->
GetObject());
5256 if (n!=0) n->SetTitle(newtitle);
5263 if (model==0)
return;
5268 if (value!=0) res = model->
MakeAmpl();
void SetParsNames(const char *name0="Par0", const char *name1="Par1", const char *name2="Par2", const char *name3="Par3", const char *name4="Par4", const char *name5="Par5", const char *name6="Par6", const char *name7="Par7", const char *name8="Par8", const char *name9="Par9")
const char * GetLibraryName()
virtual void ShootRepaintTimer()
Bool_t DefineScaleMinMax(Int_t naxis, Double_t &min, Double_t &max)
virtual bool ShowItem(QFitItem *item, bool force)
virtual TObject * GetDrawObject(TPad *pad, const char *name)
virtual bool IsPadHasSubPads(TGo4Slot *padslot)
virtual void MainFindBtn_clicked()
virtual void Cmd_RememberPar(QFitItem *item)
virtual TGo4FitData * Wiz_SelectedData()
virtual void MainAttachBtn_clicked()
const TString & GetParameter()
Bool_t IsAnyRangeLimits()
TGo4FitParsList & GetParsCfg()
virtual void Cmd_AddNewData(QFitItem *item, int id)
virtual void ArrowChanged(TGo4FitGuiArrow *arr)
virtual void UpdateWizModelsList(bool changestack)
virtual void Button_SimpleClear()
virtual void Cmd_AddDependency(QFitItem *item)
virtual void PF_MinWidthEdt_returnPressed()
virtual void UpdatePFAmplLbl()
void SetUseBuffers(Bool_t iUse)
virtual Bool_t IsAnyDataTransform()
bool fbSaveWithReferences
virtual void Smp_PolynomBtn_clicked()
void SetMemoryUsage(Int_t iMemoryUsage)
virtual TPad * FindPadForSlot(TGo4FitSlot *slot)
virtual void Cmd_DrawData(QFitItem *item)
Int_t GetNumRangeCut() const
void RemoveResult(TGo4FitMinuitResult *res)
void DoAction(TGo4FitterAction *Action)
virtual void Cmd_DeleteAllData(QFitItem *item)
TGo4FitSlot * GetSlot(Int_t nslot)
TGo4FitGuiArrow * fxOther
bool FindInParents(QFitItem *item)
Int_t GetResultNDF() const
virtual void Cmd_AddRangeCondition(QFitItem *item, int id)
void ClearRanges(Int_t naxis=-1)
void Set2NoiseFactor(Double_t factor)
virtual void Cmd_DeleteDependencies(QFitItem *item)
virtual bool UpdateObjectReferenceInSlot(TGo4FitSlot *slot, bool createlink)
virtual bool FillPopupForItem(QFitItem *item, QMenu *menu, QSignalMapper *map)
virtual TGo4Fitter * CloneFitter()
virtual void Cmd_MemorizePar(QFitItem *item)
void SetFitFunctionType(Int_t iFitFunctionType)
void SetRangeCondition(Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right)
virtual TPad * FindPadWhereModel(TGo4FitModel *model)
void AddAmplEstimation(Int_t NumIters=1)
virtual void Fitter_UpdateReferences()
virtual void Button_WorkWithPanel()
void ClearModelAssignmentTo(const char *ModelName, const char *DataName=0)
Int_t GetPeakFinderType()
virtual void UpdateWizardPage()
Int_t GetNumRangeCondition() const
virtual void Wiz_RebuildDataBtn_clicked()
virtual void Wiz_ModelBufChk_toggled(bool zn)
void DeleteAction(TGo4FitterAction *action)
virtual void RemoveFitterLink()
virtual void RemoveItemWidget()
bool fbUseSamePanelForDraw
virtual void UpdatePFRelNoiseLbl()
virtual void linkedObjectUpdated(const char *linkname, TObject *obj)
virtual void PF_WidthEdit_returnPressed()
virtual void changeEvent(QEvent *event)
virtual void WorkWithFitterInSlot(TGo4Slot *slot)
TGo4FitModel * FindModel(const char *ModelName)
TGo4FitParameter * CreatePar(const char *ParName, const char *Title, Double_t iValue=0)
Int_t GetGroupIndex() const
void SetRangeMin(Int_t naxis, Double_t value)
static TGo4MdiArea * Instance()
virtual TGo4Slot * GetDrawObjectSlot(TPad *pad, const char *name)
virtual bool FillPopupForSlot(TGo4FitSlot *slot, QMenu *menu, QSignalMapper *map)
virtual void SetItemText(QFitItem *item, bool trace)
virtual void ChangeObjectName(QFitNamedWidget *w, const char *newname)
virtual void Cmd_DeleteOutputActions(QFitItem *item)
virtual void Cmd_DeleteDependency(QFitItem *item)
void AddPolynoms(const char *DataName, const char *NamePrefix, Int_t MaxOrder=1, Int_t NumAxis=1, Int_t GroupIndex=0)
void ClearConnectionToSlot()
virtual void UpdateItemsOfType(int typ, QFitItem *parent)
virtual void Cmd_DeleteActions(QFitItem *item)
virtual void Smp_ClearBtn_clicked()
virtual void Fitter_New()
TGo4FitParameter * GetPar(Int_t n)
virtual void Cmd_DeleteModels(QFitItem *item)
void AssignToData(const char *DataName, Double_t RatioValue=1., Bool_t FixRatio=kFALSE)
virtual void Wiz_DataListSelect(QListWidgetItem *)
virtual void UpdateWizPaint(int mode)
virtual Bool_t CanAmplTouch()
virtual void Button_PeakFinder()
void AddCommand(const char *iCommand)
virtual void MemorizePars()
virtual void FillSlotsList(QFitItem *parent, const TObjArray *lst, TObject *owner)
virtual TPad * ActivePad()
void AddAction(TGo4FitterAction *Action)
void SetDataName(const char *name)
virtual Bool_t SetPosition(Int_t naxis, Double_t pos)
virtual void UpdateWizModelsBtns()
virtual void UpdateWizDataBtns()
virtual void ClearObjectReferenceInSlots()
int PopupMenuType() const
virtual void Wiz_DataList_doubleClicked(QListWidgetItem *)
virtual void Fitter_SaveToBrowser()
void SetForRange(TGo4FitComponent *Comp, Int_t num, Double_t rangey, Double_t shiftx)
virtual bool IsAcceptDrag(const char *itemname, TClass *cl, int kind)
virtual TGo4Fitter * GetFitter()
virtual void Wiz_ModelListSelect(QListWidgetItem *)
Bool_t GetRange(Double_t &min, Double_t &max) const
virtual void Delete(Option_t *option="")
virtual Bool_t CanChangeFitter() const
virtual void CreateDataFor(TGo4ViewPanel *panel, TPad *pad, TGo4Fitter *fitter)
const Int_t GetDataType()
void SetForPosition(TGo4FitModel *model, TGo4FitGuiArrow *forwidth, Double_t iLineAmpl)
virtual void Wiz_AddModelBtn_clicked()
virtual Double_t Integral()
virtual void Wiz_ShowAllMod_toggled(bool zn)
virtual void Smp_GaussianBtn_clicked()
const char * GetFunctionName()
virtual void Cmd_DeletePar(QFitItem *item)
virtual QString Wiz_GetSlotSourceInfo(TGo4FitSlot *slot)
virtual void Wiz_TakeCurrentRange()
void ClearAssignmentTo(const char *DataName)
const char * GetFullName()
virtual void FitterMenuItemSelected(int id)
virtual void Cmd_DeleteData(QFitItem *item)
virtual void LocateModel(TGo4FitModel *model, TGo4FitData *data, bool usepad)
void AssignModelTo(const char *ModelName, const char *DataName, Double_t RatioValue=1., Bool_t FixRatio=kFALSE)
virtual void Cmd_AddNewAction(QFitItem *item, int id)
virtual TGo4Slot * GetPadMainObjectSlot(TPad *pad)
void ClearSlot(TGo4FitSlot *slot, Bool_t NonOwned)
void SetAmplValue(Double_t iAmpl)
void Set2NoiseMinimum(Double_t min)
virtual void Fitter_PrintParameters()
const char * AssignmentName(Int_t n)
virtual void Wiz_GetModelInfo(TGo4FitModel *model, QString *info)
virtual void focusInEvent(QFocusEvent *event)
TGo4FitData * RemoveData(const char *DataName, Bool_t IsDel=kFALSE)
Double_t Get2NoiseFactor()
virtual void UpdateItemMenu()
virtual void PF_MinNoiseEdit_returnPressed()
void ReplaceAction(TGo4FitterAction *action, Int_t dir)
QFitItem * DefineWidgetItem()
virtual void Wiz_DataSlotsTable_contextMenuRequested(const QPoint &pnt)
TGo4FitModel * RemoveModel(const char *ModelName, Bool_t IsDel=kFALSE)
virtual void ClearCanvas()
void SetPeakFinderType(Int_t typ)
virtual void PaintFitter(TGo4Fitter *fitter, QFitItem *item, bool update)
virtual void Cmd_DeletePars(QFitItem *item)
virtual void Divide(int numX, int numY)
virtual void ChangeViewType(int id)
virtual void Cmd_UpdateAllSlots(QFitItem *item)
virtual void Cmd_CreateFitter()
virtual bool UpdateObjectReferenceInSlots()
virtual void Button_SimpleFit(int nmodel)
virtual void AboutToShowViewMenu()
void DeleteModelsAssosiatedTo(const char *DataName)
TGo4FitComponent * fxComp
bool getBool(const QString &name, bool def=true)
Double_t CalculatesIntegral(const char *DataName, const char *ModelName=0, Bool_t OnlyCounts=kFALSE)
void SetForWidth(TGo4FitModel *model, TGo4FitGuiArrow *forposition)
virtual void UpdateExtendedPage()
void SetSaveFlagForObjects(Int_t iSaveFlag, const char *PlaceName=0)
virtual void ChangeModelPar(QFitModelWidget *w, int npar, int value)
TObjArray * fxParsTableList
virtual void Cmd_ClearFitter()
virtual void DeleteDrawObject(TPad *pad, const char *name)
virtual bool ShowItemAsText(QFitItem *item, bool force)
virtual void FillNamedWidget(QFitNamedWidget *w)
virtual TGo4Fitter * CreateFitterFor(TGo4ViewPanel *panel, TPad *pad, const char *name)
TGo4FitData * AddData(TGo4FitData *d)
virtual Bool_t GetPosition(Int_t naxis, Double_t &pos)
virtual TGo4FitData * CreateData(int id, const char *name)
virtual void MainDrawBtn_clicked()
TGo4FitterOutput * AddOutputAction(const char *Action, const char *Option=0)
TObject * GetAssignedObject()
Double_t Get0MaxAmplFactor()
virtual TPad * GetSubPad(TPad *toppad, int num, bool onlytoplevel)
virtual TObject * GetPadMainObject(TPad *pad)
virtual void Cmd_DeleteAction(QFitItem *item)
virtual void Fitter_RollbackParameters()
virtual void Cmd_MoveAction(QFitItem *item, int dir)
const TObjArray * GetSlotList(Bool_t ForceUpdate=kFALSE)
QWidget * fxCurrentItemWidget
virtual void Cmd_RemoveModel(TGo4FitModel *model)
void setBool(const QString &name, bool value=true)
virtual void PF_MinWidthEdt_textChanged(const QString &str)
void Set0MaxWidth(Double_t max)
virtual void Smp_LorenzBtn_clicked()
virtual void Cmd_ExecuteActions(QFitItem *item, bool expert)
virtual bool Wiz_RemoveData()
virtual bool ShowItemAsGraph(QFitItem *item, bool force)
TCutG * GetRangeCut(Int_t n) const
virtual void Cmd_RemoveRangeCondition(QFitItem *item)
void Set0MaxAmplFactor(Double_t factor)
Bool_t IsSuitableClass(TClass *cl)
virtual void UpdateWizDataList()
virtual bool PaintRange(TGo4FitComponent *comp, int nrange, TPad *pad, QFitItem *item)
virtual void PF_MaxWidthEdt_returnPressed()
virtual int GetPadIndexForSlot(TGo4FitSlot *slot)
TGo4FitSlot * GetConnectedSlot() const
virtual void Button_PerformFit()
virtual void Wiz_DelDataBtn_clicked()
void ChangeDataNameInAssignments(const char *oldname, const char *newname)
virtual TPad * FindPadWhereData(TGo4FitData *data)
TObjArray & GetParsDepend()
void SetRange(Int_t naxis, Double_t min, Double_t max)
virtual bool PaintModel(TGo4FitModel *model, TPad *pad, QFitItem *item)
virtual void Button_FitterDraw(TGo4FitData *selecteddata)
virtual void Wiz_FitNameEdt_textChanged(const QString &name)
virtual void DropOnPanel(QDropEvent *event, const char *itemname, TClass *cl, int kind)
void DoActions(Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=0)
virtual void Cmd_ItemPrint(QFitItem *item)
Bool_t RemovePar(const char *name)
void Set2ChannelSum(Int_t sum)
Bool_t SetObject(TObject *iObject, Bool_t iOwned=kFALSE, Bool_t CheckClass=kTRUE)
virtual void MarkPadModified(TPad *pad)
virtual void PF_WidthEdit_textChanged(const QString &str)
const char * GetParFullName(Int_t n)
virtual void Wiz_ParTable_valueChanged(int nrow, int ncol)
virtual void Cmd_DeleteMinuitResult(QFitItem *item)
TGo4FitModel * GetModel(Int_t n)
int getInt(const QString &name, int def=0)
Double_t CalculatesModelIntegral(const char *ModelName, Bool_t OnlyCounts=kFALSE)
virtual void Fitter_UseWorkspace()
void SetItem(QFitItem *item, TGo4FitPanel *panel)
virtual void Wiz_ModelList_itemChanged(QListWidgetItem *)
Bool_t IsAssignTo(TObject *obj)
virtual void DeleteModelWithPrimit(TGo4FitGuiArrow *arr)
virtual TGo4ViewPanel * ActivePanel()
virtual void Wiz_PFSetupBtn_clicked()
virtual TGo4FitModel * Wiz_SelectedModel()
virtual void Wiz_DataBufChk_toggled(bool zn)
virtual void FillDataTypesList(QMenu *menu, QSignalMapper *map, int id)
QFitItem * Parent() const
virtual void PF_SumUpSpin_valueChanged(int num)
virtual void PF_RelNoiseSlider_valueChanged(int zn)
virtual void Fitter_NewForActivePad(bool overwrite)
TGo4FitParameter * FindPar(const char *ParName)
QSignalMapper * FitterMap
Double_t GetError() const
TGo4FitMinuitResult * GetResult(Int_t indx)
TGo4FitModel * GetModel()
virtual void PF_MaxWidthEdt_textChanged(const QString &str)
virtual void Wiz_AddDataBtn_clicked()
Bool_t GetEpsilon(Double_t &eps) const
virtual void SetFitter(TGo4Fitter *)
virtual void Cmd_ClearAssigments(QFitItem *item)
virtual void Cmd_SaveFitter(bool ask)
Double_t Get2NoiseMinimum()
virtual void Cmd_ExecuteAction(QFitItem *item)
void AddRangeCut(TCutG *cut, Bool_t exclude=kFALSE)
virtual TGo4FitData * Wiz_CreateNewData(int id)
virtual void Cmd_RememberPars(QFitItem *item)
virtual QFitItem * FindItem(TObject *obj, int ObjectType, QFitItem *parent)
virtual void UpdateItem(QFitItem *item, bool trace)
virtual void AboutToShowItemMenu()
virtual Bool_t SetWidth(Int_t naxis, Double_t width)
TString FindNextName(const char *Head, Int_t start, Bool_t isModel=kTRUE)
virtual TPad * FindPadWhereComp(TGo4FitComponent *comp)
void SetRangeMax(Int_t naxis, Double_t value)
virtual void Cmd_DeleteAssosiatedModels(QFitItem *item)
virtual void FillSlotList(TSeqCollection *list)
virtual void PF_RelNoiseSlider_sliderReleased()
virtual void ChangeObjectTitle(QFitNamedWidget *w, const char *newtitle)
virtual void PF_AmplSlider_sliderReleased()
virtual void linkedObjectRemoved(const char *linkname)
virtual void MainFitBtn_clicked()
virtual void FillModelTypesList(QMenu *menu, QSignalMapper *map, int id, bool extend)
virtual TGo4FitModel * Wiz_CreateNewModel(int id)
TGo4FitData * GetData(Int_t n)
TGo4ViewPanel * fxActivePanel
void SetGroupIndex(Int_t index=-1)
virtual Bool_t GetWidth(Int_t naxis, Double_t &width)
QFitItem * DefineGraphItem()
virtual void Wiz_BackgroundChk_toggled(bool chk)
Int_t NumAssigments() const
virtual void Cmd_MemorizePars(QFitItem *item)
void SetUsePolynom(Bool_t use)
virtual void CloseDrawPanel()
Int_t GetFitFunctionType()
virtual void PF_MinNoiseEdit_textChanged(const QString &str)
virtual void Wiz_UseAmplEstimChk_toggled(bool chk)
void GetRangeCondition(Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const
Double_t GetResultFF() const
virtual void LineParsChk_toggled(bool)
virtual void Wiz_DataUseRangeBtn_clicked()
virtual void FillParsWidget()
virtual void Wiz_DrawDataBtn_clicked()
virtual void MainParsBtn_clicked()
void SetValue(Double_t iValue)
virtual void ExecutePopupForSlot(QFitItem *item, TGo4FitSlot *slot, int id)
virtual bool PaintModelsFor(TGo4Fitter *fitter, TGo4FitData *data, QFitItem *item, bool update)
virtual void Wiz_MigradIterSpin_valueChanged(int num)
virtual void ItemMenuItemSelected(int id)
virtual void AboutToShowSettMenu()
void RemoveRangeCut(Int_t n)
virtual TH1 * GetPadHistogram(TPad *pad)
virtual void Cmd_AddNewPar(QFitItem *item)
Double_t GetValue() const
virtual void RememberPars()
Bool_t ConnectToSlot(TGo4FitSlot *slot)
virtual void panelSlot(TGo4ViewPanel *, TPad *, int)
virtual ~TGo4FitGuiArrow()
virtual void UpdateWizStackWidget()
virtual void FitList_currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)
virtual void Wiz_PFPolynSpin_valueChanged(int zn)
TGo4FitModel * CloneModel(const char *ModelName, const char *NewName=0)
virtual void Wiz_UseSelectedRange()
TGo4FitterAction * GetAction(Int_t num)
void RemoveRangeCondition(Int_t n)
virtual void Wiz_DelModelBtn_clicked()
virtual void Cmd_CloneModel(QFitItem *item)
virtual void UpdateActivePage()
virtual void Wiz_FitFuncCmb_activated(int typ)
void Set1LineWidth(Double_t width)
virtual void Cmd_DeleteModel(QFitItem *item)
TGo4FitPanel(QWidget *parent=0, const char *name=0)
const char * GetDataName(Int_t n)
virtual void Wiz_PFUsePolynChk_toggled(bool zn)
TObject * CloneObject(const char *newname=0)
virtual TGo4FitPeakFinder * GetPeakFinder(bool autocreate)
virtual bool CanRollbackPars()
void DeleteOutputActions()
virtual void UpdateSimplePage()
void SetClearModels(Bool_t clear)
virtual void Fitter_Delete()
virtual void FillDependencyList(QFitItem *parent)
void SetEpsilon(Double_t iEpsilon)
Int_t GetNumModel() const
virtual void FitItemDeleted(QFitItem *item)
virtual void ParsTable_valueChanged(int nrow, int ncol)
virtual void ParsTableChanged(QTableWidget *table, int nrow, int ncol, bool LinesView, TObjArray *TableList, bool updatepaint)
TGo4FitModel * AddModel(TGo4FitModel *m)
virtual void RemovePrimitives()
Bool_t IsSuitable(TObject *obj)
virtual TGo4FitModel * CreateModel(int id, const char *namebase, TGo4Fitter *fitter, TGo4FitData *data)
virtual void CreateFitSlotLink(TGo4FitSlot *slot, const char *itemname)
Bool_t MakeAmpl(Bool_t isFixed=kFALSE)
virtual void PF_AmplSlider_valueChanged(int zn)
virtual bool WorkingWithPanel()
virtual void CollectSpecialObjects(TPad *pad, TObjArray *objs, int selectkind)
virtual void Wiz_MinSetupBtn_clicked()
TObject * CreateDrawObject(const char *ObjName, const char *DataName, Bool_t IsModel=kFALSE, const char *ModelName=0)
virtual void RemoveDrawObjects()
virtual void FillParsTable(QTableWidget *table, TGo4Fitter *fitter, TGo4FitModel *model, bool LinesView, TObjArray *TableList)
virtual QFitItem * GetFitterItem()
virtual bool WorkingWithOnlyPad()
virtual void Cmd_ClearAssigment(QFitItem *item)
TGo4FitParsList & GetParsNew()
void SetBackgroundGroupIndex()
Bool_t IsAssignTo(const char *DataName) const
virtual void FindersTab_currentChanged(int)
void setInt(const QString &name, int value=0)
virtual int GetNumberOfPads(TPad *toppad)
virtual void Wiz_RebuildDataList()
virtual TPad * GetActivePad()
virtual void AboutToShowFitterMenu()
Bool_t CalculatesMomentums(const char *DataName, Bool_t UseRanges, Bool_t SubstractModels, Double_t &first, Double_t &second)
virtual int DefineModelWidgetType(TObject *obj)
const TString & GetExpression()
virtual void Smp_ExponentBtn_clicked()
virtual void Clear(Option_t *option=0)
TObject * GetObject() const
bool fbRecalculateGaussWidth
virtual bool DeleteDrawObjects(TPad *pad, int kindtodelete)
void AddActionAt(TGo4FitterAction *Action, Int_t indx)
void ExcludeRange(Int_t naxis, Double_t min, Double_t max)
void SetFixed(Bool_t iFixed)
virtual void FillParsList(QFitItem *item)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual void UpdateStatusBar(const char *info)
virtual void Cmd_CreateAppropriateFitter()
virtual void Cmd_AddNewModel(QFitItem *item, int id)
virtual void FitList_customContextMenuRequested(const QPoint &)
TGo4FitData * FindData(const char *DataName)
virtual void Wiz_DataClearRangesBtn_clicked()
void SetPolynomOrder(Int_t order)
virtual void linkedRemoved(TGo4Slot *slot, TObject *obj)
virtual TGo4Slot * AddDrawObject(TPad *pad, int kind, const char *itemname, TObject *obj, bool owner, const char *drawopt)
virtual void WorkWithFitter(const char *itemname, TGo4ViewPanel *panel, TPad *pad)
static void Info(const char *text,...)
void Set0MinWidth(Double_t min)
virtual void ChangeSettings(int id)
virtual void ShowPanelPage(int id)
virtual void Cmd_DeleteFitter()
void SetRange(Double_t iRangeMin, Double_t iRangeMax)
virtual void Wiz_ModelList_doubleClicked(QListWidgetItem *)
virtual void Wiz_CloneModelBtn_clicked()
virtual void Cmd_AssignModelToData(QFitItem *item, int id)
TGo4ViewPanel * fxDrawNewPanel
void AddStandardActions()
void SetError(Double_t iError)
TObjArray & GetParsInit()
TGo4FitParameter * GetAmplPar()
virtual void SetAutoScale(bool on, TPad *selpad)
virtual void Cmd_RemoveRangeConditions(QFitItem *item)
Bool_t CanConnectToSlot(TGo4FitSlot *slot)
virtual void Cmd_AssignModelToAllData(QFitItem *item)