Changeset 6938 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 04/13/05 17:30:51 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MBinning.cc
r6932 r6938 91 91 // -------------------------------------------------------------------------- 92 92 // 93 // Initialize Binning from an axis of a TH1. If no title given, 94 // a title combined from the axis titles and the TH1 title is 95 // used. 96 // 97 MBinning::MBinning(const TH1 &h, const Char_t axis, const char *name, const char *title) 98 { 99 fName = name ? name : gsDefName.Data(); 100 fTitle = title ? Form("%s;%s;%s;%s", h.GetTitle(), 101 h.GetXaxis()->GetTitle(), 102 h.GetYaxis()->GetTitle(), 103 h.GetZaxis()->GetTitle()) : gsDefTitle.Data(); 104 105 SetEdges(h, axis); 106 } 107 108 // -------------------------------------------------------------------------- 109 // 110 // Initialize Binning from TAxis. 111 // 112 MBinning::MBinning(const TAxis &axis, const char *name, const char *title) 113 { 114 fName = name ? name : gsDefName.Data(); 115 fTitle = title ? title : gsDefTitle.Data(); 116 117 SetEdges(axis); 118 } 119 120 // -------------------------------------------------------------------------- 121 // 93 122 // Search in the parameter list for the binning with name "name". If found, 94 123 // set the edges and title accordingly. Default is name of object. … … 412 441 *fLog << all; 413 442 *fLog << GetDescriptor() << ": nbins=" << GetNumBins() << " ["; 414 *fLog << GetEdgeLo() << ", " << GetEdgeHi() << "] ";443 *fLog << GetEdgeLo() << ", " << GetEdgeHi() << "] <"; 415 444 switch (fType) 416 445 { 417 case kIsDefault: *fLog << "de afult"; break;446 case kIsDefault: *fLog << "default"; break; 418 447 case kIsLinear: *fLog << "linear"; break; 419 448 case kIsLogarithmic: *fLog << "logarithmic"; break; -
trunk/MagicSoft/Mars/mhbase/MBinning.h
r5971 r6938 41 41 MBinning(Int_t nbins, Axis_t lo, Axis_t hi, const char *name=0, const char *opt="", const char *title=NULL); 42 42 MBinning(const MBinning &bins) { SetEdges(bins); } 43 MBinning(const TH1 &h, const Char_t axis='x', const char *name=0, const char *title=0); 44 MBinning(const TAxis &a, const char *name=0, const char *title=0); 43 45 44 46 void Copy(TObject &named) const
Note:
See TracChangeset
for help on using the changeset viewer.