ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TFitParametersDialog.cxx
Go to the documentation of this file.
1 // @(#)root/fitpanel:$Id$
2 // Author: Ilka Antcheva, Lorenzo Moneta 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 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TFitParametersDialog //
15 // //
16 // Create a dialog for fit function parameter settings. //
17 // //
18 //////////////////////////////////////////////////////////////////////////
19 
20 #include "TFitParametersDialog.h"
21 #include "TF1.h"
22 #include "TGButton.h"
23 #include "TGFrame.h"
24 #include "TGLabel.h"
25 #include "TGLayout.h"
26 #include "TGTextEntry.h"
27 #include "TGMsgBox.h"
28 #include "TGNumberEntry.h"
29 #include "TGTripleSlider.h"
30 #include "TVirtualPad.h"
31 
32 #include <limits>
33 
34 
37  kFIX = 10,
38  kBND = 20,
39  kVAL = 30,
40  kMIN = 40,
41  kMAX = 50,
42  kSLD = 60,
43  kSTP = 70,
44  kERR = 80,
45  kUPDATE = 8888,
48  kOK,
50 };
51 
53 
54 ////////////////////////////////////////////////////////////////////////////////
55 
57  const TGWindow *main,
58  TF1 *func,
60  Int_t *ret_code) :
61  TGTransientFrame(p, main, 10, 10, kVerticalFrame),
62  fFunc (func),
63  fFpad (pad),
64  fHasChanges (kFALSE),
65  fImmediateDraw (kTRUE),
66  fRetCode (ret_code)
67 
68 {
69  // Create a dialog for fit function parameters' settings.
70 
71  SetCleanup(kDeepCleanup);
72 
73  fFunc->GetRange(fRangexmin, fRangexmax);
74  fNP = fFunc->GetNpar();
75  fPmin = new Double_t[fNP];
76  fPmax = new Double_t[fNP];
77  fPval = new Double_t[fNP];
78  fPerr = new Double_t[fNP];
79  fPstp = new Double_t[fNP];
80 
81  for (Int_t i = 0; i < fNP; i++) {
82  fFunc->GetParLimits(i, fPmin[i], fPmax[i]);
83  fPval[i] = fFunc->GetParameter(i);
84  fPerr[i] = fFunc->GetParError(i);
85  if (TMath::Abs(fPval[i]) > 1E-16)
86  fPstp[i] = 0.3*TMath::Abs(fPval[i]);
87  else
88  fPstp[i] = 0.1;
89  }
90  fParNam = new TGTextEntry*[fNP];
91  fParFix = new TGCheckButton*[fNP];
92  fParBnd = new TGCheckButton*[fNP];
93  fParVal = new TGNumberEntry*[fNP];
94  fParMin = new TGNumberEntryField*[fNP];
95  fParMax = new TGNumberEntryField*[fNP];
96  fParSld = new TGTripleHSlider*[fNP];
97  fParStp = new TGNumberEntry*[fNP];
98  fParErr = new TGNumberEntryField*[fNP];
99 
100  memset(fParNam, 0, sizeof(TGTextEntry*)*fNP);
101  memset(fParFix, 0, sizeof(TGCheckButton*)*fNP);
102  memset(fParBnd, 0, sizeof(TGCheckButton*)*fNP);
103  memset(fParVal, 0, sizeof(TGNumberEntry*)*fNP);
104  memset(fParMin, 0, sizeof(TGNumberEntryField*)*fNP);
105  memset(fParMax, 0, sizeof(TGNumberEntryField*)*fNP);
106  memset(fParSld, 0, sizeof(TGTripleHSlider*)*fNP);
107  memset(fParStp, 0, sizeof(TGNumberEntry*)*fNP);
108  memset(fParErr, 0, sizeof(TGNumberEntryField*)*fNP);
109 
111  AddFrame(f1, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
112 
113  // column 'Name'
114  fContNam = new TGCompositeFrame(f1, 80, 20, kVerticalFrame | kFixedWidth);
115  fContNam->AddFrame(new TGLabel(fContNam,"Name"),
116  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
117  for (Int_t i = 0; i < fNP; i++ ) {
118  fParNam[i] = new TGTextEntry(fContNam, new TGTextBuffer(80), kNAME+i);
119  fParNam[i]->SetText(Form("%s", fFunc->GetParName(i)));
120  fParNam[i]->SetEnabled(kFALSE);
121  fContNam->AddFrame(fParNam[i],
122  new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
123  }
124  f1->AddFrame(fContNam, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
125 
126  // column 'Fix'
127  fContFix = new TGCompositeFrame(f1, 20, 20, kVerticalFrame | kFixedWidth);
128  fContFix->AddFrame(new TGLabel(fContFix,"Fix"),
129  new TGLayoutHints(kLHintsTop, 2, 0, 0, 0));
130  for (Int_t i = 0; i < fNP; i++ ) {
131  fParFix[i] = new TGCheckButton(fContFix, "", kFIX*fNP+i);
132  fParFix[i]->SetToolTipText(Form("Set %s to fixed", fFunc->GetParName(i)));
133  fContFix->AddFrame(fParFix[i], new TGLayoutHints(kLHintsLeft | kLHintsCenterY,
134  5, 5, 10, 7));
135  if ((fPmin[i] == fPmax[i]) && (fPmin[i] || fPmax[i]))
136  fParFix[i]->SetState(kButtonDown);
137  else
138  fParFix[i]->SetState(kButtonUp);
139  fParFix[i]->Connect("Toggled(Bool_t)", "TFitParametersDialog", this, "DoParFix(Bool_t)");
140  }
141  f1->AddFrame(fContFix, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
142 
143  // column 'Bound'
144  fContBnd = new TGCompositeFrame(f1, 40, 20, kVerticalFrame | kFixedWidth);
145  fContBnd->AddFrame(new TGLabel(fContBnd,"Bound"),
146  new TGLayoutHints(kLHintsTop, 2, 0, 0, 0));
147  for (Int_t i = 0; i < fNP; i++ ) {
148  fParBnd[i] = new TGCheckButton(fContBnd, "", kBND*fNP+i);
149  fParBnd[i]->SetToolTipText(Form("Set bound to %s", fFunc->GetParName(i)));
150  fContBnd->AddFrame(fParBnd[i], new TGLayoutHints(kLHintsLeft | kLHintsCenterY,
151  15, 5, 10, 7));
152  fParBnd[i]->Connect("Toggled(Bool_t)", "TFitParametersDialog", this, "DoParBound(Bool_t)");
153  if ( ((fPmin[i] != fPmax[i]) && (fPmin[i] || fPmax[i])) || (fParMin[i] < fParMax[i]) )
154  fParBnd[i]->SetState(kButtonDown, kFALSE);
155  else
156  fParBnd[i]->SetState(kButtonUp, kFALSE);
157  }
158  f1->AddFrame(fContBnd, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
159 
160  // column 'Value'
161  fContVal = new TGCompositeFrame(f1, 100, 20, kVerticalFrame | kFixedWidth);
162  fContVal->AddFrame(new TGLabel(fContVal,"Value"),
163  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
164  for (Int_t i = 0; i < fNP; i++ ) {
165  fParVal[i] = new TGNumberEntry(fContVal, 1.2E-12, 15, kVAL*fNP+i,
167  fParVal[i]->SetNumber(fPval[i]);
168  fParVal[i]->SetFormat(TGNumberFormat::kNESReal, TGNumberFormat::kNEAAnyNumber); //tbs
169  fContVal->AddFrame(fParVal[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
170  (fParVal[i]->GetNumberEntry())->SetToolTipText(Form("%s", fFunc->GetParName(i)));
171  (fParVal[i]->GetNumberEntry())->Connect("ReturnPressed()", "TFitParametersDialog",
172  this, "DoParValue()");
173  fParVal[i]->Connect("ValueSet(Long_t)", "TFitParametersDialog", this, "DoParValue()");
174  (fParVal[i]->GetNumberEntry())->Connect("TabPressed()", "TFitParametersDialog", this, "HandleTab()");
175  (fParVal[i]->GetNumberEntry())->Connect("ShiftTabPressed()", "TFitParametersDialog", this, "HandleShiftTab()");
176  fTextEntries.Add(fParVal[i]->GetNumberEntry());
177  }
178  f1->AddFrame(fContVal, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
179 
180  // column 'Min'
181  fContMin = new TGCompositeFrame(f1, 100, 20, kVerticalFrame | kFixedWidth);
182  fContMin->AddFrame(new TGLabel(fContMin,"Min"),
183  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
184  for (Int_t i = 0; i < fNP; i++ ) {
185  fParMin[i] = new TGNumberEntryField(fContMin, kMIN*fNP+i, 0.0,
188  ((TGTextEntry*)fParMin[i])->SetToolTipText(Form("Lower limit of %s",
189  fFunc->GetParName(i)));
190  fContMin->AddFrame(fParMin[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
191  fParMin[i]->SetNumber(fPmin[i]);
192  fParMin[i]->Connect("ReturnPressed()", "TFitParametersDialog", this,
193  "DoParMinLimit()");
194  fParMin[i]->Connect("TabPressed()", "TFitParametersDialog", this, "HandleTab()");
195  fParMin[i]->Connect("ShiftTabPressed()", "TFitParametersDialog", this, "HandleShiftTab()");
196  fTextEntries.Add(fParMin[i]);
197  }
198  f1->AddFrame(fContMin, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
199 
200  // column 'Set Range'
201  fContSld = new TGCompositeFrame(f1, 120, 20, kVerticalFrame | kFixedWidth);
202  fContSld->AddFrame(new TGLabel(fContSld,"Set Range"),
203  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
204  for (Int_t i = 0; i < fNP; i++ ) {
205  fParSld[i] = new TGTripleHSlider(fContSld, 100, kDoubleScaleBoth, kSLD*fNP+i,
206  kHorizontalFrame, GetDefaultFrameBackground(),
207  kFALSE, kFALSE, kFALSE, kFALSE);
208  fContSld->AddFrame(fParSld[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 5, 5));
209  fParSld[i]->SetConstrained(kTRUE);
210  }
211  f1->AddFrame(fContSld, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
212 
213  // column 'Max'
214  fContMax = new TGCompositeFrame(f1, 100, 20, kVerticalFrame | kFixedWidth);
215  fContMax->AddFrame(new TGLabel(fContMax,"Max"),
216  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
217  for (Int_t i = 0; i < fNP; i++ ) {
218  fParMax[i] = new TGNumberEntryField(fContMax, kMAX*fNP+i, 0.0,
221  ((TGTextEntry*)fParMax[i])->SetToolTipText(Form("Upper limit of %s",
222  fFunc->GetParName(i)));
223  fContMax->AddFrame(fParMax[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
224  fParMax[i]->SetNumber(fPmax[i]);
225  fParMax[i]->Connect("ReturnPressed()", "TFitParametersDialog", this, "DoParMaxLimit()");
226  fParMax[i]->Connect("TabPressed()", "TFitParametersDialog", this, "HandleTab()");
227  fParMax[i]->Connect("ShiftTabPressed()", "TFitParametersDialog", this, "HandleShiftTab()");
228  fTextEntries.Add(fParMax[i]);
229  }
230  f1->AddFrame(fContMax, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
231 
232  // column 'Step'
233  fContStp = new TGCompositeFrame(f1, 100, 20, kVerticalFrame | kFixedWidth);
234  fContStp->AddFrame(new TGLabel(fContStp,"Step"),
235  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
236  for (Int_t i = 0; i < fNP; i++ ) {
237  fParStp[i] = new TGNumberEntry(fContStp, 1.2E-12, 15, kSTP*fNP+i,
239  fParStp[i]->SetNumber(fPstp[i]);
240  fParStp[i]->SetFormat(TGNumberFormat::kNESReal, TGNumberFormat::kNEAAnyNumber); //tbs
241  fContStp->AddFrame(fParStp[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
242  (fParStp[i]->GetNumberEntry())->SetToolTipText(Form("%s", fFunc->GetParName(i)));
243  (fParStp[i]->GetNumberEntry())->Connect("ReturnPressed()", "TFitParametersDialog",
244  this, "DoParStep()");
245  fParStp[i]->Connect("ValueSet(Long_t)", "TFitParametersDialog", this, "DoParStep()");
246  (fParStp[i]->GetNumberEntry())->Connect("TabPressed()", "TFitParametersDialog", this, "HandleTab()");
247  (fParStp[i]->GetNumberEntry())->Connect("ShiftTabPressed()", "TFitParametersDialog", this, "HandleShiftTab()");
248  fTextEntries.Add(fParStp[i]->GetNumberEntry());
249  }
250  f1->AddFrame(fContStp, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
251 
252  // column 'Error'
253  fContErr = new TGCompositeFrame(f1, 80, 20, kVerticalFrame | kFixedWidth);
254  fContErr->AddFrame(new TGLabel(fContErr,"Errors"),
255  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
256  for (Int_t i = 0; i < fNP; i++ ) {
257  fParErr[i] = new TGNumberEntryField(fContErr, kERR*fNP+i, 0.0,
260  ((TGTextEntry*)fParErr[i])->SetToolTipText(Form("Error of %s",
261  fFunc->GetParName(i)));
262  fContErr->AddFrame(fParErr[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
263  fParErr[i]->SetEnabled(kFALSE);
264  if (fPerr[i])
265  fParErr[i]->SetNumber(fPerr[i]);
266  else
267  ((TGTextEntry *)fParErr[i])->SetText("-");
268  }
269  f1->AddFrame(fContErr, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
270 
271  TGCompositeFrame *f2 = new TGCompositeFrame(this, 270, 20, kHorizontalFrame);
272  AddFrame(f2, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX));
273 
274  fUpdate = new TGCheckButton(f2, "&Immediate preview", kUPDATE);
275  fUpdate->SetToolTipText("Immediate function redrawing");
276  fUpdate->SetState(kButtonDown);
277  f2->AddFrame(fUpdate, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 5, 5, 5));
278  fUpdate->Connect("Toggled(Bool_t)", "TFitParametersDialog", this, "HandleButtons(Bool_t)");
279 
281  f2->AddFrame(f3, new TGLayoutHints(kLHintsRight));
282 
283  fReset = new TGTextButton(f3, "&Reset", kRESET);
284  f3->AddFrame(fReset, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,2,2,5,5));
285  fReset->SetToolTipText("Reset the parameter settings");
286  fReset->SetState(kButtonDisabled);
287  fReset->Connect("Clicked()", "TFitParametersDialog", this, "DoReset()");
288 
289  fApply = new TGTextButton(f3, "&Apply", kAPPLY);
290  f3->AddFrame(fApply, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,2,2,5,5));
291  fApply->SetState(kButtonDisabled);
292  fApply->Connect("Clicked()", "TFitParametersDialog", this, "DoApply()");
293  fApply->SetToolTipText("Apply parameter settings and redraw the function");
294 
295  fOK = new TGTextButton(f3, "&OK", kOK);
296  f3->AddFrame(fOK, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,2,2,5,5));
297  fOK->SetToolTipText("Apply parameter settings, redraw function and close this dialog");
298  fOK->Connect("Clicked()", "TFitParametersDialog", this, "DoOK()");
299 
300  fCancel = new TGTextButton(f3, "&Cancel", kCANCEL);
301  f3->AddFrame(fCancel, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,2,2,5,5));
302  fCancel->SetToolTipText("Close this dialog with no parameter changes");
303  fCancel->Connect("Clicked()", "TFitParametersDialog", this, "DoCancel()");
304  *fRetCode = kFPDNoneBounded; // default setting
305 
306  MapSubwindows();
307  Resize(GetDefaultSize());
308  MapWindow();
309  CenterOnParent(kFALSE, kBottomLeft);
310  SetWindowName(Form("Set Parameters of %s", fFunc->GetTitle()));
311 
312  for (Int_t i = 0; i < fNP; i++ ) {
313  if (fParFix[i]->GetState() == kButtonDown) {
314  fParVal[i]->SetState(kFALSE);
315  fParMin[i]->SetEnabled(kFALSE);
316  fParMax[i]->SetEnabled(kFALSE);
317  fParSld[i]->UnmapWindow();
318  } else {
319  if (fPmin[i]*fPmax[i] == 0 && fPmin[i] >= fPmax[i]) { //init
320  if (!fPval[i]) {
321  fParMin[i]->SetNumber(-10);
322  fParMax[i]->SetNumber(10);
323  } else {
324  fParMin[i]->SetNumber(-3*TMath::Abs(fPval[i]));
325  fParMax[i]->SetNumber(3*TMath::Abs(fPval[i]));
326  }
327  }
328  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
329  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
330  fParSld[i]->SetPointerPosition(fParVal[i]->GetNumber());
331  fParSld[i]->Connect("PointerPositionChanged()", "TFitParametersDialog",
332  this, "DoSlider()");
333  fParSld[i]->Connect("PositionChanged()", "TFitParametersDialog",
334  this, "DoSlider()");
335  }
336  }
337 
338  gClient->WaitFor(this);
339 }
340 
341 ////////////////////////////////////////////////////////////////////////////////
342 /// Destructor.
343 
345 {
346  DisconnectSlots();
348  Cleanup();
349  delete [] fPval;
350  delete [] fPmin;
351  delete [] fPmax;
352  delete [] fPerr;
353  delete [] fPstp;
354 
355  delete [] fParNam;
356  delete [] fParFix;
357  delete [] fParBnd;
358  delete [] fParVal;
359  delete [] fParMin;
360  delete [] fParMax;
361  delete [] fParSld;
362  delete [] fParStp;
363  delete [] fParErr;
364 }
365 
366 ////////////////////////////////////////////////////////////////////////////////
367 /// Close parameters' dialog.
368 
370 {
371  if (fHasChanges) {
372  Int_t ret;
373  const char *txt;
374  txt = "Do you want to apply last parameters' setting?";
376  "Parameters Have Been Changed", txt, kMBIconExclamation,
377  kMBYes | kMBNo | kMBCancel, &ret);
378  if (ret == kMBYes)
379  SetParameters();
380  else if (ret == kMBNo)
381  DoReset();
382  else return;
383  }
384 
385  DisconnectSlots();
386  DeleteWindow();
387 }
388 
389 ////////////////////////////////////////////////////////////////////////////////
390 /// Slot related to the Cancel button.
391 
393 {
394  if (fHasChanges)
395  DoReset();
396  for (Int_t i = 0; i < fNP; i++ ) {
397  if (fParBnd[i]->GetState() == kButtonDown)
399  }
400  CloseWindow();
401 }
402 
403 ////////////////////////////////////////////////////////////////////////////////
404 /// Slot related to the Bound check button.
405 
407 {
408  TGButton *bt = (TGButton *) gTQSender;
409  Int_t id = bt->WidgetId();
410  fHasChanges = kTRUE;
411 
412  for (Int_t i = 0; i < fNP; i++ ) {
413  if (id == kBND*fNP+i) {
414  if (on) {
415  if (fParMin[i]->GetNumber() >= fParMax[i]->GetNumber()) {
416  Int_t ret;
417  const char *txt;
418  txt = "'Min' value cannot be bigger or equal to 'Max' - set the limits first!";
420  "Parameter Limits", txt, kMBIconExclamation,kMBOk,&ret);
421 
423  return;
424  }
425  if ((fParVal[i]->GetNumber() < fParMin[i]->GetNumber()) ||
426  (fParVal[i]->GetNumber() > fParMax[i]->GetNumber())) {
427  Double_t v = (fParMax[i]->GetNumber()+fParMin[i]->GetNumber())/2.;
428  fParVal[i]->SetNumber(v);
429  fFunc->SetParameter(i, v);
431  }
433  fParMin[i]->GetNumber(),
434  fParMax[i]->GetNumber());
436  fFunc->SetParLimits(i, fParMin[i]->GetNumber(),
437  fParMax[i]->GetNumber());
438  } else {
441  fFunc->GetParLimits(i, fPmin[i], fPmax[i]);
442  fPval[i] = fFunc->GetParameter(i);
443  if (fPmin[i]*fPmax[i] == 0 && fPmin[i] >= fPmax[i]) { //init
444  if (!fPval[i]) {
445  fParMin[i]->SetNumber(-10);
446  fParMax[i]->SetNumber(10);
447  } else {
448  fParMin[i]->SetNumber(-10*TMath::Abs(fPval[i]));
449  fParMax[i]->SetNumber(10*TMath::Abs(fPval[i]));
450  }
451  }
452  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
453  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
455  }
456  }
457  }
458  if (fUpdate->GetState() == kButtonDown)
459  DrawFunction();
460  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
463 }
464 
465 ////////////////////////////////////////////////////////////////////////////////
466 /// Slot related to parameter step setting.
467 
469 {
470 }
471 
472 ////////////////////////////////////////////////////////////////////////////////
473 /// Slot related to the Fix check button.
474 
476 {
478 
479  TGButton *bt = (TGButton *) gTQSender;
480  Int_t id = bt->WidgetId();
481  fHasChanges = kTRUE;
482 
483  for (Int_t i = 0; i < fNP; i++ ) {
484  if (id == kFIX*fNP+i) {
485  if (on) {
486  // no bound available
487  fParBnd[i]->Disconnect("Toggled(Bool_t)");
489  fParBnd[i]->SetToolTipText(Form("DISABLED - %s is fixed", fFunc->GetParName(i)));
490  if (fParVal[i]->GetNumber() != 0) {
491  fParMin[i]->SetNumber(fParVal[i]->GetNumber());
493  fParMax[i]->SetNumber(fParVal[i]->GetNumber());
495  } else {
496  fParMin[i]->SetNumber(1.);
498  fParMax[i]->SetNumber(1.);
500  }
501  fParVal[i]->SetState(kFALSE);
502  fParStp[i]->SetState(kFALSE);
503  fParSld[i]->Disconnect("PointerPositionChanged()");
504  fParSld[i]->Disconnect("PositionChanged()");
505  fParSld[i]->UnmapWindow();
506  fFunc->FixParameter(i, fParVal[i]->GetNumber());
507  } else if (!fParMin[i]->IsEnabled()) {
508  if (fPmin[i] != fPmax[i]) {
509  if (fPmin[i])
510  fParMin[i]->SetNumber(fPmin[i]);
511  else if (fPerr[i])
512  fParMin[i]->SetNumber(fPval[i]-3*fPerr[i]);
513  else if (fPval[i])
514  fParMin[i]->SetNumber(fPval[i]-0.1*fPval[i]);
515  else
516  fParMin[i]->SetNumber(1.0);
517  if (fPmax[i])
518  fParMax[i]->SetNumber(fPmax[i]);
519  else if (fPerr[i])
520  fParMax[i]->SetNumber(fPval[i]+3*fPerr[i]);
521  else if (fPval[i])
522  fParMax[i]->SetNumber(fPval[i]+0.1*fPval[i]);
523  else
524  fParMax[i]->SetNumber(1.0);
525  } else if (fPval[i]) {
526  fParMin[i]->SetNumber(fPval[i]-0.1*fPval[i]);
527  fParMax[i]->SetNumber(fPval[i]+0.1*fPval[i]);
528  } else {
529  fParMin[i]->SetNumber(1.0);
530  fParMax[i]->SetNumber(1.0);
531  }
532  if (fParMax[i]->GetNumber() < fParMin[i]->GetNumber()){
533  Double_t temp;
534  temp = fParMax[i]->GetNumber();
535  fParMax[i]->SetNumber(fParMin[i]->GetNumber());
536  fParMin[i]->SetNumber(temp);
537  }
538  fParBnd[i]->SetEnabled(kTRUE);
539  fParBnd[i]->Connect("Toggled(Bool_t)", "TFitParametersDialog",
540  this, "DoParBound(Bool_t)");
542  fParMax[i]->SetEnabled(kTRUE);
543  fParMin[i]->SetEnabled(kTRUE);
544  fParSld[i]->MapWindow();
545  fParVal[i]->SetState(kTRUE);
546  fParStp[i]->SetState(kTRUE);
547  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
548  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
550  fParSld[i]->Connect("PointerPositionChanged()", "TFitParametersDialog",
551  this, "DoSlider()");
552  fParSld[i]->Connect("PositionChanged()", "TFitParametersDialog",
553  this, "DoSlider()");
554  fFunc->SetParLimits(i, fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
555  }
556  }
557  }
558  if (fUpdate->GetState() == kButtonDown)
559  DrawFunction();
560  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
562 }
563 
564 ////////////////////////////////////////////////////////////////////////////////
565 /// Set the parameter values inside the function
566 
568 {
570  for (Int_t i = 0; i < fNP; i++ ) {
571  // first make sure the current value is up to date
573  if (fParFix[i]->GetState() == kButtonDown) {
574  fFunc->SetParameter(i, fParVal[i]->GetNumber());
575  fFunc->FixParameter(i, fParVal[i]->GetNumber());
577  } else {
578  if (fParBnd[i]->GetState() == kButtonDown) {
579  fFunc->SetParameter(i, fParVal[i]->GetNumber());
580  fFunc->SetParLimits(i, fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
582  } else {
584  }
585  }
586  }
587 }
588 
589 ////////////////////////////////////////////////////////////////////////////////
590 /// Slot related to the OK button.
591 
593 {
594  if (fHasChanges)
595  DrawFunction();
596 
597  SetParameters();
598 
599  CloseWindow();
600 }
601 
602 ////////////////////////////////////////////////////////////////////////////////
603 /// Slot related to the Preview button.
604 
606 {
607  DrawFunction();
609  if (fReset->GetState() == kButtonDisabled)
611 }
612 
613 ////////////////////////////////////////////////////////////////////////////////
614 /// Slot related to the Reset button.
615 
617 {
618  fHasChanges = kTRUE;
619  Int_t k = fNP;
620  for (Int_t i = 0; i < fNP; i++) {
621  if (fParVal[i]->GetNumber() == fPval[i])
622  k--;
623  else
624  break;
625  }
626 
627  if (!k) {
628  if (fReset->GetState() == kButtonUp)
631  return;
632  }
633  for (Int_t i = 0; i < fNP; i++) {
634  fFunc->SetParameter(i, fPval[i]);
635  fFunc->SetParLimits(i, fPmin[i], fPmax[i]);
636  fFunc->SetParError(i, fPerr[i]);
637 
638  if (fPmin[i])
639  fParMin[i]->SetNumber(fPmin[i]);
640  else if (fPerr[i])
641  fParMin[i]->SetNumber(fPval[i]-3*fPerr[i]);
642  else if (fPval[i])
643  fParMin[i]->SetNumber(-3*TMath::Abs(fPval[i]));
644  else
645  fParMin[i]->SetNumber(1.0);
646 
647  if (fPmax[i])
648  fParMax[i]->SetNumber(fPmax[i]);
649  else if (fPerr[i])
650  fParMax[i]->SetNumber(fPval[i]+3*fPerr[i]);
651  else if (fPval[i])
652  fParMax[i]->SetNumber(3*TMath::Abs(fPval[i]));
653  else
654  fParMax[i]->SetNumber(1.0);
655  if (fParMax[i]->GetNumber() < fParMin[i]->GetNumber()){
656  Double_t temp;
657  temp = fParMax[i]->GetNumber();
658  fParMax[i]->SetNumber(fParMin[i]->GetNumber());
659  fParMin[i]->SetNumber(temp);
660  }
661  if (fParMin[i]->GetNumber() == fParMax[i]->GetNumber()) {
662  fParVal[i]->SetState(kFALSE);
665  fParStp[i]->SetState(kFALSE);
666  fParSld[i]->Disconnect("PointerPositionChanged()");
667  fParSld[i]->Disconnect("PositionChanged()");
668  fParSld[i]->UnmapWindow();
669  fParBnd[i]->Disconnect("Toggled(Bool_t)");
671  fFunc->FixParameter(i, fParVal[i]->GetNumber());
673  } else {
675  if (!fParMax[i]->IsEnabled()) {
676  fParMax[i]->SetEnabled(kTRUE);
677  fParMin[i]->SetEnabled(kTRUE);
678  fParVal[i]->SetState(kTRUE);
679  fParStp[i]->SetState(kTRUE);
680  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
681  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
683  fParSld[i]->MapWindow();
684  fParSld[i]->Connect("PointerPositionChanged()", "TFitParametersDialog",
685  this, "DoSlider()");
686  fParSld[i]->Connect("PositionChanged()", "TFitParametersDialog",
687  this, "DoSlider()");
688  fParBnd[i]->SetEnabled(kTRUE);
689  fParBnd[i]->Connect("Toggled(Bool_t)", "TFitParametersDialog",
690  this, "DoParBound()");
691  }
692  }
693  fParVal[i]->SetNumber(fPval[i]);
694 
695  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
696  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
698  }
699 
700  if (fUpdate->GetState() == kButtonDown)
701  DrawFunction();
702  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
707 }
708 
709 ////////////////////////////////////////////////////////////////////////////////
710 /// Slot related to the parameters' value settings.
711 
713 {
715  Int_t id = sl->WidgetId();
716 
717  fHasChanges = kTRUE;
718  for (Int_t i = 0; i < fNP; i++ ) {
719  if (id == kSLD*fNP+i) {
720  fFunc->SetParameter(i,fParSld[i]->GetPointerPosition());
721  fFunc->SetParLimits(i,fParSld[i]->GetMinPosition(),
722  fParSld[i]->GetMaxPosition());
723  fParMin[i]->SetNumber(fParSld[i]->GetMinPosition());
724  fParMax[i]->SetNumber(fParSld[i]->GetMaxPosition());
725  fParVal[i]->SetNumber(fParSld[i]->GetPointerPosition());
726  }
727  }
728  if (fUpdate->GetState() == kButtonDown)
729  DrawFunction();
730  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
732  if (fReset->GetState() == kButtonDisabled)
734 }
735 
736 ////////////////////////////////////////////////////////////////////////////////
737 /// Slot related to the parameter value settings.
738 
740 {
742  Int_t id = ne->WidgetId();
743 
744  for (Int_t i = 0; i < fNP; i++ ) {
745  if (id == kVAL*fNP+i) {
746  if (fParVal[i]->GetNumber() < fParMin[i]->GetNumber()) {
747  Double_t extraIncrement = (fParMax[i]->GetNumber() - fParMin[i]->GetNumber()) / 4;
748  fParMin[i]->SetNumber(fParVal[i]->GetNumber() - extraIncrement );
750  fParSld[i]->SetRange(fParMin[i]->GetNumber(),
751  fParMax[i]->GetNumber());
752  fParSld[i]->SetPosition(fParMin[i]->GetNumber(),
753  fParMax[i]->GetNumber());
754  }
755  if (fParVal[i]->GetNumber() > fParMax[i]->GetNumber()) {
756  Double_t extraIncrement = (fParMax[i]->GetNumber() - fParMin[i]->GetNumber()) / 4;
757  fParMax[i]->SetNumber(fParVal[i]->GetNumber() + extraIncrement );
759  fParSld[i]->SetRange(fParMin[i]->GetNumber(),
760  fParMax[i]->GetNumber());
761  fParSld[i]->SetPosition(fParMin[i]->GetNumber(),
762  fParMax[i]->GetNumber());
763  }
764  fParSld[i]->SetPointerPosition(fParVal[i]->GetNumber());
766  fFunc->SetParameter(i,fParSld[i]->GetPointerPosition());
767  if (fParBnd[i]->GetState() == kButtonDown)
768  fFunc->SetParLimits(i,fParSld[i]->GetMinPosition(),
769  fParSld[i]->GetMaxPosition());
770  else
772  }
773  }
774  fHasChanges = kTRUE;
775  if (fUpdate->GetState() == kButtonDown)
776  DrawFunction();
777  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
779  if (fReset->GetState() == kButtonDisabled)
781 }
782 
783 ////////////////////////////////////////////////////////////////////////////////
784 /// Slot related to the minumum parameter limit settings.
785 
787 {
789  Int_t id = ne->WidgetId();
790 
791  for (Int_t i = 0; i < fNP; i++ ) {
792  if (id == kMIN*fNP+i) {
793  if ((fParMin[i]->GetNumber() >= fParMax[i]->GetNumber()) &&
794  (fParBnd[i]->GetState() == kButtonDown)) {
795  Int_t ret;
796  const char *txt;
797  txt = "'Min' cannot be bigger then 'Max' if this parameter is bounded.";
799  "Parameter Limits", txt, kMBIconExclamation, kMBOk, &ret);
800  fParMin[i]->SetNumber(fParVal[i]->GetNumber()-fParStp[i]->GetNumber());
801  return;
802  }
803  if (fParBnd[i]->GetState() == kButtonDown) {
804  Double_t val = (fParMax[i]->GetNumber()+fParMin[i]->GetNumber())/2.;
805  fParVal[i]->SetNumber(val);
806  fParVal[i]->SetLimitValues(fParMin[i]->GetNumber(),
807  fParMax[i]->GetNumber());
808  }
809  fParSld[i]->SetRange(fParMin[i]->GetNumber(),
810  fParMax[i]->GetNumber());
811  fParSld[i]->SetPosition(fParMin[i]->GetNumber(),
812  fParMax[i]->GetNumber());
813  fParSld[i]->SetPointerPosition(fParVal[i]->GetNumber());
815  }
816  }
817  fHasChanges = kTRUE;
818  if (fUpdate->GetState() == kButtonDown)
819  DrawFunction();
820  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
822  if (fReset->GetState() == kButtonDisabled)
824 }
825 
826 ////////////////////////////////////////////////////////////////////////////////
827 /// Slot related to the maximum parameter limit settings.
828 
830 {
832  Int_t id = ne->WidgetId();
833 
834  for (Int_t i = 0; i < fNP; i++ ) {
835  if (id == kMAX*fNP+i) {
836  if ((fParMin[i]->GetNumber() >= fParMax[i]->GetNumber()) &&
837  (fParBnd[i]->GetState() == kButtonDown)) {
838  Int_t ret;
839  const char *txt;
840  txt = "'Min' cannot be bigger then 'Max' if this parameter is bounded.";
842  "Parameter Limits", txt, kMBIconExclamation, kMBOk, &ret);
843  fParMax[i]->SetNumber(fParVal[i]->GetNumber()+fParStp[i]->GetNumber());
844  return;
845  }
846  if (fParBnd[i]->GetState() == kButtonDown) {
847  Double_t val = (fParMax[i]->GetNumber()+(fParMin[i]->GetNumber()))/2.;
848  fParVal[i]->SetNumber(val);
849  fParVal[i]->SetLimitValues(fParMin[i]->GetNumber(),
850  fParMax[i]->GetNumber());
851  }
852  fParSld[i]->SetRange(fParMin[i]->GetNumber(),
853  fParMax[i]->GetNumber());
854  fParSld[i]->SetPosition(fParMin[i]->GetNumber(),
855  fParMax[i]->GetNumber());
856  fParSld[i]->SetPointerPosition(fParVal[i]->GetNumber());
858  }
859  }
860  fHasChanges = kTRUE;
861  if (fUpdate->GetState() == kButtonDown)
862  DrawFunction();
863  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
865  if (fReset->GetState() == kButtonDisabled)
867 }
868 
869 ////////////////////////////////////////////////////////////////////////////////
870 /// Redraw function graphics.
871 
873 {
874  if ( !fFpad ) return;
875  TVirtualPad *save = 0;
876  save = gPad;
877  gPad = fFpad;
878  gPad->cd();
879 
880  Style_t st = fFunc->GetLineStyle();
881  fFunc->SetLineStyle(2);
882 
883  TString opt = fFunc->GetDrawOption();
884  opt.ToUpper();
885  if (!opt.Contains("SAME"))
886  opt += "SAME";
887  //fFunc->SetRange(fRXmin, fRXmax);
888  fFunc->Draw(opt);
889  gPad->Modified();
890  gPad->Update();
892 
893  fFunc->SetLineStyle(st);
894  if (save) gPad = save;
896 }
897 
898 ////////////////////////////////////////////////////////////////////////////////
899 /// Handle the button dependent states in this dialog.
900 
902 {
903  if (update && fHasChanges)
904  DrawFunction();
905  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges) {
907  }
908 }
909 
910 ////////////////////////////////////////////////////////////////////////////////
911 /// Disconnect signals from slot methods.
912 
914 {
915  for (Int_t i = 0; i < fNP; i++ ) {
916  fParFix[i]->Disconnect("Toggled(Bool_t)");
917  fParBnd[i]->Disconnect("Toggled(Bool_t)");
918  fParVal[i]->Disconnect("ValueSet(Long_t)");
919  fParMin[i]->Disconnect("ReturnPressed()");
920  fParMax[i]->Disconnect("ReturnPressed()");
921  fParSld[i]->Disconnect("PointerPositionChanged()");
922  fParSld[i]->Disconnect("PositionChanged()");
923  fParStp[i]->Disconnect("ValueSet(Long_t)");
924  fParVal[i]->Disconnect("TabPressed(Long_t)");
925  fParVal[i]->Disconnect("ShiftTabPressed(Long_t)");
926  fParMin[i]->Disconnect("TabPressed(Long_t)");
927  fParMin[i]->Disconnect("ShiftTabPressed(Long_t)");
928  fParMax[i]->Disconnect("TabPressed(Long_t)");
929  fParMax[i]->Disconnect("ShiftTabPressed(Long_t)");
930  fParStp[i]->Disconnect("TabPressed(Long_t)");
931  fParStp[i]->Disconnect("ShiftTabPressed(Long_t)");
932  }
933  fUpdate->Disconnect("Toggled(Bool_t)");
934  fReset->Disconnect("Clicked()");
935  fApply->Disconnect("Clicked()");
936  fOK->Disconnect("Clicked()");
937  fCancel->Disconnect("Clicked()");
938 }
939 
940 ////////////////////////////////////////////////////////////////////////////////
941 /// Handle Shift+Tab key event (set focus to the previous number entry field)
942 
944 {
946  next = (TGNumberEntryField *)fTextEntries.Before((TObject *)sender);
947  if (next == 0)
949  if (next) {
950  next->SetFocus();
951  next->Home();
952  }
953 }
954 
955 ////////////////////////////////////////////////////////////////////////////////
956 /// Handle Tab key event (set focus to the next number entry field)
957 
959 {
961  next = (TGNumberEntryField *)fTextEntries.After((TObject *)sender);
962  if (next == 0)
964  if (next) {
965  next->SetFocus();
966  next->Home();
967  }
968 }
969 
970 
971 
virtual void DoParFix(Bool_t on)
Slot related to the Fix check button.
virtual Style_t GetLineStyle() const
Definition: TAttLine.h:48
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)
virtual void ReleaseParameter(Int_t ipar)
Release parameter number ipar If used in a fit, the parameter can vary freely.
Definition: TF1.cxx:2820
TGCheckButton ** fParBnd
short Style_t
Definition: RtypesCore.h:76
virtual void ReturnPressed()
Return was pressed.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
R__EXTERN void * gTQSender
Definition: TQObject.h:49
TGNumberEntry ** fParStp
virtual const char * GetParName(Int_t ipar) const
Definition: TF1.h:363
virtual void DoApply()
Slot related to the Preview button.
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:222
tuple f2
Definition: surfaces.py:24
void f3()
Definition: na49.C:50
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
Definition: TF1.cxx:3200
virtual void SetNumber(Double_t val)
void ToUpper()
Change string to upper case.
Definition: TString.cxx:1088
virtual void DoCancel()
Slot related to the Cancel button.
Basic string class.
Definition: TString.h:137
#define gClient
Definition: TGClient.h:174
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
Definition: TF1.cxx:1052
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetRange(Float_t min, Float_t max)
TGTripleHSlider ** fParSld
Short_t Abs(Short_t d)
Definition: TMathBase.h:110
TGNumberEntryField * GetNumberEntry() const
TGNumberEntryField ** fParErr
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
Definition: TList.cxx:289
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
Definition: TObject.cxx:399
virtual void SetPointerPosition(Float_t pos)
Set pointer position in scaled (real) value.
virtual void DoParMinLimit()
Slot related to the minumum parameter limit settings.
virtual void SetFocus()
Set focus to this text entry.
virtual void CloseWindow()
Close parameters' dialog.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
Definition: TGMsgBox.h:51
ClassImp(TFitParametersDialog) TFitParametersDialog
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
Definition: TF1.cxx:1618
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...
Definition: TQObject.cxx:1135
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
Definition: TF1.cxx:3183
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
Definition: TList.cxx:322
void SetLimitValues(Double_t min=0, Double_t max=1)
SVector< double, 2 > v
Definition: Dict.h:5
virtual EButtonState GetState() const
Definition: TGButton.h:116
tuple main
Definition: hsum.py:20
virtual void HandleButtons(Bool_t update)
Handle the button dependent states in this dialog.
virtual void DoParBound(Bool_t on)
Slot related to the Bound check button.
virtual void SetParError(Int_t ipar, Double_t error)
Set error for parameter number ipar.
Definition: TF1.cxx:3158
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.
char * Form(const char *fmt,...)
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. ...
Definition: TF1.cxx:1253
Double_t E()
Definition: TMath.h:54
virtual Double_t GetNumber() const
Get the numeric value (floating point representation).
virtual void HandleShiftTab()
Handle Shift+Tab key event (set focus to the previous number entry field)
tuple pad
Definition: first.py:38
virtual void DoReset()
Slot related to the Reset button.
TGNumberEntry ** fParVal
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
Definition: TGWindow.cxx:133
TGNumberEntryField ** fParMin
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
Definition: TList.cxx:581
Int_t WidgetId() const
Definition: TGWidget.h:86
virtual void DoParStep()
Slot related to parameter step setting.
virtual void DoParValue()
Slot related to the parameter value settings.
void SetEnabled(Bool_t flag=kTRUE)
Definition: TGTextEntry.h:170
double Double_t
Definition: RtypesCore.h:55
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition: TGButton.cxx:409
double func(double *x, double *p)
Definition: stressTF1.cxx:213
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
Definition: TQObject.cxx:1293
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:349
virtual void SetLineStyle(Style_t lstyle)
Definition: TAttLine.h:56
virtual Double_t GetParameter(Int_t ipar) const
Definition: TF1.h:352
Mother of all ROOT objects.
Definition: TObject.h:58
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:557
virtual void UnmapWindow()
Definition: TGFrame.h:269
virtual void SetNumber(Double_t val)
Set the numeric value (floating point representation).
virtual void DoSlider()
Slot related to the parameters' value settings.
EParametersDialogWid
virtual void MapWindow()
Definition: TGFrame.h:267
TGClient * fClient
Definition: TGObject.h:41
void SetParameters()
Set the parameter values inside the function.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:567
1-Dim function class
Definition: TF1.h:149
void DisconnectSlots()
Disconnect signals from slot methods.
TF1 * f1
Definition: legend1.C:11
TGCheckButton ** fParFix
virtual void SetPosition(Float_t min, Float_t max)
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:370
#define gPad
Definition: TVirtualPad.h:288
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
virtual void SetParameter(Int_t param, Double_t value)
Definition: TF1.h:424
void Home(Bool_t mark=kFALSE)
Moves the text cursor to the left end of the line.
virtual ~TFitParametersDialog()
Destructor.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:949
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:258
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition: TGButton.cxx:395
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1200
Definition: TGMsgBox.h:52
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set button state.
Definition: TGButton.cxx:185