Changeset 8484 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 05/10/07 13:16:56 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r8423 r8484 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.10 3 2007-04-20 08:55:19tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.104 2007-05-10 12:14:54 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 514 514 // ------------------------------------------------------------------------ 515 515 // 516 // Return the number of bins (excluding under- and overflow) for which 517 // GetBinContent returns a value > t 518 // 519 Int_t MHCamera::GetNumBinsAboveThreshold(Double_t t) const 520 { 521 Int_t n = 0; 522 for (Int_t i=0; i<fNcells-2; i++) 523 if (GetBinContent(i+1)>t) 524 n++; 525 526 return n; 527 } 528 529 // ------------------------------------------------------------------------ 530 // 531 // Return the number of bins (excluding under- and overflow) for which 532 // GetBinContent returns a value < t 533 // 534 Int_t MHCamera::GetNumBinsBelowThreshold(Double_t t) const 535 { 536 Int_t n = 0; 537 for (Int_t i=0; i<fNcells-2; i++) 538 if (GetBinContent(i+1)>t) 539 n++; 540 541 return n; 542 } 543 544 // ------------------------------------------------------------------------ 545 // 516 546 // Call this function to draw the camera layout into your canvas. 517 547 // Setup a drawing canvas. Add this object and all child objects -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r8284 r8484 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.6 3 2007-02-01 14:42:02tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.64 2007-05-10 12:14:54 tbretz Exp $ 3 3 \* ======================================================================== */ 4 4 #ifndef MARS_MHCamera … … 40 40 public: 41 41 enum { 42 // DO NOT USE BIT(14) (MStatusArray WORKAROUND!) 43 // BIT(15)/BIT(16)/BIT(17) used by TH1 42 44 kProfile = BIT(18), // FIXME: When changing change max/min! 43 45 kFreezed = BIT(19), … … 45 47 kNoScale = BIT(21), 46 48 kNoUnused = BIT(22), 47 kErrorMean = BIT(23)/*, 49 kErrorMean = BIT(23)/*, // NO MORE BITS ALLOWED! 48 50 kSqrtVariance = BIT(21), 49 51 kSinglePixelProfile = BIT(22)*/ … … 197 199 Double_t GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball=kFALSE) const; 198 200 Double_t GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball=kFALSE) const; 201 202 Int_t GetNumBinsAboveThreshold(Double_t t=0) const; 203 Int_t GetNumBinsBelowThreshold(Double_t t=0) const; 199 204 200 205 void SetLevels(const TArrayF &arr);
Note:
See TracChangeset
for help on using the changeset viewer.