Changeset 3931
- Timestamp:
- 05/03/04 10:47:30 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3929 r3931 20 20 21 21 2004/05/03: Markus Gaug 22 23 * mpedestals/MPedestalPix.[h,cc] 24 - add a dedicated fValid flag in order to be able to discard pixels 25 from outside (e.g. from MBadPixelsCam) 26 27 * mpedestals/MPedCalcPedRun.[h,cc] 28 - catch badpixels cam from parameter list, if existing and set 29 corresponding pixels to not valid in MPedestalPix 22 30 23 31 * mjobs/MGCamDisplays.[h,cc] -
trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc
r3889 r3931 116 116 #include "MGeomCam.h" 117 117 118 #include "MBadPixelsPix.h" 119 #include "MBadPixelsCam.h" 120 118 121 #include "MGeomCamMagic.h" 119 122 … … 133 136 // 134 137 // Sets: 138 // - all pointers to NULL 135 139 // - fWindowSizeHiGain to fgHiGainWindowSize 136 140 // - fWindowSizeLoGain to fgLoGainWindowSize … … 144 148 MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title) 145 149 : fWindowSizeHiGain(fgHiGainWindowSize), 146 fWindowSizeLoGain(fgLoGainWindowSize) 150 fWindowSizeLoGain(fgLoGainWindowSize), 151 fGeom(NULL),fBad(NULL) 147 152 { 148 153 fName = name ? name : "MPedCalcPedRun"; … … 263 268 // - MRawRunHeader 264 269 // - MGeomCam 270 // - MBadPixelsCam 265 271 // 266 272 // The following output containers are also searched and created if … … 298 304 if (!fPedestals) 299 305 return kFALSE; 306 307 fBad = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 300 308 301 309 return kTRUE; … … 318 326 // modifying the ranges again, if necessary. 319 327 // 328 // A loop over the MBadPixelsCam is performed and bad pixels are set 329 // to MPedestalPix::SetValid(kFALSE); 330 // 320 331 Bool_t MPedCalcPedRun::ReInit(MParList *pList) 321 332 { … … 385 396 *fLog << inf << GetDescriptor() << ": Taking " << (int)fWindowSizeLoGain 386 397 << " 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 } 387 407 388 408 return kTRUE; 389 409 390 410 } 391 411 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.h
r3888 r3931 15 15 16 16 class MGeomCam; 17 class MBadPixelsCam; 17 18 class MPedCalcPedRun : public MExtractor 18 19 { … … 30 31 31 32 MGeomCam *fGeom; // Camera geometry 33 MBadPixelsCam *fBad; // Bad Pixels 32 34 33 35 TArrayF fSumx; // sum of values -
trunk/MagicSoft/Mars/mpedestal/MPedestalCam.cc
r3803 r3931 314 314 315 315 if (GetSize() <= idx) 316 return kFALSE; 317 318 if (!(*this)[idx].IsValid()) 316 319 return kFALSE; 317 320 -
trunk/MagicSoft/Mars/mpedestal/MPedestalPix.cc
r3803 r3931 17 17 ! 18 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 ! Markus Gaug 04/2004 <mailto:markus@ifae.es> 19 20 ! 20 ! Copyright: MAGIC Software Development, 2000-200 121 ! Copyright: MAGIC Software Development, 2000-2004 21 22 ! 22 23 ! … … 41 42 42 43 MPedestalPix::MPedestalPix() 44 : fValid(kTRUE) 43 45 { 44 46 Clear(); … … 52 54 void MPedestalPix::Clear(Option_t *o) 53 55 { 54 fPedestal = -1.;56 fPedestal = -1.; 55 57 fPedestalRms = -1.; 56 57 58 } 58 59 … … 60 61 { 61 62 62 fPedestal = 0.;63 fPedestal = 0.; 63 64 fPedestalRms = 0.; 64 65 } … … 67 68 void MPedestalPix::Set(Float_t m, Float_t r) 68 69 { 69 fPedestal = m;70 fPedestal = m; 70 71 fPedestalRms = r; 71 72 } … … 73 74 Bool_t MPedestalPix::IsValid() const 74 75 { 76 77 if (!fValid) 78 return kFALSE; 79 75 80 return fPedestal>=0||fPedestalRms>=0; 76 81 } -
trunk/MagicSoft/Mars/mpedestal/MPedestalPix.h
r3803 r3931 12 12 Float_t fPedestal; // mean value of pedestal (PMT offset) 13 13 Float_t fPedestalRms; // root mean square / sigma / standard deviation of pedestal 14 Bool_t fValid; // flag to set pixel valid 14 15 15 16 public: … … 26 27 27 28 void Set(const Float_t m, const Float_t r); 29 void SetValid(const Bool_t b=kTRUE) { fValid = b; } 28 30 29 31 // Getters
Note:
See TracChangeset
for help on using the changeset viewer.