Changeset 3047


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3043 r3047  
    66 2004/02/06: Thomas Bretz
    77
    8   * mhist/MHPixVsTime.[h,cc]:
    9     - changed such that you can set the name of the time container now
     8   * mhist/MHPixVsTime.[h,cc]:
     9     - changed such that you can set the name of the time container now
     10
     11   * mraw/MRawRunHeader.[h,cc]:
     12     - added GetMaxPixId()
     13
     14   * mraw/MRawEvtData.cc:
     15     - fixed wrong size calculation for fABflags
    1016
    1117
     
    1319 2004/02/06: Oscar Blanch
    1420
    15   * mmc/MFadcDefine.h && mmc/MMcFadcHeader.cxx
    16     - We cahnged the name (and values) of the global variable
    17        MFADC_RESPONSE_AMPLITUDE to  MFADC_RESPONSE_INTEGRAL
     21   * mmc/MFadcDefine.h && mmc/MMcFadcHeader.cxx
     22     - We cahnged the name (and values) of the global variable
     23        MFADC_RESPONSE_AMPLITUDE to  MFADC_RESPONSE_INTEGRAL
    1824
    1925
  • 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.