Changeset 6963 for trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc
- Timestamp:
- 04/20/05 11:59:48 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc
r6926 r6963 51 51 52 52 #include "MHCalibrationCam.h" 53 #include "MCalibrationC am.h"53 #include "MCalibrationChargeCam.h" 54 54 #include "MCalibrationBlindCam.h" 55 55 … … 61 61 #include "MBadPixelsIntensityCam.h" 62 62 63 #include "MCalibrationChargeCam.h" 63 64 #include "MCalibrationChargeCalc.h" 64 65 #include "MCalibrationRelTimeCalc.h" 65 66 66 67 #include "MRawRunHeader.h" 67 #include "MRawEvtHeader.h"68 68 #include "MCalibrationPattern.h" 69 69 … … 81 81 : fCalibPattern(NULL), fGeom(NULL), fParList(NULL), 82 82 fIntensCharge(NULL), fIntensRelTime(NULL), fIntensBad(NULL), 83 fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL) , fPattern(0)83 fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL) 84 84 { 85 85 … … 109 109 { 110 110 *fLog << err << "MRawRunHeader not found... abort." << endl; 111 return kFALSE;112 }113 114 fEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");115 if (!fEvtHeader)116 {117 *fLog << err << "MRawEvtHeader not found... abort." << endl;118 111 return kFALSE; 119 112 } … … 228 221 } 229 222 } 223 224 fColor = MCalibrationCam::kNONE; 225 fStrength = 0.; 230 226 231 227 return kTRUE; … … 241 237 { 242 238 243 const UInt_t pattern = fEvtHeader->GetPulserSlotPattern(); 244 245 if (fPattern == 0) 246 { 247 fPattern = pattern; 239 const MCalibrationCam::PulserColor_t col = fCalibPattern->GetPulserColor(); 240 const Float_t strength = fCalibPattern->GetPulserStrength(); 241 242 if (fColor ==MCalibrationCam::kNONE) 243 { 244 fColor = col; 245 fStrength = strength; 248 246 return kTRUE; 249 247 } 250 248 251 if (pattern == 0 || pattern == fPattern) 249 const Float_t strdiff = TMath::Abs(fStrength-strength); 250 251 if (col == MCalibrationCam::kNONE || (col == fColor && strdiff < 0.05)) 252 252 return kTRUE; 253 253 254 *fLog << inf << GetDescriptor() << " : old pattern: " << fPattern << flush; 255 256 fPattern = pattern; 257 258 *fLog << " : new pattern: " << pattern << flush; 254 *fLog << inf << GetDescriptor() << " : Color - old=" << fColor << flush; 255 fColor = col; 256 *fLog << " / new=" << fColor << endl; 257 258 *fLog << inf << GetDescriptor() << " : Strength - old=" << fStrength << flush; 259 fStrength = strength; 260 *fLog << " / new=" << fStrength << endl; 259 261 260 262 // … … 325 327 if (fIntensCharge) 326 328 { 329 MCalibrationChargeCam *oldcam = (MCalibrationChargeCam*)fIntensCharge->GetCam(); 327 330 fIntensCharge->AddToList(Form("MCalibrationChargeCam%s",namep.Data()),*fGeom); 328 MCalibrationC am *cam =fIntensCharge->GetCam();331 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)fIntensCharge->GetCam(); 329 332 cam->SetPulserColor(fCalibPattern->GetPulserColor()); 333 if (!cam->CopyHiLoConversionFactors(*oldcam)) 334 return kFALSE; 330 335 *fLog << inf << "New MCalibrationChargeCam with name: " << cam->GetName() << endl; 331 336 }
Note:
See TracChangeset
for help on using the changeset viewer.