Changeset 2563 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 11/23/03 21:18:30 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r2550 r2563 124 124 if (!evt) 125 125 { 126 *fLog << err << dbginf << " No MCamEvent found..." << endl;126 *fLog << err << dbginf << "Got no MCamEvent as argument of Fill()..." << endl; 127 127 return kFALSE; 128 128 } 129 129 fSum->AddCamContent(*evt, fType); 130 130 fRms->SetCamContent(*fSum, 1); 131 131 return kTRUE; 132 132 } … … 138 138 Bool_t MHCamEvent::Finalize() 139 139 { 140 fRms->AddCamContent(*fSum, 1);140 //fRms->AddCamContent(*fSum, 1); 141 141 return kTRUE; 142 142 } -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2557 r2563 299 299 { 300 300 if (fMinimum != -1111) 301 return Profile(fMinimum);301 return fMinimum; 302 302 303 303 if (fNcells<=1) … … 329 329 { 330 330 if (fMaximum!=-1111) 331 return Profile(fMaximum);331 return fMaximum; 332 332 333 333 if (fNcells<=1) … … 359 359 // To draw a camera into its own pad do something like: 360 360 // 361 // MGeomCamMagic m; 362 // MHCamera *d=new MHCamera(m); 363 // 364 // TCanvas *c = new TCanvas; 365 // c->Divide(2,1); 366 // c->cd(1); 367 // 368 // d->FillRandom(); 369 // d->Draw(); 370 // d->SetBit(kCanDelete); 361 // MGeomCamMagic m; 362 // MHCamera *d=new MHCamera(m); 363 // 364 // TCanvas *c = new TCanvas; 365 // c->Divide(2,1); 366 // c->cd(1); 367 // 368 // d->FillRandom(); 369 // d->Draw(); 370 // d->SetBit(kCanDelete); 371 // 372 // There are several drawing options: 373 // 'hist' Draw as a standard TH1 histogram (value vs. pixel index) 374 // 'box' Draw hexagons which size is in respect to its contents 375 // 'nocol' Leave the 'boxed' hexagons empty 376 // 'pixelindex' Display the pixel index in each pixel 377 // 'sectorindex' Display the sector index in each pixel 378 // 'content' Display the relative content aligned to GetMaximum() and 379 // GeMinimum() ((val-min)/(max-min)) 371 380 // 372 381 void MHCamera::Draw(Option_t *option) … … 570 579 571 580 if (opt.Contains("pixelindex")) 572 PaintIndices( kFALSE);581 PaintIndices(0); 573 582 if (opt.Contains("sectorindex")) 574 PaintIndices(kTRUE); 583 PaintIndices(1); 584 if (opt.Contains("content")) 585 PaintIndices(2); 575 586 } 576 587 … … 632 643 } 633 644 634 void MHCamera::PaintIndices( Bool_t sector)645 void MHCamera::PaintIndices(Int_t type) 635 646 { 636 647 if (fNcells<=1) 648 return; 649 650 const Double_t min = GetMinimum(); 651 const Double_t max = GetMaximum(); 652 653 if (type==2 && max==min) 637 654 return; 638 655 … … 646 663 647 664 TString num; 648 num += sector ? h.GetSector() : i; 665 switch (type) 666 { 667 case 0: num += i; break; 668 case 1: num += h.GetSector(); break; 669 case 2: num += (Int_t)((fArray[i+1]-min)/(max-min)); break; 670 } 649 671 650 672 txt.SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05); -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r2557 r2563 30 30 public: 31 31 enum { 32 kProfile = BIT(18), 32 kProfile = BIT(18), // FIXME: When changing change max/min! 33 33 kFreezed = BIT(19), 34 34 kNoLegend = BIT(20) … … 59 59 Int_t GetColor(Float_t val, Float_t min, Float_t max, Bool_t islog); 60 60 61 void PaintIndices( Bool_t sector);61 void PaintIndices(Int_t type); 62 62 void Update(Bool_t islog, Bool_t isbox, Bool_t iscol); 63 63 void UpdateLegend(Float_t min, Float_t max, Bool_t islog); -
trunk/MagicSoft/Mars/mhist/MHEvent.cc
r2529 r2563 200 200 { 201 201 s += "Run #"; 202 s += fRawRunHeader->Get NumEvents();202 s += fRawRunHeader->GetRunNumber(); 203 203 } 204 204 -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
r2550 r2563 126 126 if (!evt) 127 127 { 128 *fLog << err << dbginf << " No MCamEvent found..." << endl;128 *fLog << err << dbginf << "Got no MCamEvent as argument of Fill()..." << endl; 129 129 return kFALSE; 130 130 }
Note:
See TracChangeset
for help on using the changeset viewer.