Changeset 8411 for trunk/MagicSoft/Mars/mmovie/MMoviePrepare.cc
- Timestamp:
- 04/18/07 10:00:04 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmovie/MMoviePrepare.cc
r8406 r8411 49 49 // MPedestalSubtractedEvt 50 50 // MPedestalFundamental [MPedestalCam] 51 // MCalib rateData51 // MCalibConstCam 52 52 // MCalibrationRelTimeCam 53 53 // MRawRunHeader … … 75 75 #include "MPedestalPix.h" 76 76 77 #include "MCalibConstCam.h" 78 #include "MCalibConstPix.h" 77 79 78 80 #include "MCalibrationRelTimeCam.h" … … 82 84 #include "MMovieData.h" 83 85 #include "MRawRunHeader.h" 84 #include "MCalibrateData.h"85 86 #include "MPedestalSubtractedEvt.h" 86 87 … … 143 144 return kFALSE; 144 145 } 145 fCal = (MCalib rateData*)plist->FindTaskListWithTask("MCalibrateData")->FindTask("MCalibrateData");146 fCal = (MCalibConstCam*)plist->FindObject("MCalibConstCam"); 146 147 if (!fCal) 147 148 { 148 *fLog << err << "MCalib rateDatanot found ... aborting." << endl;149 *fLog << err << "MCalibConstCam not found ... aborting." << endl; 149 150 return kFALSE; 150 151 } … … 193 194 Double_t MMoviePrepare::GetMedianCalibConst() const 194 195 { 195 const MArrayF &calco = fCal->GetCalibConsts();196 197 196 Int_t n = fCam->GetNumPixWithAidx(0); 198 197 … … 201 200 for (UInt_t i=0; i<fCam->GetNumPixels(); i++) 202 201 if ((*fCam)[i].GetAidx()==0) 203 arr[--n] = calco[i];202 arr[--n] = (*fCal)[i].GetCalibConst(); 204 203 205 204 return TMath::Median(arr.GetSize(), arr.GetArray()); … … 246 245 247 246 // For invalid calib constants we can use the sector average 248 const MArrayF &calco = fCal->GetCalibConsts();249 247 const UShort_t npix = fEvt->GetNumPixels(); 250 248 const Double_t slope = 1./GetMedianCalibConst(); … … 258 256 259 257 const Float_t offset = tpix.GetTimeOffset(); 260 const Float_t cal = calco[p];258 const Float_t cal = (*fCal)[p].GetCalibConst(); 261 259 const Float_t *ptr = fEvt->GetSamples(p)+fFirstSlice; 262 260 const Float_t scale = cal*slope*fCam->GetPixRatio(p); … … 290 288 // 291 289 // Example: 292 // MMovie wPrepare.FirstSlice: 10293 // MMovie wPrepare.LastSlice: 50290 // MMoviePrepare.FirstSlice: 10 291 // MMoviePrepare.LastSlice: 50 294 292 // 295 293 Int_t MMoviePrepare::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
Note:
See TracChangeset
for help on using the changeset viewer.