Changeset 7109 for trunk/MagicSoft/Mars/mbadpixels
- Timestamp:
- 05/30/05 18:12:10 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbadpixels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc
r7094 r7109 136 136 Bool_t MBadPixelsCalc::CheckPedestalRms(MBadPixelsPix::UnsuitableType_t type) const 137 137 { 138 if (!fGeomCam || !fPedPhotCam || !fBadPixels) 139 { 140 *fLog << err << "MBadPixelsCalc::CheckPedestalRms: ERROR - One of the necessary container are not initialized..." << endl; 141 return kFALSE; 142 } 143 138 144 if (fPedestalLevel<=0 && fPedestalLevelVariance<=0) 139 145 return kTRUE; … … 247 253 // Check if the number of pixels to blind is > 60% of total number of pixels 248 254 // 249 // if (bads>0.6*entries)250 //{251 // fErrors[2]++;252 //return kFALSE;253 //}255 if (bads>0.5*entries) 256 { 257 *fLog << err << "ERROR - More than 50% unsuitable pixels... something must be wrong!" << endl; 258 return kFALSE; 259 } 254 260 255 261 return kTRUE; 262 } 263 264 Bool_t MBadPixelsCalc::CheckPedestalRms(MBadPixelsCam &cam, const MPedPhotCam &ped, MBadPixelsPix::UnsuitableType_t t) 265 { 266 MBadPixelsCam *store1 = fBadPixels; 267 const MPedPhotCam *store2 = fPedPhotCam; 268 269 fBadPixels = &cam; 270 fPedPhotCam = &ped; 271 272 const Bool_t rc = CheckPedestalRms(t); 273 274 fBadPixels = store1; 275 fPedPhotCam = store2; 276 277 return rc; 278 } 279 280 Bool_t MBadPixelsCalc::CheckPedestalRms(MBadPixelsCam &cam, const MPedestalCam &ped, MBadPixelsPix::UnsuitableType_t t) 281 { 282 return CheckPedestalRms(cam, MPedPhotCam(ped), t); 256 283 } 257 284 -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.h
r7094 r7109 12 12 class MGeomCam; 13 13 class MPedPhotCam; 14 class MPedestalCam; 14 15 15 16 class MBadPixelsCalc : public MTask 16 17 { 17 18 private: 18 MGeomCam *fGeomCam; //! Input container storing the pixel sizes19 MPedPhotCam *fPedPhotCam; //! Input container storing the pedestal and pedestal rms of all pixels20 MBadPixelsCam *fBadPixels; //! Output container holding the bad pixels19 const MGeomCam *fGeomCam; //! Input container storing the pixel sizes 20 const MPedPhotCam *fPedPhotCam; //! Input container storing the pedestal and pedestal rms of all pixels 21 MBadPixelsCam *fBadPixels; //! Output container holding the bad pixels 21 22 22 23 Float_t fPedestalLevel; … … 27 28 Bool_t fCheckInProcess; 28 29 Bool_t fCheckInPostProcess; 29 30 // MBadPixelsCalc31 Bool_t CheckPedestalRms(MBadPixelsPix::UnsuitableType_t t) const;32 30 33 31 // MTask … … 47 45 void SetNamePedPhotCam(const char *name) { fNamePedPhotCam = name; } 48 46 47 void SetGeomCam(const MGeomCam *geom) { fGeomCam = geom; } 48 49 49 void EnableCheckInProcess(Bool_t b=kTRUE) { fCheckInProcess = b; } 50 50 void EnableCheckInPostProcess(Bool_t b=kTRUE) { fCheckInPostProcess = b; } 51 52 // MBadPixelsCalc 53 Bool_t CheckPedestalRms(MBadPixelsPix::UnsuitableType_t t) const; 54 Bool_t CheckPedestalRms(MBadPixelsCam &cam, const MPedPhotCam &ped, MBadPixelsPix::UnsuitableType_t t=MBadPixelsPix::kUnsuitableRun); 55 Bool_t CheckPedestalRms(MBadPixelsCam &cam, const MPedestalCam &ped, MBadPixelsPix::UnsuitableType_t t=MBadPixelsPix::kUnsuitableRun); 51 56 52 57 ClassDef(MBadPixelsCalc, 1) // Task to find bad pixels (star, broken pixels, etc)
Note:
See TracChangeset
for help on using the changeset viewer.