GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QFitterWidget.cpp
Go to the documentation of this file.
1 // $Id: QFitterWidget.cpp 3116 2021-03-30 06:51:49Z linev $
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 
20 QFitterWidget::QFitterWidget(QWidget *parent, const char* name)
21  : QFitNamedWidget(parent, name)
22 {
23  setupUi(this);
24  QObject::connect(FitFunctionTypeCmb, SIGNAL(activated(int)), this, SLOT(FitFunctionTypeCmb_activated(int)));
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 
62 {
63  if (!fbFillWidget && GetFitter())
65 }
66 
void SetFitFunctionType(Int_t iFitFunctionType)
Definition: TGo4Fitter.h:80
bool fbFillWidget
Definition: QFitWidget.h:63
virtual void FillSpecificData()
virtual void FitFunctionTypeCmb_activated(int typ)
TGo4FitModel * GetModel(Int_t n)
Definition: TGo4Fitter.cxx:191
TGo4FitData * GetData(Int_t n)
Definition: TGo4Fitter.cxx:101
virtual TGo4Fitter * GetFitter()
virtual TObject * GetObject()
Definition: QFitWidget.cpp:51
Int_t GetFitFunctionType()
Definition: TGo4Fitter.h:85
Int_t GetNumModel() const
Definition: TGo4Fitter.h:178
QFitterWidget(QWidget *parent=0, const char *name=0)
virtual void FillSpecificData()
Bool_t IsAssignTo(const char *DataName) const
Definition: TGo4FitModel.h:141
Int_t GetNumData() const
Definition: TGo4Fitter.h:123