Changeset 4271 for trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
- Timestamp:
- 06/03/04 10:24:57 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r4206 r4271 88 88 // 89 89 MCalibrationCam::MCalibrationCam(const char *name, const char *title) 90 : f NumHiGainFADCSlices(0.), fNumLoGainFADCSlices(0.), fPulserColor(kNONE),90 : fPulserColor(kNONE), 91 91 fPixels(NULL), fAverageAreas(NULL), fAverageSectors(NULL) 92 92 { 93 fName = name ? name : "MCalibrationCam"; 94 fTitle = title ? title : "Base class Storage container for Camera Calibration";95 96 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1); 97 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1);98 93 94 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1); 95 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1); 96 97 fNumHiGainFADCSlices.Set(1); 98 fNumLoGainFADCSlices.Set(1); 99 99 } 100 100 … … 174 174 175 175 MCalibrationCam &calib = (MCalibrationCam&)object; 176 177 MParContainer::Copy(object); 178 179 calib.fNumHiGainFADCSlices = fNumHiGainFADCSlices; 180 calib.fNumLoGainFADCSlices = fNumLoGainFADCSlices; 176 177 MParContainer::Copy(calib); 178 181 179 calib.fPulserColor = fPulserColor; 182 180 183 181 const Int_t n3 = GetSize(); 184 182 if (n3 != 0) … … 188 186 (*this)[i].Copy(calib[i]); 189 187 } 190 188 191 189 const Int_t n4 = GetAverageAreas(); 192 190 if (n4 != 0) … … 194 192 calib.InitAverageAreas(n4); 195 193 for (int i=0; i<n4; i++) 196 GetAverageArea(i).Copy(calib.GetAverageArea(i)); 197 for (int i=0; i<n4; i++) 198 GetAverageBadArea(i).Copy(calib.GetAverageBadArea(i)); 199 for (int i=0; i<n4; i++) 200 calib.fNumUnsuitable[i] = fNumUnsuitable[i]; 201 for (int i=0; i<n4; i++) 202 calib.fNumUnreliable[i] = fNumUnreliable[i]; 194 { 195 GetAverageArea (i).Copy(calib.GetAverageArea(i)); 196 GetAverageBadArea(i).Copy(calib.GetAverageBadArea(i)); 197 calib.fNumUnsuitable [i] = fNumUnsuitable[i]; 198 calib.fNumUnreliable [i] = fNumUnreliable[i]; 199 calib.fNumHiGainFADCSlices[i] = fNumHiGainFADCSlices[i]; 200 calib.fNumLoGainFADCSlices[i] = fNumLoGainFADCSlices[i]; 201 } 203 202 } 204 203 … … 208 207 calib.InitAverageSectors(n5); 209 208 for (int i=0; i<n5; i++) 210 GetAverageSector(i).Copy(calib.GetAverageSector(i)); 211 for (int i=0; i<n5; i++) 212 GetAverageBadSector(i).Copy(calib.GetAverageBadSector(i)); 209 { 210 GetAverageSector (i).Copy(calib.GetAverageSector(i)); 211 GetAverageBadSector(i).Copy(calib.GetAverageBadSector(i)); 212 } 213 213 } 214 215 } 216 214 } 217 215 218 216 // ------------------------------------------------------------------- … … 241 239 fNumUnsuitable.Set(i); 242 240 fNumUnreliable.Set(i); 241 fNumHiGainFADCSlices.Set(i); 242 fNumLoGainFADCSlices.Set(i); 243 243 } 244 244 … … 299 299 } 300 300 301 // -------------------------------------------------------------------------- 302 // 303 // Returns the mean number of High-Gain FADC slices per area index and -1 if 304 // the area index exceeds the initialized array. 305 // 306 const Float_t MCalibrationCam::GetNumHiGainFADCSlices( Int_t aidx ) const 307 { 308 if (aidx < 0) 309 return -1; 310 311 return aidx > fNumHiGainFADCSlices.GetSize() ? -1 : fNumHiGainFADCSlices[aidx]; 312 } 313 314 // -------------------------------------------------------------------------- 315 // 316 // Returns the mean number of Low-Gain FADC slices per area index and -1 if 317 // the area index exceeds the initialized array. 318 // 319 const Float_t MCalibrationCam::GetNumLoGainFADCSlices( Int_t aidx ) const 320 { 321 if (aidx < 0) 322 return -1; 323 324 return aidx > fNumLoGainFADCSlices.GetSize() ? -1 : fNumLoGainFADCSlices[aidx]; 325 } 326 327 301 328 302 329 // -------------------------------------------------------------------------- … … 440 467 } 441 468 469 void MCalibrationCam::SetNumHiGainFADCSlices( const Float_t i, const Int_t aidx) 470 { 471 if (aidx < 0) 472 return; 473 474 if (aidx < fNumHiGainFADCSlices.GetSize()) 475 fNumHiGainFADCSlices[aidx] = i; 476 } 477 478 void MCalibrationCam::SetNumLoGainFADCSlices( const Float_t i, const Int_t aidx) 479 { 480 if (aidx < 0) 481 return; 482 if (aidx < fNumLoGainFADCSlices.GetSize()) 483 fNumLoGainFADCSlices[aidx] = i; 484 } 485 442 486 void MCalibrationCam::SetNumUnsuitable( const UInt_t i, const Int_t aidx) 443 487 {
Note:
See TracChangeset
for help on using the changeset viewer.