Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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#include "TGWidget.h"
17#include "TGFrame.h"
18
22};
23
24/// Enumeration specifying if parameters
25/// have been modified by the user
29};
30
31class TF1;
32class TGNumberEntry;
33class TGTextEntry;
34class TGCheckButton;
35class TGTextButton;
36class TGTripleHSlider;
38class TVirtualPad;
39
40
42
43protected:
44 TF1 *fFunc; ///< function passed to this dialog
45 TVirtualPad *fFpad; ///< pad where the function is drawn
46 Bool_t fHasChanges; ///< kTRUE if function was redrawn;
47 Bool_t fImmediateDraw; ///< kTRUE if function is updated on run-time
48 Int_t *fRetCode; ///< address to store return code
49 Int_t fNP; ///< number of function parameters
50 Double_t fRangexmin; ///< min function range
51 Double_t fRangexmax; ///< max function range
52 Double_t *fPmin; ///< min limits of patameters range
53 Double_t *fPmax; ///< max limits of patameters range
54 Double_t *fPval; ///< original patameters' values
55 Double_t *fPerr; ///< original patameters' errors
56 Double_t *fPstp; ///< original patameters' step
57 TGCompositeFrame *fContNam; ///< container of parameter names
58 TGCompositeFrame *fContVal; ///< container of parameter values
59 TGCompositeFrame *fContFix; ///< container of fix settings
60 TGCompositeFrame *fContBnd; ///< container of bound settings
61 TGCompositeFrame *fContSld; ///< container of sliders
62 TGCompositeFrame *fContMin; ///< container of min range values
63 TGCompositeFrame *fContMax; ///< container of max range values
64 TGCompositeFrame *fContStp; ///< container of step values
65 TGCompositeFrame *fContErr; ///< container of error values
66 TGTextEntry **fParNam; ///< parameter names
67 TGCheckButton **fParBnd; ///< bound setting switch
68 TGCheckButton **fParFix; ///< fix setting switch
69 TGNumberEntry **fParVal; ///< parameter values
70 TGNumberEntryField **fParMin; ///< min range values
71 TGNumberEntryField **fParMax; ///< max range values
72 TGNumberEntry **fParStp; ///< step values
73 TGTripleHSlider **fParSld; ///< triple sliders
74 TGNumberEntryField **fParErr; ///< error values
75 TGCheckButton *fUpdate; ///< immediate update switch
76 TGTextButton *fApply; ///< Apply button
77 TGTextButton *fReset; ///< Reset button
78 TGTextButton *fOK; ///< OK button
79 TGTextButton *fCancel; ///< Cancel button
80 TList fTextEntries; ///< list of text entries used for keyboard navigation
81
82 void DisconnectSlots();
83public:
84 TFitParametersDialog(const TGWindow *p, const TGWindow *main, TF1 *func,
85 TVirtualPad *pad, Int_t *ret_code = nullptr);
86 virtual ~TFitParametersDialog();
87
88 virtual void CloseWindow();
89 virtual void DoApply();
90 virtual void DoCancel();
91 virtual void DoOK();
92 virtual void DoParFix(Bool_t on);
93 virtual void DoParBound(Bool_t on);
94 virtual void DoParMaxLimit();
95 virtual void DoParMinLimit();
96 virtual void DoParStep();
97 virtual void DoParValue();
98 virtual void DoReset();
99 virtual void DoSlider();
100 virtual void DrawFunction();
101 virtual void HandleButtons(Bool_t update);
102 virtual void HandleShiftTab();
103 virtual void HandleTab();
104 virtual Bool_t HasChanges() { return fHasChanges; }
105
106protected:
107 void SetParameters();
108
109 ClassDef(TFitParametersDialog, 0) // Fit function parameters dialog
110};
111
112#endif
int main()
Definition Prototype.cxx:12
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
#define ClassDef(name, id)
Definition Rtypes.h:337
EFPDialogChange
Enumeration specifying if parameters have been modified by the user.
@ kFPDNoChange
@ kFPDBounded
@ kFPDNoneBounded
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
1-Dim function class
Definition TF1.h:213
Create a dialog for fit function parameter settings.
Int_t fNP
number of function parameters
TGCompositeFrame * fContMin
container of min range values
virtual void DoReset()
Slot related to the Reset button.
Double_t * fPval
original patameters' values
Bool_t fHasChanges
kTRUE if function was redrawn;
Double_t * fPmin
min limits of patameters range
virtual void DoSlider()
Slot related to the parameters' value settings.
TGNumberEntry ** fParStp
step values
TGCompositeFrame * fContVal
container of parameter values
virtual void CloseWindow()
Close parameters' dialog.
TF1 * fFunc
function passed to this dialog
Double_t fRangexmin
min function range
TGTextButton * fApply
Apply button.
virtual void HandleTab()
Handle Tab key event (set focus to the next number entry field)
TGCheckButton ** fParFix
fix setting switch
TGCheckButton ** fParBnd
bound setting switch
virtual void HandleShiftTab()
Handle Shift+Tab key event (set focus to the previous number entry field)
TGNumberEntryField ** fParErr
error values
virtual ~TFitParametersDialog()
Destructor.
TGCompositeFrame * fContStp
container of step values
void DisconnectSlots()
Disconnect signals from slot methods.
TGCompositeFrame * fContNam
container of parameter names
Int_t * fRetCode
address to store return code
Double_t * fPmax
max limits of patameters range
void SetParameters()
Set the parameter values inside the function.
virtual void DoParStep()
Slot related to parameter step setting.
TGTextButton * fCancel
Cancel button.
TGNumberEntry ** fParVal
parameter values
TGTripleHSlider ** fParSld
triple sliders
Bool_t fImmediateDraw
kTRUE if function is updated on run-time
TGCompositeFrame * fContErr
container of error values
TGCompositeFrame * fContBnd
container of bound settings
virtual void DoApply()
Slot related to the Preview button.
TGNumberEntryField ** fParMax
max range values
virtual void DoCancel()
Slot related to the Cancel button.
virtual void DoParValue()
Slot related to the parameter value settings.
virtual void DoParFix(Bool_t on)
Slot related to the Fix check button.
TList fTextEntries
list of text entries used for keyboard navigation
virtual void HandleButtons(Bool_t update)
Handle the button dependent states in this dialog.
TGCheckButton * fUpdate
immediate update switch
Double_t * fPstp
original patameters' step
Double_t fRangexmax
max function range
Double_t * fPerr
original patameters' errors
TGNumberEntryField ** fParMin
min range values
virtual void DoOK()
Slot related to the OK button.
virtual void DoParBound(Bool_t on)
Slot related to the Bound check button.
TGCompositeFrame * fContFix
container of fix settings
virtual void DoParMinLimit()
Slot related to the minumum parameter limit settings.
TVirtualPad * fFpad
pad where the function is drawn
virtual void DrawFunction()
Redraw function graphics.
TGCompositeFrame * fContMax
container of max range values
virtual void DoParMaxLimit()
Slot related to the maximum parameter limit settings.
TGTextButton * fReset
Reset button.
TGTextEntry ** fParNam
parameter names
TGCompositeFrame * fContSld
container of sliders
TGTextButton * fOK
OK button.
Selects different options.
Definition TGButton.h:264
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
TGNumberEntry is a number entry input widget with up/down buttons.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
Defines transient windows that typically are used for dialogs windows.
Definition TGFrame.h:498
TripleSlider inherit from DoubleSlider widgets and allow easy selection of a min, max and pointer val...
ROOT GUI Window base class.
Definition TGWindow.h:23
A doubly linked list.
Definition TList.h:38
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51