![]() |
|
|
Generated: 18 Jul 2008 |
00001 // $Id: HistoDecorator.cpp,v 1.4 2007/08/07 12:24:38 marcocle Exp $ 00002 // ============================================================================ 00003 // Include files 00004 // ============================================================================ 00005 // GaudiAlg 00006 // ============================================================================ 00007 #include "GaudiAlg/GaudiHistoAlg.h" 00008 // ============================================================================ 00009 // GaudiPython 00010 // ============================================================================ 00011 #include "GaudiPython/Vector.h" 00012 #include "GaudiPython/HistoDecorator.h" 00013 // ============================================================================ 00019 // ============================================================================ 00020 /* "plot"(book&fill) a sequence of data from the vector (implicit loop) 00021 * (Expected to be more efficient) 00022 * @param algo the algorihtm 00023 * @param data data 00024 * @param title histogram title 00025 * @param low low edge 00026 * @param high high edge 00027 * @param bins number of bins 00028 */ 00029 // ============================================================================ 00030 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D 00031 ( const GaudiHistoAlg& algo , 00032 const double data , 00033 const std::string& title , 00034 const double low , 00035 const double high , 00036 const unsigned long bins ) 00037 { return algo.plot1D( data , title , low , high , bins ) ; } 00038 // ============================================================================ 00039 /* "plot"(book&fill) a sequence of data from the vector (implicit loop) 00040 * (Expected to be more efficient) 00041 * @param algo the algorihtm 00042 * @param data data 00043 * @param ID histogram ID 00044 * @param title histogram title 00045 * @param low low edge 00046 * @param high high edge 00047 * @param bins number of bins 00048 */ 00049 // ============================================================================ 00050 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D 00051 ( const GaudiHistoAlg& algo , 00052 const double data , 00053 const GaudiAlg::HistoID& ID , 00054 const std::string& title , 00055 const double low , 00056 const double high , 00057 const unsigned long bins ) 00058 { return algo.plot1D( data , ID , title , low , high , bins ) ; } 00059 // ============================================================================ 00060 /* "plot"(book&fill) a sequence of data from the vector (implicit loop) 00061 * (Expected to be more efficient) 00062 * @param algo the algorihtm 00063 * @param data data 00064 * @param ID histogram ID 00065 * @param title histogram title 00066 * @param low low edge 00067 * @param high high edge 00068 * @param bins number of bins 00069 */ 00070 // ============================================================================ 00071 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D 00072 ( const GaudiHistoAlg& algo , 00073 const double data , 00074 const long ID , 00075 const std::string& title , 00076 const double low , 00077 const double high , 00078 const unsigned long bins ) 00079 { return algo.plot1D( data , ID , title , low , high , bins ) ; } 00080 // ============================================================================ 00081 /* "plot"(book&fill) a sequence of data from the vector (implicit loop) 00082 * (Expected to be more efficient) 00083 * @param algo the algorihtm 00084 * @param data data 00085 * @param ID histogram ID 00086 * @param title histogram title 00087 * @param low low edge 00088 * @param high high edge 00089 * @param bins number of bins 00090 */ 00091 // ============================================================================ 00092 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D 00093 ( const GaudiHistoAlg& algo , 00094 const double data , 00095 const std::string& ID , 00096 const std::string& title , 00097 const double low , 00098 const double high , 00099 const unsigned long bins ) 00100 { return algo.plot1D( data , ID , title , low , high , bins ) ; } 00101 // ============================================================================ 00102 /* "plot"(book&fill) a sequence of data from the vector (implicit loop) 00103 * (Expected to be more efficient) 00104 * @param algo the algorihtm 00105 * @param data vector of data 00106 * @param title histogram title 00107 * @param low low edge 00108 * @param high high edge 00109 * @param bins number of bins 00110 */ 00111 // ============================================================================ 00112 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D 00113 ( const GaudiHistoAlg& algo , 00114 const GaudiPython::Vector& data , 00115 const std::string& title , 00116 const double low , 00117 const double high , 00118 const unsigned long bins ) 00119 { 00120 return algo.plot 00121 ( GaudiPython::_identity<GaudiPython::Vector::value_type>() , 00122 data.begin () , 00123 data.end () , 00124 title , low , high , bins ) ; 00125 } 00126 // ============================================================================ 00127 /* "plot"(book&fill) a sequence of data from the vector (implicit loop) 00128 * (Expected to be more efficient) 00129 * @param algo the algorihtm 00130 * @param data vector of data 00131 * @param ID histogram ID 00132 * @param title histogram title 00133 * @param low low edge 00134 * @param high high edge 00135 * @param bins number of bins 00136 */ 00137 // ============================================================================ 00138 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D 00139 ( const GaudiHistoAlg& algo , 00140 const GaudiPython::Vector& data , 00141 const GaudiAlg::HistoID& ID , 00142 const std::string& title , 00143 const double low , 00144 const double high , 00145 const unsigned long bins ) 00146 { 00147 return algo.plot 00148 ( GaudiPython::_identity<GaudiPython::Vector::value_type>() , 00149 data.begin () , 00150 data.end () , 00151 ID , title , low , high , bins ) ; 00152 } 00153 // ============================================================================ 00154 /* "plot"(book&fill) a sequence of data from the vector (implicit loop) 00155 * (Expected to be more efficient) 00156 * @param algo the algorihtm 00157 * @param data vector of data 00158 * @param ID histogram ID 00159 * @param title histogram title 00160 * @param low low edge 00161 * @param high high edge 00162 * @param bins number of bins 00163 */ 00164 // ============================================================================ 00165 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D 00166 ( const GaudiHistoAlg& algo , 00167 const GaudiPython::Vector& data , 00168 const long ID , 00169 const std::string& title , 00170 const double low , 00171 const double high , 00172 const unsigned long bins ) 00173 { 00174 return algo.plot 00175 ( GaudiPython::_identity<GaudiPython::Vector::value_type>() , 00176 data.begin () , 00177 data.end () , 00178 ID , title , low , high , bins ) ; 00179 } 00180 // ============================================================================ 00181 /* "plot"(book&fill) a sequence of data from the vector (implicit loop) 00182 * (Expected to be more efficient) 00183 * @param algo the algorihtm 00184 * @param data vector of data 00185 * @param ID histogram ID 00186 * @param title histogram title 00187 * @param low low edge 00188 * @param high high edge 00189 * @param bins number of bins 00190 */ 00191 // ============================================================================ 00192 AIDA::IHistogram1D* GaudiPython::HistoDecorator::plot1D 00193 ( const GaudiHistoAlg& algo , 00194 const GaudiPython::Vector& data , 00195 const std::string& ID , 00196 const std::string& title , 00197 const double low , 00198 const double high , 00199 const unsigned long bins ) 00200 { 00201 return algo.plot 00202 ( GaudiPython::_identity<GaudiPython::Vector::value_type>() , 00203 data.begin () , 00204 data.end () , 00205 ID , title , low , high , bins ) ; 00206 } 00207 // ============================================================================ 00208 /* fill the 2D histogram (book on demand) 00209 * @param valueX x value to be filled 00210 * @param valueY y value to be filled 00211 * @param title histogram title (must be unique within the algorithm) 00212 * @param lowX low x limit for histogram 00213 * @param highX high x limit for histogram 00214 * @param lowY low y limit for histogram 00215 * @param highY high y limit for histogram 00216 * @param binsX number of bins in x 00217 * @param binsY number of bins in y 00218 * @param weight weight 00219 * @return pointer to AIDA 2D histogram 00220 */ 00221 // ============================================================================ 00222 AIDA::IHistogram2D* GaudiPython::HistoDecorator::plot2D 00223 ( const GaudiHistoAlg& algo , 00224 const double valueX , 00225 const double valueY , 00226 const std::string& title , 00227 const double lowX , 00228 const double highX , 00229 const double lowY , 00230 const double highY , 00231 const unsigned long binsX , 00232 const unsigned long binsY , 00233 const double weight ) 00234 { 00235 return algo.plot2D ( valueX , valueY , 00236 title , 00237 lowX , highX , 00238 lowY , highY , 00239 binsX , binsY , weight ) ; 00240 } 00241 // ============================================================================ 00256 // ============================================================================ 00257 AIDA::IHistogram2D* GaudiPython::HistoDecorator::plot2D 00258 ( const GaudiHistoAlg& algo , 00259 const double valueX , 00260 const double valueY , 00261 const GaudiAlg::HistoID& ID , 00262 const std::string& title , 00263 const double lowX , 00264 const double highX , 00265 const double lowY , 00266 const double highY , 00267 const unsigned long binsX , 00268 const unsigned long binsY , 00269 const double weight ) 00270 { 00271 return algo.plot2D ( valueX , valueY , 00272 ID , title , 00273 lowX , highX , 00274 lowY , highY , 00275 binsX , binsY , weight ) ; 00276 } 00277 // ============================================================================ 00278 /* fill the 2D histogram (book on demand) 00279 * @param valueX x value to be filled 00280 * @param valueY y value to be filled 00281 * @param ID Histogram ID to use 00282 * @param title histogram title (must be unique within the algorithm) 00283 * @param lowX low x limit for histogram 00284 * @param highX high x limit for histogram 00285 * @param lowY low y limit for histogram 00286 * @param highY high y limit for histogram 00287 * @param binsX number of bins in x 00288 * @param binsY number of bins in y 00289 * @param weight weight 00290 * @return pointer to AIDA 2D histogram 00291 */ 00292 // ============================================================================ 00293 AIDA::IHistogram2D* GaudiPython::HistoDecorator::plot2D 00294 ( const GaudiHistoAlg& algo , 00295 const double valueX , 00296 const double valueY , 00297 const long ID , 00298 const std::string& title , 00299 const double lowX , 00300 const double highX , 00301 const double lowY , 00302 const double highY , 00303 const unsigned long binsX , 00304 const unsigned long binsY , 00305 const double weight ) 00306 { 00307 return algo.plot2D ( valueX , valueY , 00308 ID , title , 00309 lowX , highX , 00310 lowY , highY , 00311 binsX , binsY , weight ) ; 00312 } 00313 // ============================================================================ 00314 /* fill the 2D histogram (book on demand) 00315 * @param valueX x value to be filled 00316 * @param valueY y value to be filled 00317 * @param ID Histogram ID to use 00318 * @param title histogram title (must be unique within the algorithm) 00319 * @param lowX low x limit for histogram 00320 * @param highX high x limit for histogram 00321 * @param lowY low y limit for histogram 00322 * @param highY high y limit for histogram 00323 * @param binsX number of bins in x 00324 * @param binsY number of bins in y 00325 * @param weight weight 00326 * @return pointer to AIDA 2D histogram 00327 */ 00328 // ============================================================================ 00329 AIDA::IHistogram2D* GaudiPython::HistoDecorator::plot2D 00330 ( const GaudiHistoAlg& algo , 00331 const double valueX , 00332 const double valueY , 00333 const std::string& ID , 00334 const std::string& title , 00335 const double lowX , 00336 const double highX , 00337 const double lowY , 00338 const double highY , 00339 const unsigned long binsX , 00340 const unsigned long binsY , 00341 const double weight ) 00342 { 00343 return algo.plot2D ( valueX , valueY , 00344 ID , title , 00345 lowX , highX , 00346 lowY , highY , 00347 binsX , binsY , weight ) ; 00348 } 00349 // ============================================================================ 00350 /* fill the 3D histogram (book on demand) 00351 * @param valueX x value to be filled 00352 * @param valueY y value to be filled 00353 * @param valueZ z value to be filled 00354 * @param title histogram title (must be unique within the algorithm) 00355 * @param lowX low x limit for histogram 00356 * @param highX high x limit for histogram 00357 * @param lowY low y limit for histogram 00358 * @param highY high y limit for histogram 00359 * @param lowZ low z limit for histogram 00360 * @param highZ high z limit for histogram 00361 * @param binsX number of bins in x 00362 * @param binsY number of bins in y 00363 * @param binsZ number of bins in z 00364 * @param weight weight 00365 * @return pointer to AIDA 3D histogram 00366 */ 00367 // ============================================================================ 00368 AIDA::IHistogram3D* GaudiPython::HistoDecorator::plot3D 00369 ( const GaudiHistoAlg& algo , 00370 const double valueX , 00371 const double valueY , 00372 const double valueZ , 00373 const std::string& title , 00374 const double lowX , 00375 const double highX , 00376 const double lowY , 00377 const double highY , 00378 const double lowZ , 00379 const double highZ , 00380 const unsigned long binsX , 00381 const unsigned long binsY , 00382 const unsigned long binsZ , 00383 const double weight ) 00384 { 00385 return algo. plot3D ( valueX , valueY , valueZ , 00386 title , 00387 lowX , highX , 00388 lowY , highY , 00389 lowZ , highZ , 00390 binsX , binsY , binsZ , 00391 weight ) ; 00392 } 00393 // ============================================================================ 00394 /* fill the 3D histogram (book on demand) 00395 * @param valueX x value to be filled 00396 * @param valueY y value to be filled 00397 * @param valueZ z value to be filled 00398 * @param title histogram title (must be unique within the algorithm) 00399 * @param lowX low x limit for histogram 00400 * @param highX high x limit for histogram 00401 * @param lowY low y limit for histogram 00402 * @param highY high y limit for histogram 00403 * @param lowZ low z limit for histogram 00404 * @param highZ high z limit for histogram 00405 * @param binsX number of bins in x 00406 * @param binsY number of bins in y 00407 * @param binsZ number of bins in z 00408 * @param weight weight 00409 * @return pointer to AIDA 3D histogram 00410 */ 00411 // ============================================================================ 00412 AIDA::IHistogram3D* GaudiPython::HistoDecorator::plot3D 00413 ( const GaudiHistoAlg& algo , 00414 const double valueX , 00415 const double valueY , 00416 const double valueZ , 00417 const GaudiAlg::HistoID& ID , 00418 const std::string& title , 00419 const double lowX , 00420 const double highX , 00421 const double lowY , 00422 const double highY , 00423 const double lowZ , 00424 const double highZ , 00425 const unsigned long binsX , 00426 const unsigned long binsY , 00427 const unsigned long binsZ , 00428 const double weight ) 00429 { 00430 return algo. plot3D ( valueX , valueY , valueZ , 00431 ID , title , 00432 lowX , highX , 00433 lowY , highY , 00434 lowZ , highZ , 00435 binsX , binsY , binsZ , 00436 weight ) ; 00437 } 00438 // ============================================================================ 00439 /* fill the 3D histogram (book on demand) 00440 * @param valueX x value to be filled 00441 * @param valueY y value to be filled 00442 * @param valueZ z value to be filled 00443 * @param title histogram title (must be unique within the algorithm) 00444 * @param lowX low x limit for histogram 00445 * @param highX high x limit for histogram 00446 * @param lowY low y limit for histogram 00447 * @param highY high y limit for histogram 00448 * @param lowZ low z limit for histogram 00449 * @param highZ high z limit for histogram 00450 * @param binsX number of bins in x 00451 * @param binsY number of bins in y 00452 * @param binsZ number of bins in z 00453 * @param weight weight 00454 * @return pointer to AIDA 3D histogram 00455 */ 00456 // ============================================================================ 00457 AIDA::IHistogram3D* GaudiPython::HistoDecorator::plot3D 00458 ( const GaudiHistoAlg& algo , 00459 const double valueX , 00460 const double valueY , 00461 const double valueZ , 00462 const long ID , 00463 const std::string& title , 00464 const double lowX , 00465 const double highX , 00466 const double lowY , 00467 const double highY , 00468 const double lowZ , 00469 const double highZ , 00470 const unsigned long binsX , 00471 const unsigned long binsY , 00472 const unsigned long binsZ , 00473 const double weight ) 00474 { 00475 return algo. plot3D ( valueX , valueY , valueZ , 00476 ID , title , 00477 lowX , highX , 00478 lowY , highY , 00479 lowZ , highZ , 00480 binsX , binsY , binsZ , 00481 weight ) ; 00482 } 00483 // ============================================================================ 00484 /* fill the 3D histogram (book on demand) 00485 * @param valueX x value to be filled 00486 * @param valueY y value to be filled 00487 * @param valueZ z value to be filled 00488 * @param title histogram title (must be unique within the algorithm) 00489 * @param lowX low x limit for histogram 00490 * @param highX high x limit for histogram 00491 * @param lowY low y limit for histogram 00492 * @param highY high y limit for histogram 00493 * @param lowZ low z limit for histogram 00494 * @param highZ high z limit for histogram 00495 * @param binsX number of bins in x 00496 * @param binsY number of bins in y 00497 * @param binsZ number of bins in z 00498 * @param weight weight 00499 * @return pointer to AIDA 3D histogram 00500 */ 00501 // ============================================================================ 00502 AIDA::IHistogram3D* 00503 GaudiPython::HistoDecorator::plot3D 00504 ( const GaudiHistoAlg& algo , 00505 const double valueX , 00506 const double valueY , 00507 const double valueZ , 00508 const std::string& ID , 00509 const std::string& title , 00510 const double lowX , 00511 const double highX , 00512 const double lowY , 00513 const double highY , 00514 const double lowZ , 00515 const double highZ , 00516 const unsigned long binsX , 00517 const unsigned long binsY , 00518 const unsigned long binsZ , 00519 const double weight ) 00520 { 00521 return algo. plot3D ( valueX , valueY , valueZ , 00522 ID , title , 00523 lowX , highX , 00524 lowY , highY , 00525 lowZ , highZ , 00526 binsX , binsY , binsZ , 00527 weight ) ; 00528 } 00529 // ======================================================================== 00530 // 1D-profiles: by title 00531 // ======================================================================== 00532 AIDA::IProfile1D* 00533 GaudiPython::HistoDecorator::profile1D 00534 ( const GaudiHistoAlg& algo , 00535 const double valueX , 00536 const double valueY , 00537 const std::string& title , 00538 const double lowX , 00539 const double highX , 00540 const unsigned long binsX , 00541 const double weight ) 00542 { 00543 return algo.profile1D 00544 ( valueX , valueY , title , lowX , highX , binsX , weight ) ; 00545 } 00546 // ======================================================================== 00547 // 1D-profiles: by generic ID 00548 // ======================================================================== 00549 AIDA::IProfile1D* 00550 GaudiPython::HistoDecorator::profile1D 00551 ( const GaudiHistoAlg& algo , 00552 const double valueX , 00553 const double valueY , 00554 const GaudiAlg::HistoID& ID , 00555 const std::string& title , 00556 const double lowX , 00557 const double highX , 00558 const unsigned long binsX , 00559 const double weight ) 00560 { 00561 return algo.profile1D 00562 ( valueX , valueY , ID , title , lowX , highX , binsX , weight ) ; 00563 } 00564 // ======================================================================== 00565 // 1D-profiles: by numeric ID 00566 // ======================================================================== 00567 AIDA::IProfile1D* 00568 GaudiPython::HistoDecorator::profile1D 00569 ( const GaudiHistoAlg& algo , 00570 const double valueX , 00571 const double valueY , 00572 const long ID , 00573 const std::string& title , 00574 const double lowX , 00575 const double highX , 00576 const unsigned long binsX , 00577 const double weight ) 00578 { 00579 return algo.profile1D 00580 ( valueX , valueY , ID , title , lowX , highX , binsX , weight ) ; 00581 } 00582 // ======================================================================== 00583 // 1D-profiles: by string ID 00584 // ======================================================================== 00585 AIDA::IProfile1D* 00586 GaudiPython::HistoDecorator::profile1D 00587 ( const GaudiHistoAlg& algo , 00588 const double valueX , 00589 const double valueY , 00590 const std::string& ID , 00591 const std::string& title , 00592 const double lowX , 00593 const double highX , 00594 const unsigned long binsX , 00595 const double weight ) 00596 { 00597 return algo.profile1D 00598 ( valueX , valueY , ID , title , lowX , highX , binsX , weight ) ; 00599 } 00600 // ======================================================================== 00601 // 2D-profiles: by title 00602 // ======================================================================== 00603 AIDA::IProfile2D* 00604 GaudiPython::HistoDecorator::profile2D 00605 ( const GaudiHistoAlg& algo , 00606 const double valueX , 00607 const double valueY , 00608 const double valueZ , 00609 const std::string& title , 00610 const double lowX , 00611 const double highX , 00612 const double lowY , 00613 const double highY , 00614 const unsigned long binsX , 00615 const unsigned long binsY , 00616 const double weight ) 00617 { 00618 return algo.profile2D 00619 ( valueX , valueY , valueZ , 00620 title , 00621 lowX , highX , 00622 lowY , highY , 00623 binsX , binsY , weight ) ; 00624 } 00625 // ======================================================================== 00626 // 2D-profiles: by generic ID 00627 // ======================================================================== 00628 AIDA::IProfile2D* 00629 GaudiPython::HistoDecorator::profile2D 00630 ( const GaudiHistoAlg& algo , 00631 const double valueX , 00632 const double valueY , 00633 const double valueZ , 00634 const GaudiAlg::HistoID& ID , 00635 const std::string& title , 00636 const double lowX , 00637 const double highX , 00638 const double lowY , 00639 const double highY , 00640 const unsigned long binsX , 00641 const unsigned long binsY , 00642 const double weight ) 00643 { 00644 return algo.profile2D 00645 ( valueX , valueY , valueZ , 00646 ID , title , 00647 lowX , highX , 00648 lowY , highY , 00649 binsX , binsY , weight ) ; 00650 } 00651 // ======================================================================== 00652 // 2D-profiles: by numeric ID 00653 // ======================================================================== 00654 AIDA::IProfile2D* 00655 GaudiPython::HistoDecorator::profile2D 00656 ( const GaudiHistoAlg& algo , 00657 const double valueX , 00658 const double valueY , 00659 const double valueZ , 00660 const long ID , 00661 const std::string& title , 00662 const double lowX , 00663 const double highX , 00664 const double lowY , 00665 const double highY , 00666 const unsigned long binsX , 00667 const unsigned long binsY , 00668 const double weight ) 00669 { 00670 return algo.profile2D 00671 ( valueX , valueY , valueZ , 00672 ID , title , 00673 lowX , highX , 00674 lowY , highY , 00675 binsX , binsY , weight ) ; 00676 } 00677 // ======================================================================== 00678 // 2D-profiles: by string ID 00679 // ======================================================================== 00680 AIDA::IProfile2D* 00681 GaudiPython::HistoDecorator::profile2D 00682 ( const GaudiHistoAlg& algo , 00683 const double valueX , 00684 const double valueY , 00685 const double valueZ , 00686 const std::string& ID , 00687 const std::string& title , 00688 const double lowX , 00689 const double highX , 00690 const double lowY , 00691 const double highY , 00692 const unsigned long binsX , 00693 const unsigned long binsY , 00694 const double weight ) 00695 { 00696 return algo.profile2D 00697 ( valueX , valueY , valueZ , 00698 ID , title , 00699 lowX , highX , 00700 lowY , highY , 00701 binsX , binsY , weight ) ; 00702 } 00703 // ============================================================================ 00704 // The END 00705 // ============================================================================