Changeset 1483 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 08/05/02 16:12:14 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 3 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 } -
trunk/MagicSoft/Mars/mhist/MFillH.cc
r1481 r1483 358 358 fParContainer->SavePrimitive(out); 359 359 360 out << " MFillH " << ToLower(fName) << "(";360 out << " MFillH " << GetUniqueName() << "("; 361 361 362 362 if (fH) 363 out << "&" << ToLower(fH->GetName());363 out << "&" << fH->GetUniqueName(); 364 364 else 365 365 out << "\"" << fHName << "\""; 366 366 367 367 if (fParContainer) 368 out << ", &" << ToLower(fParContainer->GetName());368 out << ", &" << fParContainer->GetUniqueName(); 369 369 else 370 370 if (!fParContainerName.IsNull()) -
trunk/MagicSoft/Mars/mhist/MH3.cc
r1481 r1483 78 78 ClassImp(MH3); 79 79 80 static const TString gsDefName = "MH3"; 81 static const TString gsDefTitle = "Container for a %dD Mars Histogram"; 82 80 83 MH3::MH3() : fDimension(0), fHist(NULL) 81 84 { 82 fName = "MH3";83 fTitle = "Container for a 1D Mars Histogram";85 fName = gsDefName; 86 fTitle = Form(gsDefTitle.Data(), 0); 84 87 85 88 fData[0] = fData[1] = fData[2] = NULL; … … 101 104 fData[2] = NULL; 102 105 103 fName = "MH3";104 fTitle = "Container for a 1D Mars Histogram";106 fName = gsDefName; 107 fTitle = Form(gsDefTitle.Data(), 1); 105 108 106 109 fHist->SetDirectory(NULL); … … 127 130 fData[2] = NULL; 128 131 129 fName = "MH3";130 fTitle = "Container for a 2D Mars Histogram";132 fName = gsDefName; 133 fTitle = Form(gsDefTitle.Data(), 2); 131 134 132 135 fHist->SetDirectory(NULL); … … 153 156 fData[2] = new MDataChain(memberz); 154 157 155 fName = "MH3";156 fTitle = "Container for a 3D Mars Histogram";158 fName = gsDefName; 159 fTitle = Form(gsDefTitle.Data(), 3); 157 160 158 161 fHist->SetDirectory(NULL); … … 386 389 void MH3::StreamPrimitive(ofstream &out) const 387 390 { 388 TString name = ToLower(fName);391 TString name = GetUniqueName(); 389 392 390 393 out << " MH3 " << name << "(\""; … … 397 400 out << ");" << endl; 398 401 399 out << " " << name << ".SetName(\"" << fName << "\");" << endl; 400 out << " " << name << ".SetTitle(\"" << fTitle << "\");" << endl; 402 if (fName!=gsDefName) 403 out << " " << name << ".SetName(\"" << fName << "\");" << endl; 404 405 if (fTitle!=Form(gsDefTitle.Data(), fDimension)) 406 out << " " << name << ".SetTitle(\"" << fTitle << "\");" << endl; 401 407 402 408 switch (fDimension)
Note:
See TracChangeset
for help on using the changeset viewer.