Ignore:
Timestamp:
02/06/04 18:12:17 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mraw
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r2655 r3047  
    399399        fHiGainFadcSamples = new MArrayB(npix*fRunHeader->GetNumSamplesHiGain());
    400400        fLoGainFadcSamples = new MArrayB(npix*fRunHeader->GetNumSamplesLoGain());
    401         fABFlags           = new TArrayC((npix-1)/8+1);
     401        fABFlags           = new TArrayC(fRunHeader->GetMaxPixId());
    402402
    403403        fArraySize  = npix;
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc

    r2984 r3047  
    235235}
    236236
     237// --------------------------------------------------------------------------
     238//
     239// Return the number of pixel which are markes as connected in the
     240// pix assignment (>0)
     241//
    237242UShort_t MRawRunHeader::GetNumConnectedPixels() const
    238243{
     
    241246    UShort_t rc = 0;
    242247    for (int i=0; i<num; i++)
     248    {
    243249        if (GetPixAssignment(i)>0)
    244250            rc++;
     251    }
     252    return rc;
     253}
     254
     255// --------------------------------------------------------------------------
     256//
     257// Return the maximum id which exists in the pix assignment
     258//
     259UShort_t MRawRunHeader::GetMaxPixId() const
     260{
     261    const Int_t num = fPixAssignment->GetSize();
     262
     263    UShort_t rc = 0;
     264    for (int i=0; i<num; i++)
     265        rc = TMath::Max(GetPixAssignment(i), rc);
     266
    245267    return rc;
    246268}
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.h

    r2984 r3047  
    9393    const MTime &GetRunEnd() const        { return fRunStop; }
    9494    UShort_t GetPixAssignment(UShort_t i) const;
     95    UShort_t GetMaxPixId() const;
    9596    UShort_t GetNumConnectedPixels() const;
    9697
Note: See TracChangeset for help on using the changeset viewer.