Changeset 4905 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 09/09/04 17:43:22 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r4855 r4905 266 266 // the area index exceeds the initialized array. 267 267 // 268 const Int_t MCalibrationCam::GetNumUnsuitable( Int_t aidx ) const 269 { 270 if (aidx < 0) 271 return -1; 272 268 const Int_t MCalibrationCam::GetNumUnsuitable( const Int_t aidx ) const 269 { 270 if (aidx < 0) 271 { 272 Int_t num = 0; 273 for (Int_t i=0;i<fNumUnsuitable.GetSize();i++) 274 num += fNumUnsuitable[i]; 275 return num; 276 } 277 273 278 return aidx > fNumUnsuitable.GetSize() ? -1 : fNumUnsuitable[aidx]; 274 279 } … … 279 284 // the area index exceeds the initialized array. 280 285 // 281 const Int_t MCalibrationCam::GetNumUnreliable( Int_t aidx ) const 282 { 283 if (aidx < 0) 284 return -1; 286 const Int_t MCalibrationCam::GetNumUnreliable( const Int_t aidx ) const 287 { 288 if (aidx < 0) 289 { 290 Int_t num = 0; 291 for (Int_t i=0;i<fNumUnreliable.GetSize();i++) 292 num += fNumUnreliable[i]; 293 return num; 294 } 285 295 286 296 return aidx > fNumUnreliable.GetSize() ? -1 : fNumUnreliable[aidx]; … … 292 302 // the area index exceeds the initialized array. 293 303 // 294 const Float_t MCalibrationCam::GetNumHiGainFADCSlices( Int_taidx ) const304 const Float_t MCalibrationCam::GetNumHiGainFADCSlices( const Int_t aidx ) const 295 305 { 296 306 if (aidx < 0) … … 305 315 // the area index exceeds the initialized array. 306 316 // 307 const Float_t MCalibrationCam::GetNumLoGainFADCSlices( Int_taidx ) const317 const Float_t MCalibrationCam::GetNumLoGainFADCSlices( const Int_t aidx ) const 308 318 { 309 319 if (aidx < 0) … … 368 378 // Get i-th average pixel (area number) 369 379 // 370 MCalibrationPix &MCalibrationCam::GetAverageArea( UInt_t i)380 MCalibrationPix &MCalibrationCam::GetAverageArea(const UInt_t i) 371 381 { 372 382 return *static_cast<MCalibrationPix*>(fAverageAreas->UncheckedAt(i)); … … 377 387 // Get i-th average pixel (area number) 378 388 // 379 const MCalibrationPix &MCalibrationCam::GetAverageArea( UInt_t i) const389 const MCalibrationPix &MCalibrationCam::GetAverageArea(const UInt_t i) const 380 390 { 381 391 return *static_cast<MCalibrationPix*>(fAverageAreas->UncheckedAt(i)); … … 386 396 // Get i-th average pixel (sector number) 387 397 // 388 MCalibrationPix &MCalibrationCam::GetAverageSector( UInt_t i)398 MCalibrationPix &MCalibrationCam::GetAverageSector(const UInt_t i) 389 399 { 390 400 return *static_cast<MCalibrationPix*>(fAverageSectors->UncheckedAt(i)); … … 395 405 // Get i-th average pixel (sector number) 396 406 // 397 const MCalibrationPix &MCalibrationCam::GetAverageSector( UInt_t i) const407 const MCalibrationPix &MCalibrationCam::GetAverageSector(const UInt_t i) const 398 408 { 399 409 return *static_cast<MCalibrationPix*>(fAverageSectors->UncheckedAt(i)); … … 404 414 // Get i-th average pixel (area number) 405 415 // 406 MBadPixelsPix &MCalibrationCam::GetAverageBadArea( UInt_t i)416 MBadPixelsPix &MCalibrationCam::GetAverageBadArea(const UInt_t i) 407 417 { 408 418 return *static_cast<MBadPixelsPix*>(fAverageBadAreas->UncheckedAt(i)); … … 413 423 // Get i-th average pixel (area number) 414 424 // 415 const MBadPixelsPix &MCalibrationCam::GetAverageBadArea( UInt_t i) const425 const MBadPixelsPix &MCalibrationCam::GetAverageBadArea(const UInt_t i) const 416 426 { 417 427 return *static_cast<MBadPixelsPix*>(fAverageBadAreas->UncheckedAt(i)); … … 422 432 // Get i-th average pixel (sector number) 423 433 // 424 MBadPixelsPix &MCalibrationCam::GetAverageBadSector( UInt_t i)434 MBadPixelsPix &MCalibrationCam::GetAverageBadSector(const UInt_t i) 425 435 { 426 436 return *static_cast<MBadPixelsPix*>(fAverageBadSectors->UncheckedAt(i)); … … 431 441 // Get i-th average pixel (sector number) 432 442 // 433 const MBadPixelsPix &MCalibrationCam::GetAverageBadSector( UInt_t i) const443 const MBadPixelsPix &MCalibrationCam::GetAverageBadSector(const UInt_t i) const 434 444 { 435 445 return *static_cast<MBadPixelsPix*>(fAverageBadSectors->UncheckedAt(i)); -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
r4882 r4905 56 56 57 57 void Clear ( Option_t *o=""); 58 void DrawPixelContent( Int_t num) const;59 58 void Copy(TObject& object) const; 60 59 60 void DrawPixelContent( Int_t num) const; 61 61 62 // Getters 62 const Int_t GetAverageAreas () const;63 MCalibrationPix &GetAverageArea ( UInt_t i);64 const MCalibrationPix &GetAverageArea ( UInt_t i )const;65 MBadPixelsPix &GetAverageBadArea ( UInt_t i);66 const MBadPixelsPix &GetAverageBadArea ( UInt_t i )const;67 MBadPixelsPix &GetAverageBadSector ( UInt_t i );68 const MBadPixelsPix &GetAverageBadSector ( UInt_t i ) const;69 MCalibrationPix &GetAverageSector ( UInt_t i );70 const Int_t GetAverageSectors () const;71 const M CalibrationPix &GetAverageSector ( UInt_t i) const;72 const Float_t GetNumHiGainFADCSlices ( Int_t aidx=0 ) const;73 const Float_t GetNumLoGainFADCSlices ( Int_t aidx=0 ) const;74 const Int_t GetNumUnsuitable ( Int_t aidx) const;75 const Int_t GetNumUnreliable ( Int_t aidx) const;63 const Int_t GetAverageAreas () const; 64 MCalibrationPix &GetAverageArea ( const UInt_t i ); 65 const MCalibrationPix &GetAverageArea ( const UInt_t i ) const; 66 MBadPixelsPix &GetAverageBadArea ( const UInt_t i ); 67 const MBadPixelsPix &GetAverageBadArea ( const UInt_t i ) const; 68 const Int_t GetAverageSectors () const; 69 MCalibrationPix &GetAverageSector ( const UInt_t i ); 70 const MCalibrationPix &GetAverageSector ( const UInt_t i ) const; 71 MBadPixelsPix &GetAverageBadSector ( const UInt_t i ); 72 const MBadPixelsPix &GetAverageBadSector ( const UInt_t i ) const; 73 const Float_t GetNumHiGainFADCSlices ( const Int_t aidx=0 ) const; 74 const Float_t GetNumLoGainFADCSlices ( const Int_t aidx=0 ) const; 75 const Int_t GetNumUnsuitable ( const Int_t aidx=-1) const; 76 const Int_t GetNumUnreliable ( const Int_t aidx=-1) const; 76 77 77 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 78 const PulserColor_t GetPulserColor() const { return fPulserColor; } 79 const Int_t GetSize() const; 78 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, 79 Int_t type=0 ) const; 80 const PulserColor_t GetPulserColor () const { return fPulserColor; } 81 const Int_t GetSize () const; 80 82 81 MCalibrationPix &operator[] ( UInt_t i );82 const MCalibrationPix &operator[] ( UInt_t i )const;83 MCalibrationPix &operator[] ( UInt_t i ); 84 const MCalibrationPix &operator[] ( UInt_t i ) const; 83 85 84 86 // Inits 85 void Init ( const MGeomCam &geom );87 void Init ( const MGeomCam &geom ); 86 88 void InitSize ( const UInt_t i ); 87 89 void InitAverageAreas ( const UInt_t i ); … … 91 93 void SetNumHiGainFADCSlices ( const Float_t f, const Int_t aidx=0 ); 92 94 void SetNumLoGainFADCSlices ( const Float_t f, const Int_t aidx=0 ); 93 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx );94 void SetNumUnreliable ( const UInt_t i, const Int_t aidx );95 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx ); 96 void SetNumUnreliable ( const UInt_t i, const Int_t aidx ); 95 97 void SetPulserColor ( const PulserColor_t col=kCT1 ) { fPulserColor = col; } 96 98
Note:
See TracChangeset
for help on using the changeset viewer.