All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
HistoDecorator.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // Include files
3 // ============================================================================
4 // GaudiAlg
5 // ============================================================================
8 // ============================================================================
9 // GaudiPython
10 // ============================================================================
11 #include "GaudiPython/Vector.h"
13 // ============================================================================
19 // ============================================================================
20 /* "plot"(book&fill) a sequence of data from the vector (implicit loop)
21  * (Expected to be more efficient)
22  * @param algo the algorithm
23  * @param data data
24  * @param title histogram title
25  * @param low low edge
26  * @param high high edge
27  * @param bins number of bins
28  */
29 // ============================================================================
30 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D
31 ( const GaudiHistoAlg& algo ,
32  const double data ,
33  const std::string& title ,
34  const double low ,
35  const double high ,
36  const unsigned long bins )
37 { return algo.plot1D( data , title , low , high , bins ) ; }
38 // ============================================================================
39 /* "plot"(book&fill) a sequence of data from the vector (implicit loop)
40  * (Expected to be more efficient)
41  * @param algo the algorithm
42  * @param data data
43  * @param ID histogram ID
44  * @param title histogram title
45  * @param low low edge
46  * @param high high edge
47  * @param bins number of bins
48  */
49 // ============================================================================
50 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D
51 ( const GaudiHistoAlg& algo ,
52  const double data ,
53  const GaudiAlg::HistoID& ID ,
54  const std::string& title ,
55  const double low ,
56  const double high ,
57  const unsigned long bins )
58 { return algo.plot1D( data , ID , title , low , high , bins ) ; }
59 // ============================================================================
60 /* "plot"(book&fill) a sequence of data from the vector (implicit loop)
61  * (Expected to be more efficient)
62  * @param algo the algorithm
63  * @param data data
64  * @param ID histogram ID
65  * @param title histogram title
66  * @param low low edge
67  * @param high high edge
68  * @param bins number of bins
69  */
70 // ============================================================================
71 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D
72 ( const GaudiHistoAlg& algo ,
73  const double data ,
74  const long ID ,
75  const std::string& title ,
76  const double low ,
77  const double high ,
78  const unsigned long bins )
79 { return algo.plot1D( data , ID , title , low , high , bins ) ; }
80 // ============================================================================
81 /* "plot"(book&fill) a sequence of data from the vector (implicit loop)
82  * (Expected to be more efficient)
83  * @param algo the algorithm
84  * @param data data
85  * @param ID histogram ID
86  * @param title histogram title
87  * @param low low edge
88  * @param high high edge
89  * @param bins number of bins
90  */
91 // ============================================================================
92 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D
93 ( const GaudiHistoAlg& algo ,
94  const double data ,
95  const std::string& ID ,
96  const std::string& title ,
97  const double low ,
98  const double high ,
99  const unsigned long bins )
100 { return algo.plot1D( data , ID , title , low , high , bins ) ; }
101 // ============================================================================
102 /* "plot"(book&fill) a sequence of data from the vector (implicit loop)
103  * (Expected to be more efficient)
104  * @param algo the algorithm
105  * @param data vector of data
106  * @param title histogram title
107  * @param low low edge
108  * @param high high edge
109  * @param bins number of bins
110  */
111 // ============================================================================
112 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D
113 ( const GaudiHistoAlg& algo ,
114  const GaudiPython::Vector& data ,
115  const std::string& title ,
116  const double low ,
117  const double high ,
118  const unsigned long bins )
119 {
120  return algo.plot
122  data.begin () ,
123  data.end () ,
124  title , low , high , bins ) ;
125 }
126 // ============================================================================
127 /* "plot"(book&fill) a sequence of data from the vector (implicit loop)
128  * (Expected to be more efficient)
129  * @param algo the algorithm
130  * @param data vector of data
131  * @param ID histogram ID
132  * @param title histogram title
133  * @param low low edge
134  * @param high high edge
135  * @param bins number of bins
136  */
137 // ============================================================================
138 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D
139 ( const GaudiHistoAlg& algo ,
140  const GaudiPython::Vector& data ,
141  const GaudiAlg::HistoID& ID ,
142  const std::string& title ,
143  const double low ,
144  const double high ,
145  const unsigned long bins )
146 {
147  return algo.plot
149  data.begin () ,
150  data.end () ,
151  ID , title , low , high , bins ) ;
152 }
153 // ============================================================================
154 /* "plot"(book&fill) a sequence of data from the vector (implicit loop)
155  * (Expected to be more efficient)
156  * @param algo the algorithm
157  * @param data vector of data
158  * @param ID histogram ID
159  * @param title histogram title
160  * @param low low edge
161  * @param high high edge
162  * @param bins number of bins
163  */
164 // ============================================================================
165 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D
166 ( const GaudiHistoAlg& algo ,
167  const GaudiPython::Vector& data ,
168  const long ID ,
169  const std::string& title ,
170  const double low ,
171  const double high ,
172  const unsigned long bins )
173 {
174  return algo.plot
176  data.begin () ,
177  data.end () ,
178  ID , title , low , high , bins ) ;
179 }
180 // ============================================================================
181 /* "plot"(book&fill) a sequence of data from the vector (implicit loop)
182  * (Expected to be more efficient)
183  * @param algo the algorithm
184  * @param data vector of data
185  * @param ID histogram ID
186  * @param title histogram title
187  * @param low low edge
188  * @param high high edge
189  * @param bins number of bins
190  */
191 // ============================================================================
192 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D
193 ( const GaudiHistoAlg& algo ,
194  const GaudiPython::Vector& data ,
195  const std::string& ID ,
196  const std::string& title ,
197  const double low ,
198  const double high ,
199  const unsigned long bins )
200 {
201  return algo.plot
203  data.begin () ,
204  data.end () ,
205  ID , title , low , high , bins ) ;
206 }
207 // ============================================================================
208 /* fill the 2D histogram (book on demand)
209  * @param valueX x value to be filled
210  * @param valueY y value to be filled
211  * @param title histogram title (must be unique within the algorithm)
212  * @param lowX low x limit for histogram
213  * @param highX high x limit for histogram
214  * @param lowY low y limit for histogram
215  * @param highY high y limit for histogram
216  * @param binsX number of bins in x
217  * @param binsY number of bins in y
218  * @param weight weight
219  * @return pointer to AIDA 2D histogram
220  */
221 // ============================================================================
222 AIDA::IHistogram2D* GaudiPython::HistoDecorator::plot2D
223 ( const GaudiHistoAlg& algo ,
224  const double valueX ,
225  const double valueY ,
226  const std::string& title ,
227  const double lowX ,
228  const double highX ,
229  const double lowY ,
230  const double highY ,
231  const unsigned long binsX ,
232  const unsigned long binsY ,
233  const double weight )
234 {
235  return algo.plot2D ( valueX , valueY ,
236  title ,
237  lowX , highX ,
238  lowY , highY ,
239  binsX , binsY , weight ) ;
240 }
241 // ============================================================================
256 // ============================================================================
257 AIDA::IHistogram2D* GaudiPython::HistoDecorator::plot2D
258 ( const GaudiHistoAlg& algo ,
259  const double valueX ,
260  const double valueY ,
261  const GaudiAlg::HistoID& ID ,
262  const std::string& title ,
263  const double lowX ,
264  const double highX ,
265  const double lowY ,
266  const double highY ,
267  const unsigned long binsX ,
268  const unsigned long binsY ,
269  const double weight )
270 {
271  return algo.plot2D ( valueX , valueY ,
272  ID , title ,
273  lowX , highX ,
274  lowY , highY ,
275  binsX , binsY , weight ) ;
276 }
277 // ============================================================================
278 /* fill the 2D histogram (book on demand)
279  * @param valueX x value to be filled
280  * @param valueY y value to be filled
281  * @param ID Histogram ID to use
282  * @param title histogram title (must be unique within the algorithm)
283  * @param lowX low x limit for histogram
284  * @param highX high x limit for histogram
285  * @param lowY low y limit for histogram
286  * @param highY high y limit for histogram
287  * @param binsX number of bins in x
288  * @param binsY number of bins in y
289  * @param weight weight
290  * @return pointer to AIDA 2D histogram
291  */
292 // ============================================================================
293 AIDA::IHistogram2D* GaudiPython::HistoDecorator::plot2D
294 ( const GaudiHistoAlg& algo ,
295  const double valueX ,
296  const double valueY ,
297  const long ID ,
298  const std::string& title ,
299  const double lowX ,
300  const double highX ,
301  const double lowY ,
302  const double highY ,
303  const unsigned long binsX ,
304  const unsigned long binsY ,
305  const double weight )
306 {
307  return algo.plot2D ( valueX , valueY ,
308  ID , title ,
309  lowX , highX ,
310  lowY , highY ,
311  binsX , binsY , weight ) ;
312 }
313 // ============================================================================
314 /* fill the 2D histogram (book on demand)
315  * @param valueX x value to be filled
316  * @param valueY y value to be filled
317  * @param ID Histogram ID to use
318  * @param title histogram title (must be unique within the algorithm)
319  * @param lowX low x limit for histogram
320  * @param highX high x limit for histogram
321  * @param lowY low y limit for histogram
322  * @param highY high y limit for histogram
323  * @param binsX number of bins in x
324  * @param binsY number of bins in y
325  * @param weight weight
326  * @return pointer to AIDA 2D histogram
327  */
328 // ============================================================================
329 AIDA::IHistogram2D* GaudiPython::HistoDecorator::plot2D
330 ( const GaudiHistoAlg& algo ,
331  const double valueX ,
332  const double valueY ,
333  const std::string& ID ,
334  const std::string& title ,
335  const double lowX ,
336  const double highX ,
337  const double lowY ,
338  const double highY ,
339  const unsigned long binsX ,
340  const unsigned long binsY ,
341  const double weight )
342 {
343  return algo.plot2D ( valueX , valueY ,
344  ID , title ,
345  lowX , highX ,
346  lowY , highY ,
347  binsX , binsY , weight ) ;
348 }
349 // ============================================================================
350 /* fill the 3D histogram (book on demand)
351  * @param valueX x value to be filled
352  * @param valueY y value to be filled
353  * @param valueZ z value to be filled
354  * @param title histogram title (must be unique within the algorithm)
355  * @param lowX low x limit for histogram
356  * @param highX high x limit for histogram
357  * @param lowY low y limit for histogram
358  * @param highY high y limit for histogram
359  * @param lowZ low z limit for histogram
360  * @param highZ high z limit for histogram
361  * @param binsX number of bins in x
362  * @param binsY number of bins in y
363  * @param binsZ number of bins in z
364  * @param weight weight
365  * @return pointer to AIDA 3D histogram
366  */
367 // ============================================================================
368 AIDA::IHistogram3D* GaudiPython::HistoDecorator::plot3D
369 ( const GaudiHistoAlg& algo ,
370  const double valueX ,
371  const double valueY ,
372  const double valueZ ,
373  const std::string& title ,
374  const double lowX ,
375  const double highX ,
376  const double lowY ,
377  const double highY ,
378  const double lowZ ,
379  const double highZ ,
380  const unsigned long binsX ,
381  const unsigned long binsY ,
382  const unsigned long binsZ ,
383  const double weight )
384 {
385  return algo. plot3D ( valueX , valueY , valueZ ,
386  title ,
387  lowX , highX ,
388  lowY , highY ,
389  lowZ , highZ ,
390  binsX , binsY , binsZ ,
391  weight ) ;
392 }
393 // ============================================================================
394 /* fill the 3D histogram (book on demand)
395  * @param valueX x value to be filled
396  * @param valueY y value to be filled
397  * @param valueZ z value to be filled
398  * @param title histogram title (must be unique within the algorithm)
399  * @param lowX low x limit for histogram
400  * @param highX high x limit for histogram
401  * @param lowY low y limit for histogram
402  * @param highY high y limit for histogram
403  * @param lowZ low z limit for histogram
404  * @param highZ high z limit for histogram
405  * @param binsX number of bins in x
406  * @param binsY number of bins in y
407  * @param binsZ number of bins in z
408  * @param weight weight
409  * @return pointer to AIDA 3D histogram
410  */
411 // ============================================================================
412 AIDA::IHistogram3D* GaudiPython::HistoDecorator::plot3D
413 ( const GaudiHistoAlg& algo ,
414  const double valueX ,
415  const double valueY ,
416  const double valueZ ,
417  const GaudiAlg::HistoID& ID ,
418  const std::string& title ,
419  const double lowX ,
420  const double highX ,
421  const double lowY ,
422  const double highY ,
423  const double lowZ ,
424  const double highZ ,
425  const unsigned long binsX ,
426  const unsigned long binsY ,
427  const unsigned long binsZ ,
428  const double weight )
429 {
430  return algo. plot3D ( valueX , valueY , valueZ ,
431  ID , title ,
432  lowX , highX ,
433  lowY , highY ,
434  lowZ , highZ ,
435  binsX , binsY , binsZ ,
436  weight ) ;
437 }
438 // ============================================================================
439 /* fill the 3D histogram (book on demand)
440  * @param valueX x value to be filled
441  * @param valueY y value to be filled
442  * @param valueZ z value to be filled
443  * @param title histogram title (must be unique within the algorithm)
444  * @param lowX low x limit for histogram
445  * @param highX high x limit for histogram
446  * @param lowY low y limit for histogram
447  * @param highY high y limit for histogram
448  * @param lowZ low z limit for histogram
449  * @param highZ high z limit for histogram
450  * @param binsX number of bins in x
451  * @param binsY number of bins in y
452  * @param binsZ number of bins in z
453  * @param weight weight
454  * @return pointer to AIDA 3D histogram
455  */
456 // ============================================================================
457 AIDA::IHistogram3D* GaudiPython::HistoDecorator::plot3D
458 ( const GaudiHistoAlg& algo ,
459  const double valueX ,
460  const double valueY ,
461  const double valueZ ,
462  const long ID ,
463  const std::string& title ,
464  const double lowX ,
465  const double highX ,
466  const double lowY ,
467  const double highY ,
468  const double lowZ ,
469  const double highZ ,
470  const unsigned long binsX ,
471  const unsigned long binsY ,
472  const unsigned long binsZ ,
473  const double weight )
474 {
475  return algo. plot3D ( valueX , valueY , valueZ ,
476  ID , title ,
477  lowX , highX ,
478  lowY , highY ,
479  lowZ , highZ ,
480  binsX , binsY , binsZ ,
481  weight ) ;
482 }
483 // ============================================================================
484 /* fill the 3D histogram (book on demand)
485  * @param valueX x value to be filled
486  * @param valueY y value to be filled
487  * @param valueZ z value to be filled
488  * @param title histogram title (must be unique within the algorithm)
489  * @param lowX low x limit for histogram
490  * @param highX high x limit for histogram
491  * @param lowY low y limit for histogram
492  * @param highY high y limit for histogram
493  * @param lowZ low z limit for histogram
494  * @param highZ high z limit for histogram
495  * @param binsX number of bins in x
496  * @param binsY number of bins in y
497  * @param binsZ number of bins in z
498  * @param weight weight
499  * @return pointer to AIDA 3D histogram
500  */
501 // ============================================================================
502 AIDA::IHistogram3D*
504 ( const GaudiHistoAlg& algo ,
505  const double valueX ,
506  const double valueY ,
507  const double valueZ ,
508  const std::string& ID ,
509  const std::string& title ,
510  const double lowX ,
511  const double highX ,
512  const double lowY ,
513  const double highY ,
514  const double lowZ ,
515  const double highZ ,
516  const unsigned long binsX ,
517  const unsigned long binsY ,
518  const unsigned long binsZ ,
519  const double weight )
520 {
521  return algo. plot3D ( valueX , valueY , valueZ ,
522  ID , title ,
523  lowX , highX ,
524  lowY , highY ,
525  lowZ , highZ ,
526  binsX , binsY , binsZ ,
527  weight ) ;
528 }
529 // ========================================================================
530 // 1D-profiles: by title
531 // ========================================================================
532 AIDA::IProfile1D*
534 ( const GaudiHistoAlg& algo ,
535  const double valueX ,
536  const double valueY ,
537  const std::string& title ,
538  const double lowX ,
539  const double highX ,
540  const unsigned long binsX ,
541  const std::string& opt ,
542  const double lowY ,
543  const double highY ,
544  const double weight )
545 {
546  return algo.profile1D
547  ( valueX , valueY , title , lowX , highX , binsX ,
548  opt , lowY , highY , weight ) ;
549 }
550 // ========================================================================
551 // 1D-profiles: by generic ID
552 // ========================================================================
553 AIDA::IProfile1D*
555 ( const GaudiHistoAlg& algo ,
556  const double valueX ,
557  const double valueY ,
558  const GaudiAlg::HistoID& ID ,
559  const std::string& title ,
560  const double lowX ,
561  const double highX ,
562  const unsigned long binsX ,
563  const std::string& opt ,
564  const double lowY ,
565  const double highY ,
566  const double weight )
567 {
568  return algo.profile1D
569  ( valueX , valueY , ID , title , lowX , highX , binsX ,
570  opt , lowY , highY , weight ) ;
571 }
572 // ========================================================================
573 // 1D-profiles: by numeric ID
574 // ========================================================================
575 AIDA::IProfile1D*
577 ( const GaudiHistoAlg& algo ,
578  const double valueX ,
579  const double valueY ,
580  const long ID ,
581  const std::string& title ,
582  const double lowX ,
583  const double highX ,
584  const unsigned long binsX ,
585  const std::string& opt ,
586  const double lowY ,
587  const double highY ,
588  const double weight )
589 {
590  return algo.profile1D
591  ( valueX , valueY , ID , title , lowX , highX , binsX ,
592  opt , lowY , highY , weight ) ;
593 }
594 // ========================================================================
595 // 1D-profiles: by string ID
596 // ========================================================================
597 AIDA::IProfile1D*
599 ( const GaudiHistoAlg& algo ,
600  const double valueX ,
601  const double valueY ,
602  const std::string& ID ,
603  const std::string& title ,
604  const double lowX ,
605  const double highX ,
606  const unsigned long binsX ,
607  const std::string& opt ,
608  const double lowY ,
609  const double highY ,
610  const double weight )
611 {
612  return algo.profile1D
613  ( valueX , valueY , ID , title , lowX , highX , binsX ,
614  opt , lowY , highY , weight ) ;
615 }
616 // ========================================================================
617 // 2D-profiles: by title
618 // ========================================================================
619 AIDA::IProfile2D*
621 ( const GaudiHistoAlg& algo ,
622  const double valueX ,
623  const double valueY ,
624  const double valueZ ,
625  const std::string& title ,
626  const double lowX ,
627  const double highX ,
628  const double lowY ,
629  const double highY ,
630  const unsigned long binsX ,
631  const unsigned long binsY ,
632  const double weight )
633 {
634  return algo.profile2D
635  ( valueX , valueY , valueZ ,
636  title ,
637  lowX , highX ,
638  lowY , highY ,
639  binsX , binsY , weight ) ;
640 }
641 // ========================================================================
642 // 2D-profiles: by generic ID
643 // ========================================================================
644 AIDA::IProfile2D*
646 ( const GaudiHistoAlg& algo ,
647  const double valueX ,
648  const double valueY ,
649  const double valueZ ,
650  const GaudiAlg::HistoID& ID ,
651  const std::string& title ,
652  const double lowX ,
653  const double highX ,
654  const double lowY ,
655  const double highY ,
656  const unsigned long binsX ,
657  const unsigned long binsY ,
658  const double weight )
659 {
660  return algo.profile2D
661  ( valueX , valueY , valueZ ,
662  ID , title ,
663  lowX , highX ,
664  lowY , highY ,
665  binsX , binsY , weight ) ;
666 }
667 // ========================================================================
668 // 2D-profiles: by numeric ID
669 // ========================================================================
670 AIDA::IProfile2D*
672 ( const GaudiHistoAlg& algo ,
673  const double valueX ,
674  const double valueY ,
675  const double valueZ ,
676  const long ID ,
677  const std::string& title ,
678  const double lowX ,
679  const double highX ,
680  const double lowY ,
681  const double highY ,
682  const unsigned long binsX ,
683  const unsigned long binsY ,
684  const double weight )
685 {
686  return algo.profile2D
687  ( valueX , valueY , valueZ ,
688  ID , title ,
689  lowX , highX ,
690  lowY , highY ,
691  binsX , binsY , weight ) ;
692 }
693 // ========================================================================
694 // 2D-profiles: by string ID
695 // ========================================================================
696 AIDA::IProfile2D*
698 ( const GaudiHistoAlg& algo ,
699  const double valueX ,
700  const double valueY ,
701  const double valueZ ,
702  const std::string& ID ,
703  const std::string& title ,
704  const double lowX ,
705  const double highX ,
706  const double lowY ,
707  const double highY ,
708  const unsigned long binsX ,
709  const unsigned long binsY ,
710  const double weight )
711 {
712  return algo.profile2D
713  ( valueX , valueY , valueZ ,
714  ID , title ,
715  lowX , highX ,
716  lowY , highY ,
717  binsX , binsY , weight ) ;
718 }
719 // ============================================================================
720 // get all histograms
721 // ============================================================================
722 namespace
723 {
725  // =========================================================================
726  template <typename Container, typename HISTO>
727  size_t fromMap
728  ( const Container& a ,
731  {
732  b.clear() ;
733  c.clear() ;
734  for ( const auto& i : a )
735  {
736  if ( !i.second ) { continue ; }
737  b.push_back ( i.first ) ;
738  c.push_back ( i.second ) ;
739  }
740  return b.size () ;
741  }
742  // ==========================================================================
743 }
744 // ============================================================================
746 ( const GaudiHistoAlg* cmp ,
749 {
750  histos.clear() ;
751  ids .clear() ;
752  return cmp ? fromMap ( cmp -> histo1DMapID () , ids , histos ) : 0;
753  // ==========================================================================
754 }
755 // ============================================================================
757 ( const GaudiHistoTool* cmp ,
760 {
761  histos.clear() ;
762  ids .clear() ;
763  return cmp ? fromMap( cmp -> histo1DMapID () , ids , histos ) : 0;
764  // ==========================================================================
765 }
766 // ============================================================================
768 ( const IAlgorithm* cmp ,
771 {
772  ids . clear() ;
773  histos . clear() ;
774  return cmp ? _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) : 0;
775 }
776 // ============================================================================
778 ( const IAlgTool* cmp ,
781 {
782  ids . clear() ;
783  histos . clear() ;
784  return cmp ? _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) : 0;
785 }
786 // ============================================================================
787 // 2D-histograms
788 // ============================================================================
790 ( const GaudiHistoAlg* cmp ,
793 {
794  histos.clear() ;
795  ids .clear() ;
796  return cmp ? fromMap ( cmp -> histo2DMapID () , ids , histos ) : 0;
797  // ==========================================================================
798 }
799 // ============================================================================
801 ( const GaudiHistoTool* cmp ,
804 {
805  histos.clear() ;
806  ids .clear() ;
807  return cmp ? fromMap ( cmp -> histo2DMapID () , ids , histos ) : 0;
808  // ==========================================================================
809 }
810 // ============================================================================
812 ( const IAlgorithm* cmp ,
815 {
816  ids . clear() ;
817  histos . clear() ;
818  return cmp ? _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) : 0;
819 }
820 // ============================================================================
822 ( const IAlgTool* cmp ,
825 {
826  ids . clear() ;
827  histos . clear() ;
828  return cmp ? _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) : 0;
829 }
830 // ============================================================================
831 // 3D-histograms
832 // ============================================================================
834 ( const GaudiHistoAlg* cmp ,
837 {
838  histos.clear() ;
839  ids .clear() ;
840  return cmp ? fromMap ( cmp -> histo3DMapID () , ids , histos ) : 0;
841  // ==========================================================================
842 }
843 // ============================================================================
845 ( const GaudiHistoTool* cmp ,
848 {
849  histos.clear() ;
850  ids .clear() ;
851  return cmp ? fromMap ( cmp -> histo3DMapID () , ids , histos ) : 0;
852  // ==========================================================================
853 }
854 // ============================================================================
856 ( const IAlgorithm* cmp ,
859 {
860  ids . clear() ;
861  histos . clear() ;
862  return cmp ? _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) : 0;
863 }
864 // ============================================================================
866 ( const IAlgTool* cmp ,
869 {
870  ids . clear() ;
871  histos . clear() ;
872  return cmp ? _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) : 0;
873 }
874 // ============================================================================
875 // 1D-profiles
876 // ============================================================================
878 ( const GaudiHistoAlg* cmp ,
881 {
882  histos.clear() ;
883  ids .clear() ;
884  return cmp ? fromMap ( cmp -> profile1DMapID () , ids , histos ) : 0;
885  // ==========================================================================
886 }
887 // ============================================================================
889 ( const GaudiHistoTool* cmp ,
892 {
893  histos.clear() ;
894  ids .clear() ;
895  return cmp ? fromMap ( cmp -> profile1DMapID () , ids , histos ) : 0;
896  // ==========================================================================
897 }
898 // ============================================================================
900 ( const IAlgorithm* cmp ,
903 {
904  ids . clear() ;
905  histos . clear() ;
906  return cmp ? _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) : 0;
907 }
908 // ============================================================================
910 ( const IAlgTool* cmp ,
913 {
914  ids . clear() ;
915  histos . clear() ;
916  return cmp ? _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) : 0;
917 }
918 // ============================================================================
919 // 2D-profiles
920 // ============================================================================
922 ( const GaudiHistoAlg* cmp ,
925 {
926  histos.clear() ;
927  ids .clear() ;
928  return cmp ? fromMap ( cmp -> profile2DMapID () , ids , histos ) : 0;
929  // ==========================================================================
930 }
931 // ============================================================================
933 ( const GaudiHistoTool* cmp ,
936 {
937  histos.clear() ;
938  ids .clear() ;
939  return cmp ? fromMap ( cmp -> profile2DMapID () , ids , histos ) : 0;
940  // ==========================================================================
941 }
942 // ============================================================================
944 ( const IAlgorithm* cmp ,
947 {
948  ids . clear() ;
949  histos . clear() ;
950  return cmp ? _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) : 0;
951 }
952 // ============================================================================
954 ( const IAlgTool* cmp ,
957 {
958  ids . clear() ;
959  histos . clear() ;
960  return cmp ? _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) : 0;
961 }
962 // ============================================================================
963 
964 // ============================================================================
965 // The END
966 // ============================================================================
static AIDA::IProfile2D * profile2D(const GaudiHistoAlg &algo, const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0)
It is here due to &#39;missing&#39;(?) std::identity.
Definition: Vector.h:29
AIDA::IProfile1D * profile1D(const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0) const
fill the 1D profile histogram (book on demand)
static AIDA::IHistogram1D * plot1D(const GaudiHistoAlg &algo, const double data, const std::string &title, const double low, const double high, const unsigned long bins=100)
"plot"(book&fill) a sequence of data from the vector (implicit loop) (Expected to be more efficient) ...
AIDA::IHistogram1D * plot(const double value, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const
fill the 1D histogram (book on demand)
Definition: GaudiHistos.h:154
static AIDA::IProfile1D * profile1D(const GaudiHistoAlg &algo, const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0)
Header file for class : GaudiHistoTool.
Simple class to extend the functionality of class GaudiAlgorithm.
Definition: GaudiHistoAlg.h:37
T end(T...args)
Simple class to extend the functionality of class GaudiTool.
STL class.
T push_back(T...args)
T clear(T...args)
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:27
static AIDA::IHistogram3D * plot3D(const GaudiHistoAlg &algo, const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const double lowZ, const double highZ, const unsigned long binsX=10, const unsigned long binsY=10, const unsigned long binsZ=10, const double weight=1.0)
fill the 3D histogram (book on demand)
T size(T...args)
static AIDA::IHistogram2D * plot2D(const GaudiHistoAlg &algo, const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0)
fill the 2D histogram (book on demand)
AIDA::IHistogram2D * plot2D(const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
fill the 2D histogram (book on demand)
T begin(T...args)
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
static size_t _histos_a_(const GaudiHistoAlg *cmp, IDs &ids, Histos1D &histos)
static size_t _histos_t_(const GaudiHistoTool *cmp, IDs &ids, Histos1D &histos)
AIDA::IProfile2D * profile2D(const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
fill the 2D profile histogram (book on demand)
AIDA::IHistogram1D * plot1D(const double value, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const
fill the 1D histogram (book on demand)
ID class for Histogram and Ntuples.
Definition: GaudiHistoID.h:44