Changeset 8669 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 08/15/07 18:06:11 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH3.cc
r8082 r8669 18 18 ! Author(s): Thomas Bretz 2002 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 220 ! Copyright: MAGIC Software Development, 2000-2007 21 21 ! 22 22 ! … … 41 41 // "MyHillas.fLength" 42 42 // 43 // If you want to use a different unit for histogramming use SetScaleX, 44 // SetScaleY and SetScaleZ. 45 // 46 // 47 // Binning name 48 // ============ 49 // 43 50 // The axis binning is retrieved from the parameter list, too. Create a 44 51 // MBinning with the name "Binning" plus the name of your MH3 container 45 52 // plus the axis name ("X", "Y" or "Z") and add it to the parameter list. 46 53 // 47 // If you want to use a different unit for histogramming use SetScaleX, 48 // SetScaleY and SetScaleZ. 54 // If the binning should have a different name than the histogram name 55 // the binning name can be added to the name, eg.: 56 // SetName("MyHistName;MyBinning") 57 // Instead of BinningMyHistName[XYZ] the parameter list will be searched 58 // for BinningMyBinning[XYZ]. 49 59 // 50 60 // … … 59 69 // the axis titles. For more information see TH1::SetTitle, eg. 60 70 // SetTitle("MyHist;x[mm];y[cm];Counts"); 71 // 61 72 // 62 73 // For example: … … 301 312 fHist->Reset(); 302 313 314 const Int_t split = fName.First(';'); 315 316 const TString name = split<0 ? fName : fName(0, split); 317 const TString bins = split<0 ? fName : fName(split+1, fName.Length()); 318 303 319 TString bname("Binning"); 304 bname += fName;320 bname += bins; 305 321 306 322 MBinning *binsx = NULL; … … 364 380 365 381 TString title("Histogram for "); 366 title += fName;382 title += name; 367 383 title += Form(" (%dD)", fDimension); 368 384 369 fHist->SetName( fName);385 fHist->SetName(name); 370 386 fHist->SetTitle(fTitle==gsDefTitle ? title : fTitle); 371 387 fHist->SetDirectory(0); … … 577 593 578 594 const Bool_t only = str.Contains("only") && fDimension==2; 579 const Bool_t same = str.Contains("same") && fDimension ==2;595 const Bool_t same = str.Contains("same") && fDimension<3; 580 596 const Bool_t blue = str.Contains("blue") && fDimension==2; 581 597 const Bool_t profx = str.Contains("profx") && fDimension==2; … … 587 603 str.ReplaceAll("profy", ""); 588 604 str.ReplaceAll(" ", ""); 605 606 if (same && fDimension==1) 607 { 608 fHist->SetLineColor(kBlue); 609 fHist->SetMarkerColor(kBlue); 610 } 589 611 590 612 // FIXME: We may have to remove all our own options from str!
Note:
See TracChangeset
for help on using the changeset viewer.