Changeset 7971 for trunk/MagicSoft/Mars/mhvstime
- Timestamp:
- 09/26/06 11:45:32 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mhvstime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.cc
r7091 r7971 224 224 TString str(opt); 225 225 226 // This is not done automatically anymore since root 5.12/00 227 // and it is necessary to force a proper update of the axis. 226 228 TH1 *h = fGraph->GetHistogram(); 229 if (h) 230 { 231 delete h; 232 fGraph->SetHistogram(0); 233 h = fGraph->GetHistogram(); 234 } 227 235 228 236 h->SetXTitle("Time"); -
trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc
r7841 r7971 291 291 } 292 292 293 // This is not done automatically anymore since root 5.12/00 294 // and it is necessary to force a proper update of the axis. 293 295 TH1 *h = fGraph->GetHistogram(); 296 if (h) 297 { 298 delete h; 299 fGraph->SetHistogram(0); 300 h = fGraph->GetHistogram(); 301 } 294 302 295 303 h->SetXTitle("Time"); -
trunk/MagicSoft/Mars/mhvstime/MHVsTime.cc
r7842 r7971 264 264 while ((obj=Next())) *fLog << obj << " " << obj->GetName() << " " << obj->ClassName() << " " << Next.GetOption() << endl; 265 265 */ 266 267 266 if (!fGraph) 268 267 return; … … 284 283 } 285 284 286 // SetPoint deletes the histogram! 287 if (fUseEventNumber) 288 fGraph->GetHistogram()->SetXTitle("Event Number"); 289 else 290 { 291 fGraph->GetHistogram()->SetXTitle("Time"); 292 fGraph->GetHistogram()->GetXaxis()->SetLabelSize(0.033); 293 fGraph->GetHistogram()->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT"); 294 fGraph->GetHistogram()->GetXaxis()->SetTimeDisplay(1); 285 // This is not done automatically anymore since root 5.12/00 286 // and it is necessary to force a proper update of the axis. 287 TH1 *h = fGraph->GetHistogram(); 288 if (h) 289 { 290 delete h; 291 fGraph->SetHistogram(0); 292 h = fGraph->GetHistogram(); 293 } 294 if (h) 295 { 296 TAxis *axe = h->GetXaxis(); 297 // SetPoint deletes the histogram! 298 if (fUseEventNumber) 299 axe->SetTitle("Event Number"); 300 else 301 { 302 axe->SetTitle("Time"); 303 axe->SetLabelSize(0.033); 304 axe->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT"); 305 axe->SetTimeDisplay(1); 306 } 295 307 } 296 308 … … 300 312 // This is a workaround if the TGraph has only one point. 301 313 // Otherwise MStatusDisplay::Update hangs. 302 gPad->GetListOfPrimitives()->Remove(fGraph);303 fGraph->Draw(fGraph->GetN()<2 ? "A" : str.Data());314 // gPad->GetListOfPrimitives()->Remove(fGraph); 315 // fGraph->Draw(fGraph->GetN()<2 ? "A" : str.Data()); 304 316 //gPad->GetListOfPrimitives()->Add(fGraph, fGraph->GetN()<2 ? "A" : opt); 305 317 // AppendPad(str); … … 319 331 pad->SetBorderMode(0); 320 332 AppendPad(opt); 333 334 fGraph->Draw("A"); 321 335 } 322 336
Note:
See TracChangeset
for help on using the changeset viewer.