Changeset 8657 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 08/06/07 15:44:16 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH.cc
r8238 r8657 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.3 2 2007-01-10 12:58:25tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.33 2007-08-06 14:44:13 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 619 619 } 620 620 621 Bool_t MH::ApplyBinning(const MParList &plist, TString x, TString y, TH2 *h) 622 { 623 const MBinning *binsx = (MBinning*)plist.FindObject("Binning"+x); 624 if (!binsx) 625 { 626 gLog << inf << "Object 'Binning" << x << "' [MBinning] not found... no binning applied." << endl; 627 return kFALSE; 628 } 629 const MBinning *binsy = (MBinning*)plist.FindObject("Binning"+y); 630 if (!binsy) 631 { 632 gLog << inf << "Object 'Binning" << y << "' [MBinning] not found... no binning applied." << endl; 633 return kFALSE; 634 } 635 636 if (binsx->IsDefault() && binsy->IsDefault()) 637 return kTRUE; 638 639 // ------------------------- 640 /* 641 MBinning binsx, binsy, binsz; 642 binsx.SetEdges(fHist, 'x'); 643 binsy.SetEdges(fHist, 'y'); 644 binsz.SetEdges(fHist, 'z'); 645 */ 646 // ------------------------- 647 648 SetBinning(h, binsx, binsy); 649 650 return kTRUE; 651 } 652 653 Bool_t MH::ApplyBinning(const MParList &plist, TString x, TString y, TString z, TH3 *h) 654 { 655 const MBinning *binsx = (MBinning*)plist.FindObject("Binning"+x); 656 if (!binsx) 657 { 658 gLog << inf << "Object 'Binning" << x << "' [MBinning] not found... no binning applied." << endl; 659 return kFALSE; 660 } 661 const MBinning *binsy = (MBinning*)plist.FindObject("Binning"+y); 662 if (!binsy) 663 { 664 gLog << inf << "Object 'Binning" << y << "' [MBinning] not found... no binning applied." << endl; 665 return kFALSE; 666 } 667 const MBinning *binsz = (MBinning*)plist.FindObject("Binning"+z); 668 if (!binsz) 669 { 670 gLog << inf << "Object 'Binning" << z << "' [MBinning] not found... no binning applied." << endl; 671 return kFALSE; 672 } 673 674 if (binsx->IsDefault() && binsy->IsDefault() && binsz->IsDefault()) 675 return kTRUE; 676 677 SetBinning(h, binsx, binsy, binsz); 678 return kTRUE; 679 } 680 621 681 void MH::FindGoodLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger) 622 682 { -
trunk/MagicSoft/Mars/mhbase/MH.h
r8047 r8657 80 80 static void RemoveFirstBin(TH1 &h); 81 81 82 static Bool_t ApplyBinning(const MParList &plist, TString name, TH1 *h); 82 static Bool_t ApplyBinning(const MParList &plist, TString x, TH1 *h); 83 static Bool_t ApplyBinning(const MParList &plist, TString x, TString y, TH2 *h); 84 static Bool_t ApplyBinning(const MParList &plist, TString x, TString y, TString z, TH3 *h); 83 85 84 86 static void ScaleArray(TArrayD &bins, Double_t f);
Note:
See TracChangeset
for help on using the changeset viewer.