66 fImmediateDraw (
kTRUE),
145 fParFix[i]->
Connect(
"Toggled(Bool_t)",
"TFitParametersDialog",
this,
"DoParFix(Bool_t)");
158 fParBnd[i]->
Connect(
"Toggled(Bool_t)",
"TFitParametersDialog",
this,
"DoParBound(Bool_t)");
178 this,
"DoParValue()");
179 fParVal[i]->
Connect(
"ValueSet(Long_t)",
"TFitParametersDialog",
this,
"DoParValue()");
198 fParMin[i]->
Connect(
"ReturnPressed()",
"TFitParametersDialog",
this,
200 fParMin[i]->
Connect(
"TabPressed()",
"TFitParametersDialog",
this,
"HandleTab()");
201 fParMin[i]->
Connect(
"ShiftTabPressed()",
"TFitParametersDialog",
this,
"HandleShiftTab()");
231 fParMax[i]->
Connect(
"ReturnPressed()",
"TFitParametersDialog",
this,
"DoParMaxLimit()");
232 fParMax[i]->
Connect(
"TabPressed()",
"TFitParametersDialog",
this,
"HandleTab()");
233 fParMax[i]->
Connect(
"ShiftTabPressed()",
"TFitParametersDialog",
this,
"HandleShiftTab()");
250 this,
"DoParStep()");
251 fParStp[i]->
Connect(
"ValueSet(Long_t)",
"TFitParametersDialog",
this,
"DoParStep()");
284 fUpdate->
Connect(
"Toggled(Bool_t)",
"TFitParametersDialog",
this,
"HandleButtons(Bool_t)");
293 fReset->
Connect(
"Clicked()",
"TFitParametersDialog",
this,
"DoReset()");
298 fApply->
Connect(
"Clicked()",
"TFitParametersDialog",
this,
"DoApply()");
303 fOK->
SetToolTipText(
"Apply parameter settings, redraw function and close this dialog");
304 fOK->
Connect(
"Clicked()",
"TFitParametersDialog",
this,
"DoOK()");
309 fCancel->
Connect(
"Clicked()",
"TFitParametersDialog",
this,
"DoCancel()");
343 fParSld[i]->
Connect(
"PointerPositionChanged()",
"TFitParametersDialog",
386 txt =
"Do you want to apply last parameters' setting?";
394 else if (ret ==
kMBNo)
432 txt =
"'Min' value cannot be bigger or equal to 'Max' - set the limits first!";
503 if (
fParVal[i]->GetNumber() != 0) {
520 }
else if (!
fParMin[i]->IsEnabled()) {
538 }
else if (
fPval[i]) {
553 this,
"DoParBound(Bool_t)");
563 fParSld[i]->
Connect(
"PointerPositionChanged()",
"TFitParametersDialog",
693 if (!
fParMax[i]->IsEnabled()) {
702 fParSld[i]->
Connect(
"PointerPositionChanged()",
"TFitParametersDialog",
708 this,
"DoParBound(Bool_t)");
815 txt =
"'Min' cannot be bigger then 'Max' if this parameter is bounded.";
858 txt =
"'Min' cannot be bigger then 'Max' if this parameter is bounded.";
892 if ( !
fFpad )
return;
912 if (save)
gPad = save;
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
R__EXTERN void * gTQSender
char * Form(const char *fmt,...)
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Style_t GetLineStyle() const
Return the line style.
virtual void ReleaseParameter(Int_t ipar)
Release parameter number ipar If used in a fit, the parameter can vary freely.
virtual void SetParError(Int_t ipar, Double_t error)
Set error for parameter number ipar.
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
virtual Int_t GetNpar() const
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
virtual const char * GetParName(Int_t ipar) const
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
virtual void SetParameter(Int_t param, Double_t value)
virtual void FixParameter(Int_t ipar, Double_t value)
Fix the value of a parameter The specified value will be used in a fit operation.
virtual Double_t GetParameter(Int_t ipar) const
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;
TFitParametersDialog(const TGWindow *p, const TGWindow *main, TF1 *func, TVirtualPad *pad, Int_t *ret_code=0)
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
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.
const TGWindow * GetRoot() const
Returns current root (i.e.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
The base class for composite widgets (menu bars, list boxes, etc.).
Int_t GetState(TGFrame *f) const
Get state of sub frame.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual Float_t GetMaxPosition() const
virtual Float_t GetMinPosition() const
virtual void SetRange(Float_t min, Float_t max)
virtual void SetPosition(Float_t min, Float_t max)
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual void DeleteWindow()
Delete window.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MapWindow()
map window
virtual void UnmapWindow()
unmap window
This class handles GUI labels.
This class describes layout hints used by the layout classes.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
Set the numeric value (floating point representation).
virtual Double_t GetNumber() const
Get the numeric value (floating point representation).
virtual void ReturnPressed()
Return was pressed.
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
void SetLimitValues(Double_t min=0, Double_t max=1)
virtual void SetFormat(EStyle style, EAttribute attr=TGNumberFormat::kNEAAnyNumber)
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
TGClient * fClient
Connection to display server.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
virtual void SetFocus()
Set focus to this text entry.
void SetEnabled(Bool_t flag=kTRUE)
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
void Home(Bool_t mark=kFALSE)
Moves the text cursor to the left end of the line.
Defines transient windows that typically are used for dialogs windows.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
TripleSlider inherit from DoubleSlider widgets and allow easy selection of a min, max and pointer val...
virtual void SetPointerPosition(Double_t pos)
Set pointer position in scaled (real) value.
virtual void SetConstrained(Bool_t on=kTRUE)
Set pointer position constrained in the slider range.
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void Add(TObject *obj)
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual const char * GetTitle() const
Returns title of object.
Mother of all ROOT objects.
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
void ToUpper()
Change string to upper case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
Double_t Floor(Double_t x)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Double_t Log10(Double_t x)