Ignore:
Timestamp:
08/17/04 13:31:40 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpedestal
Files:
2 edited

Legend:

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

    r4609 r4648  
    357357        return kFALSE;
    358358
     359    if (fNumEventsDump<=0 && fPedestalUpdate)
     360    {
     361        *fLog << warn << "Pedestal Update switched on and Number of Events to dump <= 0... fNumEventsDump=1000" << endl;
     362        fNumEventsDump=1000;
     363    }
     364
    359365    return kTRUE;
    360366}
     
    518524        // Calculate the amplitude of the 150MHz "AB" noise
    519525
    520         Int_t abFlag = (fRunHeader->GetNumSamplesHiGain()
    521                         + fLoGainFirst
    522                         + pixel.HasABFlag()) & 0x1;
    523         for (Int_t islice=0; islice<fWindowSizeLoGain; islice+=2)
     526        if (pixel.IsABFlagValid())
    524527        {
    525             Int_t sliceAB0 = islice + abFlag;
    526             Int_t sliceAB1 = islice - abFlag + 1;
    527             fSumAB0[idx] += firstSlice[sliceAB0];
    528             fSumAB1[idx] += firstSlice[sliceAB1];
     528            const Int_t abFlag = (fRunHeader->GetNumSamplesHiGain()
     529                                  + fLoGainFirst + pixel.HasABFlag()) & 0x1;
     530            for (Int_t islice=0; islice<fWindowSizeLoGain; islice+=2)
     531            {
     532                const Int_t sliceAB0 = islice + abFlag;
     533                const Int_t sliceAB1 = islice - abFlag + 1;
     534                fSumAB0[idx] += firstSlice[sliceAB0];
     535                fSumAB1[idx] += firstSlice[sliceAB1];
     536            }
    529537        }
    530538
     
    543551    if (fPedestalUpdate)
    544552    {
    545         fPedestals->ReCalc(*fGeom);
     553        //fPedestals->ReCalc(*fGeom);
    546554        fPedestals->SetReadyToSave();
    547555    }
     
    606614    if (IsEnvDefined(env, prefix, "NumEventsDump", print))
    607615    {
    608         SetDumpEvents(GetEnvValue(env, prefix, "NumEventsDump", fNumEventsDump));
     616        SetNumEventsDump(GetEnvValue(env, prefix, "NumEventsDump", fNumEventsDump));
    609617        rc = kTRUE;
    610618    }
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.h

    r4609 r4648  
    6565    void SetWindowSize(Byte_t windowh=fgHiGainWindowSize, Byte_t windowl=fgLoGainWindowSize);
    6666    void SetMaxHiGainVar(Byte_t maxvar=fgMaxHiGainVar);
    67     void SetDumpEvents(UInt_t dumpevents = 0) {fNumEventsDump = dumpevents;}
     67    void SetNumEventsDump(UInt_t dumpevents = 0) { fNumEventsDump = dumpevents; }
    6868    void SetPedestalUpdate(Bool_t pedupdate)  {fPedestalUpdate = pedupdate;}
    6969
Note: See TracChangeset for help on using the changeset viewer.