Changeset 9362 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 02/22/09 23:36:01 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH.cc
r9315 r9362 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.4 5 2009-02-11 12:08:23tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.46 2009-02-22 23:36:00 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 698 698 699 699 if (bins->IsDefault()) 700 { 701 gLog << inf << "Object 'Binning" << name << "' [MBinning] is default... binning unchanged." << endl; 700 702 return kTRUE; 703 } 701 704 702 705 SetBinning(h, bins); … … 707 710 { 708 711 const MBinning *binsx = (MBinning*)plist.FindObject("Binning"+x); 712 const MBinning *binsy = (MBinning*)plist.FindObject("Binning"+y); 713 714 if (!binsx && !binsy) 715 { 716 gLog << inf << "Neither 'Binning" << x << "' nor 'Binning" << y; 717 gLog << "' [MBinning] found... no binning applied." << endl; 718 return kFALSE; 719 } 720 709 721 if (!binsx) 710 { 711 gLog << inf << "Object 'Binning" << x << "' [MBinning] not found... no binning applied." << endl; 722 gLog << inf << "Object 'Binning" << x << "' [MBinning] not found... binning unchanged." << endl; 723 if (!binsy) 724 gLog << inf << "Object 'Binning" << y << "' [MBinning] not found... binning unchanged." << endl; 725 726 if (binsx && binsx->IsDefault()) 727 { 728 gLog << inf << "Object 'Binning" << x << "' [MBinning] is default... binning unchanged." << endl; 729 binsx = 0; 730 } 731 732 if (binsy && binsy->IsDefault()) 733 { 734 gLog << inf << "Object 'Binning" << y << "' [MBinning] is default... binning unchanged." << endl; 735 binsy = 0; 736 } 737 738 MBinning binsxx, binsyy; 739 binsxx.SetEdges(*h, 'x'); 740 binsyy.SetEdges(*h, 'y'); 741 742 SetBinning(h, binsx?binsx:&binsxx, binsy?binsy:&binsyy); 743 744 return kTRUE; 745 } 746 747 Bool_t MH::ApplyBinning(const MParList &plist, TString x, TString y, TString z, TH3 *h) 748 { 749 const MBinning *binsx = (MBinning*)plist.FindObject("Binning"+x); 750 const MBinning *binsy = (MBinning*)plist.FindObject("Binning"+y); 751 const MBinning *binsz = (MBinning*)plist.FindObject("Binning"+z); 752 753 if (!binsx && !binsy && !binsz) 754 { 755 gLog << inf << "Neither 'Binning" << x << "', 'Binning" << y; 756 gLog << "' nor 'Binning" << z << "' [MBinning] found... "; 757 gLog << "no binning applied." << endl; 712 758 return kFALSE; 713 759 } 714 const MBinning *binsy = (MBinning*)plist.FindObject("Binning"+y); 760 761 if (!binsx) 762 gLog << inf << "Object 'Binning" << x << "' [MBinning] not found... binning unchanged." << endl; 715 763 if (!binsy) 716 { 717 gLog << inf << "Object 'Binning" << y << "' [MBinning] not found... no binning applied." << endl; 718 return kFALSE; 719 } 720 721 if (binsx->IsDefault() && binsy->IsDefault()) 722 return kTRUE; 723 724 // ------------------------- 725 /* 726 MBinning binsx, binsy, binsz; 727 binsx.SetEdges(fHist, 'x'); 728 binsy.SetEdges(fHist, 'y'); 729 binsz.SetEdges(fHist, 'z'); 730 */ 731 // ------------------------- 732 733 SetBinning(h, binsx, binsy); 734 735 return kTRUE; 736 } 737 738 Bool_t MH::ApplyBinning(const MParList &plist, TString x, TString y, TString z, TH3 *h) 739 { 740 const MBinning *binsx = (MBinning*)plist.FindObject("Binning"+x); 741 if (!binsx) 742 { 743 gLog << inf << "Object 'Binning" << x << "' [MBinning] not found... no binning applied." << endl; 744 return kFALSE; 745 } 746 const MBinning *binsy = (MBinning*)plist.FindObject("Binning"+y); 747 if (!binsy) 748 { 749 gLog << inf << "Object 'Binning" << y << "' [MBinning] not found... no binning applied." << endl; 750 return kFALSE; 751 } 752 const MBinning *binsz = (MBinning*)plist.FindObject("Binning"+z); 764 gLog << inf << "Object 'Binning" << y << "' [MBinning] not found... binning unchanged." << endl; 753 765 if (!binsz) 754 { 755 gLog << inf << "Object 'Binning" << z << "' [MBinning] not found... no binning applied." << endl; 756 return kFALSE; 757 } 758 759 if (binsx->IsDefault() && binsy->IsDefault() && binsz->IsDefault()) 760 return kTRUE; 761 762 SetBinning(h, binsx, binsy, binsz); 766 gLog << inf << "Object 'Binning" << z << "' [MBinning] not found... binning unchanged." << endl; 767 768 if (binsx && binsx->IsDefault()) 769 { 770 gLog << inf << "Object 'Binning" << x << "' [MBinning] is default... binning unchanged." << endl; 771 binsx = 0; 772 } 773 774 if (binsy && binsy->IsDefault()) 775 { 776 gLog << inf << "Object 'Binning" << y << "' [MBinning] is default... binning unchanged." << endl; 777 binsy = 0; 778 } 779 780 if (binsz && binsz->IsDefault()) 781 { 782 gLog << inf << "Object 'Binning" << z << "' [MBinning] is default... binning unchanged." << endl; 783 binsy = 0; 784 } 785 786 MBinning binsxx, binsyy, binszz; 787 binsxx.SetEdges(*h, 'x'); 788 binsyy.SetEdges(*h, 'y'); 789 binszz.SetEdges(*h, 'z'); 790 791 SetBinning(h, binsx?binsx:&binsxx, binsy?binsy:&binsyy, binsz?binsz:&binszz); 792 763 793 return kTRUE; 764 794 } -
trunk/MagicSoft/Mars/mhbase/MH3.cc
r9302 r9362 583 583 if (!binsx) 584 584 { 585 *fLog << err << dbginf << "Neither '" << bx << "' nor ' " << fName << "' found... aborting." << endl;585 *fLog << err << dbginf << "Neither '" << bx << "' nor 'Binning" << fName << "' found... aborting." << endl; 586 586 return kFALSE; 587 587 }
Note:
See TracChangeset
for help on using the changeset viewer.