#ifndef MARS_MBadPixelsTreat #define MARS_MBadPixelsTreat #ifndef MARS_MTask #include "MTask.h" #endif class MGeomCam; class MCerPhotEvt; class MPedPhotCam; class MBadPixelsCam; class MBadPixelsTreat : public MTask { private: MGeomCam *fGeomCam; //! MPedPhotCam *fPedPhot; //! MCerPhotEvt *fEvt; //! MBadPixelsCam *fBadPixels; //! Byte_t fFlags; // flag for the method which is used Byte_t fNumMinNeighbors; enum { kUseInterpolation = 1, kUseCentralPixel = 2, kProcessRMS = 3, kSloppyTreatment = 4 }; static Double_t Pow2(Double_t x) { return x*x; } void InterpolateSignal() const; void InterpolatePedestals() const; void Unmap() const; void StreamPrimitive(ofstream &out) const; Bool_t ReInit(MParList *pList); Int_t PreProcess(MParList *pList); Int_t Process(); Bool_t IsPixelBad(Int_t idx) const; public: MBadPixelsTreat(const char *name=NULL, const char *title=NULL); void SetUseInterpolation(Bool_t b=kTRUE) { b ? SETBIT(fFlags, kUseInterpolation) : CLRBIT(fFlags, kUseInterpolation); } void SetUseCentralPixel(Bool_t b=kTRUE) { b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel); } void SetProcessRMS(Bool_t b=kTRUE) { b ? SETBIT(fFlags, kProcessRMS) : CLRBIT(fFlags, kProcessRMS); } void SetSloppyTreatment(Bool_t b=kTRUE) { b ? SETBIT(fFlags, kSloppyTreatment) : CLRBIT(fFlags, kSloppyTreatment); } void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; } ClassDef(MBadPixelsTreat, 1) // Task to treat bad pixels (interpolation, unmapping) }; #endif