Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TAdvancedGraphicsDialog.cxx
Go to the documentation of this file.
1// @(#)root/fitpanel:$Id$
2// Author: David Gonzalez Maline 11/12/2008
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/** \class TAdvancedGraphicsDialog
14 \ingroup fitpanel
15
16Allows to create advanced graphics from the last fit made in the
17fitpanel. This includes the scan graphics, the contour and the
18confidence levels.
19
20*/
21
22
24#include "TGraph.h"
25#include "TAxis.h"
26#include "TVirtualPad.h"
27#include "TColor.h"
28#include "TVirtualX.h"
29
30#include "Fit/BinData.h"
31#include "Math/IParamFunction.h"
32#include "TGraphErrors.h"
33#include "TGraph2DErrors.h"
34
35#include <sstream>
36
37#include <string>
38
41 fFitter((TBackCompFitter *) TVirtualFitter::GetFitter())
42{
43 // Creates the Advanced Graphics Dialog.
44
45
46 if (!p && !main) {
47 MakeZombie();
48 return;
49 }
51
52 fMainFrame = new TGVerticalFrame(this);
53
54 fTab = new TGTab(fMainFrame, 10, 10);
57 fTab->Associate(this);
58
59 // Add the first method to the dialog (Contour)
61 fTab->AddTab("Contour", fContourFrame);
62
63 // Add the second method to the dialog (Scan)
65 fTab->AddTab("Scan", fScanFrame);
66
68 fTab->AddTab("Conf Intervals", fConfFrame);
69
71
72 fDraw = new TGTextButton(frame, "&Draw", kAGD_BDRAW);
73 fDraw->Associate(this);
74 frame->AddFrame(fDraw, new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 5, 5, 0, 0));
75
76 fClose = new TGTextButton(frame, "&Close", kAGD_BCLOSE);
77 fClose->Associate(this);
78 frame->AddFrame(fClose, new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 5, 5, 0, 0));
79
80 UInt_t width = 0, height = 0;
83 frame->Resize((width + 20) * 2, height);
84
86
88
90
91 SetWindowName("Advanced Drawing Tools");
92
93 // map all widgets and calculate size of dialog
95
98
100 MapWindow();
101
102 // position relative to the parent's window
104
105 // make the message box non-resizable
108
114
115 // popup dialog and wait till user replies
116 gClient->WaitFor(this);
117}
118
119////////////////////////////////////////////////////////////////////////////////
120/// Create the frame that contains all the necessary information for
121/// the Contour method.
122
124{
127
128 TGLabel* label = new TGLabel(frame, "Number of Points: ");
129 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
130
131 fContourPoints = new TGNumberEntry(frame, 40,
132 5, kAGD_SCANMIN,
136 fContourPoints->Resize(130, 20);
137 fContourPoints->GetNumberEntry()->SetToolTipText("Sets the number of points used for the contour");
138 frame->AddFrame(fContourPoints, new TGLayoutHints(kLHintsNormal, 8, 0, 5, 0));
139 fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
140
141 frame = new TGHorizontalFrame(fContourFrame);
142 label = new TGLabel(frame, "Parameter 1: ");
143 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
144
147 fContourPar1->Resize(130, 20);
148 fContourPar1->Associate(this);
150 lb->Resize(lb->GetWidth(), 200);
151 frame->AddFrame(fContourPar1, new TGLayoutHints(kLHintsNormal, 37, 0, 5, 0));
152 fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
153
154 frame = new TGHorizontalFrame(fContourFrame);
155
156 label = new TGLabel(frame, "Parameter 2: ");
157 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
158
162 fContourPar2->Resize(130, 20);
163 fContourPar2->Associate(this);
164 lb = fContourPar2->GetListBox();
165 lb->Resize(lb->GetWidth(), 200);
166 frame->AddFrame(fContourPar2, new TGLayoutHints(kLHintsNormal, 37, 0, 5, 0));
167
168 fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
169
170 frame = new TGHorizontalFrame(fContourFrame);
171
172 label = new TGLabel(frame, "Confidence Level: ");
173 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
174
175 fContourError = new TGNumberEntry(frame, 0.683, 5, kAGD_CONTERR,
179 fContourError->Resize(130, 20);
180 fContourError->GetNumberEntry()->SetToolTipText("Sets the contour confidence level");
181 frame->AddFrame(fContourError, new TGLayoutHints(kLHintsNormal, 5, 0, 5, 0));
182
183 fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 5));
184
185 frame = new TGHorizontalFrame(fContourFrame);
186
187 label = new TGLabel(frame, "Fill Colour: ");
188 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
189
191 frame->AddFrame(fContourColor, new TGLayoutHints(kLHintsNormal, 5, 0, 5, 0));
192
193 fContourOver = new TGCheckButton(frame, "Superimpose", kAGD_CONTOVER);
194 fContourOver->SetToolTipText("If checked, the new contour will overlap the previous one");
195 frame->AddFrame(fContourOver, new TGLayoutHints(kLHintsNormal, 5, 0, 5, 0));
196
197 fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 5));
198}
199
200////////////////////////////////////////////////////////////////////////////////
201/// Create the frame that contains all the necessary information for
202/// the Scan method.
203
205{
208
209 TGLabel* label = new TGLabel(frame, "Number of Points: ");
210 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
211
212 fScanPoints = new TGNumberEntry(frame, 40,
213 5, kAGD_SCANMIN,
217 fScanPoints->Resize(140, 20);
218 fScanPoints->GetNumberEntry()->SetToolTipText("Sets the number of points used in the scan");
219 frame->AddFrame(fScanPoints, new TGLayoutHints(kLHintsNormal, 0, 0, 5, 0));
220 fScanFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
221
222 frame = new TGHorizontalFrame(fScanFrame);
223
224 label = new TGLabel(frame, "Parameter: ");
225 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
226
227 fScanPar = new TGComboBox(frame, kAGD_SCANPAR);
229 fScanPar->Resize(140, 20);
230 fScanPar->Associate(this);
232 lb->Resize(lb->GetWidth(), 200);
233 frame->AddFrame(fScanPar, new TGLayoutHints(kLHintsNormal, 39, 0, 5, 0));
234 fScanFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
235
236 frame = new TGHorizontalFrame(fScanFrame);
237 label = new TGLabel(frame, "Min: ");
238 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
239
242 fScanMin = new TGNumberEntry(frame, val - 2.*err ,
243 5, kAGD_SCANMIN,
247 fScanMin->Resize(70, 20);
248 fScanMin->GetNumberEntry()->SetToolTipText("Sets the minimum parameter value");
249 frame->AddFrame(fScanMin, new TGLayoutHints(kLHintsNormal, 2, 0, 5, 0));
250
251 label = new TGLabel(frame, "Max: ");
252 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 35, 5, 5, 0));
253 fScanMax = new TGNumberEntry(frame, val + 2.*err,
254 5, kAGD_SCANMAX,
258 fScanMax->Resize(70, 20);
259 fScanMax->GetNumberEntry()->SetToolTipText("Sets the maximum parameter value");
260 frame->AddFrame(fScanMax, new TGLayoutHints(kLHintsNormal, 2, 0, 5, 0));
261 fScanFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
262
263}
264
265////////////////////////////////////////////////////////////////////////////////
266/// Create the frame that contains all the necessary information for
267/// the Confidence Level method.
268
270{
273
274 TGLabel* label = new TGLabel(frame, "Confidence Level: ");
275 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
276
277 fConfLevel = new TGNumberEntry(frame, 0.95,
278 5, kAGD_SCANMIN,
282 0, 0.9999);
283 fConfLevel->Resize(140, 20);
284 fConfLevel->GetNumberEntry()->SetToolTipText("Sets the value of the confidence level");
285 frame->AddFrame(fConfLevel, new TGLayoutHints(kLHintsNormal, 0, 0, 5, 0));
286 fConfFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
287
288 frame = new TGHorizontalFrame(fConfFrame);
289
290 label = new TGLabel(frame, "Fill Colour: ");
291 frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
292
294 frame->AddFrame(fConfColor, new TGLayoutHints(kLHintsNormal, 5, 0, 5, 0));
295
296 fConfFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 5));
297}
298
300{
301 // Add all the parameters of the VirtualFitter into a comboBox
302 // (helper method)
303
304 for ( Int_t i = 0; i < fFitter->GetNumberTotalParameters(); ++i ) {
305 comboBox->AddEntry(fFitter->GetParName(i), kAGD_PARCOUNTER + i);
306 }
307 comboBox->Select(kAGD_PARCOUNTER, kFALSE);
308}
309
310////////////////////////////////////////////////////////////////////////////////
311/// Connect the slots (buttons mainly + specific methods)
312
314{
315 // Buttons
316 fClose->Connect("Clicked()", "TAdvancedGraphicsDialog", this, "CloseWindow()");
317 fDraw->Connect("Clicked()", "TAdvancedGraphicsDialog", this, "DoDraw()");
318
319 // Slots for the Scan method
320 fScanPar->Connect("Selected(Int_t)", "TAdvancedGraphicsDialog", this, "DoChangedScanPar(Int_t)");
321}
322
323////////////////////////////////////////////////////////////////////////////////
324/// Changes the Min and Max default values of the scan method,
325/// depending on the selected parameter.
326
328{
329 double val = fFitter->GetParameter( selected - kAGD_PARCOUNTER );
330 double err = fFitter->GetParError( selected - kAGD_PARCOUNTER );
331 fScanMin->SetNumber( val -2 * err );
332 fScanMax->SetNumber( val +2 * err );
333}
334
335////////////////////////////////////////////////////////////////////////////////
336/// Calls the corresponding method, depending on the selected tab.
337
339{
340 if ( fTab->GetCurrent() == 0 ) {
341 DrawContour();
342 } else if ( fTab->GetCurrent() == 1 ) {
343 DrawScan();
344 } else if ( fTab->GetCurrent() == 2 ) {
346 }
347}
348
349////////////////////////////////////////////////////////////////////////////////
350/// Generates all necessary data for the Contour method from its
351/// tab. Then it call Virtual Fitter to perform it.
352
354{
355 static TGraph * graph = 0;
356 std::string options;
357 if ( ! (fContourOver->GetState() == kButtonDown) ) {
358 if ( graph )
359 delete graph;
360 options = "ALF";
361 } else
362 options = "LF";
363 graph = new TGraph( static_cast<int>(fContourPoints->GetNumber()) );
366 if ( par1 == par2 ) {
367 Error("TAdvancedGraphicsDialog::DrawContour", "Parameters cannot be the same");
368 return;
369 }
370 // contour error is actually the desired confidence level
372 fFitter->Contour( par1, par2, graph, cl);
374 graph->GetXaxis()->SetTitle( fFitter->GetParName(par1) );
375 graph->GetYaxis()->SetTitle( fFitter->GetParName(par2) );
376 graph->Draw( options.c_str() );
377 gPad->Update();
378}
379
380////////////////////////////////////////////////////////////////////////////////
381/// Generates all necessary data for the Scan method from its
382/// tab. Then it call Virtual Fitter to perform it.
383
385{
386 static TGraph * graph = 0;
387 if ( graph )
388 delete graph;
389 graph = new TGraph( static_cast<int>(fScanPoints->GetNumber()) );
391 fFitter->Scan( par, graph,
393 fScanMax->GetNumber() );
394 graph->SetLineColor(kBlue);
395 graph->SetLineWidth(2);
396 graph->GetXaxis()->SetTitle(fFitter->GetParName(par) );
397 graph->GetYaxis()->SetTitle("FCN" );
398 graph->Draw("APL");
399 gPad->Update();
400}
401
402////////////////////////////////////////////////////////////////////////////////
403/// Generates all necessary data for the Scan method from its
404/// tab. Then it call Virtual Fitter to perform it.
405
407{
409 const ROOT::Fit::FitResult::IModelFunction* function = result.FittedFunction();
410 const ROOT::Fit::BinData* data = dynamic_cast<const ROOT::Fit::BinData*>(&(fFitter->GetFitData()));
411 if ( !data )
412 {
413 Error("DrawConfidenceLevels","Unbinned data set cannot draw confidence levels.");
414 return;
415 }
416
417 if ( !function )
418 {
419 Error("DrawConfidenceLevels","Fit Function does not exist!");
420 return;
421 }
422
423 std::vector<Double_t> ci(data->Size());
424 result.GetConfidenceIntervals(*data, &ci[0], fConfLevel->GetNumber());
425
426 if ( data->NDim() == 1 )
427 {
428 TGraphErrors* g = new TGraphErrors(ci.size());
429 for (unsigned int i = 0; i < ci.size(); ++i)
430 {
431 const Double_t *x = data->Coords(i);
432 const Double_t y = (*function)(x);
433 g->SetPoint(i, *x, y);
434 g->SetPointError(i, 0, ci[i]);
435 }
436 std::ostringstream os;
437 os << "Confidence Intervals with " << fConfLevel->GetNumber()
438 << " conf. band.";
439 g->SetTitle(os.str().c_str());
440 g->SetLineColor( TVirtualX::Pixel2Number( fConfColor->GetColor() ));
441 g->SetFillColor( TVirtualX::Pixel2Number( fConfColor->GetColor() ));
442 g->SetFillStyle(3001);
443 g->Draw("C3same");
444 } else if ( data->NDim() == 2 )
445 {
446 TGraph2DErrors* g = new TGraph2DErrors(ci.size());
447 for (unsigned int i = 0; i < ci.size(); ++i)
448 {
449 const Double_t *x = data->Coords(i);
450 const Double_t y = (*function)(x);
451 g->SetPoint(i, x[0], x[1], y);
452 g->SetPointError(i, 0, 0, ci[i]);
453 }
454 std::ostringstream os;
455 os << "Confidence Intervals with " << fConfLevel->GetNumber()
456 << " conf. band.";
457 g->SetTitle(os.str().c_str());
458 g->SetLineColor( TVirtualX::Pixel2Number( fConfColor->GetColor() ));
459 g->SetFillColor( TVirtualX::Pixel2Number( fConfColor->GetColor() ));
460 g->SetFillStyle(3001);
461 g->Draw("C3same");
462 }
463 gPad->Update();
464}
465
466////////////////////////////////////////////////////////////////////////////////
467/// Cleanup dialog.
468
@ kVerticalFrame
Definition GuiTypes.h:382
#define g(i)
Definition RSha256.hxx:105
constexpr Bool_t kFALSE
Definition RtypesCore.h:109
@ kBlue
Definition Rtypes.h:66
@ kYellow
Definition Rtypes.h:66
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:208
@ kButtonDown
Definition TGButton.h:54
#define gClient
Definition TGClient.h:157
@ kMWMDecorResizeH
Definition TGFrame.h:65
@ kMWMFuncAll
Definition TGFrame.h:49
@ kMWMFuncResize
Definition TGFrame.h:50
@ kMWMDecorMaximize
Definition TGFrame.h:69
@ kMWMDecorMinimize
Definition TGFrame.h:68
@ kMWMDecorMenu
Definition TGFrame.h:67
@ kMWMDecorAll
Definition TGFrame.h:63
@ kMWMFuncMaximize
Definition TGFrame.h:53
@ kMWMInputModeless
Definition TGFrame.h:57
@ kMWMFuncMinimize
Definition TGFrame.h:52
@ kDeepCleanup
Definition TGFrame.h:42
@ kLHintsRight
Definition TGLayout.h:26
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsCenterY
Definition TGLayout.h:28
@ kLHintsNormal
Definition TGLayout.h:32
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetMWMHints
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t SetWMSizeHints
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
#define gPad
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
Definition BinData.h:52
class containing the result of the fit and all the related information (fitted parameter values,...
Definition FitResult.h:44
TBackCompFitter * fFitter
Fitter.
~TAdvancedGraphicsDialog() override
Cleanup dialog.
TGVerticalFrame * fContourFrame
Contour Frame.
TGNumberEntry * fScanMax
Max Value for Contour.
void DoDraw()
Calls the corresponding method, depending on the selected tab.
void CreateScanFrame()
Create the frame that contains all the necessary information for the Scan method.
void CreateConfFrame()
Create the frame that contains all the necessary information for the Confidence Level method.
TGComboBox * fContourPar1
Parameter 1 for Contour.
TGComboBox * fScanPar
Parameter for Scan.
void ConnectSlots()
Connect the slots (buttons mainly + specific methods)
TGNumberEntry * fScanPoints
Number of points for the graph.
TGNumberEntry * fContourError
Error Level for Contour.
TGTextButton * fDraw
ok button
TGComboBox * fContourPar2
Parameter 2 for Contour.
TGVerticalFrame * fMainFrame
Main Vertical Frame.
TGColorSelect * fConfColor
Color for the graph.
TGVerticalFrame * fScanFrame
Scan Frame.
void CreateContourFrame()
Create the frame that contains all the necessary information for the Contour method.
void DrawContour()
Generates all necessary data for the Contour method from its tab.
TGNumberEntry * fConfLevel
Confidence Level.
TGTextButton * fClose
cancel button
TAdvancedGraphicsDialog(const TAdvancedGraphicsDialog &)
TGTab * fTab
Tab containing the available methods.
TGNumberEntry * fScanMin
Min Value for Contour.
TGVerticalFrame * fConfFrame
Confidence Intervals Frame.
void DoChangedScanPar(Int_t selected)
Changes the Min and Max default values of the scan method, depending on the selected parameter.
TGColorSelect * fContourColor
Color for the graph.
void DrawScan()
Generates all necessary data for the Scan method from its tab.
void DrawConfidenceLevels()
Generates all necessary data for the Scan method from its tab.
TGCheckButton * fContourOver
Superimpose the graphics.
TGNumberEntry * fContourPoints
Number of points for the graph.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition TAttFill.h:40
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:47
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:44
Backward compatible implementation of TVirtualFitter.
const ROOT::Fit::FitResult & GetFitResult() const
Get reference to Fit Result object (NOTE: it will be invalid when class is deleted)
const char * GetParName(Int_t ipar) const override
Return name of parameter ipar.
Double_t GetParError(Int_t ipar) const override
Parameter error.
Int_t GetNumberTotalParameters() const override
Number of total parameters.
bool Contour(unsigned int ipar, unsigned int jpar, TGraph *gr, double confLevel=0.683)
Create a 2D contour around the minimum for the parameter ipar and jpar if a minimum does not exist or...
const ROOT::Fit::FitData & GetFitData() const
Get reference to Fit Data object (NOTE: it will be invalid when class is deleted)
bool Scan(unsigned int ipar, TGraph *gr, double xmin=0, double xmax=0)
Scan parameter ipar between value of xmin and xmax A graph must be given which will be on return fill...
Double_t GetParameter(Int_t ipar) const override
Parameter value.
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition TGButton.cxx:440
virtual EButtonState GetState() const
Definition TGButton.h:112
Selects different options.
Definition TGButton.h:264
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
Pixel_t GetColor() const
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
virtual Int_t GetSelected() const
Definition TGComboBox.h:114
virtual void AddEntry(TGString *s, Int_t id)
Definition TGComboBox.h:86
virtual TGListBox * GetListBox() const
Definition TGComboBox.h:110
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1111
UInt_t GetDefaultWidth() const override
Definition TGFrame.h:314
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:961
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1158
UInt_t GetDefaultHeight() const override
Definition TGFrame.h:316
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1066
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:599
virtual UInt_t GetDefaultWidth() const
Definition TGFrame.h:192
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:193
void MapWindow() override
map window
Definition TGFrame.h:206
UInt_t GetWidth() const
Definition TGFrame.h:226
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:387
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
A listbox is a box, possibly with scrollbar, containing entries.
Definition TGListBox.h:221
void Resize(UInt_t w, UInt_t h) override
Resize the listbox widget.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
Definition TGFrame.cxx:1886
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
Definition TGFrame.cxx:1781
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
virtual Double_t GetNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
@ kNEAPositive
Positive number.
@ kNEANonNegative
Non-negative number.
@ kNEAAnyNumber
Attributes of number entry field.
@ kNESRealThree
Fixed fraction real, three digit.
@ kNESInteger
Style of number entry field.
@ kNESRealFour
Fixed fraction real, four digit.
@ kNESRealTwo
Fixed fraction real, two digit.
@ kNELNoLimits
Limit selection of number entry field.
@ kNELLimitMinMax
Both lower and upper limits.
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
Definition TGTab.h:46
Int_t GetCurrent() const
Definition TGTab.h:90
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
Definition TGTab.cxx:373
Yield an action as soon as it is clicked.
Definition TGButton.h:142
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
Defines transient windows that typically are used for dialogs windows.
Definition TGFrame.h:500
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Definition TGFrame.cxx:1950
A composite frame that layout their children in vertical way.
Definition TGFrame.h:376
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
ROOT GUI Window base class.
Definition TGWindow.h:23
Graph 2D class with errors.
A TGraphErrors is a TGraph with error bars.
A TGraph is an object made of two arrays X and Y with npoints each.
Definition TGraph.h:41
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
Definition TGraph.cxx:859
TAxis * GetXaxis() const
Get x axis of the graph.
Definition TGraph.cxx:1595
TAxis * GetYaxis() const
Get y axis of the graph.
Definition TGraph.cxx:1604
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:173
void MakeZombie()
Definition TObject.h:55
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:865
Abstract Base Class for Fitting.
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
static Int_t Pixel2Number(ULong_t pixel)
Static method returning color number for color specified by system dependent pixel value.
int main()
Definition main.cpp:18
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Definition TMathBase.h:249