GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PeakFitter.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2006 by Christophe Theisen & Olivier Stezowski *
3  * christophe.theisen(AT)cea.fr, stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #ifndef GW_PEAKFITTER_H
24 #define GW_PEAKFITTER_H
25 
26 //#include<stdio>
27 #include<fstream>
28 #include<iostream>
29 #include<iomanip>
30 using namespace std;
31 
32 #ifndef ROOT_TH1_H
33 #include "TH1.h"
34 #endif
35 #ifndef GW_PEAK_H
36 #include "Peak.h"
37 #endif
38 #ifndef ROOT_TObjArray_H
39 #include "TObjArray.h"
40 #endif
41 
42 #ifndef ROOT_TGDockableFrame
43 #include "TGDockableFrame.h"
44 #endif
45 #ifndef ROOT_TGMenu
46 #include "TGMenu.h"
47 #endif
48 #ifndef ROOT_TGMdiDecorFrame
49 #include "TGMdiDecorFrame.h"
50 #endif
51 #ifndef ROOT_TG3DLine
52 #include "TG3DLine.h"
53 #endif
54 #ifndef ROOT_TGMdiFrame
55 #include "TGMdiFrame.h"
56 #endif
57 #ifndef ROOT_TGedFrame
58 #include "TGedFrame.h"
59 #endif
60 #ifndef ROOT_TGMdiMainFrame
61 #include "TGMdiMainFrame.h"
62 #endif
63 #ifndef ROOT_TGuiBldHintsButton
64 #include "TGuiBldHintsButton.h"
65 #endif
66 #ifndef ROOT_TGMdiMenu
67 #include "TGMdiMenu.h"
68 #endif
69 #ifndef ROOT_TGListBox
70 #include "TGListBox.h"
71 #endif
72 #ifndef ROOT_TGNumberEntry
73 #include "TGNumberEntry.h"
74 #endif
75 #ifndef ROOT_TGScrollBar
76 #include "TGScrollBar.h"
77 #endif
78 #ifndef ROOT_TGuiBldHintsEditor
79 #include "TGuiBldHintsEditor.h"
80 #endif
81 #ifndef ROOT_TRootBrowser
82 #include "TRootBrowser.h"
83 #endif
84 #ifndef ROOT_TGFrame
85 #include "TGFrame.h"
86 #endif
87 #ifndef ROOT_TGedEditor
88 #include "TGedEditor.h"
89 #endif
90 #ifndef ROOT_TGFileDialog
91 #include "TGFileDialog.h"
92 #endif
93 #ifndef ROOT_TPadEditor
94 #include "TPadEditor.h"
95 #endif
96 #ifndef ROOT_TGShutter
97 #include "TGShutter.h"
98 #endif
99 #ifndef ROOT_TGButtonGroup
100 #include "TGButtonGroup.h"
101 #endif
102 #ifndef ROOT_TGedPatternSelect
103 #include "TGedPatternSelect.h"
104 #endif
105 #ifndef ROOT_TGCanvas
106 #include "TGCanvas.h"
107 #endif
108 #ifndef ROOT_TGFSContainer
109 #include "TGFSContainer.h"
110 #endif
111 #ifndef ROOT_TGuiBldEditor
112 #include "TGuiBldEditor.h"
113 #endif
114 #ifndef ROOT_TGColorSelect
115 #include "TGColorSelect.h"
116 #endif
117 #ifndef ROOT_TGButton
118 #include "TGButton.h"
119 #endif
120 #ifndef ROOT_TGFSComboBox
121 #include "TGFSComboBox.h"
122 #endif
123 #ifndef ROOT_TGComboBox
124 #include "TGComboBox.h"
125 #endif
126 #ifndef ROOT_TGLabel
127 #include "TGLabel.h"
128 #endif
129 #ifndef ROOT_TGMsgBox
130 #include "TGMsgBox.h"
131 #endif
132 #ifndef ROOT_TRootGuiBuilder
133 #include "TRootGuiBuilder.h"
134 #endif
135 #ifndef ROOT_TGTab
136 #include "TGTab.h"
137 #endif
138 #ifndef ROOT_TGListView
139 #include "TGListView.h"
140 #endif
141 #ifndef ROOT_TGSplitter
142 #include "TGSplitter.h"
143 #endif
144 #ifndef ROOT_TRootCanvas
145 #include "TRootCanvas.h"
146 #endif
147 #ifndef ROOT_TGStatusBar
148 #include "TGStatusBar.h"
149 #endif
150 #ifndef ROOT_TAttLineEditor
151 #include "TAttLineEditor.h"
152 #endif
153 #ifndef ROOT_TGListTree
154 #include "TGListTree.h"
155 #endif
156 #ifndef ROOT_TAttFillEditor
157 #include "TAttFillEditor.h"
158 #endif
159 #ifndef ROOT_TGToolTip
160 #include "TGToolTip.h"
161 #endif
162 #ifndef ROOT_TGToolBar
163 #include "TGToolBar.h"
164 #endif
165 #ifndef ROOT_TGuiBldDragManager
166 #include "TGuiBldDragManager.h"
167 #endif
168 
169 namespace GwD {
170 
179 class PeakFitter {
180 
181 public:
182  PeakFitter();
183  virtual ~PeakFitter();
184 
185  enum FunctionType {kGauss,kSkewed};
186 
187  void CollectOn();
188  void CollectOff();
189  void ClearMarkers();
190  void ClearLastMarker();
191  void DoFit1(Float_t sigma = 1.0);
192 
193  void SetFunctionType(const FunctionType type);
194 
195 protected:
196  TObjArray fPeaks;
197  TGMainFrame *fMainFrame;
198  TGGroupFrame *fGroupFrame1;
199  TGTextButton *fTextButtonCollectOn;
200  TGTextButton *fTextButtonCollectOff;
201  TGTextButton *fTextButtonDoFit;
203  TGTextButton *fTextButtonClearMarkers;
205 
207 
208 
210  ClassDef(PeakFitter,0); // a PeakFitter
211 
212 };
213 
214 }
215 
216 #endif
TGTextButton * fTextButtonDoFit
Definition: PeakFitter.h:201
PeakFitter is a tool class.
Definition: PeakFitter.h:179
TGTextButton * fTextButtonClearMarkers
Definition: PeakFitter.h:203
TObjArray fPeaks
Definition: PeakFitter.h:196
header file for the calibration facility
void CollectOff()
Definition: CollectOff.C:2
void ClearMarkers()
Definition: ClearMarkers.C:3
TGMainFrame * fMainFrame
Definition: PeakFitter.h:197
void ClearLastMarker()
void DoFit1(Float_t sigma=1.0, Char_t *logname=NULL)
Function to fit gaussians.
Definition: DoFit1.C:7
TGTextButton * fTextButtonClearLastMarker
Definition: PeakFitter.h:202
TGTextButton * fTextButtonCollectOn
Definition: PeakFitter.h:199
void CollectOn()
Definition: CollectOn.C:3
TGTextButton * fTextButtonCollectOff
Definition: PeakFitter.h:200
TGGroupFrame * fGroupFrame1
Definition: PeakFitter.h:198
TGComboBox * fComboBoxFunctionType
Definition: PeakFitter.h:204
FunctionType fType
Definition: PeakFitter.h:206