Changeset 1483 for trunk/MagicSoft/Mars/mhist/MBinning.cc
- Timestamp:
- 08/05/02 16:12:14 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MBinning.cc
r1477 r1483 36 36 ClassImp(MBinning); 37 37 38 static const TString gsDefName = "MBinning"; 39 static const TString gsDefTitle = "Container describing the binning of an axis"; 40 38 41 // -------------------------------------------------------------------------- 39 42 // … … 46 49 // set the name and title of this object 47 50 // 48 fName = name ? name : "MBinning";49 fTitle = title ? title : "Container describing the binning of an axis";51 fName = name ? name : gsDefName.Data(); 52 fTitle = title ? title : gsDefTitle.Data(); 50 53 51 54 SetEdges(10, 0, 1); … … 105 108 void MBinning::StreamPrimitive(ofstream &out) const 106 109 { 107 out << " MBinning " << ToLower(fName) << "(\""; 108 out << fName << "\", \"" << fTitle << "\");" << endl; 110 out << " MBinning " << GetUniqueName(); 111 if (fName!=gsDefName) 112 { 113 out << "(\"" << fName << "\""; 114 if (fTitle!=gsDefTitle) 115 out << ", \"" << fTitle << "\""; 116 out <<")"; 117 } 118 out << ";" << endl; 109 119 110 120 if (IsDefault()) … … 113 123 if (IsLinear() || IsLogarithmic()) 114 124 { 115 out << " " << ToLower(fName) << ".SetEdges";125 out << " " << GetUniqueName() << ".SetEdges"; 116 126 if (IsLogarithmic()) 117 127 out << "Log"; … … 124 134 for (int i=0; i<GetNumEdges(); i++) 125 135 out << " dummy[" << i << "]=" << GetEdges()[i] << ";" << endl; 126 out << " " << ToLower(fName) << ".SetEdges(dummy);" << endl;136 out << " " << GetUniqueName() << ".SetEdges(dummy);" << endl; 127 137 out << " }" << endl; 128 138 }
Note:
See TracChangeset
for help on using the changeset viewer.