Changeset 7353 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 09/16/05 11:58:09 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r7189 r7353 542 542 { 543 543 skip++; 544 calibConv = -1.; 545 continue; 544 continue; // calibConv will remain 0 546 545 } 547 546 … … 679 678 calibConv = -1.; 680 679 calibFFactor = -1.; 681 *fLog << warn << "Conversion factor of Pixel " << pixidx << " out of range " << endl; 680 *fLog << warn << GetDescriptor() 681 << ": WARNING - Conversion factor of Pixel " << pixidx << " out of range... set to 0. " << endl; 682 682 } 683 683 cpix.SetCalibConst(calibConv); -
trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.cc
r7134 r7353 86 86 Int_t MCalibrateRelTimes::PreProcess(MParList *pList) 87 87 { 88 89 88 fSignals = (MArrivalTimeCam*)pList->FindObject(AddSerialNumber("MArrivalTimeCam")); 90 89 91 90 if (!fSignals) 92 91 { 93 *fLog << err << AddSerialNumber("MArrivalTimeCam") << " not found ... aborting" << endl;92 *fLog << err << AddSerialNumber("MArrivalTimeCam") << " not found ... aborting" << endl; 94 93 return kFALSE; 95 94 } … … 97 96 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 98 97 if (!fBadPixels) 99 *fLog << warn << AddSerialNumber("MBadPixelsCam") << " not found ... no action" << endl; 100 98 *fLog << warn << AddSerialNumber("MBadPixelsCam") << " not found ... ignoring." << endl; 101 99 102 100 fCalibrations = (MCalibrationRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam")); … … 106 104 return kFALSE; 107 105 } 108 109 106 110 107 fArrivalTime = (MSignalCam*)pList->FindCreateObj(AddSerialNumber("MSignalCam")); … … 124 121 const UInt_t npix = fSignals->GetSize(); 125 122 126 for (UInt_t pixidx=0; pixidx<npix; pixidx++)123 for (UInt_t idx=0; idx<npix; idx++) 127 124 { 128 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCalibrations)[pixidx]; 129 130 if (fBadPixels && (*fBadPixels)[pixidx].IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 125 if (fBadPixels && (*fBadPixels)[idx].IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 131 126 continue; 132 127 133 const Float_t offset = pix.GetTimeOffset(); 128 const MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCalibrations)[idx]; 129 const MArrivalTimePix &sig = (*fSignals)[idx]; 134 130 135 MArrivalTimePix &sig = (*fSignals)[pixidx]; 131 const Float_t signal = sig.GetArrivalTime(); 132 const Float_t offset = pix.GetTimeOffset(); 136 133 137 Float_t signal; 138 139 if (sig.IsLoGainUsed()) 140 signal = sig.GetArrivalTimeLoGain(); 141 else 142 signal = sig.GetArrivalTimeHiGain(); 143 144 const Float_t time = signal - offset; 145 146 (*fArrivalTime)[pixidx].SetArrivalTime(time); 147 148 } /* for (UInt_t pixidx=0; pixidx<npix; pixidx++) */ 134 (*fArrivalTime)[idx].SetArrivalTime(signal - offset); 135 } 149 136 150 137 fArrivalTime->SetReadyToSave();
Note:
See TracChangeset
for help on using the changeset viewer.