| The Gaudi Framework v29r0 (ff2e7097)

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

- File List
- File Members

HistoDecorator.h
Go to the documentation of this file.
1 // ============================================================================
2 #ifndef GAUDIPYTHON_HISTODECORATOR_H
3 #define GAUDIPYTHON_HISTODECORATOR_H 1
4 // ============================================================================
5 // Include files
6 // ============================================================================
7 // GaudiAlg
8 // ============================================================================
9 #include "GaudiAlg/GaudiHistoAlg.h"
10 // ============================================================================
11 // GaudiPython
12 // ============================================================================
13 #include "GaudiPython/GaudiPython.h"
14 #include "GaudiPython/Vector.h"
15 // ============================================================================
16 struct GaudiHistoTool;
17 // ============================================================================
18 namespace GaudiPython
19 {
26 class GAUDI_API HistoDecorator
27 {
28 public:
29 // ========================================================================
30 typedef std::vector<GaudiAlg::ID> IDs;
31 typedef std::vector<AIDA::IHistogram1D*> Histos1D;
32 typedef std::vector<AIDA::IHistogram2D*> Histos2D;
33 typedef std::vector<AIDA::IHistogram3D*> Histos3D;
34 typedef std::vector<AIDA::IProfile1D*> Profiles1D;
35 typedef std::vector<AIDA::IProfile2D*> Profiles2D;
36 // ========================================================================
37 public:
38 // ========================================================================
48 static AIDA::IHistogram1D* plot1D( const GaudiHistoAlg& algo, const double data, const std::string& title,
49 const double low, const double high, const unsigned long bins = 100 );
50 // ========================================================================
61 static AIDA::IHistogram1D* plot1D( const GaudiHistoAlg& algo, const double data, const GaudiAlg::HistoID& ID,
62 const std::string& title, const double low, const double high,
63 const unsigned long bins = 100 );
64 // ========================================================================
75 static AIDA::IHistogram1D* plot1D( const GaudiHistoAlg& algo, const double data, const long ID,
76 const std::string& title, const double low, const double high,
77 const unsigned long bins = 100 );
78 // ========================================================================
89 static AIDA::IHistogram1D* plot1D( const GaudiHistoAlg& algo, const double data, const std::string& ID,
90 const std::string& title, const double low, const double high,
91 const unsigned long bins = 100 );
92 // ========================================================================
102 static AIDA::IHistogram1D* plot1D( const GaudiHistoAlg& algo, const GaudiPython::Vector& data,
103 const std::string& title, const double low, const double high,
104 const unsigned long bins = 100 );
105 // ========================================================================
116 static AIDA::IHistogram1D* plot1D( const GaudiHistoAlg& algo, const GaudiPython::Vector& data,
117 const GaudiAlg::HistoID& ID, const std::string& title, const double low,
118 const double high, const unsigned long bins = 100 );
119 // ========================================================================
130 static AIDA::IHistogram1D* plot1D( const GaudiHistoAlg& algo, const GaudiPython::Vector& data, const long ID,
131 const std::string& title, const double low, const double high,
132 const unsigned long bins = 100 );
133 // ========================================================================
144 static AIDA::IHistogram1D* plot1D( const GaudiHistoAlg& algo, const GaudiPython::Vector& data,
145 const std::string& ID, const std::string& title, const double low,
146 const double high, const unsigned long bins = 100 );
147 // ========================================================================
161 static AIDA::IHistogram2D* plot2D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
162 const std::string& title, const double lowX, const double highX,
163 const double lowY, const double highY, const unsigned long binsX = 50,
164 const unsigned long binsY = 50, const double weight = 1.0 );
165 // ========================================================================
180 static AIDA::IHistogram2D* plot2D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
181 const GaudiAlg::HistoID& ID, const std::string& title, const double lowX,
182 const double highX, const double lowY, const double highY,
183 const unsigned long binsX = 50, const unsigned long binsY = 50,
184 const double weight = 1.0 );
185 // ========================================================================
200 static AIDA::IHistogram2D* plot2D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
201 const long ID, const std::string& title, const double lowX, const double highX,
202 const double lowY, const double highY, const unsigned long binsX = 50,
203 const unsigned long binsY = 50, const double weight = 1.0 );
204 // ========================================================================
219 static AIDA::IHistogram2D* plot2D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
220 const std::string& ID, const std::string& title, const double lowX,
221 const double highX, const double lowY, const double highY,
222 const unsigned long binsX = 50, const unsigned long binsY = 50,
223 const double weight = 1.0 );
224 // ========================================================================
242 static AIDA::IHistogram3D* plot3D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
243 const double valueZ, const std::string& title, const double lowX,
244 const double highX, const double lowY, const double highY, const double lowZ,
245 const double highZ, const unsigned long binsX = 10,
246 const unsigned long binsY = 10, const unsigned long binsZ = 10,
247 const double weight = 1.0 );
248 // ========================================================================
267 static AIDA::IHistogram3D* plot3D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
268 const double valueZ, const GaudiAlg::HistoID& ID, const std::string& title,
269 const double lowX, const double highX, const double lowY, const double highY,
270 const double lowZ, const double highZ, const unsigned long binsX = 10,
271 const unsigned long binsY = 10, const unsigned long binsZ = 10,
272 const double weight = 1.0 );
273 // ========================================================================
292 static AIDA::IHistogram3D* plot3D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
293 const double valueZ, const long ID, const std::string& title, const double lowX,
294 const double highX, const double lowY, const double highY, const double lowZ,
295 const double highZ, const unsigned long binsX = 10,
296 const unsigned long binsY = 10, const unsigned long binsZ = 10,
297 const double weight = 1.0 );
298 // ========================================================================
317 static AIDA::IHistogram3D* plot3D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
318 const double valueZ, const std::string& ID, const std::string& title,
319 const double lowX, const double highX, const double lowY, const double highY,
320 const double lowZ, const double highZ, const unsigned long binsX = 10,
321 const unsigned long binsY = 10, const unsigned long binsZ = 10,
322 const double weight = 1.0 );
323 // ========================================================================
324 // 1D-profiles: by title
325 // ========================================================================
326 static AIDA::IProfile1D* profile1D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
327 const std::string& title, const double lowX, const double highX,
328 const unsigned long binsX = 100, const std::string& opt = "",
329 const double lowY = -std::numeric_limits<double>::max(),
330 const double highY = std::numeric_limits<double>::max(),
331 const double weight = 1.0 );
332 // ========================================================================
333 // 1D-profiles: by generic ID
334 // ========================================================================
335 static AIDA::IProfile1D*
336 profile1D( const GaudiHistoAlg& algo, const double valueX, const double valueY, const GaudiAlg::HistoID& ID,
337 const std::string& title, const double lowX, const double highX, const unsigned long binsX = 100,
338 const std::string& opt = "", const double lowY = -std::numeric_limits<double>::max(),
339 const double highY = std::numeric_limits<double>::max(), const double weight = 1.0 );
340 // ========================================================================
341 // 1D-profiles: by numeric ID
342 // ========================================================================
343 static AIDA::IProfile1D* profile1D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
344 const long ID, const std::string& title, const double lowX, const double highX,
345 const unsigned long binsX = 100, const std::string& opt = "",
346 const double lowY = -std::numeric_limits<double>::max(),
347 const double highY = std::numeric_limits<double>::max(),
348 const double weight = 1.0 );
349 // ========================================================================
350 // 1D-profiles: by string ID
351 // ========================================================================
352 static AIDA::IProfile1D*
353 profile1D( const GaudiHistoAlg& algo, const double valueX, const double valueY, const std::string& ID,
354 const std::string& title, const double lowX, const double highX, const unsigned long binsX = 100,
355 const std::string& opt = "", const double lowY = -std::numeric_limits<double>::max(),
356 const double highY = std::numeric_limits<double>::max(), const double weight = 1.0 );
357 // ========================================================================
358 // 2D-profiles: by title
359 // ========================================================================
360 static AIDA::IProfile2D* profile2D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
361 const double valueZ, const std::string& title, const double lowX,
362 const double highX, const double lowY, const double highY,
363 const unsigned long binsX = 50, const unsigned long binsY = 50,
364 const double weight = 1.0 );
365 // ========================================================================
366 // 2D-profiles: by generic ID
367 // ========================================================================
368 static AIDA::IProfile2D* profile2D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
369 const double valueZ, const GaudiAlg::HistoID& ID, const std::string& title,
370 const double lowX, const double highX, const double lowY, const double highY,
371 const unsigned long binsX = 50, const unsigned long binsY = 50,
372 const double weight = 1.0 );
373 // ========================================================================
374 // 2D-profiles: by numeric ID
375 // ========================================================================
376 static AIDA::IProfile2D* profile2D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
377 const double valueZ, const long ID, const std::string& title, const double lowX,
378 const double highX, const double lowY, const double highY,
379 const unsigned long binsX = 50, const unsigned long binsY = 50,
380 const double weight = 1.0 );
381 // ========================================================================
382 // 2D-profiles: by string ID
383 // ========================================================================
384 static AIDA::IProfile2D* profile2D( const GaudiHistoAlg& algo, const double valueX, const double valueY,
385 const double valueZ, const std::string& ID, const std::string& title,
386 const double lowX, const double highX, const double lowY, const double highY,
387 const unsigned long binsX = 50, const unsigned long binsY = 50,
388 const double weight = 1.0 );
389 // ========================================================================
390 public:
391 // ========================================================================
392 static size_t _histos_a_( const GaudiHistoAlg* cmp, IDs& ids, Histos1D& histos );
393 static size_t _histos_t_( const GaudiHistoTool* cmp, IDs& ids, Histos1D& histos );
394 static size_t _histos_a_( const IAlgorithm* cmp, IDs& ids, Histos1D& histos );
395 static size_t _histos_t_( const IAlgTool* cmp, IDs& ids, Histos1D& histos );
396 // ========================================================================
397 static size_t _histos_a_( const GaudiHistoAlg* cmp, IDs& ids, Histos2D& histos );
398 static size_t _histos_t_( const GaudiHistoTool* cmp, IDs& ids, Histos2D& histos );
399 static size_t _histos_a_( const IAlgorithm* cmp, IDs& ids, Histos2D& histos );
400 static size_t _histos_t_( const IAlgTool* cmp, IDs& ids, Histos2D& histos );
401 // ========================================================================
402 static size_t _histos_a_( const GaudiHistoAlg* cmp, IDs& ids, Histos3D& histos );
403 static size_t _histos_t_( const GaudiHistoTool* cmp, IDs& ids, Histos3D& histos );
404 static size_t _histos_a_( const IAlgorithm* cmp, IDs& ids, Histos3D& histos );
405 static size_t _histos_t_( const IAlgTool* cmp, IDs& ids, Histos3D& histos );
406 // ========================================================================
407 static size_t _histos_a_( const GaudiHistoAlg* cmp, IDs& ids, Profiles1D& histos );
408 static size_t _histos_t_( const GaudiHistoTool* cmp, IDs& ids, Profiles1D& histos );
409 static size_t _histos_a_( const IAlgorithm* cmp, IDs& ids, Profiles1D& histos );
410 static size_t _histos_t_( const IAlgTool* cmp, IDs& ids, Profiles1D& histos );
411 // ========================================================================
412 static size_t _histos_a_( const GaudiHistoAlg* cmp, IDs& ids, Profiles2D& histos );
413 static size_t _histos_t_( const GaudiHistoTool* cmp, IDs& ids, Profiles2D& histos );
414 static size_t _histos_a_( const IAlgorithm* cmp, IDs& ids, Profiles2D& histos );
415 static size_t _histos_t_( const IAlgTool* cmp, IDs& ids, Profiles2D& histos );
416 // ========================================================================
417 };
418 // ==========================================================================
419 } // end of namespace GaudiPython
420 // ============================================================================
421 // The END
422 // ============================================================================
423 #endif // GAUDIPYTHON_HISTODECORATOR_H
424 // ============================================================================
Vector.h
GaudiHistoAlg
Simple class to extend the functionality of class GaudiAlgorithm.
Definition: GaudiHistoAlg.h:37
GaudiPython::HistoDecorator::Histos2D
std::vector< AIDA::IHistogram2D * > Histos2D
Definition: HistoDecorator.h:32
GaudiHistoTool
Simple class to extend the functionality of class GaudiTool.
Definition: GaudiHistoTool.h:39
GaudiPython::HistoDecorator::IDs
std::vector< GaudiAlg::ID > IDs
Definition: HistoDecorator.h:30
std::string
STL class.
compareRootHistos.histos
list histos
Definition: compareRootHistos.py:13
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
GaudiPython.h
GaudiPython
GaudiPython.h GaudiPython/GaudiPython.h.
Definition: AlgDecorators.h:37
std::vector
STL class.
GaudiPython::HistoDecorator::Profiles2D
std::vector< AIDA::IProfile2D * > Profiles2D
Definition: HistoDecorator.h:35
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
GaudiHistoAlg.h
GaudiPython::HistoDecorator::Histos1D
std::vector< AIDA::IHistogram1D * > Histos1D
Definition: HistoDecorator.h:31
GaudiPython::HistoDecorator::Histos3D
std::vector< AIDA::IHistogram3D * > Histos3D
Definition: HistoDecorator.h:33
GaudiPython::HistoDecorator
Simple decorator class to allow to reuse the functionality of GaudiHistos<TYPE> class in pythin...
Definition: HistoDecorator.h:26
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
GaudiPython::HistoDecorator::Profiles1D
std::vector< AIDA::IProfile1D * > Profiles1D
Definition: HistoDecorator.h:34
GaudiAlg::ID
ID class for Histogram and Ntuples.
Definition: GaudiHistoID.h:44
std::numeric_limits