Changeset 5803 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 01/11/05 16:46:58 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MBinning.cc
r4966 r5803 48 48 #include "MLogManip.h" 49 49 50 #include "MParList.h" 51 50 52 #include "MH.h" 51 53 … … 85 87 86 88 SetEdges(nbins, lo, hi, opt); 89 } 90 91 // -------------------------------------------------------------------------- 92 // 93 // Search in the parameter list for the binning with name "name". If found, 94 // set the edges and title accordingly. Default is name of object. 95 // return kTRUE if object found, kFALSE otherwise. 96 // 97 Bool_t MBinning::SetEdges(const MParList &list, const char *name) 98 { 99 MBinning *bins = (MBinning*)list.FindObject(name ? name : fName.Data(), "MBinning"); 100 if (!bins) 101 return kFALSE; 102 103 SetEdges(*bins); 104 return kTRUE; 87 105 } 88 106 -
trunk/MagicSoft/Mars/mhbase/MBinning.h
r5692 r5803 12 12 class TH1; 13 13 class TAxis; 14 15 class MParList; 14 16 15 17 class MBinning : public MParContainer … … 52 54 } 53 55 56 Bool_t SetEdges(const MParList &list, const char *name=0); 54 57 void SetEdges(const TAxis &axe); 55 void SetEdges(const MBinning &bins) { SetEdges(bins.fEdges); fType = bins.fType; }58 void SetEdges(const MBinning &bins) { SetEdges(bins.fEdges); fType = bins.fType; fTitle = bins.fTitle; } 56 59 void SetEdges(const TH1 &h, const Char_t axis='x'); 57 60 void SetEdges(const Int_t nbins, const Axis_t lo, Axis_t up);
Note:
See TracChangeset
for help on using the changeset viewer.