Changeset 6976 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 04/22/05 18:28:07 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc
r6961 r6976 32 32 33 33 #include <TCanvas.h> 34 #include <TPaveStats.h> 34 35 35 36 #include "MLog.h" … … 274 275 void MHCollectionArea::Paint(Option_t *option) 275 276 { 276 TVirtualPad *pad = gPad; 277 TVirtualPad *pad; 278 279 TPaveStats *st=0; 280 for (int x=0; x<4; x++) 281 { 282 pad=gPad->GetPad(x+1); 283 if (!pad || !(st = (TPaveStats*)pad->GetPrimitive("stats"))) 284 continue; 285 286 if (st->GetOptStat()==11) 287 continue; 288 289 const Double_t y1 = st->GetY1NDC(); 290 const Double_t y2 = st->GetY2NDC(); 291 const Double_t x1 = st->GetX1NDC(); 292 const Double_t x2 = st->GetX2NDC(); 293 294 st->SetY1NDC((y2-y1)/3+y1); 295 st->SetX1NDC((x2-x1)/3+x1); 296 st->SetOptStat(11); 297 } 298 299 pad = gPad; 277 300 278 301 TH1 *h1=0, *h2=0; … … 288 311 h2=fHistSel.ProjectionY("ProjSelY", -1, 9999, "E"); 289 312 290 if (h1 ->GetMaximum()>0)313 if (h1 && h1->GetMaximum()>0) 291 314 { 292 315 gPad->SetLogx(); -
trunk/MagicSoft/Mars/mhflux/MHCollectionArea.h
r6954 r6976 53 53 TH2D &GetHistAll() { return fHistAll; } 54 54 const TH2D &GetHistAll() const { return fHistAll; } 55 const TH2D &GetHistSel() const { return fHistSel; } 55 56 const TH1D &GetHEnergy() const { return fHEnergy; } 56 57
Note:
See TracChangeset
for help on using the changeset viewer.