Changeset 8140 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 10/20/06 19:26:01 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r7829 r8140 167 167 fIntensConst = (MCalibrationIntensityConstCam*) pList->FindCreateObj("MCalibrationIntensityConstCam"); 168 168 169 if (!fIntensCharge) 170 return kFALSE; 171 if (!fIntensQE) 172 return kFALSE; 173 if (!fIntensConst) 174 return kFALSE; 175 176 169 177 MCalibrationChargeCam *chargeinit = (MCalibrationChargeCam*)pList->FindObject("MCalibrationChargeCam"); 170 178 MCalibrationQECam *qeinit = (MCalibrationQECam*) pList->FindObject("MCalibrationQECam"); … … 190 198 *fLog << inf << "Found MHCalibrationChargeCam ... " << flush; 191 199 192 if (!fIntensCharge)193 {194 *fLog << err << "Could not find nor create MCalibrationIntensityChargeCam abort... " << endl;195 return kFALSE;196 }197 198 if (!fIntensQE)199 {200 *fLog << err << "Could not find nor create MCalibrationIntensityQECam abort... " << endl;201 return kFALSE;202 }203 204 200 if (!fChargeCalc) 205 201 { … … 388 384 const Int_t runnumber = fRunHeader->GetRunNumber(); 389 385 386 // The "DeleteOldCam" function must not delete the first entry in 387 // the array because it is a special cam from the MParList. (see above) 388 390 389 if (fIntensBad) 391 { 390 { 391 *fLog << "MBadPixelsCam..."; 392 MBadPixelsCam *cold = fIntensBad->GetCam(); 392 393 fIntensBad->AddToList(Form("MBadPixelsCam%04d",fNumCam),*fGeom); 393 *fLog << "MBadPixelsCam..."; 394 } 394 if (cold) 395 fIntensBad->DeleteOldCam(cold); 396 } 395 397 396 398 if (fIntensCharge) 397 { 399 { 400 *fLog << "MCalibrationChargeCam..."; 398 401 MCalibrationChargeCam *cold = (MCalibrationChargeCam*)fIntensCharge->GetCam(); 399 402 … … 404 407 405 408 if (cold) 409 { 406 410 cnew->MergeHiLoConversionFactors(*cold); 407 408 *fLog << "MCalibrationChargeCam..."; 409 } 411 fIntensCharge->DeleteOldCam(cold); 412 } 413 } 414 410 415 if (fIntensQE) 411 { 416 { 417 *fLog << "MCalibrationQECam..."; 418 MCalibrationCam *cold = fIntensQE->GetCam(); 412 419 fIntensQE->AddToList(Form("MCalibrationQECam%04d",fNumCam),*fGeom); 413 420 fIntensQE->GetCam()->SetRunNumber(runnumber); 414 *fLog << "MCalibrationQECam..."; 415 } 421 if (cold) 422 fIntensQE->DeleteOldCam(cold); 423 } 416 424 if (fIntensBlind) 417 { 425 { 426 *fLog << "MCalibrationBlindCam..."; 427 MCalibrationCam *cold = fIntensBlind->GetCam(); 418 428 fIntensBlind->AddToList(Form("MCalibrationBlindCam%04d",fNumCam),*fGeom); 419 429 fIntensBlind->GetCam()->SetRunNumber(runnumber); 420 *fLog << "MCalibrationBlindCam..."; 421 } 430 if (cold) 431 fIntensBlind->DeleteOldCam(cold); 432 } 422 433 423 434 *fLog << endl; -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc
r7804 r8140 289 289 // Get camera with name 'name' 290 290 // 291 /* 291 292 MCalibrationCam *MCalibrationIntensityCam::GetCam(const char *name) 292 293 { … … 302 303 return static_cast<MCalibrationCam*>(fCams->FindObject(name)); 303 304 } 304 305 */ 305 306 // -------------------------------------------------------------------------- 306 307 // -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.h
r7189 r8140 42 42 void AddHist(const MHCalibrationCam *cam); 43 43 44 Int_t CountNumEntries(const MCalibrationCam::PulserColor_t col) const; 44 Int_t CountNumEntries(const MCalibrationCam::PulserColor_t col) const; 45 45 46 46 const Int_t GetSize() const { return fCams->GetSize(); } … … 57 57 const MBadPixelsPix &GetAverageBadSector ( UInt_t i ) const { return GetCam()->GetAverageBadSector(i); } 58 58 59 MCalibrationCam *GetCam ( Int_t i=-1) { 60 61 const MCalibrationCam *GetCam ( Int_t i =-1) const {62 59 MCalibrationCam *GetCam ( Int_t i/*=-1*/) { 60 return static_cast<MCalibrationCam*>(i==-1 ? fCams->Last() : fCams->At(i)); } 61 const MCalibrationCam *GetCam ( Int_t i/*=-1*/) const { 62 return static_cast<MCalibrationCam*>(i==-1 ? fCams->Last() : fCams->At(i)); } 63 63 64 MCalibrationCam *GetCam ( const char *name ); 65 const MCalibrationCam *GetCam ( const char *name ) const; 64 MCalibrationCam *GetCam() { return static_cast<MCalibrationCam*>(fCams->Last()); } 65 const MCalibrationCam *GetCam() const { return static_cast<MCalibrationCam*>(fCams->Last()); } 66 67 // MCalibrationCam *GetCam ( const char *name ); 68 // const MCalibrationCam *GetCam ( const char *name ) const; 69 70 // The "DeleteOldCam" function must not delete the first entry in 71 // the array because it is a special cam from the MParList. (see above) 72 void DeleteOldCam(MCalibrationCam *cam) { /* if (fCams->IndexOf(cam)>0) delete fCams->Remove(cam);*/ } 66 73 67 74 MHCalibrationCam *GetHist ( Int_t i=-1);
Note:
See TracChangeset
for help on using the changeset viewer.