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