ROOT  6.06/09
Reference Guide
TFitParametersDialog.h
Go to the documentation of this file.
1 // @(#)root/fitpanel:$Id$
2 // Author: Ilka Antcheva, Lorenzo Moneta, David Gonzalez Maline 03/10/06
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TFitParametersDialog
13 #define ROOT_TFitParametersDialog
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TFitParametersDialog //
18 // //
19 // This class is used for fit function parameter settings. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TGButton
24 #include "TGWidget.h"
25 #endif
26 #ifndef ROOT_TGFrame
27 #include "TGFrame.h"
28 #endif
29 
33 };
34 
35 class TF1;
36 class TGNumberEntry;
37 class TGTextEntry;
38 class TGCheckButton;
39 class TGTextButton;
40 class TGTripleHSlider;
41 class TGNumberEntryField;
42 class TVirtualPad;
43 
44 
46 
47 protected:
48  TF1 *fFunc; // function passed to this dialog
49  TVirtualPad *fFpad; // pad where the function is drawn
50  Bool_t fHasChanges; // kTRUE if function was redrawn;
51  Bool_t fImmediateDraw; // kTRUE if function is updated on run-time
52  Int_t *fRetCode; // address to store return code
53  Int_t fNP; // number of function parameters
54  Double_t fRangexmin; // min function range
55  Double_t fRangexmax; // max function range
56  Double_t *fPmin; // min limits of patameters range
57  Double_t *fPmax; // max limits of patameters range
58  Double_t *fPval; // original patameters' values
59  Double_t *fPerr; // original patameters' errors
60  Double_t *fPstp; // original patameters' step
61  TGCompositeFrame *fContNam; // container of parameter names
62  TGCompositeFrame *fContVal; // container of parameter values
63  TGCompositeFrame *fContFix; // container of fix settings
64  TGCompositeFrame *fContBnd; // container of bound settings
65  TGCompositeFrame *fContSld; // container of sliders
66  TGCompositeFrame *fContMin; // container of min range values
67  TGCompositeFrame *fContMax; // container of max range values
68  TGCompositeFrame *fContStp; // container of step values
69  TGCompositeFrame *fContErr; // container of error values
70  TGTextEntry **fParNam; // parameter names
71  TGCheckButton **fParBnd; // bound setting switch
72  TGCheckButton **fParFix; // fix setting switch
73  TGNumberEntry **fParVal; // parameter values
74  TGNumberEntryField **fParMin; // min range values
75  TGNumberEntryField **fParMax; // max range values
76  TGNumberEntry **fParStp; // step values
77  TGTripleHSlider **fParSld; // triple sliders
78  TGNumberEntryField **fParErr; // error values
79  TGCheckButton *fUpdate; // immediate update switch
80  TGTextButton *fApply; // Apply button
81  TGTextButton *fReset; // Reset button
82  TGTextButton *fOK; // OK button
83  TGTextButton *fCancel; // Cancel button
84  TList fTextEntries; // list of text entries used for keyboard navigation
85 
86  void DisconnectSlots();
87 public:
89  TVirtualPad *pad, Int_t *ret_code = 0);
90  virtual ~TFitParametersDialog();
91 
92  virtual void CloseWindow();
93  virtual void DoApply();
94  virtual void DoCancel();
95  virtual void DoOK();
96  virtual void DoParFix(Bool_t on);
97  virtual void DoParBound(Bool_t on);
98  virtual void DoParMaxLimit();
99  virtual void DoParMinLimit();
100  virtual void DoParStep();
101  virtual void DoParValue();
102  virtual void DoReset();
103  virtual void DoSlider();
104  virtual void DrawFunction();
105  virtual void HandleButtons(Bool_t update);
106  virtual void HandleShiftTab();
107  virtual void HandleTab();
108 
109 protected:
110  void SetParameters();
111 
112  ClassDef(TFitParametersDialog, 0) // Fit function parameters dialog
113 };
114 
115 #endif
virtual void DoParFix(Bool_t on)
Slot related to the Fix check button.
virtual void DoParMaxLimit()
Slot related to the maximum parameter limit settings.
virtual void HandleTab()
Handle Tab key event (set focus to the next number entry field)
TGCheckButton ** fParBnd
TGNumberEntry ** fParStp
virtual void DoApply()
Slot related to the Preview button.
virtual void DoCancel()
Slot related to the Cancel button.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGTripleHSlider ** fParSld
TFitParametersDialog(const TGWindow *p, const TGWindow *main, TF1 *func, TVirtualPad *pad, Int_t *ret_code=0)
TGCompositeFrame * fContVal
TGNumberEntryField ** fParErr
#define ClassDef(name, id)
Definition: Rtypes.h:254
TGCompositeFrame * fContErr
virtual void DoParMinLimit()
Slot related to the minumum parameter limit settings.
virtual void CloseWindow()
Close parameters' dialog.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
A doubly linked list.
Definition: TList.h:47
EFPDialogBound
virtual void HandleButtons(Bool_t update)
Handle the button dependent states in this dialog.
TGCompositeFrame * fContNam
virtual void DoParBound(Bool_t on)
Slot related to the Bound check button.
TGNumberEntryField ** fParMax
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
virtual void DrawFunction()
Redraw function graphics.
virtual void DoOK()
Slot related to the OK button.
virtual void HandleShiftTab()
Handle Shift+Tab key event (set focus to the previous number entry field)
virtual void DoReset()
Slot related to the Reset button.
TGNumberEntry ** fParVal
TGNumberEntryField ** fParMin
int main(int argc, char *argv[])
Definition: python64.c:14
virtual void DoParStep()
Slot related to parameter step setting.
virtual void DoParValue()
Slot related to the parameter value settings.
double Double_t
Definition: RtypesCore.h:55
double func(double *x, double *p)
Definition: stressTF1.cxx:213
TGCompositeFrame * fContMax
virtual void DoSlider()
Slot related to the parameters' value settings.
void SetParameters()
Set the parameter values inside the function.
TGCompositeFrame * fContBnd
1-Dim function class
Definition: TF1.h:149
TGCompositeFrame * fContSld
void DisconnectSlots()
Disconnect signals from slot methods.
TGCheckButton ** fParFix
virtual ~TFitParametersDialog()
Destructor.
TGCompositeFrame * fContFix
TGCompositeFrame * fContStp
TGCompositeFrame * fContMin