Gaudi Framework, version v21r4

Home   Generated: 7 Sep 2009

HistoDecorator.cpp

Go to the documentation of this file.
00001 // $Id: HistoDecorator.cpp,v 1.5 2008/10/09 09:59:14 marcocle Exp $
00002 // ============================================================================
00003 // Include files 
00004 // ============================================================================
00005 // GaudiAlg 
00006 // ============================================================================
00007 #include "GaudiAlg/GaudiHistoAlg.h"
00008 #include "GaudiAlg/GaudiHistoTool.h"
00009 // ============================================================================
00010 // GaudiPython
00011 // ============================================================================
00012 #include "GaudiPython/Vector.h"
00013 #include "GaudiPython/HistoDecorator.h"
00014 // ============================================================================
00020 // ============================================================================
00021 /*  "plot"(book&fill) a sequence of data from the vector (implicit loop) 
00022  *  (Expected to be more efficient)
00023  *  @param algo the algorithm
00024  *  @param data  data 
00025  *  @param title histogram title
00026  *  @param low   low edge 
00027  *  @param high  high edge
00028  *  @param bins  number of bins 
00029  */
00030 // ============================================================================
00031 AIDA::IHistogram1D*   GaudiPython::HistoDecorator::plot1D
00032 ( const GaudiHistoAlg&         algo  , 
00033   const double                 data  , 
00034   const std::string&           title ,
00035   const double                 low   ,
00036   const double                 high  ,
00037   const unsigned long          bins  ) 
00038 { return algo.plot1D( data , title , low , high , bins ) ; }
00039 // ============================================================================
00040 /*  "plot"(book&fill) a sequence of data from the vector (implicit loop) 
00041  *  (Expected to be more efficient)
00042  *  @param algo the algorithm
00043  *  @param data data  
00044  *  @param ID   histogram ID 
00045  *  @param title histogram title 
00046  *  @param low   low edge 
00047  *  @param high  high edge
00048  *  @param bins  number of bins 
00049  */
00050 // ============================================================================
00051 AIDA::IHistogram1D*   GaudiPython::HistoDecorator::plot1D
00052 ( const GaudiHistoAlg&         algo  , 
00053   const double                 data  , 
00054   const GaudiAlg::HistoID&     ID    ,
00055   const std::string&           title ,
00056   const double                 low   ,
00057   const double                 high  ,
00058   const unsigned long          bins  ) 
00059 { return algo.plot1D( data , ID , title , low , high , bins ) ; }
00060 // ============================================================================
00061 /*  "plot"(book&fill) a sequence of data from the vector (implicit loop) 
00062  *  (Expected to be more efficient)
00063  *  @param algo the algorithm
00064  *  @param data data  
00065  *  @param ID   histogram ID 
00066  *  @param title histogram title 
00067  *  @param low   low edge 
00068  *  @param high  high edge
00069  *  @param bins  number of bins 
00070  */
00071 // ============================================================================
00072 AIDA::IHistogram1D*   GaudiPython::HistoDecorator::plot1D
00073 ( const GaudiHistoAlg&         algo  , 
00074   const double                 data  , 
00075   const long                   ID    ,
00076   const std::string&           title ,
00077   const double                 low   ,
00078   const double                 high  ,
00079   const unsigned long          bins  ) 
00080 { return algo.plot1D( data , ID , title , low , high , bins ) ; }
00081 // ============================================================================
00082 /*  "plot"(book&fill) a sequence of data from the vector (implicit loop) 
00083  *  (Expected to be more efficient)
00084  *  @param algo the algorithm
00085  *  @param data data  
00086  *  @param ID   histogram ID 
00087  *  @param title histogram title 
00088  *  @param low   low edge 
00089  *  @param high  high edge
00090  *  @param bins  number of bins 
00091  */
00092 // ============================================================================
00093 AIDA::IHistogram1D*   GaudiPython::HistoDecorator::plot1D
00094 ( const GaudiHistoAlg&         algo  , 
00095   const double                 data  , 
00096   const std::string&           ID    ,
00097   const std::string&           title ,
00098   const double                 low   ,
00099   const double                 high  ,
00100   const unsigned long          bins  ) 
00101 { return algo.plot1D( data , ID , title , low , high , bins ) ; }
00102 // ============================================================================
00103 /*  "plot"(book&fill) a sequence of data from the vector (implicit loop) 
00104  *  (Expected to be more efficient)
00105  *  @param algo the algorithm
00106  *  @param data vector of data 
00107  *  @param title histogram title 
00108  *  @param low   low edge 
00109  *  @param high  high edge
00110  *  @param bins  number of bins 
00111  */
00112 // ============================================================================
00113 AIDA::IHistogram1D*   GaudiPython::HistoDecorator::plot1D
00114 ( const GaudiHistoAlg&         algo  , 
00115   const GaudiPython::Vector&   data  , 
00116   const std::string&           title ,
00117   const double                 low   ,
00118   const double                 high  ,
00119   const unsigned long          bins  ) 
00120 { 
00121   return algo.plot 
00122     ( GaudiPython::_identity<GaudiPython::Vector::value_type>() , 
00123       data.begin ()              ,
00124       data.end   ()              , 
00125       title , low , high , bins  ) ;
00126 } 
00127 // ============================================================================
00128 /*  "plot"(book&fill) a sequence of data from the vector (implicit loop) 
00129  *  (Expected to be more efficient)
00130  *  @param algo the algorithm
00131  *  @param data vector of data 
00132  *  @param ID   histogram ID 
00133  *  @param title histogram title 
00134  *  @param low   low edge 
00135  *  @param high  high edge
00136  *  @param bins  number of bins 
00137  */
00138 // ============================================================================
00139 AIDA::IHistogram1D*   GaudiPython::HistoDecorator::plot1D
00140 ( const GaudiHistoAlg&         algo   , 
00141   const GaudiPython::Vector&   data   , 
00142   const GaudiAlg::HistoID&     ID     ,
00143   const std::string&           title  ,
00144   const double                 low    ,
00145   const double                 high   ,
00146   const unsigned long          bins   ) 
00147 {
00148   return algo.plot 
00149     ( GaudiPython::_identity<GaudiPython::Vector::value_type>() , 
00150       data.begin ()                       ,
00151       data.end   ()                       , 
00152       ID , title , low , high , bins      ) ;
00153 }
00154 // ============================================================================
00155 /*  "plot"(book&fill) a sequence of data from the vector (implicit loop) 
00156  *  (Expected to be more efficient)
00157  *  @param algo the algorithm
00158  *  @param data vector of data 
00159  *  @param ID   histogram ID 
00160  *  @param title histogram title 
00161  *  @param low   low edge 
00162  *  @param high  high edge
00163  *  @param bins  number of bins 
00164  */
00165 // ============================================================================
00166 AIDA::IHistogram1D*   GaudiPython::HistoDecorator::plot1D
00167 ( const GaudiHistoAlg&         algo   , 
00168   const GaudiPython::Vector&   data   , 
00169   const long                   ID     ,
00170   const std::string&           title  ,
00171   const double                 low    ,
00172   const double                 high   ,
00173   const unsigned long          bins   ) 
00174 {
00175   return algo.plot 
00176     ( GaudiPython::_identity<GaudiPython::Vector::value_type>() , 
00177       data.begin ()                       ,
00178       data.end   ()                       , 
00179       ID , title , low , high , bins      ) ;
00180 }
00181 // ============================================================================
00182 /*  "plot"(book&fill) a sequence of data from the vector (implicit loop) 
00183  *  (Expected to be more efficient)
00184  *  @param algo the algorithm
00185  *  @param data vector of data 
00186  *  @param ID   histogram ID 
00187  *  @param title histogram title 
00188  *  @param low   low edge 
00189  *  @param high  high edge
00190  *  @param bins  number of bins 
00191  */
00192 // ============================================================================
00193 AIDA::IHistogram1D*   GaudiPython::HistoDecorator::plot1D
00194 ( const GaudiHistoAlg&         algo   , 
00195   const GaudiPython::Vector&   data   , 
00196   const std::string&           ID     ,
00197   const std::string&           title  ,
00198   const double                 low    ,
00199   const double                 high   ,
00200   const unsigned long          bins   ) 
00201 {
00202   return algo.plot 
00203     ( GaudiPython::_identity<GaudiPython::Vector::value_type>() , 
00204       data.begin ()                       ,
00205       data.end   ()                       , 
00206       ID , title , low , high , bins      ) ;
00207 }
00208 // ============================================================================
00209 /*  fill the 2D histogram (book on demand)
00210  *  @param valueX x value to be filled
00211  *  @param valueY y value to be filled
00212  *  @param title histogram title (must be unique within the algorithm)
00213  *  @param lowX  low x limit for histogram
00214  *  @param highX high x limit for histogram
00215  *  @param lowY  low y limit for histogram
00216  *  @param highY high y limit for histogram
00217  *  @param binsX  number of bins in x
00218  *  @param binsY  number of bins in y
00219  *  @param weight weight
00220  *  @return pointer to AIDA 2D histogram
00221  */
00222 // ============================================================================
00223 AIDA::IHistogram2D*  GaudiPython::HistoDecorator::plot2D
00224 ( const GaudiHistoAlg&      algo    ,
00225   const double              valueX  ,
00226   const double              valueY  ,
00227   const std::string&        title   ,
00228   const double              lowX    ,
00229   const double              highX   ,
00230   const double              lowY    ,
00231   const double              highY   ,
00232   const unsigned long       binsX   ,
00233   const unsigned long       binsY   ,
00234   const double              weight  ) 
00235 {
00236   return algo.plot2D ( valueX , valueY , 
00237                        title  , 
00238                        lowX   , highX  , 
00239                        lowY   , highY  ,
00240                        binsX  , binsY  , weight ) ;
00241 }
00242 // ============================================================================
00257 // ============================================================================
00258 AIDA::IHistogram2D*  GaudiPython::HistoDecorator::plot2D
00259 ( const GaudiHistoAlg&      algo    ,
00260   const double              valueX  ,
00261   const double              valueY  ,
00262   const GaudiAlg::HistoID&  ID      ,
00263   const std::string&        title   ,
00264   const double              lowX    ,
00265   const double              highX   ,
00266   const double              lowY    ,
00267   const double              highY   ,
00268   const unsigned long       binsX   ,
00269   const unsigned long       binsY   ,
00270   const double              weight  ) 
00271 {
00272   return algo.plot2D ( valueX , valueY , 
00273                        ID     , title  , 
00274                        lowX   , highX  , 
00275                        lowY   , highY  ,
00276                        binsX  , binsY  , weight ) ;
00277 }
00278 // ============================================================================
00279 /*  fill the 2D histogram (book on demand)
00280  *  @param valueX x value to be filled
00281  *  @param valueY y value to be filled
00282  *  @param ID     Histogram ID to use
00283  *  @param title histogram title (must be unique within the algorithm)
00284  *  @param lowX  low x limit for histogram
00285  *  @param highX high x limit for histogram
00286  *  @param lowY  low y limit for histogram
00287  *  @param highY high y limit for histogram
00288  *  @param binsX  number of bins in x
00289  *  @param binsY  number of bins in y
00290  *  @param weight weight
00291  *  @return pointer to AIDA 2D histogram
00292  */
00293 // ============================================================================
00294 AIDA::IHistogram2D*  GaudiPython::HistoDecorator::plot2D
00295 ( const GaudiHistoAlg&      algo    ,
00296   const double              valueX  ,
00297   const double              valueY  ,
00298   const long                ID      ,
00299   const std::string&        title   ,
00300   const double              lowX    ,
00301   const double              highX   ,
00302   const double              lowY    ,
00303   const double              highY   ,
00304   const unsigned long       binsX   ,
00305   const unsigned long       binsY   ,
00306   const double              weight  ) 
00307 {
00308   return algo.plot2D ( valueX , valueY , 
00309                        ID     , title  , 
00310                        lowX   , highX  , 
00311                        lowY   , highY  ,
00312                        binsX  , binsY  , weight ) ;
00313 }
00314 // ============================================================================
00315 /*  fill the 2D histogram (book on demand)
00316  *  @param valueX x value to be filled
00317  *  @param valueY y value to be filled
00318  *  @param ID     Histogram ID to use
00319  *  @param title histogram title (must be unique within the algorithm)
00320  *  @param lowX  low x limit for histogram
00321  *  @param highX high x limit for histogram
00322  *  @param lowY  low y limit for histogram
00323  *  @param highY high y limit for histogram
00324  *  @param binsX  number of bins in x
00325  *  @param binsY  number of bins in y
00326  *  @param weight weight
00327  *  @return pointer to AIDA 2D histogram
00328  */
00329 // ============================================================================
00330 AIDA::IHistogram2D*  GaudiPython::HistoDecorator::plot2D
00331 ( const GaudiHistoAlg&      algo    ,
00332   const double              valueX  ,
00333   const double              valueY  ,
00334   const std::string&        ID      ,
00335   const std::string&        title   ,
00336   const double              lowX    ,
00337   const double              highX   ,
00338   const double              lowY    ,
00339   const double              highY   ,
00340   const unsigned long       binsX   ,
00341   const unsigned long       binsY   ,
00342   const double              weight  ) 
00343 {
00344   return algo.plot2D ( valueX , valueY , 
00345                        ID     , title  , 
00346                        lowX   , highX  , 
00347                        lowY   , highY  ,
00348                        binsX  , binsY  , weight ) ;
00349 }
00350 // ============================================================================
00351 /*  fill the 3D histogram (book on demand)
00352  *  @param valueX x value to be filled
00353  *  @param valueY y value to be filled
00354  *  @param valueZ z value to be filled
00355  *  @param title histogram title (must be unique within the algorithm)
00356  *  @param lowX  low x limit for histogram
00357  *  @param highX high x limit for histogram
00358  *  @param lowY  low y limit for histogram
00359  *  @param highY high y limit for histogram
00360  *  @param lowZ  low z limit for histogram
00361  *  @param highZ high z limit for histogram
00362  *  @param binsX number of bins in x
00363  *  @param binsY number of bins in y
00364  *  @param binsZ number of bins in z
00365  *  @param weight weight
00366  *  @return pointer to AIDA 3D histogram
00367  */
00368 // ============================================================================
00369 AIDA::IHistogram3D*  GaudiPython::HistoDecorator::plot3D
00370 ( const GaudiHistoAlg&      algo   ,  
00371   const double        valueX       ,
00372   const double        valueY       ,
00373   const double        valueZ       ,
00374   const std::string&  title        ,
00375   const double        lowX         ,
00376   const double        highX        ,
00377   const double        lowY         ,
00378   const double        highY        ,
00379   const double        lowZ         ,
00380   const double        highZ        ,
00381   const unsigned long binsX        ,
00382   const unsigned long binsY        ,
00383   const unsigned long binsZ        ,
00384   const double        weight       ) 
00385 {
00386   return algo. plot3D ( valueX , valueY , valueZ , 
00387                         title                    , 
00388                         lowX   , highX  , 
00389                         lowY   , highY  , 
00390                         lowZ   , highZ  , 
00391                         binsX  , binsY  , binsZ  , 
00392                         weight                   ) ;
00393 }
00394 // ============================================================================
00395 /*  fill the 3D histogram (book on demand)
00396  *  @param valueX x value to be filled
00397  *  @param valueY y value to be filled
00398  *  @param valueZ z value to be filled
00399  *  @param title histogram title (must be unique within the algorithm)
00400  *  @param lowX  low x limit for histogram
00401  *  @param highX high x limit for histogram
00402  *  @param lowY  low y limit for histogram
00403  *  @param highY high y limit for histogram
00404  *  @param lowZ  low z limit for histogram
00405  *  @param highZ high z limit for histogram
00406  *  @param binsX number of bins in x
00407  *  @param binsY number of bins in y
00408  *  @param binsZ number of bins in z
00409  *  @param weight weight
00410  *  @return pointer to AIDA 3D histogram
00411  */
00412 // ============================================================================
00413 AIDA::IHistogram3D*  GaudiPython::HistoDecorator::plot3D
00414 ( const GaudiHistoAlg&      algo   ,  
00415   const double        valueX       ,
00416   const double        valueY       ,
00417   const double        valueZ       ,
00418   const GaudiAlg::HistoID&  ID     ,
00419   const std::string&  title        ,
00420   const double        lowX         ,
00421   const double        highX        ,
00422   const double        lowY         ,
00423   const double        highY        ,
00424   const double        lowZ         ,
00425   const double        highZ        ,
00426   const unsigned long binsX        ,
00427   const unsigned long binsY        ,
00428   const unsigned long binsZ        ,
00429   const double        weight       ) 
00430 {
00431   return algo. plot3D ( valueX , valueY , valueZ , 
00432                         ID     , title  , 
00433                         lowX   , highX  , 
00434                         lowY   , highY  , 
00435                         lowZ   , highZ  , 
00436                         binsX  , binsY  , binsZ  , 
00437                         weight                   ) ;
00438 }
00439 // ============================================================================
00440 /*  fill the 3D histogram (book on demand)
00441  *  @param valueX x value to be filled
00442  *  @param valueY y value to be filled
00443  *  @param valueZ z value to be filled
00444  *  @param title histogram title (must be unique within the algorithm)
00445  *  @param lowX  low x limit for histogram
00446  *  @param highX high x limit for histogram
00447  *  @param lowY  low y limit for histogram
00448  *  @param highY high y limit for histogram
00449  *  @param lowZ  low z limit for histogram
00450  *  @param highZ high z limit for histogram
00451  *  @param binsX number of bins in x
00452  *  @param binsY number of bins in y
00453  *  @param binsZ number of bins in z
00454  *  @param weight weight
00455  *  @return pointer to AIDA 3D histogram
00456  */
00457 // ============================================================================
00458 AIDA::IHistogram3D*  GaudiPython::HistoDecorator::plot3D
00459 ( const GaudiHistoAlg&      algo   ,  
00460   const double        valueX       ,
00461   const double        valueY       ,
00462   const double        valueZ       ,
00463   const long          ID           ,
00464   const std::string&  title        ,
00465   const double        lowX         ,
00466   const double        highX        ,
00467   const double        lowY         ,
00468   const double        highY        ,
00469   const double        lowZ         ,
00470   const double        highZ        ,
00471   const unsigned long binsX        ,
00472   const unsigned long binsY        ,
00473   const unsigned long binsZ        ,
00474   const double        weight       ) 
00475 {
00476   return algo. plot3D ( valueX , valueY , valueZ , 
00477                         ID     , title  , 
00478                         lowX   , highX  , 
00479                         lowY   , highY  , 
00480                         lowZ   , highZ  , 
00481                         binsX  , binsY  , binsZ  , 
00482                         weight                   ) ;
00483 }
00484 // ============================================================================
00485 /*  fill the 3D histogram (book on demand)
00486  *  @param valueX x value to be filled
00487  *  @param valueY y value to be filled
00488  *  @param valueZ z value to be filled
00489  *  @param title histogram title (must be unique within the algorithm)
00490  *  @param lowX  low x limit for histogram
00491  *  @param highX high x limit for histogram
00492  *  @param lowY  low y limit for histogram
00493  *  @param highY high y limit for histogram
00494  *  @param lowZ  low z limit for histogram
00495  *  @param highZ high z limit for histogram
00496  *  @param binsX number of bins in x
00497  *  @param binsY number of bins in y
00498  *  @param binsZ number of bins in z
00499  *  @param weight weight
00500  *  @return pointer to AIDA 3D histogram
00501  */
00502 // ============================================================================
00503 AIDA::IHistogram3D*  
00504 GaudiPython::HistoDecorator::plot3D
00505 ( const GaudiHistoAlg&      algo   ,  
00506   const double        valueX       ,
00507   const double        valueY       ,
00508   const double        valueZ       ,
00509   const std::string&  ID           ,
00510   const std::string&  title        ,
00511   const double        lowX         ,
00512   const double        highX        ,
00513   const double        lowY         ,
00514   const double        highY        ,
00515   const double        lowZ         ,
00516   const double        highZ        ,
00517   const unsigned long binsX        ,
00518   const unsigned long binsY        ,
00519   const unsigned long binsZ        ,
00520   const double        weight       ) 
00521 {
00522   return algo. plot3D ( valueX , valueY , valueZ , 
00523                         ID     , title  , 
00524                         lowX   , highX  , 
00525                         lowY   , highY  , 
00526                         lowZ   , highZ  , 
00527                         binsX  , binsY  , binsZ  , 
00528                         weight                   ) ;
00529 }
00530 // ========================================================================
00531 // 1D-profiles: by title  
00532 // ========================================================================  
00533 AIDA::IProfile1D* 
00534 GaudiPython::HistoDecorator::profile1D
00535 ( const GaudiHistoAlg&   algo   , 
00536   const double           valueX ,
00537   const double           valueY ,
00538   const std::string&     title  ,
00539   const double           lowX   ,
00540   const double           highX  ,
00541   const unsigned long    binsX  ,
00542   const std::string&     opt    ,
00543   const double           lowY   , 
00544   const double           highY  ,
00545   const double           weight ) 
00546 {
00547   return algo.profile1D 
00548     ( valueX , valueY , title , lowX , highX , binsX , 
00549       opt , lowY , highY , weight ) ;
00550 }
00551 // ========================================================================      
00552 // 1D-profiles: by generic ID 
00553 // ========================================================================  
00554 AIDA::IProfile1D* 
00555 GaudiPython::HistoDecorator::profile1D
00556 ( const GaudiHistoAlg&     algo   , 
00557   const double             valueX ,
00558   const double             valueY ,
00559   const GaudiAlg::HistoID& ID     ,
00560   const std::string&       title  ,
00561   const double             lowX   ,
00562   const double             highX  ,
00563   const unsigned long      binsX  ,
00564   const std::string&       opt    ,
00565   const double             lowY   , 
00566   const double             highY  ,
00567   const double             weight )
00568 {
00569   return algo.profile1D 
00570     ( valueX , valueY , ID , title , lowX , highX , binsX , 
00571       opt , lowY , highY , weight ) ;
00572 }
00573 // ========================================================================      
00574 // 1D-profiles: by numeric ID 
00575 // ========================================================================  
00576 AIDA::IProfile1D* 
00577 GaudiPython::HistoDecorator::profile1D
00578 ( const GaudiHistoAlg&   algo   , 
00579   const double           valueX ,
00580   const double           valueY ,
00581   const long             ID     ,
00582   const std::string&     title  ,
00583   const double           lowX   ,
00584   const double           highX  ,
00585   const unsigned long    binsX  ,
00586   const std::string&     opt    ,
00587   const double           lowY   , 
00588   const double           highY  ,
00589   const double           weight )
00590 {
00591   return algo.profile1D 
00592     ( valueX , valueY , ID , title , lowX , highX , binsX , 
00593       opt , lowY , highY , weight ) ;
00594 }
00595 // ========================================================================      
00596 // 1D-profiles: by string ID 
00597 // ========================================================================  
00598 AIDA::IProfile1D* 
00599 GaudiPython::HistoDecorator::profile1D
00600 ( const GaudiHistoAlg&   algo   , 
00601   const double           valueX ,
00602   const double           valueY ,
00603   const std::string&     ID     ,
00604   const std::string&     title  ,
00605   const double           lowX   ,
00606   const double           highX  ,
00607   const unsigned long    binsX  ,
00608   const std::string&     opt    ,
00609   const double           lowY   , 
00610   const double           highY  ,
00611   const double           weight ) 
00612 {
00613   return algo.profile1D 
00614     ( valueX , valueY , ID , title , lowX , highX , binsX , 
00615       opt , lowY , highY , weight ) ;
00616 }
00617 // ========================================================================  
00618 // 2D-profiles: by title 
00619 // ========================================================================
00620 AIDA::IProfile2D* 
00621 GaudiPython::HistoDecorator::profile2D
00622 ( const GaudiHistoAlg&   algo   , 
00623   const double           valueX ,
00624   const double           valueY ,
00625   const double           valueZ ,
00626   const std::string&     title  ,
00627   const double           lowX   ,
00628   const double           highX  ,
00629   const double           lowY   ,
00630   const double           highY  ,
00631   const unsigned long    binsX  ,
00632   const unsigned long    binsY  ,
00633   const double           weight ) 
00634 {
00635   return algo.profile2D 
00636     ( valueX , valueY , valueZ ,
00637       title  , 
00638       lowX   , highX  , 
00639       lowY   , highY  , 
00640       binsX  , binsY  , weight  ) ;
00641 }
00642 // ========================================================================  
00643 // 2D-profiles: by generic ID  
00644 // ========================================================================  
00645 AIDA::IProfile2D* 
00646 GaudiPython::HistoDecorator::profile2D
00647 ( const GaudiHistoAlg&     algo   , 
00648   const double             valueX ,
00649   const double             valueY ,
00650   const double             valueZ ,
00651   const GaudiAlg::HistoID& ID     ,
00652   const std::string&       title  ,
00653   const double             lowX   ,
00654   const double             highX  ,
00655   const double             lowY   ,
00656   const double             highY  ,
00657   const unsigned long      binsX  ,
00658   const unsigned long      binsY  ,
00659   const double             weight ) 
00660 {
00661   return algo.profile2D 
00662     ( valueX , valueY , valueZ ,
00663       ID     , title  , 
00664       lowX   , highX  , 
00665       lowY   , highY  , 
00666       binsX  , binsY  , weight  ) ;
00667 }
00668 // ========================================================================  
00669 // 2D-profiles: by numeric ID  
00670 // ========================================================================  
00671 AIDA::IProfile2D* 
00672 GaudiPython::HistoDecorator::profile2D
00673 ( const GaudiHistoAlg&   algo   , 
00674   const double           valueX ,
00675   const double           valueY ,
00676   const double           valueZ ,
00677   const long             ID     ,
00678   const std::string&     title  ,
00679   const double           lowX   ,
00680   const double           highX  ,
00681   const double           lowY   ,
00682   const double           highY  ,
00683   const unsigned long    binsX  ,
00684   const unsigned long    binsY  ,
00685   const double           weight ) 
00686 {
00687   return algo.profile2D 
00688     ( valueX , valueY , valueZ ,
00689       ID     , title  , 
00690       lowX   , highX  , 
00691       lowY   , highY  , 
00692       binsX  , binsY  , weight  ) ;
00693 }
00694 // ========================================================================  
00695 // 2D-profiles: by string ID  
00696 // ========================================================================  
00697 AIDA::IProfile2D* 
00698 GaudiPython::HistoDecorator::profile2D
00699 ( const GaudiHistoAlg&   algo   , 
00700   const double           valueX ,
00701   const double           valueY ,
00702   const double           valueZ ,
00703   const std::string&     ID     ,
00704   const std::string&     title  ,
00705   const double           lowX   ,
00706   const double           highX  ,
00707   const double           lowY   ,
00708   const double           highY  ,
00709   const unsigned long    binsX  ,
00710   const unsigned long    binsY  ,
00711   const double           weight ) 
00712 {
00713   return algo.profile2D 
00714     ( valueX , valueY , valueZ ,
00715       ID     , title  , 
00716       lowX   , highX  , 
00717       lowY   , highY  , 
00718       binsX  , binsY  , weight  ) ;
00719 }
00720 // ============================================================================
00721 // get all histograms 
00722 // ============================================================================
00723 namespace 
00724 {
00726   template <class KEY, class HISTO>
00727   size_t _getHistos 
00728   ( const GaudiUtils::HashMap<KEY,HISTO>& a ,
00729     std::map<GaudiAlg::ID,HISTO>&         b ) 
00730   {
00731     for  ( typename GaudiUtils::HashMap<KEY,HISTO>::const_iterator ih = 
00732              a.begin() ; a.end() != ih ; ++ih ) 
00733     {
00734       if ( 0 == ih->second ) { continue ; }
00735       GaudiAlg::ID id ( ih->first ) ;
00736       b [ id ] = ih->second ;
00737     }
00738     return b.size() ;
00739   }
00740   // =========================================================================
00741   template <class HISTO>
00742   size_t fromMap 
00743   ( const std::map<GaudiAlg::ID,HISTO>&  a ,
00744     std::vector<GaudiAlg::ID>&           b , 
00745     std::vector<HISTO>&                  c ) 
00746   {
00747     b.clear() ;
00748     c.clear() ;
00749      for ( typename std::map<GaudiAlg::ID,HISTO>::const_iterator it = 
00750              a.begin() ; a.end() != it ; ++it ) 
00751      {
00752        if ( 0 == it->second ) { continue ; }
00753        b.push_back ( it->first  ) ;
00754        c.push_back ( it->second ) ;
00755      }
00756     return b.size () ;
00757   }
00758   // ==========================================================================
00759 }
00760 // ============================================================================
00761 size_t GaudiPython::HistoDecorator::_histos_a_
00762 ( const GaudiHistoAlg*                   cmp    , 
00763   GaudiPython::HistoDecorator::IDs&      ids    , 
00764   GaudiPython::HistoDecorator::Histos1D& histos ) 
00765 {
00766   histos.clear() ;
00767   ids   .clear() ;
00768   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00769   //
00770   std::map<GaudiAlg::ID,AIDA::IHistogram1D*> _map ;
00771   //
00772   _getHistos ( cmp -> histo1DMapNumID () , _map ) ;
00773   _getHistos ( cmp -> histo1DMapLitID () , _map ) ;
00774   // 
00775   return fromMap ( _map , ids , histos ) ;
00776   // ==========================================================================
00777 }
00778 // ============================================================================
00779 size_t GaudiPython::HistoDecorator::_histos_t_
00780 ( const GaudiHistoTool*                  cmp    , 
00781   GaudiPython::HistoDecorator::IDs&      ids    , 
00782   GaudiPython::HistoDecorator::Histos1D& histos ) 
00783 {
00784   histos.clear() ;
00785   ids   .clear() ;
00786   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00787   //
00788   std::map<GaudiAlg::ID,AIDA::IHistogram1D*> _map ;
00789   //
00790   _getHistos ( cmp -> histo1DMapNumID () , _map ) ;
00791   _getHistos ( cmp -> histo1DMapLitID () , _map ) ;
00792   // 
00793   return fromMap ( _map , ids , histos ) ;
00794   // ==========================================================================
00795 }
00796 // ============================================================================
00797 size_t GaudiPython::HistoDecorator::_histos_a_
00798 ( const IAlgorithm*                        cmp    , 
00799   GaudiPython::HistoDecorator::IDs&        ids    , 
00800   GaudiPython::HistoDecorator::Histos1D&   histos ) 
00801 {
00802   ids    . clear() ;
00803   histos . clear() ;
00804   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00805   return _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) ;
00806 }
00807 // ============================================================================
00808 size_t GaudiPython::HistoDecorator::_histos_t_
00809 ( const IAlgTool*                          cmp    , 
00810   GaudiPython::HistoDecorator::IDs&        ids    , 
00811   GaudiPython::HistoDecorator::Histos1D&   histos ) 
00812 {
00813   ids    . clear() ;
00814   histos . clear() ;
00815   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00816   return _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) ;
00817 }
00818 // ============================================================================
00819 //                                                                2D-histograms
00820 // ============================================================================
00821 size_t GaudiPython::HistoDecorator::_histos_a_
00822 ( const GaudiHistoAlg*                   cmp    , 
00823   GaudiPython::HistoDecorator::IDs&      ids    , 
00824   GaudiPython::HistoDecorator::Histos2D& histos ) 
00825 {
00826   histos.clear() ;
00827   ids   .clear() ;
00828   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00829   //
00830   std::map<GaudiAlg::ID,AIDA::IHistogram2D*> _map ;
00831   //
00832   _getHistos ( cmp -> histo2DMapNumID () , _map ) ;
00833   _getHistos ( cmp -> histo2DMapLitID () , _map ) ;
00834   // 
00835   return fromMap ( _map , ids , histos ) ;
00836   // ==========================================================================
00837 }
00838 // ============================================================================
00839 size_t GaudiPython::HistoDecorator::_histos_t_
00840 ( const GaudiHistoTool*                  cmp    , 
00841   GaudiPython::HistoDecorator::IDs&      ids    , 
00842   GaudiPython::HistoDecorator::Histos2D& histos ) 
00843 {
00844   histos.clear() ;
00845   ids   .clear() ;
00846   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00847   //
00848   std::map<GaudiAlg::ID,AIDA::IHistogram2D*> _map ;
00849   //
00850   _getHistos ( cmp -> histo2DMapNumID () , _map ) ;
00851   _getHistos ( cmp -> histo2DMapLitID () , _map ) ;
00852   // 
00853   return fromMap ( _map , ids , histos ) ;
00854   // ==========================================================================
00855 }
00856 // ============================================================================
00857 size_t GaudiPython::HistoDecorator::_histos_a_
00858 ( const IAlgorithm*                        cmp    , 
00859   GaudiPython::HistoDecorator::IDs&        ids    , 
00860   GaudiPython::HistoDecorator::Histos2D&   histos ) 
00861 {
00862   ids    . clear() ;
00863   histos . clear() ;
00864   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00865   return _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) ;
00866 }
00867 // ============================================================================
00868 size_t GaudiPython::HistoDecorator::_histos_t_
00869 ( const IAlgTool*                          cmp    , 
00870   GaudiPython::HistoDecorator::IDs&        ids    , 
00871   GaudiPython::HistoDecorator::Histos2D&   histos ) 
00872 {
00873   ids    . clear() ;
00874   histos . clear() ;
00875   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00876   return _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) ;
00877 }
00878 // ============================================================================
00879 //                                                                3D-histograms
00880 // ============================================================================
00881 size_t GaudiPython::HistoDecorator::_histos_a_
00882 ( const GaudiHistoAlg*                   cmp    , 
00883   GaudiPython::HistoDecorator::IDs&      ids    , 
00884   GaudiPython::HistoDecorator::Histos3D& histos ) 
00885 {
00886   histos.clear() ;
00887   ids   .clear() ;
00888   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00889   //
00890   std::map<GaudiAlg::ID,AIDA::IHistogram3D*> _map ;
00891   //
00892   _getHistos ( cmp -> histo3DMapNumID () , _map ) ;
00893   _getHistos ( cmp -> histo3DMapLitID () , _map ) ;
00894   // 
00895   return fromMap ( _map , ids , histos ) ;
00896   // ==========================================================================
00897 }
00898 // ============================================================================
00899 size_t GaudiPython::HistoDecorator::_histos_t_
00900 ( const GaudiHistoTool*                  cmp    , 
00901   GaudiPython::HistoDecorator::IDs&      ids    , 
00902   GaudiPython::HistoDecorator::Histos3D& histos ) 
00903 {
00904   histos.clear() ;
00905   ids   .clear() ;
00906   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00907   //
00908   std::map<GaudiAlg::ID,AIDA::IHistogram3D*> _map ;
00909   //
00910   _getHistos ( cmp -> histo3DMapNumID () , _map ) ;
00911   _getHistos ( cmp -> histo3DMapLitID () , _map ) ;
00912   // 
00913   return fromMap ( _map , ids , histos ) ;
00914   // ==========================================================================
00915 }
00916 // ============================================================================
00917 size_t GaudiPython::HistoDecorator::_histos_a_
00918 ( const IAlgorithm*                        cmp    , 
00919   GaudiPython::HistoDecorator::IDs&        ids    , 
00920   GaudiPython::HistoDecorator::Histos3D&   histos ) 
00921 {
00922   ids    . clear() ;
00923   histos . clear() ;
00924   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00925   return _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) ;
00926 }
00927 // ============================================================================
00928 size_t GaudiPython::HistoDecorator::_histos_t_
00929 ( const IAlgTool*                          cmp    , 
00930   GaudiPython::HistoDecorator::IDs&        ids    , 
00931   GaudiPython::HistoDecorator::Histos3D&   histos ) 
00932 {
00933   ids    . clear() ;
00934   histos . clear() ;
00935   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00936   return _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) ;
00937 }
00938 // ============================================================================
00939 //                                                                  1D-profiles 
00940 // ============================================================================
00941 size_t GaudiPython::HistoDecorator::_histos_a_
00942 ( const GaudiHistoAlg*                     cmp    , 
00943   GaudiPython::HistoDecorator::IDs&        ids    , 
00944   GaudiPython::HistoDecorator::Profiles1D& histos ) 
00945 {
00946   histos.clear() ;
00947   ids   .clear() ;
00948   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00949   //
00950   std::map<GaudiAlg::ID,AIDA::IProfile1D*> _map ;
00951   //
00952   _getHistos ( cmp -> profile1DMapNumID () , _map ) ;
00953   _getHistos ( cmp -> profile1DMapLitID () , _map ) ;
00954   // 
00955   return fromMap ( _map , ids , histos ) ;
00956   // ==========================================================================
00957 }
00958 // ============================================================================
00959 size_t GaudiPython::HistoDecorator::_histos_t_
00960 ( const GaudiHistoTool*                    cmp    , 
00961   GaudiPython::HistoDecorator::IDs&        ids    , 
00962   GaudiPython::HistoDecorator::Profiles1D& histos ) 
00963 {
00964   histos.clear() ;
00965   ids   .clear() ;
00966   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00967   //
00968   std::map<GaudiAlg::ID,AIDA::IProfile1D*> _map ;
00969   //
00970   _getHistos ( cmp -> profile1DMapNumID () , _map ) ;
00971   _getHistos ( cmp -> profile1DMapLitID () , _map ) ;
00972   // 
00973   return fromMap ( _map , ids , histos ) ;
00974   // ==========================================================================
00975 }
00976 // ============================================================================
00977 size_t GaudiPython::HistoDecorator::_histos_a_
00978 ( const IAlgorithm*                        cmp    , 
00979   GaudiPython::HistoDecorator::IDs&        ids    , 
00980   GaudiPython::HistoDecorator::Profiles1D& histos ) 
00981 {
00982   ids    . clear() ;
00983   histos . clear() ;
00984   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00985   return _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) ;
00986 }
00987 // ============================================================================
00988 size_t GaudiPython::HistoDecorator::_histos_t_
00989 ( const IAlgTool*                          cmp    , 
00990   GaudiPython::HistoDecorator::IDs&        ids    , 
00991   GaudiPython::HistoDecorator::Profiles1D& histos ) 
00992 {
00993   ids    . clear() ;
00994   histos . clear() ;
00995   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
00996   return _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) ;
00997 }
00998 // ============================================================================
00999 //                                                                  2D-profiles 
01000 // ============================================================================
01001 size_t GaudiPython::HistoDecorator::_histos_a_
01002 ( const GaudiHistoAlg*                     cmp    , 
01003   GaudiPython::HistoDecorator::IDs&        ids    , 
01004   GaudiPython::HistoDecorator::Profiles2D& histos ) 
01005 {
01006   histos.clear() ;
01007   ids   .clear() ;
01008   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
01009   //
01010   std::map<GaudiAlg::ID,AIDA::IProfile2D*> _map ;
01011   //
01012   _getHistos ( cmp -> profile2DMapNumID () , _map ) ;
01013   _getHistos ( cmp -> profile2DMapLitID () , _map ) ;
01014   // 
01015   return fromMap ( _map , ids , histos ) ;
01016   // ==========================================================================
01017 }
01018 // ============================================================================
01019 size_t GaudiPython::HistoDecorator::_histos_t_
01020 ( const GaudiHistoTool*                    cmp    , 
01021   GaudiPython::HistoDecorator::IDs&        ids    , 
01022   GaudiPython::HistoDecorator::Profiles2D& histos ) 
01023 {
01024   histos.clear() ;
01025   ids   .clear() ;
01026   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
01027   //
01028   std::map<GaudiAlg::ID,AIDA::IProfile2D*> _map ;
01029   //
01030   _getHistos ( cmp -> profile2DMapNumID () , _map ) ;
01031   _getHistos ( cmp -> profile2DMapLitID () , _map ) ;
01032   // 
01033   return fromMap ( _map , ids , histos ) ;
01034   // ==========================================================================
01035 }
01036 // ============================================================================
01037 size_t GaudiPython::HistoDecorator::_histos_a_
01038 ( const IAlgorithm*                        cmp    , 
01039   GaudiPython::HistoDecorator::IDs&        ids    , 
01040   GaudiPython::HistoDecorator::Profiles2D& histos ) 
01041 {
01042   ids    . clear() ;
01043   histos . clear() ;
01044   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
01045   return _histos_a_ ( dynamic_cast<const GaudiHistoAlg*> ( cmp ) , ids, histos ) ;
01046 }
01047 // ============================================================================
01048 size_t GaudiPython::HistoDecorator::_histos_t_
01049 ( const IAlgTool*                          cmp    , 
01050   GaudiPython::HistoDecorator::IDs&        ids    , 
01051   GaudiPython::HistoDecorator::Profiles2D& histos ) 
01052 {
01053   ids    . clear() ;
01054   histos . clear() ;
01055   if ( 0 == cmp ) { return 0 ; }                                      // RETURN  
01056   return _histos_t_ ( dynamic_cast<const GaudiHistoTool*> ( cmp ) , ids, histos ) ;
01057 }
01058 // ============================================================================
01059 
01060 
01061 // ============================================================================
01062 // The END 
01063 // ============================================================================

Generated at Mon Sep 7 18:05:46 2009 for Gaudi Framework, version v21r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004