| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HistoTool.h
Go to the documentation of this file.
1 // $Id: HistoTool.h,v 1.4 2006/11/30 10:16:12 mato Exp $
2 // ============================================================================
3 #ifndef GAUDIALG_HISTOTOOL_H
4 #define GAUDIALG_HISTOTOOL_H 1
5 // ============================================================================
6 // Include files
7 // ============================================================================
8 // Gaudi
9 // ============================================================================
10 #include "GaudiAlg/GaudiHistoTool.h"
11 #include "GaudiAlg/IHistoTool.h"
12 // ============================================================================
13
30 class HistoTool : virtual public GaudiHistoTool ,
31 virtual public IHistoTool
32 {
33 public:
34 typedef IHistoTool::HistoID HistoID ;
35
44 HistoTool ( const std::string& type,
45 const std::string& name,
46 const IInterface* parent);
47
48 // protected virtual destructor
49 virtual ~HistoTool( );
50
51 public:
52
53 // ================================= 1D Histograms ========================================
54
55 // fill the histogram (book on demand)
56 virtual AIDA::IHistogram1D* plot1D
57 ( const double value ,
58 const std::string& title ,
59 const double low ,
60 const double high ,
61 const unsigned long bins = 100 ,
62 const double weight = 1.0 ) const
63
64 {
65 return GaudiHistoTool::plot1D
66 ( value , title , low , high , bins , weight ) ;
67 };
68
69 // fill the histogram with forced ID assignement (book on demand)
70 virtual AIDA::IHistogram1D* plot1D
71 ( const double value ,
72 const HistoID& ID ,
73 const std::string& title ,
74 const double low ,
75 const double high ,
76 const unsigned long bins = 100 ,
77 const double weight = 1.0 ) const
78 {
79 return GaudiHistoTool::plot1D
80 ( value , ID , title , low , high , bins , weight ) ;
81 };
82
83 // ================================= 2D Histograms ========================================
84
85 // fill the histogram (book on demand)
86 virtual AIDA::IHistogram2D* plot2D
87 ( const double valueX ,
88 const double valueY ,
89 const std::string& title ,
90 const double lowX ,
91 const double highX ,
92 const double lowY ,
93 const double highY ,
94 const unsigned long binsX = 50 ,
95 const unsigned long binsY = 50 ,
96 const double weight = 1.0 ) const
97 {
98 return GaudiHistoTool::plot2D
99 ( valueX, valueY, title, lowX, highX, lowY, highY, binsX, binsY, weight ) ;
100 };
101
102 // fill the histogram (book on demand)
103 virtual AIDA::IHistogram2D* plot2D
104 ( const double valueX ,
105 const double valueY ,
106 const HistoID& ID ,
107 const std::string& title ,
108 const double lowX ,
109 const double highX ,
110 const double lowY ,
111 const double highY ,
112 const unsigned long binsX = 50 ,
113 const unsigned long binsY = 50 ,
114 const double weight = 1.0 ) const
115 {
116 return GaudiHistoTool::plot2D
117 ( valueX, valueY, ID, title, lowX, highX, lowY, highY, binsX, binsY, weight ) ;
118 };
119
120 // ================================= 3D Histograms ========================================
121
122 // fill the histogram (book on demand)
123 virtual AIDA::IHistogram3D* plot3D
124 ( const double valueX ,
125 const double valueY ,
126 const double valueZ ,
127 const std::string& title ,
128 const double lowX ,
129 const double highX ,
130 const double lowY ,
131 const double highY ,
132 const double lowZ ,
133 const double highZ ,
134 const unsigned long binsX = 10 ,
135 const unsigned long binsY = 10 ,
136 const unsigned long binsZ = 10 ,
137 const double weight = 1.0 ) const
138 {
139 return GaudiHistoTool::plot3D
140 ( valueX, valueY, valueZ, title,
141 lowX, highX, lowY, highY, lowZ, highZ, binsX, binsY, binsZ, weight ) ;
142 };
143
144 // fill the histogram (book on demand)
145 virtual AIDA::IHistogram3D* plot3D
146 ( const double valueX ,
147 const double valueY ,
148 const double valueZ ,
149 const HistoID& ID ,
150 const std::string& title ,
151 const double lowX ,
152 const double highX ,
153 const double lowY ,
154 const double highY ,
155 const double lowZ ,
156 const double highZ ,
157 const unsigned long binsX = 10 ,
158 const unsigned long binsY = 10 ,
159 const unsigned long binsZ = 10 ,
160 const double weight = 1.0 ) const
161 {
162 return GaudiHistoTool::plot3D
163 ( valueX, valueY, valueZ, ID, title,
164 lowX, highX, lowY, highY, lowZ, highZ, binsX, binsY, binsZ, weight ) ;
165 };
166
167 public:
168
169 // book the 1D histogram
170 virtual AIDA::IHistogram1D* book1D
171 ( const std::string& title ,
172 const double low = 0 ,
173 const double high = 100 ,
174 const unsigned long bins = 100 ) const
175 {
176 return GaudiHistoTool::book1D ( title , low , high , bins ) ;
177 };
178
179 // book the 2D histogram
180 virtual AIDA::IHistogram2D* book2D
181 ( const std::string& title ,
182 const double lowX = 0 ,
183 const double highX = 100 ,
184 const unsigned long binsX = 50 ,
185 const double lowY = 0 ,
186 const double highY = 100 ,
187 const unsigned long binsY = 50 ) const
188 {
189 return GaudiHistoTool::book2D ( title, lowX, highX, binsX, lowY, highY, binsY ) ;
190 }
191
192 // book the 3D histogram
193 virtual AIDA::IHistogram3D* book3D
194 ( const std::string& title ,
195 const double lowX = 0 ,
196 const double highX = 100 ,
197 const unsigned long binsX = 10 ,
198 const double lowY = 0 ,
199 const double highY = 100 ,
200 const unsigned long binsY = 10 ,
201 const double lowZ = 0 ,
202 const double highZ = 100 ,
203 const unsigned long binsZ = 10 ) const
204 {
205 return GaudiHistoTool::book3D ( title,
206 lowX, highX, binsX,
207 lowY, highY, binsY,
208 lowZ, highZ, binsZ ) ;
209 }
210
211 // book the 1D histogram with forced ID
212 virtual AIDA::IHistogram1D* book1D
213 ( const HistoID& ID ,
214 const std::string& title = "" ,
215 const double low = 0 ,
216 const double high = 100 ,
217 const unsigned long bins = 100 ) const
218 {
219 return GaudiHistoTool::book1D ( ID , title , low , high , bins ) ;
220 };
221
222 // book the 2D histogram with forced ID
223 virtual AIDA::IHistogram2D* book2D
224 ( const HistoID& ID ,
225 const std::string& title ,
226 const double lowX = 0 ,
227 const double highX = 100 ,
228 const unsigned long binsX = 50 ,
229 const double lowY = 0 ,
230 const double highY = 100 ,
231 const unsigned long binsY = 50 ) const
232 {
233 return GaudiHistoTool::book2D ( ID, title, lowX, highX, binsX, lowY, highY, binsY ) ;
234 }
235
236 // book the 3D histogram with forced ID
237 virtual AIDA::IHistogram3D* book3D
238 ( const HistoID& ID ,
239 const std::string& title ,
240 const double lowX = 0 ,
241 const double highX = 100 ,
242 const unsigned long binsX = 10 ,
243 const double lowY = 0 ,
244 const double highY = 100 ,
245 const unsigned long binsY = 10 ,
246 const double lowZ = 0 ,
247 const double highZ = 100 ,
248 const unsigned long binsZ = 10 ) const
249 {
250 return GaudiHistoTool::book3D ( ID, title,
251 lowX, highX, binsX,
252 lowY, highY, binsY,
253 lowZ, highZ, binsZ ) ;
254 }
255
256 // fill the histo with the value and weight
257 virtual AIDA::IHistogram1D* fill
258 ( AIDA::IHistogram1D* histo ,
259 const double value ,
260 const double weight ,
261 const std::string& title = "") const
262 {
263 return GaudiHistoTool::fill ( histo , value , weight , title ) ;
264 };
265
266 // fill the 2D histo with the value and weight
267 virtual AIDA::IHistogram2D* fill
268 ( AIDA::IHistogram2D* histo ,
269 const double valueX ,
270 const double valueY ,
271 const double weight ,
272 const std::string& title = "" ) const
273 {
274 return GaudiHistoTool::fill ( histo , valueX , valueY , weight , title ) ;
275 };
276
277 // fill the 3D histo with the value and weight
278 virtual AIDA::IHistogram3D* fill
279 ( AIDA::IHistogram3D* histo ,
280 const double valueX ,
281 const double valueY ,
282 const double valueZ ,
283 const double weight ,
284 const std::string& title = "" ) const
285 {
286 return GaudiHistoTool::fill ( histo , valueX , valueY , valueZ, weight , title ) ;
287 };
288
289 // access the EXISTING 1D histogram by title
290 virtual AIDA::IHistogram1D* histo1D ( const std::string& title ) const
291 { return GaudiHistoTool::histo1D ( title ) ; }
292
293 // access the EXISTING 1D histogram by ID
294 virtual AIDA::IHistogram1D* histo1D ( const HistoID& ID ) const
295 { return GaudiHistoTool::histo1D ( ID ) ; }
296
297 // access the EXISTING 2D histogram by title
298 virtual AIDA::IHistogram2D* histo2D ( const std::string& title ) const
299 { return GaudiHistoTool::histo2D ( title ) ; }
300
301 // access the EXISTING 2D histogram by ID
302 virtual AIDA::IHistogram2D* histo2D ( const HistoID& ID ) const
303 { return GaudiHistoTool::histo2D ( ID ) ; }
304
305 // access the EXISTING 3D histogram by title
306 virtual AIDA::IHistogram3D* histo3D ( const std::string& title ) const
307 { return GaudiHistoTool::histo3D ( title ) ; }
308
309 // access the EXISTING 3D histogram by ID
310 virtual AIDA::IHistogram3D* histo3D ( const HistoID& ID ) const
311 { return GaudiHistoTool::histo3D ( ID ) ; }
312
313 // check the existence AND validity of the histogram with given title
314 virtual bool histoExists ( const std::string& title ) const
315 { return GaudiHistoTool::histoExists ( title ) ; }
316
317 // check the existence AND validity of the histogram with given title
318 virtual bool histoExists ( const HistoID& ID ) const
319 { return GaudiHistoTool::histoExists ( ID ) ; }
320
321 private:
322
323 HistoTool() ;
324 HistoTool ( const HistoTool& ) ;
325 HistoTool& operator=( const HistoTool& ) ;
326
327 };
328
329 #endif // GAUDIALG_HISTOTOOL_H