Changeset 5620 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 12/17/04 13:27:08 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH3.cc
r5603 r5620 103 103 // 104 104 MH3::MH3(const unsigned int dim) 105 : fDimension(dim>3?3:dim), fHist(NULL) ,105 : fDimension(dim>3?3:dim), fHist(NULL)/*, 106 106 fNameProfX(Form("ProfX_%p", this)), 107 fNameProfY(Form("ProfY_%p", this)) 107 fNameProfY(Form("ProfY_%p", this))*/ 108 108 { 109 109 switch (fDimension) … … 205 205 // 206 206 MH3::MH3(const char *memberx, const char *membery) 207 : fDimension(2) , fNameProfX(Form("ProjX_%p", this)), fNameProfY(Form("ProjY_%p", this))207 : fDimension(2)/*, fNameProfX(Form("ProjX_%p", this)), fNameProfY(Form("ProjY_%p", this))*/ 208 208 { 209 209 fHist = new TH2F; … … 507 507 void MH3::Paint(Option_t *o) 508 508 { 509 /* 510 *fLog << all << fHist << " " << gPad->GetName() << " ----> Paint " << o << endl; 511 TListIter Next(gPad->GetListOfPrimitives()); TObject *obj; 512 while ((obj=Next())) *fLog << obj << " " << obj->GetName() << " " << obj->ClassName() << " " << Next.GetOption() << " " << (int)obj->TestBit(kCanDelete) << endl; 513 */ 514 /* 509 515 TString str(o); 510 511 // FIXME: Do it in Paint()512 /*513 if (str.Contains("COL", TString::kIgnoreCase))514 {515 SetColors();516 return;517 }518 */519 516 520 517 if (str.Contains("log", TString::kIgnoreCase)) … … 536 533 if ((h0 = (TProfile*)gPad->FindObject(fNameProfY))) 537 534 ((TH2*)fHist)->ProfileY(fNameProfY, -1, 9999, "s"); 538 } 535 } 536 */ 537 538 fHist->SetFillStyle(4000); 539 540 TString str(o); 541 str = str.Strip(TString::kBoth); 542 543 Bool_t only = str.Contains("ONLY", TString::kIgnoreCase) && fDimension==2; 544 Bool_t same = str.Contains("SAME", TString::kIgnoreCase) && fDimension==2; 545 Bool_t blue = str.Contains("BLUE", TString::kIgnoreCase) && fDimension==2; 546 547 // FIXME: We may have to remove all our own options from str! 548 if (!only && !gPad->GetListOfPrimitives()->FindObject(fHist)) 549 fHist->Draw(str); 550 551 if (str.Contains("PROFX", TString::kIgnoreCase) && fDimension==2) 552 { 553 TProfile *p = ((TH2*)fHist)->ProfileX("ProfX", -1, 9999, "s"); 554 if (!gPad->GetListOfPrimitives()->FindObject(p)) 555 { 556 p->UseCurrentStyle(); 557 p->SetLineColor(blue ? kBlue : fHist->GetLineColor()); 558 p->SetBit(kCanDelete); 559 p->SetDirectory(NULL); 560 p->SetXTitle(fHist->GetXaxis()->GetTitle()); 561 p->SetYTitle(fHist->GetYaxis()->GetTitle()); 562 p->Draw(only&&!same?"":"same"); 563 } 564 } 565 if (str.Contains("PROFY", TString::kIgnoreCase) && fDimension==2) 566 { 567 TProfile *p = ((TH2*)fHist)->ProfileY("ProfY", -1, 9999, "s"); 568 if (!gPad->GetListOfPrimitives()->FindObject(p)) 569 { 570 p->UseCurrentStyle(); 571 p->SetLineColor(blue ? kBlue : fHist->GetLineColor()); 572 p->SetBit(kCanDelete); 573 p->SetDirectory(NULL); 574 p->SetYTitle(fHist->GetXaxis()->GetTitle()); 575 p->SetXTitle(fHist->GetYaxis()->GetTitle()); 576 p->Draw(only&&!same?"":"same"); 577 } 578 } 579 580 if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx(); 581 if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy(); 582 if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz(); 539 583 } 540 584 … … 559 603 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(fHist); 560 604 pad->SetBorderMode(0); 561 605 AppendPad(opt); 606 607 return; 608 /* 562 609 fHist->SetFillStyle(4000); 563 610 … … 597 644 } 598 645 599 AppendPad("log"); 646 AppendPad("log");*/ 600 647 } 601 648 -
trunk/MagicSoft/Mars/mhbase/MH3.h
r5429 r5620 26 26 Double_t fScale[3]; // Scale for the three axis (eg unit) 27 27 28 TString fNameProfX; //! This should make sure, that gROOT doen't confuse the profile with something else29 TString fNameProfY; //! This should make sure, that gROOT doen't confuse the profile with something else28 // TString fNameProfX; //! This should make sure, that gROOT doen't confuse the profile with something else 29 // TString fNameProfY; //! This should make sure, that gROOT doen't confuse the profile with something else 30 30 31 31 void StreamPrimitive(ofstream &out) const; … … 36 36 kIsLogz = BIT(19) 37 37 }; 38 39 // Int_t DistancetoPrimitive(Int_t px, Int_t py); 40 // void ExecuteEvent(Int_t event, Int_t px, Int_t py); 38 41 39 42 public:
Note:
See TracChangeset
for help on using the changeset viewer.