Ignore:
Timestamp:
12/02/08 11:23:24 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r8988 r9186  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.109 2008-06-30 09:36:38 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.110 2008-12-02 11:22:19 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    363363}
    364364
     365UInt_t MHCamera::GetNumUsedSector(const TArrayI &sector, const TArrayI &aidx) const
     366{
     367    if (fNcells<=1)
     368        return 0;
     369
     370    Int_t n=0;
     371 
     372    for (int i=0; i<fNcells-2; i++)
     373    {
     374        if (!IsUsed(i) || !MatchSector(i, sector, aidx))
     375            continue;
     376
     377        if (TestBit(kProfile) && fBinEntries[i+1]==0)
     378            continue;
     379        n++;
     380    }
     381
     382    // return Median of the profile data
     383    return n;
     384}
     385
    365386// ------------------------------------------------------------------------
    366387//
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r8988 r9186  
    11/* ======================================================================== *\
    2 !  $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.65 2008-06-30 09:36:38 tbretz Exp $
     2!  $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.66 2008-12-02 11:22:19 tbretz Exp $
    33\* ======================================================================== */
    44#ifndef MARS_MHCamera
     
    133133    void   SetUsed(Int_t idx)      { SETBIT(fUsed[idx], kIsUsed); }
    134134    void   SetAllUsed()            { fUsed.Reset(BIT(kIsUsed)); }
     135
     136    UInt_t GetNumUsedSector(const TArrayI &sector, const TArrayI &aidx) const;
     137    UInt_t GetNumUsed() const { return GetNumUsedSector(TArrayI(), TArrayI()); }
     138    UInt_t GetNumUsedSector(Int_t sector, Int_t aidx) const
     139    {
     140        return GetNumUsedSector(TArrayI(1, &sector), TArrayI(1, &aidx));
     141    }
     142
    135143
    136144    Int_t Fill(Axis_t x, Axis_t y, Stat_t w);
Note: See TracChangeset for help on using the changeset viewer.