Changeset 1265
- Timestamp:
- 03/21/02 16:25:12 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1264 r1265 1 1 -*-*- END -*-*- 2 3 2002/03/21: Thomas Bretz 4 5 * mhists/MH.cc: 6 - TAxis::Set resets the axis title so I implemented a workaround 7 in SetBinning so that the axis title survives. 8 9 * mhists/MHEffOnTimeTheta.cc, MHEffOnTimeTime.cc: 10 - replaced Get*axis()->SetTitle() by Set*Title() 11 - corrected the Name in MakeDefCanvas 12 13 14 2 15 2002/03/20: Thomas Bretz 3 16 -
trunk/MagicSoft/Mars/mhist/MH.cc
r1215 r1265 117 117 { 118 118 // 119 // Another strange behaviour: TAxis::Set deletes the axis title! 120 // 121 TAxis &x = *h->GetXaxis(); 122 123 TString xtitle = x.GetTitle(); 124 125 // 119 126 // This is a necessary workaround if one wants to set 120 127 // non-equidistant bins after the initialization … … 127 134 // in one of the two given histograms 128 135 // 129 h->GetXaxis()->Set(binsx->GetNumBins(), binsx->GetEdges()); 136 x.Set(binsx->GetNumBins(), binsx->GetEdges()); 137 x.SetTitle(xtitle); 130 138 } 131 139 132 140 void MH::SetBinning(TH1 *h, const MBinning *binsx, const MBinning *binsy) 133 141 { 142 TAxis &x = *h->GetXaxis(); 143 TAxis &y = *h->GetYaxis(); 144 145 // 146 // Another strange behaviour: TAxis::Set deletes the axis title! 147 // 148 TString xtitle = x.GetTitle(); 149 TString ytitle = y.GetTitle(); 150 134 151 // 135 152 // This is a necessary workaround if one wants to set … … 144 161 // in one of the two given histograms 145 162 // 146 h->GetXaxis()->Set(binsx->GetNumBins(), binsx->GetEdges()); 147 h->GetYaxis()->Set(binsy->GetNumBins(), binsy->GetEdges()); 163 x.Set(binsx->GetNumBins(), binsx->GetEdges()); 164 y.Set(binsy->GetNumBins(), binsy->GetEdges()); 165 x.SetTitle(xtitle); 166 y.SetTitle(ytitle); 148 167 } 149 168 150 169 void MH::SetBinning(TH1 *h, const MBinning *binsx, const MBinning *binsy, const MBinning *binsz) 151 170 { 171 // 172 // Another strange behaviour: TAxis::Set deletes the axis title! 173 // 174 TAxis &x = *h->GetXaxis(); 175 TAxis &y = *h->GetYaxis(); 176 TAxis &z = *h->GetZaxis(); 177 178 TString xtitle = x.GetTitle(); 179 TString ytitle = y.GetTitle(); 180 TString ztitle = z.GetTitle(); 181 152 182 // 153 183 // This is a necessary workaround if one wants to set … … 163 193 // in one of the two given histograms 164 194 // 165 h->GetXaxis()->Set(binsx->GetNumBins(), binsx->GetEdges()); 166 h->GetYaxis()->Set(binsy->GetNumBins(), binsy->GetEdges()); 167 h->GetZaxis()->Set(binsz->GetNumBins(), binsz->GetEdges()); 195 x.Set(binsx->GetNumBins(), binsx->GetEdges()); 196 y.Set(binsy->GetNumBins(), binsy->GetEdges()); 197 z.Set(binsz->GetNumBins(), binsz->GetEdges()); 198 x.SetTitle(xtitle); 199 y.SetTitle(ytitle); 200 z.SetTitle(ztitle); 168 201 } 169 202 -
trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.cc
r1227 r1265 67 67 fHist.SetDirectory(NULL); 68 68 69 fHist. GetXaxis()->SetTitle("t_{eff} [s]");70 fHist. GetYaxis()->SetTitle("\\Theta [\\circ]");69 fHist.SetXTitle("t_{eff} [s]"); 70 fHist.SetYTitle("\\Theta [\\circ]"); 71 71 } 72 72 -
trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.cc
r1227 r1265 68 68 fHist.SetDirectory(NULL); 69 69 70 fHist. GetXaxis()->SetTitle("t_{eff} [s]");71 fHist. GetYaxis()->SetTitle("t [s]");70 fHist.SetXTitle("t_{eff} [s]"); 71 fHist.SetYTitle("t [s]"); 72 72 } 73 73 74 74 TObject *MHEffOnTimeTime::DrawClone(Option_t *opt) const 75 75 { 76 TCanvas *c = MakeDefCanvas("EffOnTimeT heta", "t_eff vs. t");76 TCanvas *c = MakeDefCanvas("EffOnTimeTime", "t_eff vs. t"); 77 77 78 78 gROOT->SetSelectedPad(NULL); … … 89 89 { 90 90 if (!gPad) 91 MakeDefCanvas("EffOnTimeT heta", "t_eff vs. t");91 MakeDefCanvas("EffOnTimeTime", "t_eff vs. t"); 92 92 93 93 fHist.Draw(opt); -
trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.cc
r1263 r1265 90 90 TObject *MHTimeDiffTime::DrawClone(Option_t *opt) const 91 91 { 92 TCanvas *c = MakeDefCanvas("DiffTimeTime", "Distrib of \\Deltat, t");92 TCanvas *c = MakeDefCanvas("DiffTimeTime", "Distrib of dt, t"); 93 93 c->Divide(2, 2); 94 94 … … 123 123 { 124 124 if (!gPad) 125 MakeDefCanvas("DiffTimeTime", "Distrib of \\Deltat, t");125 MakeDefCanvas("DiffTimeTime", "Distrib of dt, t"); 126 126 127 127 gPad->Divide(2,2);
Note:
See TracChangeset
for help on using the changeset viewer.