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 // ============================================================================
10 // ============================================================================
11 // GaudiPython
12 // ============================================================================
14 #include "GaudiPython/Vector.h"
15 // ============================================================================
16 struct GaudiHistoTool ;
17 // ============================================================================
18 namespace GaudiPython
19 {
27  {
28  public:
29  // ========================================================================
36  // ========================================================================
37  public:
38  // ========================================================================
48  static AIDA::IHistogram1D* plot1D
49  ( const GaudiHistoAlg& algo ,
50  const double data ,
51  const std::string& title ,
52  const double low ,
53  const double high ,
54  const unsigned long bins = 100 ) ;
55  // ========================================================================
66  static AIDA::IHistogram1D* plot1D
67  ( const GaudiHistoAlg& algo ,
68  const double data ,
69  const GaudiAlg::HistoID& ID ,
70  const std::string& title ,
71  const double low ,
72  const double high ,
73  const unsigned long bins = 100 ) ;
74  // ========================================================================
85  static AIDA::IHistogram1D* plot1D
86  ( const GaudiHistoAlg& algo ,
87  const double data ,
88  const long ID ,
89  const std::string& title ,
90  const double low ,
91  const double high ,
92  const unsigned long bins = 100 ) ;
93  // ========================================================================
104  static AIDA::IHistogram1D* plot1D
105  ( const GaudiHistoAlg& algo ,
106  const double data ,
107  const std::string& ID ,
108  const std::string& title ,
109  const double low ,
110  const double high ,
111  const unsigned long bins = 100 ) ;
112  // ========================================================================
122  static AIDA::IHistogram1D* plot1D
123  ( const GaudiHistoAlg& algo ,
124  const GaudiPython::Vector& data ,
125  const std::string& title ,
126  const double low ,
127  const double high ,
128  const unsigned long bins = 100 ) ;
129  // ========================================================================
140  static AIDA::IHistogram1D* plot1D
141  ( const GaudiHistoAlg& algo ,
142  const GaudiPython::Vector& data ,
143  const GaudiAlg::HistoID& ID ,
144  const std::string& title ,
145  const double low ,
146  const double high ,
147  const unsigned long bins = 100 ) ;
148  // ========================================================================
159  static AIDA::IHistogram1D* plot1D
160  ( const GaudiHistoAlg& algo ,
161  const GaudiPython::Vector& data ,
162  const long ID ,
163  const std::string& title ,
164  const double low ,
165  const double high ,
166  const unsigned long bins = 100 ) ;
167  // ========================================================================
178  static AIDA::IHistogram1D* plot1D
179  ( const GaudiHistoAlg& algo ,
180  const GaudiPython::Vector& data ,
181  const std::string& ID ,
182  const std::string& title ,
183  const double low ,
184  const double high ,
185  const unsigned long bins = 100 ) ;
186  // ========================================================================
200  static AIDA::IHistogram2D* plot2D
201  ( const GaudiHistoAlg& algo ,
202  const double valueX ,
203  const double valueY ,
204  const std::string& title ,
205  const double lowX ,
206  const double highX ,
207  const double lowY ,
208  const double highY ,
209  const unsigned long binsX = 50 ,
210  const unsigned long binsY = 50 ,
211  const double weight = 1.0 ) ;
212  // ========================================================================
227  static AIDA::IHistogram2D* plot2D
228  ( const GaudiHistoAlg& algo ,
229  const double valueX ,
230  const double valueY ,
231  const GaudiAlg::HistoID& ID ,
232  const std::string& title ,
233  const double lowX ,
234  const double highX ,
235  const double lowY ,
236  const double highY ,
237  const unsigned long binsX = 50 ,
238  const unsigned long binsY = 50 ,
239  const double weight = 1.0 ) ;
240  // ========================================================================
255  static AIDA::IHistogram2D* plot2D
256  ( const GaudiHistoAlg& algo ,
257  const double valueX ,
258  const double valueY ,
259  const long ID ,
260  const std::string& title ,
261  const double lowX ,
262  const double highX ,
263  const double lowY ,
264  const double highY ,
265  const unsigned long binsX = 50 ,
266  const unsigned long binsY = 50 ,
267  const double weight = 1.0 ) ;
268  // ========================================================================
283  static AIDA::IHistogram2D* plot2D
284  ( const GaudiHistoAlg& algo ,
285  const double valueX ,
286  const double valueY ,
287  const std::string& ID ,
288  const std::string& title ,
289  const double lowX ,
290  const double highX ,
291  const double lowY ,
292  const double highY ,
293  const unsigned long binsX = 50 ,
294  const unsigned long binsY = 50 ,
295  const double weight = 1.0 ) ;
296  // ========================================================================
314  static AIDA::IHistogram3D* plot3D
315  ( const GaudiHistoAlg& algo ,
316  const double valueX ,
317  const double valueY ,
318  const double valueZ ,
319  const std::string& title ,
320  const double lowX ,
321  const double highX ,
322  const double lowY ,
323  const double highY ,
324  const double lowZ ,
325  const double highZ ,
326  const unsigned long binsX = 10 ,
327  const unsigned long binsY = 10 ,
328  const unsigned long binsZ = 10 ,
329  const double weight = 1.0 ) ;
330  // ========================================================================
349  static AIDA::IHistogram3D* plot3D
350  ( const GaudiHistoAlg& algo ,
351  const double valueX ,
352  const double valueY ,
353  const double valueZ ,
354  const GaudiAlg::HistoID& ID ,
355  const std::string& title ,
356  const double lowX ,
357  const double highX ,
358  const double lowY ,
359  const double highY ,
360  const double lowZ ,
361  const double highZ ,
362  const unsigned long binsX = 10 ,
363  const unsigned long binsY = 10 ,
364  const unsigned long binsZ = 10 ,
365  const double weight = 1.0 ) ;
366  // ========================================================================
385  static AIDA::IHistogram3D* plot3D
386  ( const GaudiHistoAlg& algo ,
387  const double valueX ,
388  const double valueY ,
389  const double valueZ ,
390  const long ID ,
391  const std::string& title ,
392  const double lowX ,
393  const double highX ,
394  const double lowY ,
395  const double highY ,
396  const double lowZ ,
397  const double highZ ,
398  const unsigned long binsX = 10 ,
399  const unsigned long binsY = 10 ,
400  const unsigned long binsZ = 10 ,
401  const double weight = 1.0 ) ;
402  // ========================================================================
421  static AIDA::IHistogram3D* plot3D
422  ( const GaudiHistoAlg& algo ,
423  const double valueX ,
424  const double valueY ,
425  const double valueZ ,
426  const std::string& ID ,
427  const std::string& title ,
428  const double lowX ,
429  const double highX ,
430  const double lowY ,
431  const double highY ,
432  const double lowZ ,
433  const double highZ ,
434  const unsigned long binsX = 10 ,
435  const unsigned long binsY = 10 ,
436  const unsigned long binsZ = 10 ,
437  const double weight = 1.0 ) ;
438  // ========================================================================
439  // 1D-profiles: by title
440  // ========================================================================
441  static AIDA::IProfile1D* profile1D
442  ( const GaudiHistoAlg& algo ,
443  const double valueX ,
444  const double valueY ,
445  const std::string& title ,
446  const double lowX ,
447  const double highX ,
448  const unsigned long binsX = 100 ,
449  const std::string& opt = "" ,
450  const double lowY = -std::numeric_limits<double>::max() ,
451  const double highY = std::numeric_limits<double>::max() ,
452  const double weight = 1.0 ) ;
453  // ========================================================================
454  // 1D-profiles: by generic ID
455  // ========================================================================
456  static AIDA::IProfile1D* profile1D
457  ( const GaudiHistoAlg& algo ,
458  const double valueX ,
459  const double valueY ,
460  const GaudiAlg::HistoID& ID ,
461  const std::string& title ,
462  const double lowX ,
463  const double highX ,
464  const unsigned long binsX = 100 ,
465  const std::string& opt = "" ,
466  const double lowY = -std::numeric_limits<double>::max() ,
467  const double highY = std::numeric_limits<double>::max() ,
468  const double weight = 1.0 ) ;
469  // ========================================================================
470  // 1D-profiles: by numeric ID
471  // ========================================================================
472  static AIDA::IProfile1D* profile1D
473  ( const GaudiHistoAlg& algo ,
474  const double valueX ,
475  const double valueY ,
476  const long ID ,
477  const std::string& title ,
478  const double lowX ,
479  const double highX ,
480  const unsigned long binsX = 100 ,
481  const std::string& opt = "" ,
482  const double lowY = -std::numeric_limits<double>::max() ,
483  const double highY = std::numeric_limits<double>::max() ,
484  const double weight = 1.0 ) ;
485  // ========================================================================
486  // 1D-profiles: by string ID
487  // ========================================================================
488  static AIDA::IProfile1D* profile1D
489  ( const GaudiHistoAlg& algo ,
490  const double valueX ,
491  const double valueY ,
492  const std::string& ID ,
493  const std::string& title ,
494  const double lowX ,
495  const double highX ,
496  const unsigned long binsX = 100 ,
497  const std::string& opt = "" ,
498  const double lowY = -std::numeric_limits<double>::max() ,
499  const double highY = std::numeric_limits<double>::max() ,
500  const double weight = 1.0 ) ;
501  // ========================================================================
502  // 2D-profiles: by title
503  // ========================================================================
504  static AIDA::IProfile2D* profile2D
505  ( const GaudiHistoAlg& algo ,
506  const double valueX ,
507  const double valueY ,
508  const double valueZ ,
509  const std::string& title ,
510  const double lowX ,
511  const double highX ,
512  const double lowY ,
513  const double highY ,
514  const unsigned long binsX = 50 ,
515  const unsigned long binsY = 50 ,
516  const double weight = 1.0 ) ;
517  // ========================================================================
518  // 2D-profiles: by generic ID
519  // ========================================================================
520  static AIDA::IProfile2D* profile2D
521  ( const GaudiHistoAlg& algo ,
522  const double valueX ,
523  const double valueY ,
524  const double valueZ ,
525  const GaudiAlg::HistoID& ID ,
526  const std::string& title ,
527  const double lowX ,
528  const double highX ,
529  const double lowY ,
530  const double highY ,
531  const unsigned long binsX = 50 ,
532  const unsigned long binsY = 50 ,
533  const double weight = 1.0 ) ;
534  // ========================================================================
535  // 2D-profiles: by numeric ID
536  // ========================================================================
537  static AIDA::IProfile2D* profile2D
538  ( const GaudiHistoAlg& algo ,
539  const double valueX ,
540  const double valueY ,
541  const double valueZ ,
542  const long ID ,
543  const std::string& title ,
544  const double lowX ,
545  const double highX ,
546  const double lowY ,
547  const double highY ,
548  const unsigned long binsX = 50 ,
549  const unsigned long binsY = 50 ,
550  const double weight = 1.0 ) ;
551  // ========================================================================
552  // 2D-profiles: by string ID
553  // ========================================================================
554  static AIDA::IProfile2D* profile2D
555  ( const GaudiHistoAlg& algo ,
556  const double valueX ,
557  const double valueY ,
558  const double valueZ ,
559  const std::string& ID ,
560  const std::string& title ,
561  const double lowX ,
562  const double highX ,
563  const double lowY ,
564  const double highY ,
565  const unsigned long binsX = 50 ,
566  const unsigned long binsY = 50 ,
567  const double weight = 1.0 ) ;
568  // ========================================================================
569  public:
570  // ========================================================================
571  static size_t _histos_a_
572  ( const GaudiHistoAlg* cmp ,
573  IDs& ids ,
574  Histos1D& histos ) ;
575  static size_t _histos_t_
576  ( const GaudiHistoTool* cmp ,
577  IDs& ids ,
578  Histos1D& histos ) ;
579  static size_t _histos_a_
580  ( const IAlgorithm* cmp ,
581  IDs& ids ,
582  Histos1D& histos ) ;
583  static size_t _histos_t_
584  ( const IAlgTool* cmp ,
585  IDs& ids ,
586  Histos1D& histos ) ;
587  // ========================================================================
588  static size_t _histos_a_
589  ( const GaudiHistoAlg* cmp ,
590  IDs& ids ,
591  Histos2D& histos ) ;
592  static size_t _histos_t_
593  ( const GaudiHistoTool* cmp ,
594  IDs& ids ,
595  Histos2D& histos ) ;
596  static size_t _histos_a_
597  ( const IAlgorithm* cmp ,
598  IDs& ids ,
599  Histos2D& histos ) ;
600  static size_t _histos_t_
601  ( const IAlgTool* cmp ,
602  IDs& ids ,
603  Histos2D& histos ) ;
604  // ========================================================================
605  static size_t _histos_a_
606  ( const GaudiHistoAlg* cmp ,
607  IDs& ids ,
608  Histos3D& histos ) ;
609  static size_t _histos_t_
610  ( const GaudiHistoTool* cmp ,
611  IDs& ids ,
612  Histos3D& histos ) ;
613  static size_t _histos_a_
614  ( const IAlgorithm* cmp ,
615  IDs& ids ,
616  Histos3D& histos ) ;
617  static size_t _histos_t_
618  ( const IAlgTool* cmp ,
619  IDs& ids ,
620  Histos3D& histos ) ;
621  // ========================================================================
622  static size_t _histos_a_
623  ( const GaudiHistoAlg* cmp ,
624  IDs& ids ,
625  Profiles1D& histos ) ;
626  static size_t _histos_t_
627  ( const GaudiHistoTool* cmp ,
628  IDs& ids ,
629  Profiles1D& histos ) ;
630  static size_t _histos_a_
631  ( const IAlgorithm* cmp ,
632  IDs& ids ,
633  Profiles1D& histos ) ;
634  static size_t _histos_t_
635  ( const IAlgTool* cmp ,
636  IDs& ids ,
637  Profiles1D& histos ) ;
638  // ========================================================================
639  static size_t _histos_a_
640  ( const GaudiHistoAlg* cmp ,
641  IDs& ids ,
642  Profiles2D& histos ) ;
643  static size_t _histos_t_
644  ( const GaudiHistoTool* cmp ,
645  IDs& ids ,
646  Profiles2D& histos ) ;
647  static size_t _histos_a_
648  ( const IAlgorithm* cmp ,
649  IDs& ids ,
650  Profiles2D& histos ) ;
651  static size_t _histos_t_
652  ( const IAlgTool* cmp ,
653  IDs& ids ,
654  Profiles2D& histos ) ;
655  // ========================================================================
656  };
657  // ==========================================================================
658 } // end of namespace GaudiPython
659 // ============================================================================
660 // The END
661 // ============================================================================
662 #endif // GAUDIPYTHON_HISTODECORATOR_H
663 // ============================================================================
Simple class to extend the functionality of class GaudiAlgorithm.
Definition: GaudiHistoAlg.h:37
std::vector< AIDA::IHistogram2D * > Histos2D
Simple class to extend the functionality of class GaudiTool.
std::vector< GaudiAlg::ID > IDs
STL class.
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:27
GaudiPython.h GaudiPython/GaudiPython.h.
Definition: AlgDecorators.h:37
STL class.
std::vector< AIDA::IProfile2D * > Profiles2D
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
std::vector< AIDA::IHistogram1D * > Histos1D
std::vector< AIDA::IHistogram3D * > Histos3D
Simple decorator class to allow to reuse the functionality of GaudiHistos<TYPE> class in pythin...
#define GAUDI_API
Definition: Kernel.h:107
std::vector< AIDA::IProfile1D * > Profiles1D
ID class for Histogram and Ntuples.
Definition: GaudiHistoID.h:44