Ignore:
Timestamp:
05/03/04 10:47:30 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r3889 r3931  
    116116#include "MGeomCam.h"
    117117
     118#include "MBadPixelsPix.h"
     119#include "MBadPixelsCam.h"
     120
    118121#include "MGeomCamMagic.h"
    119122
     
    133136//
    134137// Sets:
     138// - all pointers to NULL
    135139// - fWindowSizeHiGain to fgHiGainWindowSize
    136140// - fWindowSizeLoGain to fgLoGainWindowSize
     
    144148MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title)
    145149    : fWindowSizeHiGain(fgHiGainWindowSize),
    146       fWindowSizeLoGain(fgLoGainWindowSize)
     150      fWindowSizeLoGain(fgLoGainWindowSize),
     151      fGeom(NULL),fBad(NULL)
    147152{
    148153  fName  = name  ? name  : "MPedCalcPedRun";
     
    263268//  - MRawRunHeader
    264269//  - MGeomCam
     270//  - MBadPixelsCam
    265271//
    266272// The following output containers are also searched and created if
     
    298304  if (!fPedestals)
    299305    return kFALSE;
     306
     307  fBad       =  (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
    300308
    301309  return kTRUE;
     
    318326// modifying the ranges again, if necessary.
    319327//
     328// A loop over the MBadPixelsCam is performed and bad pixels are set
     329// to MPedestalPix::SetValid(kFALSE);
     330//
    320331Bool_t MPedCalcPedRun::ReInit(MParList *pList)
    321332{
     
    385396  *fLog << inf << GetDescriptor() << ": Taking " << (int)fWindowSizeLoGain
    386397        << " LoGain FADC samples starting with slice: " << (int)fLoGainFirst << endl;
     398
     399
     400  if (fBad)
     401    {
     402      const Int_t nbads = fBad->GetSize();
     403      for (Int_t i=0; i<(nbads>npixels?npixels:nbads);i++)
     404        if ((*fBad)[i].IsBad())
     405          (*fPedestals)[i].SetValid(kFALSE);
     406    }
    387407 
    388408  return kTRUE;
    389  
     409     
    390410}
    391411// --------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.