Ignore:
Timestamp:
07/06/03 14:24:09 (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

    r2244 r2264  
    480480        return kFALSE;
    481481
    482     val = Next.GetSumHiGainSamples()-(float)GetNumHiGainSamples()*fHiGainFadcSamples->GetArray()[0];
    483     val *= cam.GetPixRatio(idx);
     482    switch (type)
     483    {
     484    case 0:
     485        val = Next.GetSumHiGainSamples()-(float)GetNumHiGainSamples()*fHiGainFadcSamples->GetArray()[0];
     486        val*= cam.GetPixRatio(idx);
     487        break;
     488    case 1:
     489        val = Next.GetMaxHiGainSample();
     490        break;
     491    case 2:
     492        val = Next.GetMaxLoGainSample();
     493        break;
     494    }
    484495
    485496    return kTRUE;
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc

    r2259 r2264  
    247247// --------------------------------------------------------------------------
    248248//
     249// Returns the maximum signal of all sliced in the hi gain samples
     250//
     251Byte_t MRawEvtPixelIter::GetMaxHiGainSample() const
     252{
     253    Byte_t max = 0;
     254
     255    for (int i=0; i<fNumHiGainSamples; i++)
     256        if (fHiGainPos[i]>max)
     257            max = fHiGainPos[i];
     258
     259    return max;
     260}
     261
     262// --------------------------------------------------------------------------
     263//
     264// Returns the maximum signal of all sliced in the hi gain samples
     265//
     266Byte_t MRawEvtPixelIter::GetMaxLoGainSample() const
     267{
     268    Byte_t max = 0;
     269
     270    for (int i=fNumLoGainSamples-1; i>=0; i--)
     271        if (fLoGainPos[i]>max)
     272            max = fLoGainPos[i];
     273
     274    return max;
     275}
     276
     277// --------------------------------------------------------------------------
     278//
    249279// returns the sum of all lo gain fadc samples of the actual pixel.
    250280// if no lo gain information is available 0 is returned.
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.h

    r2236 r2264  
    8383    Byte_t GetNumMaxHiGainSample() const;
    8484    Byte_t GetNumMaxLoGainSample() const;
     85    Byte_t GetMaxHiGainSample() const;
     86    Byte_t GetMaxLoGainSample() const;
    8587
    8688    Bool_t HasLoGain() const
Note: See TracChangeset for help on using the changeset viewer.