GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
QFitterWidget.cpp
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#include "QFitterWidget.h"
15
16#include "TGo4Fitter.h"
17#include "TGo4FitData.h"
18#include "TGo4FitModel.h"
19
20QFitterWidget::QFitterWidget(QWidget *parent, const char *name)
21 : QFitNamedWidget(parent, name)
22{
23 setupUi(this);
24 QObject::connect(FitFunctionTypeCmb, QOverload<int>::of(&QComboBox::activated), this, &QFitterWidget::FitFunctionTypeCmb_activated);
25}
26
28{
29 return dynamic_cast<TGo4Fitter*> (GetObject());
30}
31
33{
35 if (GetFitter()) {
36 int typ = GetFitter()->GetFitFunctionType();
38 FitFunctionTypeCmb->setCurrentIndex(typ);
39
40 const char strend[3] = { 13, 10, 0 };
41 QString info("Associations:");
42 info+=strend;
43 for (Int_t ndata = 0; ndata < GetFitter()->GetNumData(); ndata++) {
44 TGo4FitData *data = GetFitter()->GetData(ndata);
45 info += data->GetName();
46 info += ":";
47 for (Int_t nmodel = 0; nmodel < GetFitter()->GetNumModel(); nmodel++) {
48 TGo4FitModel *model = GetFitter()->GetModel(nmodel);
49 if (model->IsAssignTo(data->GetName())) {
50 info+=" ";
51 info+=model->GetName();
52 }
53 }
54 info += strend;
55 }
56 InfoLbl->setText(info);
57 InfoLbl->adjustSize();
58 }
59}
60
66
QFitNamedWidget(QWidget *parent=nullptr, const char *name=nullptr)
void FillSpecificData() override
virtual TObject * GetObject()
bool fbFillWidget
Definition QFitWidget.h:63
TGo4Fitter * GetFitter() override
virtual void FitFunctionTypeCmb_activated(int typ)
void FillSpecificData() override
QFitterWidget(QWidget *parent=nullptr, const char *name=nullptr)
Basic abstract class for representing data, which should be fitted.
Definition TGo4FitData.h:39
Basic abstract class for representing model components of fitted data.
Bool_t IsAssignTo(const char *DataName) const
Checks, if model assigned to given data.
Central class of Go4Fit package.
Definition TGo4Fitter.h:38
@ ff_least_squares
Definition TGo4Fitter.h:40
TGo4FitModel * GetModel(Int_t n)
Return model component with given index.
Int_t GetNumModel() const
Return number of model component in fitter.
Definition TGo4Fitter.h:179
TGo4FitData * GetData(Int_t n)
Return data object with given index.
Int_t GetNumData() const
Return number of data objects in fitter.
Definition TGo4Fitter.h:124
void SetFitFunctionType(Int_t iFitFunctionType)
Set fitted function type for minimization.
Definition TGo4Fitter.h:81
Int_t GetFitFunctionType() const
Return type of fitted function.
Definition TGo4Fitter.h:86