GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QFitterWidget.cpp
Go to the documentation of this file.
1 // $Id: QFitterWidget.cpp 490 2009-11-04 12:30:14Z 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 für 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 "QFitItem.h"
17 #include "TGo4Fitter.h"
18 #include "TGo4FitData.h"
19 #include "TGo4FitModel.h"
20 
21 
22 QFitterWidget::QFitterWidget(QWidget *parent, const char* name)
23  : QFitNamedWidget(parent, name)
24 {
25  setupUi(this);
26 }
27 
29 {
30  return dynamic_cast<TGo4Fitter*> (GetObject());
31 }
32 
34 {
36  if (GetFitter()) {
37  int typ = GetFitter()->GetFitFunctionType();
39  FitFunctionTypeCmb->setCurrentIndex(typ);
40 
41  const char strend[3] = { 13, 10 , 0 };
42  QString info("Associations:");
43  info+=strend;
44  for (Int_t ndata=0;ndata<GetFitter()->GetNumData();ndata++) {
45  TGo4FitData* data = GetFitter()->GetData(ndata);
46  info += data->GetName();
47  info += ":";
48  for(Int_t nmodel=0;nmodel<GetFitter()->GetNumModel();nmodel++) {
49  TGo4FitModel* model = GetFitter()->GetModel(nmodel);
50  if (model->IsAssignTo(data->GetName())) {
51  info+=" ";
52  info+=model->GetName();
53  }
54  }
55  info+=strend;
56  }
57  InfoLbl->setText(info);
58  InfoLbl->adjustSize();
59  }
60 }
61 
63 {
64  if (!fbFillWidget && GetFitter())
66 }
67 
void SetFitFunctionType(Int_t iFitFunctionType)
Definition: TGo4Fitter.h:80
bool fbFillWidget
Definition: QFitWidget.h:64
virtual void FillSpecificData()
virtual void FitFunctionTypeCmb_activated(int typ)
TGo4FitModel * GetModel(Int_t n)
Definition: TGo4Fitter.cxx:193
TGo4FitData * GetData(Int_t n)
Definition: TGo4Fitter.cxx:103
virtual TGo4Fitter * GetFitter()
virtual TObject * GetObject()
Definition: QFitWidget.cpp:53
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