Ignore:
Timestamp:
03/04/07 12:01:41 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpedestal
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc

    r8343 r8361  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.36 2007-03-01 21:20:41 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.37 2007-03-04 12:00:30 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    214214        return kFALSE;
    215215
    216     CheckExtractionWindow(fRunHeader->GetNumSamplesHiGain());
     216    const Int_t nhi = fRunHeader->GetNumSamplesHiGain();
     217    const Int_t nlo = fRunHeader->GetNumSamplesLoGain();
     218    CheckExtractionWindow(nlo>0?nhi:0);
    217219
    218220    return kTRUE;
     
    227229Int_t MPedCalcFromLoGain::Calc()
    228230{
     231    const Int_t nhi = fRunHeader->GetNumSamplesHiGain();
     232    const Int_t nlo = fRunHeader->GetNumSamplesLoGain();
     233
    229234    // Real Process
    230235    MRawEvtPixelIter pixel(fRawEvt);
    231 
    232236    while (pixel.Next())
    233237    {
     
    240244        UInt_t ab[2];
    241245        const Float_t sum = fExtractor ?
    242             CalcExtractor(pixel, pixel.GetNumHiGainSamples()) :
    243             CalcSums(pixel, pixel.GetNumHiGainSamples(), ab[0], ab[1]);
     246            CalcExtractor(pixel, nlo>0?nhi:0) :
     247            CalcSums(pixel, nlo>0?nhi:0, ab[0], ab[1]);
    244248
    245249        const UInt_t aidx   = (*fGeom)[idx].GetAidx();
  • trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.cc

    r8250 r8361  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtractedEvt.cc,v 1.2 2007-01-15 12:06:15 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MPedestalSubtractedEvt.cc,v 1.3 2007-03-04 12:01:37 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    105105    Byte_t *p0 = GetSamplesRaw(idx);
    106106
    107     Byte_t *sathi0 = 0; // first saturating hi-gain slice
    108     Byte_t *sathi1 = 0; // last  saturating hi-gain slice
     107    Byte_t *sat0 = 0; // first saturating slice
     108    Byte_t *sat1 = 0; // last  saturating slice
    109109
    110110    Int_t num = 0;
     
    115115        if (*ptr>=limit)
    116116        {
    117             sathi1 = ptr;
    118             if (!sathi0)
    119                 sathi0 = ptr;
     117            sat1 = ptr;
     118            if (!sat0)
     119                sat0 = ptr;
    120120            num++;
    121121        }
    122122    }
    123123
    124     last  = sathi1 ? sathi1-p0 : -1;
    125     first = sathi0 ? sathi0-p0 : -1;
     124    last  = sat1 ? sat1-p0 : -1;
     125    first = sat0 ? sat0-p0 : -1;
    126126
    127127    return num;
     
    138138// Warning: No range checks and no sanity checks are done!
    139139//
    140 Int_t MPedestalSubtractedEvt::GetMax(const Int_t idx, const Int_t first, const Int_t last, Int_t &val) const
     140Int_t MPedestalSubtractedEvt::GetMax(const Int_t idx, const Int_t first, const Int_t last, UInt_t &val) const
    141141{
    142142    // Get pointer to first slice to be considered
  • trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.h

    r8350 r8361  
    4141    Int_t GetSaturation(const Int_t idx, Int_t limit, Int_t &first, Int_t &last) const;
    4242    //void  InterpolateSaturation(const Int_t idx, Int_t limit, Int_t first, Int_t last) const;
    43     Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last, Int_t &val) const;
     43    Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last, UInt_t &val) const;
    4444    Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last) const
    4545    {
    46         Int_t val;
     46        UInt_t val;
    4747        return GetMax(pixidx, first, last, val);
    4848    }
    49     Int_t GetMax(const Int_t pixidx, Int_t &val) const
     49    Int_t GetMax(const Int_t pixidx, UInt_t &val) const
    5050    {
    5151        return GetMax(pixidx, 0, fNumSamples, val);
     
    5454    Int_t GetMax(const Int_t pixidx) const
    5555    {
    56         Int_t val;
     56        UInt_t val;
    5757        return GetMax(pixidx, 0, fNumSamples, val);
    5858    }
Note: See TracChangeset for help on using the changeset viewer.