Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TAdvancedGraphicsDialog.h
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 #ifndef ROOT__TAdvancedGraphicsDialog__
13 #define ROOT__TAdvancedGraphicsDialog__
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TAdvancedGraphicsDialog //
18 // //
19 // Allows to create advanced graphics from the last fit made in the //
20 // fitpanel. This includes the scan graphics, the contour and the //
21 // confidence levels. //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TGFrame.h"
25 #include "TTreeInput.h"
26 #include "TGButton.h"
27 #include "TGComboBox.h"
28 #include "TGLabel.h"
29 #include "TGTextEntry.h"
30 #include "TGNumberEntry.h"
31 #include "TGTab.h"
32 #include "TGColorSelect.h"
33 
34 #include "TBackCompFitter.h"
35 #include "TF1.h"
36 
37 enum EAdvanceGraphicsDialog {
38  kAGD_TMETHOD, kAGD_CONTOURMETHOD, kAGD_SCANMETHOD,
39  kAGD_CONTPAR1, kAGD_CONTPAR2, kAGD_CONTERR,
40  kAGD_CONTOVER, kAGD_CONTCOLOR,
41  kAGD_BDRAW, kAGD_BCLOSE,
42  kAGD_SCANPAR, kAGD_SCANMIN, kAGD_SCANMAX,
43 
44  kAGD_PARCOUNTER = 1000
45 };
46 
47 class TAdvancedGraphicsDialog : public TGTransientFrame {
48 
49 private:
50  TGVerticalFrame *fMainFrame; // Main Vertical Frame
51  TGTab *fTab; // Tab containing the available methods
52 
53  TGVerticalFrame *fContourFrame; // Contour Frame
54  TGNumberEntry *fContourPoints; // Number of points for the graph
55  TGComboBox *fContourPar1; // Parameter 1 for Contour
56  TGComboBox *fContourPar2; // Parameter 2 for Contour
57  TGNumberEntry *fContourError; // Error Level for Contour
58  TGCheckButton *fContourOver; // Superimpose the graphics
59  TGColorSelect *fContourColor; // Color for the graph
60 
61  TGVerticalFrame *fScanFrame; // Scan Frame
62  TGNumberEntry *fScanPoints; // Number of points for the graph
63  TGComboBox *fScanPar; // Parameter for Scan
64  TGNumberEntry *fScanMin; // Min Value for Contour
65  TGNumberEntry *fScanMax; // Max Value for Contour
66 
67  TGVerticalFrame *fConfFrame; // Confidence Intervals Frame
68  TGNumberEntry *fConfLevel; // Confidence Level
69  TGColorSelect *fConfColor; // Color for the graph
70 
71  TGTextButton *fDraw; // ok button
72  TGTextButton *fClose; // cancel button
73 
74  TBackCompFitter *fFitter; // Fitter.
75 
76  void CreateContourFrame();
77  void CreateScanFrame();
78  void CreateConfFrame();
79  void AddParameters(TGComboBox*);
80 
81  void DrawContour();
82  void DrawScan();
83  void DrawConfidenceLevels();
84 
85  void ConnectSlots();
86 
87  TAdvancedGraphicsDialog(const TAdvancedGraphicsDialog&); // Not implemented
88  TAdvancedGraphicsDialog &operator= (const TAdvancedGraphicsDialog&); // Not implemented
89 
90 public:
91  TAdvancedGraphicsDialog(const TGWindow *p, const TGWindow *main);
92  ~TAdvancedGraphicsDialog();
93 
94  void DoDraw();
95  void DoChangedScanPar(Int_t selected);
96 
97  ClassDef(TAdvancedGraphicsDialog, 0) // Simple input dialog
98 };
99 
100 #endif
101