Changeset 4966 for trunk/MagicSoft/Mars/mhbase/MBinning.h
- Timestamp:
- 09/13/04 08:57:58 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MBinning.h
r4920 r4966 46 46 47 47 void SetEdges(const TAxis &axe); 48 void SetEdges(const MBinning &bins) { SetEdges(fEdges); } 48 49 void SetEdges(const TH1 &h, const Char_t axis='x'); 49 50 void SetEdges(const Int_t nbins, const Axis_t lo, Axis_t up); … … 59 60 for (int i=1; i<fEdges.GetSize(); i++) 60 61 { 61 if ( ((TArrayD)fEdges)[i] >= val)62 if (fEdges[i] >= val) 62 63 return i-1; 63 64 } … … 70 71 } 71 72 72 // FIXME: ROOT workaround: "operator[] const" missing 73 Double_t GetEdgeLo() const { return ((TArrayD)fEdges)[0]; } 74 Double_t GetEdgeHi() const { return ((TArrayD)fEdges)[fEdges.GetSize()-1]; } 73 Double_t GetEdgeLo() const { return fEdges[0]; } 74 Double_t GetEdgeHi() const { return fEdges[fEdges.GetSize()-1]; } 75 75 76 Int_t GetNumEdges() const { return fEdges.GetSize(); }77 Int_t GetNumBins() const { return fEdges.GetSize()-1; }76 Int_t GetNumEdges() const { return fEdges.GetSize(); } 77 Int_t GetNumBins() const { return fEdges.GetSize()-1; } 78 78 79 79 Double_t *GetEdges() const { return (Double_t*)fEdges.GetArray(); } 80 const TArrayD &GetEdgesD() const { return fEdges; } 80 81 81 82 void AddEdge(Axis_t up); 83 void RemoveFirstEdge(); 84 void RemoveLastEdge(); 82 85 83 Bool_t IsLinear() const { return fType==kIsLinear; }86 Bool_t IsLinear() const { return fType==kIsLinear; } 84 87 Bool_t IsLogarithmic() const { return fType==kIsLogarithmic; } 85 Bool_t IsCosinic() const { return fType==kIsCosinic; }86 Bool_t IsDefault() const { return fType==kIsDefault; }87 Bool_t IsUserArray() const { return fType==kIsUserArray; }88 Bool_t IsCosinic() const { return fType==kIsCosinic; } 89 Bool_t IsDefault() const { return fType==kIsDefault; } 90 Bool_t IsUserArray() const { return fType==kIsUserArray; } 88 91 89 Bool_t HasTitle() const { return gsDefTitle!=fTitle; }92 Bool_t HasTitle() const { return gsDefTitle!=fTitle; } 90 93 91 94 void Apply(TH1 &) const; … … 95 98 96 99 #endif 97
Note:
See TracChangeset
for help on using the changeset viewer.