ROOT  6.06/09
Reference Guide
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 
55 
56 ////////////////////////////////////////////////////////////////////////////////
57 
59  const TGWindow *main,
60  TF1 *func,
61  TVirtualPad *pad,
62  Int_t *ret_code) :
63  TGTransientFrame(p, main, 10, 10, kVerticalFrame),
64  fFunc (func),
65  fFpad (pad),
66  fHasChanges (kFALSE),
67  fImmediateDraw (kTRUE),
68  fRetCode (ret_code)
69 
70 {
71  // Create a dialog for fit function parameters' settings.
72 
73  SetCleanup(kDeepCleanup);
74 
75  fFunc->GetRange(fRangexmin, fRangexmax);
76  fNP = fFunc->GetNpar();
77  fPmin = new Double_t[fNP];
78  fPmax = new Double_t[fNP];
79  fPval = new Double_t[fNP];
80  fPerr = new Double_t[fNP];
81  fPstp = new Double_t[fNP];
82 
83  for (Int_t i = 0; i < fNP; i++) {
84  fFunc->GetParLimits(i, fPmin[i], fPmax[i]);
85  fPval[i] = fFunc->GetParameter(i);
86  fPerr[i] = fFunc->GetParError(i);
87  if (TMath::Abs(fPval[i]) > 1E-16)
88  fPstp[i] = 0.3*TMath::Abs(fPval[i]);
89  else
90  fPstp[i] = 0.1;
91  }
92  fParNam = new TGTextEntry*[fNP];
93  fParFix = new TGCheckButton*[fNP];
94  fParBnd = new TGCheckButton*[fNP];
95  fParVal = new TGNumberEntry*[fNP];
96  fParMin = new TGNumberEntryField*[fNP];
97  fParMax = new TGNumberEntryField*[fNP];
98  fParSld = new TGTripleHSlider*[fNP];
99  fParStp = new TGNumberEntry*[fNP];
100  fParErr = new TGNumberEntryField*[fNP];
101 
102  memset(fParNam, 0, sizeof(TGTextEntry*)*fNP);
103  memset(fParFix, 0, sizeof(TGCheckButton*)*fNP);
104  memset(fParBnd, 0, sizeof(TGCheckButton*)*fNP);
105  memset(fParVal, 0, sizeof(TGNumberEntry*)*fNP);
106  memset(fParMin, 0, sizeof(TGNumberEntryField*)*fNP);
107  memset(fParMax, 0, sizeof(TGNumberEntryField*)*fNP);
108  memset(fParSld, 0, sizeof(TGTripleHSlider*)*fNP);
109  memset(fParStp, 0, sizeof(TGNumberEntry*)*fNP);
110  memset(fParErr, 0, sizeof(TGNumberEntryField*)*fNP);
111 
113  AddFrame(f1, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
114 
115  // column 'Name'
116  fContNam = new TGCompositeFrame(f1, 80, 20, kVerticalFrame | kFixedWidth);
117  fContNam->AddFrame(new TGLabel(fContNam,"Name"),
118  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
119  for (Int_t i = 0; i < fNP; i++ ) {
120  fParNam[i] = new TGTextEntry(fContNam, new TGTextBuffer(80), kNAME+i);
121  fParNam[i]->SetText(Form("%s", fFunc->GetParName(i)));
122  fParNam[i]->SetEnabled(kFALSE);
123  fContNam->AddFrame(fParNam[i],
124  new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
125  }
126  f1->AddFrame(fContNam, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
127 
128  // column 'Fix'
129  fContFix = new TGCompositeFrame(f1, 20, 20, kVerticalFrame | kFixedWidth);
130  fContFix->AddFrame(new TGLabel(fContFix,"Fix"),
131  new TGLayoutHints(kLHintsTop, 2, 0, 0, 0));
132  for (Int_t i = 0; i < fNP; i++ ) {
133  fParFix[i] = new TGCheckButton(fContFix, "", kFIX*fNP+i);
134  fParFix[i]->SetToolTipText(Form("Set %s to fixed", fFunc->GetParName(i)));
135  fContFix->AddFrame(fParFix[i], new TGLayoutHints(kLHintsLeft | kLHintsCenterY,
136  5, 5, 10, 7));
137  if ((fPmin[i] == fPmax[i]) && (fPmin[i] || fPmax[i]))
138  fParFix[i]->SetState(kButtonDown);
139  else
140  fParFix[i]->SetState(kButtonUp);
141  fParFix[i]->Connect("Toggled(Bool_t)", "TFitParametersDialog", this, "DoParFix(Bool_t)");
142  }
143  f1->AddFrame(fContFix, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
144 
145  // column 'Bound'
146  fContBnd = new TGCompositeFrame(f1, 40, 20, kVerticalFrame | kFixedWidth);
147  fContBnd->AddFrame(new TGLabel(fContBnd,"Bound"),
148  new TGLayoutHints(kLHintsTop, 2, 0, 0, 0));
149  for (Int_t i = 0; i < fNP; i++ ) {
150  fParBnd[i] = new TGCheckButton(fContBnd, "", kBND*fNP+i);
151  fParBnd[i]->SetToolTipText(Form("Set bound to %s", fFunc->GetParName(i)));
152  fContBnd->AddFrame(fParBnd[i], new TGLayoutHints(kLHintsLeft | kLHintsCenterY,
153  15, 5, 10, 7));
154  fParBnd[i]->Connect("Toggled(Bool_t)", "TFitParametersDialog", this, "DoParBound(Bool_t)");
155  if ( ((fPmin[i] != fPmax[i]) && (fPmin[i] || fPmax[i])) || (fParMin[i] < fParMax[i]) )
156  fParBnd[i]->SetState(kButtonDown, kFALSE);
157  else
158  fParBnd[i]->SetState(kButtonUp, kFALSE);
159  }
160  f1->AddFrame(fContBnd, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
161 
162  // column 'Value'
163  fContVal = new TGCompositeFrame(f1, 100, 20, kVerticalFrame | kFixedWidth);
164  fContVal->AddFrame(new TGLabel(fContVal,"Value"),
165  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
166  for (Int_t i = 0; i < fNP; i++ ) {
167  fParVal[i] = new TGNumberEntry(fContVal, 1.2E-12, 15, kVAL*fNP+i,
169  fParVal[i]->SetNumber(fPval[i]);
170  fParVal[i]->SetFormat(TGNumberFormat::kNESReal, TGNumberFormat::kNEAAnyNumber); //tbs
171  fContVal->AddFrame(fParVal[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
172  (fParVal[i]->GetNumberEntry())->SetToolTipText(Form("%s", fFunc->GetParName(i)));
173  (fParVal[i]->GetNumberEntry())->Connect("ReturnPressed()", "TFitParametersDialog",
174  this, "DoParValue()");
175  fParVal[i]->Connect("ValueSet(Long_t)", "TFitParametersDialog", this, "DoParValue()");
176  (fParVal[i]->GetNumberEntry())->Connect("TabPressed()", "TFitParametersDialog", this, "HandleTab()");
177  (fParVal[i]->GetNumberEntry())->Connect("ShiftTabPressed()", "TFitParametersDialog", this, "HandleShiftTab()");
178  fTextEntries.Add(fParVal[i]->GetNumberEntry());
179  }
180  f1->AddFrame(fContVal, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
181 
182  // column 'Min'
183  fContMin = new TGCompositeFrame(f1, 100, 20, kVerticalFrame | kFixedWidth);
184  fContMin->AddFrame(new TGLabel(fContMin,"Min"),
185  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
186  for (Int_t i = 0; i < fNP; i++ ) {
187  fParMin[i] = new TGNumberEntryField(fContMin, kMIN*fNP+i, 0.0,
190  ((TGTextEntry*)fParMin[i])->SetToolTipText(Form("Lower limit of %s",
191  fFunc->GetParName(i)));
192  fContMin->AddFrame(fParMin[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
193  fParMin[i]->SetNumber(fPmin[i]);
194  fParMin[i]->Connect("ReturnPressed()", "TFitParametersDialog", this,
195  "DoParMinLimit()");
196  fParMin[i]->Connect("TabPressed()", "TFitParametersDialog", this, "HandleTab()");
197  fParMin[i]->Connect("ShiftTabPressed()", "TFitParametersDialog", this, "HandleShiftTab()");
198  fTextEntries.Add(fParMin[i]);
199  }
200  f1->AddFrame(fContMin, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
201 
202  // column 'Set Range'
203  fContSld = new TGCompositeFrame(f1, 120, 20, kVerticalFrame | kFixedWidth);
204  fContSld->AddFrame(new TGLabel(fContSld,"Set Range"),
205  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
206  for (Int_t i = 0; i < fNP; i++ ) {
207  fParSld[i] = new TGTripleHSlider(fContSld, 100, kDoubleScaleBoth, kSLD*fNP+i,
208  kHorizontalFrame, GetDefaultFrameBackground(),
209  kFALSE, kFALSE, kFALSE, kFALSE);
210  fContSld->AddFrame(fParSld[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 5, 5));
211  fParSld[i]->SetConstrained(kTRUE);
212  }
213  f1->AddFrame(fContSld, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
214 
215  // column 'Max'
216  fContMax = new TGCompositeFrame(f1, 100, 20, kVerticalFrame | kFixedWidth);
217  fContMax->AddFrame(new TGLabel(fContMax,"Max"),
218  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
219  for (Int_t i = 0; i < fNP; i++ ) {
220  fParMax[i] = new TGNumberEntryField(fContMax, kMAX*fNP+i, 0.0,
223  ((TGTextEntry*)fParMax[i])->SetToolTipText(Form("Upper limit of %s",
224  fFunc->GetParName(i)));
225  fContMax->AddFrame(fParMax[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
226  fParMax[i]->SetNumber(fPmax[i]);
227  fParMax[i]->Connect("ReturnPressed()", "TFitParametersDialog", this, "DoParMaxLimit()");
228  fParMax[i]->Connect("TabPressed()", "TFitParametersDialog", this, "HandleTab()");
229  fParMax[i]->Connect("ShiftTabPressed()", "TFitParametersDialog", this, "HandleShiftTab()");
230  fTextEntries.Add(fParMax[i]);
231  }
232  f1->AddFrame(fContMax, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
233 
234  // column 'Step'
235  fContStp = new TGCompositeFrame(f1, 100, 20, kVerticalFrame | kFixedWidth);
236  fContStp->AddFrame(new TGLabel(fContStp,"Step"),
237  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
238  for (Int_t i = 0; i < fNP; i++ ) {
239  fParStp[i] = new TGNumberEntry(fContStp, 1.2E-12, 15, kSTP*fNP+i,
241  fParStp[i]->SetNumber(fPstp[i]);
242  fParStp[i]->SetFormat(TGNumberFormat::kNESReal, TGNumberFormat::kNEAAnyNumber); //tbs
243  fContStp->AddFrame(fParStp[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
244  (fParStp[i]->GetNumberEntry())->SetToolTipText(Form("%s", fFunc->GetParName(i)));
245  (fParStp[i]->GetNumberEntry())->Connect("ReturnPressed()", "TFitParametersDialog",
246  this, "DoParStep()");
247  fParStp[i]->Connect("ValueSet(Long_t)", "TFitParametersDialog", this, "DoParStep()");
248  (fParStp[i]->GetNumberEntry())->Connect("TabPressed()", "TFitParametersDialog", this, "HandleTab()");
249  (fParStp[i]->GetNumberEntry())->Connect("ShiftTabPressed()", "TFitParametersDialog", this, "HandleShiftTab()");
250  fTextEntries.Add(fParStp[i]->GetNumberEntry());
251  }
252  f1->AddFrame(fContStp, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
253 
254  // column 'Error'
255  fContErr = new TGCompositeFrame(f1, 80, 20, kVerticalFrame | kFixedWidth);
256  fContErr->AddFrame(new TGLabel(fContErr,"Errors"),
257  new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
258  for (Int_t i = 0; i < fNP; i++ ) {
259  fParErr[i] = new TGNumberEntryField(fContErr, kERR*fNP+i, 0.0,
262  ((TGTextEntry*)fParErr[i])->SetToolTipText(Form("Error of %s",
263  fFunc->GetParName(i)));
264  fContErr->AddFrame(fParErr[i], new TGLayoutHints(kLHintsExpandX, 2, 2, 7, 5));
265  fParErr[i]->SetEnabled(kFALSE);
266  if (fPerr[i])
267  fParErr[i]->SetNumber(fPerr[i]);
268  else
269  ((TGTextEntry *)fParErr[i])->SetText("-");
270  }
271  f1->AddFrame(fContErr, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
272 
273  TGCompositeFrame *f2 = new TGCompositeFrame(this, 270, 20, kHorizontalFrame);
274  AddFrame(f2, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX));
275 
276  fUpdate = new TGCheckButton(f2, "&Immediate preview", kUPDATE);
277  fUpdate->SetToolTipText("Immediate function redrawing");
278  fUpdate->SetState(kButtonDown);
279  f2->AddFrame(fUpdate, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 5, 5, 5));
280  fUpdate->Connect("Toggled(Bool_t)", "TFitParametersDialog", this, "HandleButtons(Bool_t)");
281 
283  f2->AddFrame(f3, new TGLayoutHints(kLHintsRight));
284 
285  fReset = new TGTextButton(f3, "&Reset", kRESET);
286  f3->AddFrame(fReset, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,2,2,5,5));
287  fReset->SetToolTipText("Reset the parameter settings");
288  fReset->SetState(kButtonDisabled);
289  fReset->Connect("Clicked()", "TFitParametersDialog", this, "DoReset()");
290 
291  fApply = new TGTextButton(f3, "&Apply", kAPPLY);
292  f3->AddFrame(fApply, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,2,2,5,5));
293  fApply->SetState(kButtonDisabled);
294  fApply->Connect("Clicked()", "TFitParametersDialog", this, "DoApply()");
295  fApply->SetToolTipText("Apply parameter settings and redraw the function");
296 
297  fOK = new TGTextButton(f3, "&OK", kOK);
298  f3->AddFrame(fOK, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,2,2,5,5));
299  fOK->SetToolTipText("Apply parameter settings, redraw function and close this dialog");
300  fOK->Connect("Clicked()", "TFitParametersDialog", this, "DoOK()");
301 
302  fCancel = new TGTextButton(f3, "&Cancel", kCANCEL);
303  f3->AddFrame(fCancel, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,2,2,5,5));
304  fCancel->SetToolTipText("Close this dialog with no parameter changes");
305  fCancel->Connect("Clicked()", "TFitParametersDialog", this, "DoCancel()");
306  *fRetCode = kFPDNoneBounded; // default setting
307 
308  MapSubwindows();
309  Resize(GetDefaultSize());
310  MapWindow();
311  CenterOnParent(kFALSE, kBottomLeft);
312  SetWindowName(Form("Set Parameters of %s", fFunc->GetTitle()));
313 
314  for (Int_t i = 0; i < fNP; i++ ) {
315  if (fParFix[i]->GetState() == kButtonDown) {
316  fParVal[i]->SetState(kFALSE);
317  fParMin[i]->SetEnabled(kFALSE);
318  fParMax[i]->SetEnabled(kFALSE);
319  fParSld[i]->UnmapWindow();
320  } else {
321  if (fPmin[i]*fPmax[i] == 0 && fPmin[i] >= fPmax[i]) { //init
322  if (!fPval[i]) {
323  fParMin[i]->SetNumber(-10);
324  fParMax[i]->SetNumber(10);
325  } else {
326  fParMin[i]->SetNumber(-3*TMath::Abs(fPval[i]));
327  fParMax[i]->SetNumber(3*TMath::Abs(fPval[i]));
328  }
329  }
330  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
331  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
332  fParSld[i]->SetPointerPosition(fParVal[i]->GetNumber());
333  fParSld[i]->Connect("PointerPositionChanged()", "TFitParametersDialog",
334  this, "DoSlider()");
335  fParSld[i]->Connect("PositionChanged()", "TFitParametersDialog",
336  this, "DoSlider()");
337  }
338  }
339 
340  gClient->WaitFor(this);
341 }
342 
343 ////////////////////////////////////////////////////////////////////////////////
344 /// Destructor.
345 
347 {
348  DisconnectSlots();
350  Cleanup();
351  delete [] fPval;
352  delete [] fPmin;
353  delete [] fPmax;
354  delete [] fPerr;
355  delete [] fPstp;
356 
357  delete [] fParNam;
358  delete [] fParFix;
359  delete [] fParBnd;
360  delete [] fParVal;
361  delete [] fParMin;
362  delete [] fParMax;
363  delete [] fParSld;
364  delete [] fParStp;
365  delete [] fParErr;
366 }
367 
368 ////////////////////////////////////////////////////////////////////////////////
369 /// Close parameters' dialog.
370 
372 {
373  if (fHasChanges) {
374  Int_t ret;
375  const char *txt;
376  txt = "Do you want to apply last parameters' setting?";
378  "Parameters Have Been Changed", txt, kMBIconExclamation,
379  kMBYes | kMBNo | kMBCancel, &ret);
380  if (ret == kMBYes)
381  SetParameters();
382  else if (ret == kMBNo)
383  DoReset();
384  else return;
385  }
386 
387  DisconnectSlots();
388  DeleteWindow();
389 }
390 
391 ////////////////////////////////////////////////////////////////////////////////
392 /// Slot related to the Cancel button.
393 
395 {
396  if (fHasChanges)
397  DoReset();
398  for (Int_t i = 0; i < fNP; i++ ) {
399  if (fParBnd[i]->GetState() == kButtonDown)
401  }
402  CloseWindow();
403 }
404 
405 ////////////////////////////////////////////////////////////////////////////////
406 /// Slot related to the Bound check button.
407 
409 {
410  TGButton *bt = (TGButton *) gTQSender;
411  Int_t id = bt->WidgetId();
412  fHasChanges = kTRUE;
413 
414  for (Int_t i = 0; i < fNP; i++ ) {
415  if (id == kBND*fNP+i) {
416  if (on) {
417  if (fParMin[i]->GetNumber() >= fParMax[i]->GetNumber()) {
418  Int_t ret;
419  const char *txt;
420  txt = "'Min' value cannot be bigger or equal to 'Max' - set the limits first!";
422  "Parameter Limits", txt, kMBIconExclamation,kMBOk,&ret);
423 
425  return;
426  }
427  if ((fParVal[i]->GetNumber() < fParMin[i]->GetNumber()) ||
428  (fParVal[i]->GetNumber() > fParMax[i]->GetNumber())) {
429  Double_t v = (fParMax[i]->GetNumber()+fParMin[i]->GetNumber())/2.;
430  fParVal[i]->SetNumber(v);
431  fFunc->SetParameter(i, v);
433  }
435  fParMin[i]->GetNumber(),
436  fParMax[i]->GetNumber());
438  fFunc->SetParLimits(i, fParMin[i]->GetNumber(),
439  fParMax[i]->GetNumber());
440  } else {
443  fFunc->GetParLimits(i, fPmin[i], fPmax[i]);
444  fPval[i] = fFunc->GetParameter(i);
445  if (fPmin[i]*fPmax[i] == 0 && fPmin[i] >= fPmax[i]) { //init
446  if (!fPval[i]) {
447  fParMin[i]->SetNumber(-10);
448  fParMax[i]->SetNumber(10);
449  } else {
450  fParMin[i]->SetNumber(-10*TMath::Abs(fPval[i]));
451  fParMax[i]->SetNumber(10*TMath::Abs(fPval[i]));
452  }
453  }
454  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
455  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
457  }
458  }
459  }
460  if (fUpdate->GetState() == kButtonDown)
461  DrawFunction();
462  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
465 }
466 
467 ////////////////////////////////////////////////////////////////////////////////
468 /// Slot related to parameter step setting.
469 
471 {
472 }
473 
474 ////////////////////////////////////////////////////////////////////////////////
475 /// Slot related to the Fix check button.
476 
478 {
480 
481  TGButton *bt = (TGButton *) gTQSender;
482  Int_t id = bt->WidgetId();
483  fHasChanges = kTRUE;
484 
485  for (Int_t i = 0; i < fNP; i++ ) {
486  if (id == kFIX*fNP+i) {
487  if (on) {
488  // no bound available
489  fParBnd[i]->Disconnect("Toggled(Bool_t)");
491  fParBnd[i]->SetToolTipText(Form("DISABLED - %s is fixed", fFunc->GetParName(i)));
492  if (fParVal[i]->GetNumber() != 0) {
493  fParMin[i]->SetNumber(fParVal[i]->GetNumber());
495  fParMax[i]->SetNumber(fParVal[i]->GetNumber());
497  } else {
498  fParMin[i]->SetNumber(1.);
500  fParMax[i]->SetNumber(1.);
502  }
503  fParVal[i]->SetState(kFALSE);
504  fParStp[i]->SetState(kFALSE);
505  fParSld[i]->Disconnect("PointerPositionChanged()");
506  fParSld[i]->Disconnect("PositionChanged()");
507  fParSld[i]->UnmapWindow();
508  fFunc->FixParameter(i, fParVal[i]->GetNumber());
509  } else if (!fParMin[i]->IsEnabled()) {
510  if (fPmin[i] != fPmax[i]) {
511  if (fPmin[i])
512  fParMin[i]->SetNumber(fPmin[i]);
513  else if (fPerr[i])
514  fParMin[i]->SetNumber(fPval[i]-3*fPerr[i]);
515  else if (fPval[i])
516  fParMin[i]->SetNumber(fPval[i]-0.1*fPval[i]);
517  else
518  fParMin[i]->SetNumber(1.0);
519  if (fPmax[i])
520  fParMax[i]->SetNumber(fPmax[i]);
521  else if (fPerr[i])
522  fParMax[i]->SetNumber(fPval[i]+3*fPerr[i]);
523  else if (fPval[i])
524  fParMax[i]->SetNumber(fPval[i]+0.1*fPval[i]);
525  else
526  fParMax[i]->SetNumber(1.0);
527  } else if (fPval[i]) {
528  fParMin[i]->SetNumber(fPval[i]-0.1*fPval[i]);
529  fParMax[i]->SetNumber(fPval[i]+0.1*fPval[i]);
530  } else {
531  fParMin[i]->SetNumber(1.0);
532  fParMax[i]->SetNumber(1.0);
533  }
534  if (fParMax[i]->GetNumber() < fParMin[i]->GetNumber()){
535  Double_t temp;
536  temp = fParMax[i]->GetNumber();
537  fParMax[i]->SetNumber(fParMin[i]->GetNumber());
538  fParMin[i]->SetNumber(temp);
539  }
540  fParBnd[i]->SetEnabled(kTRUE);
541  fParBnd[i]->Connect("Toggled(Bool_t)", "TFitParametersDialog",
542  this, "DoParBound(Bool_t)");
544  fParMax[i]->SetEnabled(kTRUE);
545  fParMin[i]->SetEnabled(kTRUE);
546  fParSld[i]->MapWindow();
547  fParVal[i]->SetState(kTRUE);
548  fParStp[i]->SetState(kTRUE);
549  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
550  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
552  fParSld[i]->Connect("PointerPositionChanged()", "TFitParametersDialog",
553  this, "DoSlider()");
554  fParSld[i]->Connect("PositionChanged()", "TFitParametersDialog",
555  this, "DoSlider()");
556  fFunc->SetParLimits(i, fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
557  }
558  }
559  }
560  if (fUpdate->GetState() == kButtonDown)
561  DrawFunction();
562  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
564 }
565 
566 ////////////////////////////////////////////////////////////////////////////////
567 /// Set the parameter values inside the function
568 
570 {
572  for (Int_t i = 0; i < fNP; i++ ) {
573  // first make sure the current value is up to date
575  if (fParFix[i]->GetState() == kButtonDown) {
576  fFunc->SetParameter(i, fParVal[i]->GetNumber());
577  fFunc->FixParameter(i, fParVal[i]->GetNumber());
579  } else {
580  if (fParBnd[i]->GetState() == kButtonDown) {
581  fFunc->SetParameter(i, fParVal[i]->GetNumber());
582  fFunc->SetParLimits(i, fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
584  } else {
586  }
587  }
588  }
589 }
590 
591 ////////////////////////////////////////////////////////////////////////////////
592 /// Slot related to the OK button.
593 
595 {
596  if (fHasChanges)
597  DrawFunction();
598 
599  SetParameters();
600 
601  CloseWindow();
602 }
603 
604 ////////////////////////////////////////////////////////////////////////////////
605 /// Slot related to the Preview button.
606 
608 {
609  DrawFunction();
611  if (fReset->GetState() == kButtonDisabled)
613 }
614 
615 ////////////////////////////////////////////////////////////////////////////////
616 /// Slot related to the Reset button.
617 
619 {
620  fHasChanges = kTRUE;
621  Int_t k = fNP;
622  for (Int_t i = 0; i < fNP; i++) {
623  if (fParVal[i]->GetNumber() == fPval[i])
624  k--;
625  else
626  break;
627  }
628 
629  if (!k) {
630  if (fReset->GetState() == kButtonUp)
633  return;
634  }
635  for (Int_t i = 0; i < fNP; i++) {
636  fFunc->SetParameter(i, fPval[i]);
637  fFunc->SetParLimits(i, fPmin[i], fPmax[i]);
638  fFunc->SetParError(i, fPerr[i]);
639 
640  if (fPmin[i])
641  fParMin[i]->SetNumber(fPmin[i]);
642  else if (fPerr[i])
643  fParMin[i]->SetNumber(fPval[i]-3*fPerr[i]);
644  else if (fPval[i])
645  fParMin[i]->SetNumber(-3*TMath::Abs(fPval[i]));
646  else
647  fParMin[i]->SetNumber(1.0);
648 
649  if (fPmax[i])
650  fParMax[i]->SetNumber(fPmax[i]);
651  else if (fPerr[i])
652  fParMax[i]->SetNumber(fPval[i]+3*fPerr[i]);
653  else if (fPval[i])
654  fParMax[i]->SetNumber(3*TMath::Abs(fPval[i]));
655  else
656  fParMax[i]->SetNumber(1.0);
657  if (fParMax[i]->GetNumber() < fParMin[i]->GetNumber()){
658  Double_t temp;
659  temp = fParMax[i]->GetNumber();
660  fParMax[i]->SetNumber(fParMin[i]->GetNumber());
661  fParMin[i]->SetNumber(temp);
662  }
663  if (fParMin[i]->GetNumber() == fParMax[i]->GetNumber()) {
664  fParVal[i]->SetState(kFALSE);
667  fParStp[i]->SetState(kFALSE);
668  fParSld[i]->Disconnect("PointerPositionChanged()");
669  fParSld[i]->Disconnect("PositionChanged()");
670  fParSld[i]->UnmapWindow();
671  fParBnd[i]->Disconnect("Toggled(Bool_t)");
673  fFunc->FixParameter(i, fParVal[i]->GetNumber());
675  } else {
677  if (!fParMax[i]->IsEnabled()) {
678  fParMax[i]->SetEnabled(kTRUE);
679  fParMin[i]->SetEnabled(kTRUE);
680  fParVal[i]->SetState(kTRUE);
681  fParStp[i]->SetState(kTRUE);
682  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
683  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
685  fParSld[i]->MapWindow();
686  fParSld[i]->Connect("PointerPositionChanged()", "TFitParametersDialog",
687  this, "DoSlider()");
688  fParSld[i]->Connect("PositionChanged()", "TFitParametersDialog",
689  this, "DoSlider()");
690  fParBnd[i]->SetEnabled(kTRUE);
691  fParBnd[i]->Connect("Toggled(Bool_t)", "TFitParametersDialog",
692  this, "DoParBound()");
693  }
694  }
695  fParVal[i]->SetNumber(fPval[i]);
696 
697  fParSld[i]->SetRange(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
698  fParSld[i]->SetPosition(fParMin[i]->GetNumber(), fParMax[i]->GetNumber());
700  }
701 
702  if (fUpdate->GetState() == kButtonDown)
703  DrawFunction();
704  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
709 }
710 
711 ////////////////////////////////////////////////////////////////////////////////
712 /// Slot related to the parameters' value settings.
713 
715 {
717  Int_t id = sl->WidgetId();
718 
719  fHasChanges = kTRUE;
720  for (Int_t i = 0; i < fNP; i++ ) {
721  if (id == kSLD*fNP+i) {
722  fFunc->SetParameter(i,fParSld[i]->GetPointerPosition());
723  fFunc->SetParLimits(i,fParSld[i]->GetMinPosition(),
724  fParSld[i]->GetMaxPosition());
725  fParMin[i]->SetNumber(fParSld[i]->GetMinPosition());
726  fParMax[i]->SetNumber(fParSld[i]->GetMaxPosition());
727  fParVal[i]->SetNumber(fParSld[i]->GetPointerPosition());
728  }
729  }
730  if (fUpdate->GetState() == kButtonDown)
731  DrawFunction();
732  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
734  if (fReset->GetState() == kButtonDisabled)
736 }
737 
738 ////////////////////////////////////////////////////////////////////////////////
739 /// Slot related to the parameter value settings.
740 
742 {
744  Int_t id = ne->WidgetId();
745 
746  for (Int_t i = 0; i < fNP; i++ ) {
747  if (id == kVAL*fNP+i) {
748  if (fParVal[i]->GetNumber() < fParMin[i]->GetNumber()) {
749  Double_t extraIncrement = (fParMax[i]->GetNumber() - fParMin[i]->GetNumber()) / 4;
750  fParMin[i]->SetNumber(fParVal[i]->GetNumber() - extraIncrement );
752  fParSld[i]->SetRange(fParMin[i]->GetNumber(),
753  fParMax[i]->GetNumber());
754  fParSld[i]->SetPosition(fParMin[i]->GetNumber(),
755  fParMax[i]->GetNumber());
756  }
757  if (fParVal[i]->GetNumber() > fParMax[i]->GetNumber()) {
758  Double_t extraIncrement = (fParMax[i]->GetNumber() - fParMin[i]->GetNumber()) / 4;
759  fParMax[i]->SetNumber(fParVal[i]->GetNumber() + extraIncrement );
761  fParSld[i]->SetRange(fParMin[i]->GetNumber(),
762  fParMax[i]->GetNumber());
763  fParSld[i]->SetPosition(fParMin[i]->GetNumber(),
764  fParMax[i]->GetNumber());
765  }
766  fParSld[i]->SetPointerPosition(fParVal[i]->GetNumber());
768  fFunc->SetParameter(i,fParSld[i]->GetPointerPosition());
769  if (fParBnd[i]->GetState() == kButtonDown)
770  fFunc->SetParLimits(i,fParSld[i]->GetMinPosition(),
771  fParSld[i]->GetMaxPosition());
772  else
774  }
775  }
776  fHasChanges = kTRUE;
777  if (fUpdate->GetState() == kButtonDown)
778  DrawFunction();
779  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
781  if (fReset->GetState() == kButtonDisabled)
783 }
784 
785 ////////////////////////////////////////////////////////////////////////////////
786 /// Slot related to the minumum parameter limit settings.
787 
789 {
791  Int_t id = ne->WidgetId();
792 
793  for (Int_t i = 0; i < fNP; i++ ) {
794  if (id == kMIN*fNP+i) {
795  if ((fParMin[i]->GetNumber() >= fParMax[i]->GetNumber()) &&
796  (fParBnd[i]->GetState() == kButtonDown)) {
797  Int_t ret;
798  const char *txt;
799  txt = "'Min' cannot be bigger then 'Max' if this parameter is bounded.";
801  "Parameter Limits", txt, kMBIconExclamation, kMBOk, &ret);
802  fParMin[i]->SetNumber(fParVal[i]->GetNumber()-fParStp[i]->GetNumber());
803  return;
804  }
805  if (fParBnd[i]->GetState() == kButtonDown) {
806  Double_t val = (fParMax[i]->GetNumber()+fParMin[i]->GetNumber())/2.;
807  fParVal[i]->SetNumber(val);
808  fParVal[i]->SetLimitValues(fParMin[i]->GetNumber(),
809  fParMax[i]->GetNumber());
810  }
811  fParSld[i]->SetRange(fParMin[i]->GetNumber(),
812  fParMax[i]->GetNumber());
813  fParSld[i]->SetPosition(fParMin[i]->GetNumber(),
814  fParMax[i]->GetNumber());
815  fParSld[i]->SetPointerPosition(fParVal[i]->GetNumber());
817  }
818  }
819  fHasChanges = kTRUE;
820  if (fUpdate->GetState() == kButtonDown)
821  DrawFunction();
822  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
824  if (fReset->GetState() == kButtonDisabled)
826 }
827 
828 ////////////////////////////////////////////////////////////////////////////////
829 /// Slot related to the maximum parameter limit settings.
830 
832 {
834  Int_t id = ne->WidgetId();
835 
836  for (Int_t i = 0; i < fNP; i++ ) {
837  if (id == kMAX*fNP+i) {
838  if ((fParMin[i]->GetNumber() >= fParMax[i]->GetNumber()) &&
839  (fParBnd[i]->GetState() == kButtonDown)) {
840  Int_t ret;
841  const char *txt;
842  txt = "'Min' cannot be bigger then 'Max' if this parameter is bounded.";
844  "Parameter Limits", txt, kMBIconExclamation, kMBOk, &ret);
845  fParMax[i]->SetNumber(fParVal[i]->GetNumber()+fParStp[i]->GetNumber());
846  return;
847  }
848  if (fParBnd[i]->GetState() == kButtonDown) {
849  Double_t val = (fParMax[i]->GetNumber()+(fParMin[i]->GetNumber()))/2.;
850  fParVal[i]->SetNumber(val);
851  fParVal[i]->SetLimitValues(fParMin[i]->GetNumber(),
852  fParMax[i]->GetNumber());
853  }
854  fParSld[i]->SetRange(fParMin[i]->GetNumber(),
855  fParMax[i]->GetNumber());
856  fParSld[i]->SetPosition(fParMin[i]->GetNumber(),
857  fParMax[i]->GetNumber());
858  fParSld[i]->SetPointerPosition(fParVal[i]->GetNumber());
860  }
861  }
862  fHasChanges = kTRUE;
863  if (fUpdate->GetState() == kButtonDown)
864  DrawFunction();
865  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges)
867  if (fReset->GetState() == kButtonDisabled)
869 }
870 
871 ////////////////////////////////////////////////////////////////////////////////
872 /// Redraw function graphics.
873 
875 {
876  if ( !fFpad ) return;
877  TVirtualPad *save = 0;
878  save = gPad;
879  gPad = fFpad;
880  gPad->cd();
881 
882  Style_t st = fFunc->GetLineStyle();
883  fFunc->SetLineStyle(2);
884 
885  TString opt = fFunc->GetDrawOption();
886  opt.ToUpper();
887  if (!opt.Contains("SAME"))
888  opt += "SAME";
889  //fFunc->SetRange(fRXmin, fRXmax);
890  fFunc->Draw(opt);
891  gPad->Modified();
892  gPad->Update();
894 
895  fFunc->SetLineStyle(st);
896  if (save) gPad = save;
898 }
899 
900 ////////////////////////////////////////////////////////////////////////////////
901 /// Handle the button dependent states in this dialog.
902 
904 {
905  if (update && fHasChanges)
906  DrawFunction();
907  else if ((fApply->GetState() == kButtonDisabled) && fHasChanges) {
909  }
910 }
911 
912 ////////////////////////////////////////////////////////////////////////////////
913 /// Disconnect signals from slot methods.
914 
916 {
917  for (Int_t i = 0; i < fNP; i++ ) {
918  fParFix[i]->Disconnect("Toggled(Bool_t)");
919  fParBnd[i]->Disconnect("Toggled(Bool_t)");
920  fParVal[i]->Disconnect("ValueSet(Long_t)");
921  fParMin[i]->Disconnect("ReturnPressed()");
922  fParMax[i]->Disconnect("ReturnPressed()");
923  fParSld[i]->Disconnect("PointerPositionChanged()");
924  fParSld[i]->Disconnect("PositionChanged()");
925  fParStp[i]->Disconnect("ValueSet(Long_t)");
926  fParVal[i]->Disconnect("TabPressed(Long_t)");
927  fParVal[i]->Disconnect("ShiftTabPressed(Long_t)");
928  fParMin[i]->Disconnect("TabPressed(Long_t)");
929  fParMin[i]->Disconnect("ShiftTabPressed(Long_t)");
930  fParMax[i]->Disconnect("TabPressed(Long_t)");
931  fParMax[i]->Disconnect("ShiftTabPressed(Long_t)");
932  fParStp[i]->Disconnect("TabPressed(Long_t)");
933  fParStp[i]->Disconnect("ShiftTabPressed(Long_t)");
934  }
935  fUpdate->Disconnect("Toggled(Bool_t)");
936  fReset->Disconnect("Clicked()");
937  fApply->Disconnect("Clicked()");
938  fOK->Disconnect("Clicked()");
939  fCancel->Disconnect("Clicked()");
940 }
941 
942 ////////////////////////////////////////////////////////////////////////////////
943 /// Handle Shift+Tab key event (set focus to the previous number entry field)
944 
946 {
948  next = (TGNumberEntryField *)fTextEntries.Before((TObject *)sender);
949  if (next == 0)
951  if (next) {
952  next->SetFocus();
953  next->Home();
954  }
955 }
956 
957 ////////////////////////////////////////////////////////////////////////////////
958 /// Handle Tab key event (set focus to the next number entry field)
959 
961 {
963  next = (TGNumberEntryField *)fTextEntries.After((TObject *)sender);
964  if (next == 0)
966  if (next) {
967  next->SetFocus();
968  next->Home();
969  }
970 }
971 
972 
973 
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:2843
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:370
virtual void DoApply()
Slot related to the Preview button.
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:222
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
Definition: TF1.cxx:3223
virtual void SetNumber(Double_t val)
void ToUpper()
Change string to upper case.
Definition: TString.cxx:1101
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:1075
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:288
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:1641
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
const Double_t kUnlimit
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
Definition: TF1.cxx:3206
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
Definition: TList.cxx:321
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
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:3181
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:1276
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)
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:580
Int_t WidgetId() const
Definition: TGWidget.h:86
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.
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:348
virtual void SetLineStyle(Style_t lstyle)
Definition: TAttLine.h:56
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Definition: vector.h:440
virtual Double_t GetParameter(Int_t ipar) const
Definition: TF1.h:359
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:556
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.
double f2(const double *x)
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:431
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