- Timestamp:
- 09/15/04 20:14:15 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5039 r5043 61 61 62 62 2004/09/15: Markus Gaug 63 64 * mcalib/MCalibration*Cam.[h,cc] 65 - replace TObjArray by TOrdCollection, otherwise the streamer does not work 63 66 64 67 * mimage/MHillasCalc.[h,cc] -
trunk/MagicSoft/Mars/mcalib/MCalibrationBlindCam.cc
r5031 r5043 30 30 // the actual values of the MCalibrationBlindPix's. 31 31 // 32 // Contains TO bjArrays for the following objects:33 // - f BlindPixels: Array of classes derived from MCalibrationBlindPix, one entry34 // 32 // Contains TOrdCollections for the following objects: 33 // - fPixels: Array of classes derived from MCalibrationBlindPix, one entry 34 // per blind pixel. 35 35 // 36 // All TO bjArrays have to enlarged by the corresponding calls to (e.g. in MGeomApply):36 // All TOrdCollections have to enlarged by the corresponding calls to (e.g. in MGeomApply): 37 37 // - InitSize() 38 38 // 39 // See also: MCalibrationBlindCamOneOldStyle 39 // See also: MCalibrationBlindCamOneOldStyle, MCalibrationBlindCamTwoNewStyle 40 40 // 41 41 ///////////////////////////////////////////////////////////////////////////// … … 43 43 #include "MCalibrationBlindPix.h" 44 44 45 #include <TO bjArray.h>45 #include <TOrdCollection.h> 46 46 47 47 #include "MLogManip.h" … … 66 66 { 67 67 for (UInt_t i=a; i<b; i++) 68 (*fPixels)[i] = new MCalibrationBlindPix;68 fPixels->AddAt(new MCalibrationBlindPix,i); 69 69 } 70 70 … … 78 78 MCalibrationBlindCam &calib = (MCalibrationBlindCam&)object; 79 79 80 // MParContainer::Copy(calib); 81 80 MCalibrationCam::Copy(calib); 81 82 /* 82 83 const UInt_t n = GetSize(); 83 84 if (n != 0) … … 87 88 (*this)[i].Copy(calib[i]); 88 89 } 90 */ 89 91 } 90 92 91 93 92 // --------------------------------------------------------------------------93 //94 // Expands and creates new MCalibrationPix's. Cannot use ExpandCreate(), because95 // for some reason, the constructor of MCalibrationPix does not initialize the96 // Arrays correctly, then.97 //98 void MCalibrationBlindCam::InitSize( const UInt_t n)99 {100 const UInt_t size = GetSize();101 fPixels->Expand(n);102 103 for (UInt_t i=size; i<n; i++)104 (*fPixels)[i] = new MCalibrationBlindPix;105 106 }107 94 108 95 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r5042 r5043 29 29 // Base class for Camera Calibration results. 30 30 // 31 // Contains TO bjArrays for the following objects:31 // Contains TOrdCollections for the following objects: 32 32 // - fPixels: Array of classes derived from MCalibrationPix, one entry 33 33 // per pixel. Has to be created … … 42 42 // per camera SECTOR. Is created automatically. 43 43 // 44 // All TO bjArrays have to enlarged by the corresponding calls to (e.g. in MGeomApply):44 // All TOrdCollections have to enlarged by the corresponding calls to (e.g. in MGeomApply): 45 45 // - InitSize() 46 46 // - InitAverageAreas() … … 50 50 #include "MCalibrationCam.h" 51 51 52 #include <TO bjArray.h>52 #include <TOrdCollection.h> 53 53 54 54 #include "MGeomCam.h" … … 82 82 // - fNumLoGainFADCSlices to 0. 83 83 // 84 // Creates a TO bjArray of MBadPixelsPix containers for the TObjArray's:84 // Creates a TOrdCollection of MBadPixelsPix containers for the TOrdCollection's: 85 85 // - fAverageBadAreas 86 86 // - fAverageBadSectors … … 94 94 { 95 95 96 fPixels = new TO bjArray;96 fPixels = new TOrdCollection; 97 97 fPixels->SetOwner(); 98 98 99 fAverageAreas = new TO bjArray;99 fAverageAreas = new TOrdCollection; 100 100 fAverageAreas->SetOwner(); 101 101 102 fAverageSectors = new TO bjArray;102 fAverageSectors = new TOrdCollection; 103 103 fAverageSectors->SetOwner(); 104 104 105 fAverageBadAreas = new TO bjArray;105 fAverageBadAreas = new TOrdCollection; 106 106 fAverageBadAreas->SetOwner(); 107 107 108 fAverageBadSectors = new TO bjArray;108 fAverageBadSectors = new TOrdCollection; 109 109 fAverageBadSectors->SetOwner(); 110 110 … … 221 221 // ------------------------------------------------------------------- 222 222 // 223 // Calls TObjArray::ExpandCreate() for fPixels224 223 // 225 224 void MCalibrationCam::InitSize(const UInt_t i) … … 231 230 return; 232 231 233 fPixels->Expand(i);232 // Pixels->Expand(i); 234 233 235 234 if (i>save) … … 240 239 { 241 240 for (UInt_t i=a; i<b; i++) 242 (*fPixels)[i] = new MCalibrationPix;241 fPixels->AddAt(new MCalibrationPix,i); 243 242 } 244 243 … … 246 245 { 247 246 for (UInt_t i=a; i<b; i++) 248 (*fAverageAreas)[i] = new MCalibrationPix;247 fAverageAreas->AddAt(new MCalibrationPix,i); 249 248 } 250 249 … … 252 251 { 253 252 for (UInt_t i=a; i<b; i++) 254 (*fAverageSectors)[i] = new MCalibrationPix;253 fAverageSectors->AddAt(new MCalibrationPix,i); 255 254 } 256 255 … … 270 269 return; 271 270 272 fAverageAreas->Expand(i);273 fAverageBadAreas->Expand(i);271 //fAverageAreas->Expand(i); 272 //fAverageBadAreas->Expand(i); 274 273 275 274 fNumUnsuitable.Set(i); … … 282 281 283 282 for (UInt_t j=save; j<i; j++) 284 (*fAverageBadAreas)[j] = new MBadPixelsPix;283 fAverageBadAreas->AddAt(new MBadPixelsPix,j); 285 284 286 285 AddArea(save,i); … … 305 304 return; 306 305 307 fAverageSectors->Expand(i);308 fAverageBadSectors->Expand(i);306 //fAverageSectors->Expand(i); 307 //fAverageBadSectors->Expand(i); 309 308 310 309 if (i < save) … … 312 311 313 312 for (UInt_t j=save; j<i; j++) 314 (*fAverageBadSectors)[j] = new MBadPixelsPix;313 fAverageBadSectors->AddAt(new MBadPixelsPix,j); 315 314 316 315 AddSector(save,i); … … 405 404 const Int_t MCalibrationCam::GetAverageAreas() const 406 405 { 407 return fAverageAreas->Get EntriesFast();406 return fAverageAreas->GetSize(); 408 407 } 409 408 … … 415 414 const Int_t MCalibrationCam::GetAverageSectors() const 416 415 { 417 return fAverageSectors->Get EntriesFast();416 return fAverageSectors->GetSize(); 418 417 } 419 418 … … 425 424 MCalibrationPix &MCalibrationCam::operator[](UInt_t i) 426 425 { 427 return *static_cast<MCalibrationPix*>(fPixels-> UncheckedAt(i));426 return *static_cast<MCalibrationPix*>(fPixels->At(i)); 428 427 } 429 428 … … 434 433 const MCalibrationPix &MCalibrationCam::operator[](UInt_t i) const 435 434 { 436 return *static_cast<MCalibrationPix*>(fPixels-> UncheckedAt(i));435 return *static_cast<MCalibrationPix*>(fPixels->At(i)); 437 436 } 438 437 … … 444 443 const Int_t MCalibrationCam::GetSize() const 445 444 { 446 return fPixels->Get EntriesFast();445 return fPixels->GetSize(); 447 446 } 448 447 … … 453 452 MCalibrationPix &MCalibrationCam::GetAverageArea(const UInt_t i) 454 453 { 455 return *static_cast<MCalibrationPix*>(fAverageAreas-> UncheckedAt(i));454 return *static_cast<MCalibrationPix*>(fAverageAreas->At(i)); 456 455 } 457 456 … … 462 461 const MCalibrationPix &MCalibrationCam::GetAverageArea(const UInt_t i) const 463 462 { 464 return *static_cast<MCalibrationPix*>(fAverageAreas-> UncheckedAt(i));463 return *static_cast<MCalibrationPix*>(fAverageAreas->At(i)); 465 464 } 466 465 … … 471 470 MCalibrationPix &MCalibrationCam::GetAverageSector(const UInt_t i) 472 471 { 473 return *static_cast<MCalibrationPix*>(fAverageSectors-> UncheckedAt(i));472 return *static_cast<MCalibrationPix*>(fAverageSectors->At(i)); 474 473 } 475 474 … … 480 479 const MCalibrationPix &MCalibrationCam::GetAverageSector(const UInt_t i) const 481 480 { 482 return *static_cast<MCalibrationPix*>(fAverageSectors-> UncheckedAt(i));481 return *static_cast<MCalibrationPix*>(fAverageSectors->At(i)); 483 482 } 484 483 … … 489 488 MBadPixelsPix &MCalibrationCam::GetAverageBadArea(const UInt_t i) 490 489 { 491 return *static_cast<MBadPixelsPix*>(fAverageBadAreas-> UncheckedAt(i));490 return *static_cast<MBadPixelsPix*>(fAverageBadAreas->At(i)); 492 491 } 493 492 … … 498 497 const MBadPixelsPix &MCalibrationCam::GetAverageBadArea(const UInt_t i) const 499 498 { 500 return *static_cast<MBadPixelsPix*>(fAverageBadAreas-> UncheckedAt(i));499 return *static_cast<MBadPixelsPix*>(fAverageBadAreas->At(i)); 501 500 } 502 501 … … 507 506 MBadPixelsPix &MCalibrationCam::GetAverageBadSector(const UInt_t i) 508 507 { 509 return *static_cast<MBadPixelsPix*>(fAverageBadSectors-> UncheckedAt(i));508 return *static_cast<MBadPixelsPix*>(fAverageBadSectors->At(i)); 510 509 } 511 510 … … 516 515 const MBadPixelsPix &MCalibrationCam::GetAverageBadSector(const UInt_t i) const 517 516 { 518 return *static_cast<MBadPixelsPix*>(fAverageBadSectors-> UncheckedAt(i));517 return *static_cast<MBadPixelsPix*>(fAverageBadSectors->At(i)); 519 518 } 520 519 -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
r5036 r5043 15 15 #endif 16 16 17 class TO bjArray;17 class TOrdCollection; 18 18 19 19 class MCalibrationPix; … … 44 44 PulserColor_t fPulserColor; // Colour of the pulsed LEDs 45 45 46 TO bjArray *fPixels;// Array of MCalibrationPix, one per pixel47 TO bjArray *fAverageAreas;// Array of MCalibrationPix, one per pixel area48 TO bjArray *fAverageSectors;// Array of MCalibrationPix, one per camera sector49 TO bjArray *fAverageBadAreas;// Array of MBadPixelsPix, one per pixel area50 TO bjArray *fAverageBadSectors;// Array of MBadPixelsPix, one per camera sector46 TOrdCollection *fPixels; // Array of MCalibrationPix, one per pixel 47 TOrdCollection *fAverageAreas; // Array of MCalibrationPix, one per pixel area 48 TOrdCollection *fAverageSectors; // Array of MCalibrationPix, one per camera sector 49 TOrdCollection *fAverageBadAreas; // Array of MBadPixelsPix, one per pixel area 50 TOrdCollection *fAverageBadSectors; // Array of MBadPixelsPix, one per camera sector 51 51 52 52 virtual void Add(const UInt_t a, const UInt_t b); -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r5019 r5043 82 82 #include "MCalibrationChargeCam.h" 83 83 84 #include <TO bjArray.h>84 #include <TOrdCollection.h> 85 85 86 86 #include "MLog.h" … … 118 118 } 119 119 120 // -------------------------------------------------------------------------- 121 // 122 // Creates new MCalibrationCam only for the averaged areas: 123 // the rest has to be retrieved directly, e.g. via: 124 // 125 TObject *MCalibrationChargeCam::Clone(const char *) const 126 { 127 128 // 129 // FIXME, this might be done faster and more elegant, by direct copy. 130 // 131 MCalibrationChargeCam *cam = new MCalibrationChargeCam(fName,fTitle); 132 133 cam->fNumUnsuitable = fNumUnsuitable; 134 cam->fNumUnreliable = fNumUnreliable; 135 cam->fNumHiGainFADCSlices = fNumHiGainFADCSlices; 136 cam->fNumLoGainFADCSlices = fNumLoGainFADCSlices; 137 cam->fPulserColor = fPulserColor; 138 139 cam->fFlags = fFlags; 140 141 cam->fNumPhotonsBlindPixelMethod = fNumPhotonsBlindPixelMethod; 142 cam->fNumPhotonsFFactorMethod = fNumPhotonsFFactorMethod; 143 cam->fNumPhotonsPINDiodeMethod = fNumPhotonsPINDiodeMethod; 144 cam->fNumPhotonsBlindPixelMethodErr = fNumPhotonsBlindPixelMethodErr; 145 cam->fNumPhotonsFFactorMethodErr = fNumPhotonsFFactorMethodErr; 146 cam->fNumPhotonsPINDiodeMethodErr = fNumPhotonsPINDiodeMethodErr; 147 148 for (Int_t i=0; i<GetSize(); i++) 149 cam->fPixels->AddAt((*this)[i].Clone(),i); 150 151 for (Int_t i=0; i<GetAverageAreas(); i++) 152 { 153 cam->fAverageAreas->AddAt(GetAverageArea(i).Clone(),i); 154 cam->fAverageBadAreas->AddAt(GetAverageBadArea(i).Clone(),i); 155 } 156 for (Int_t i=0; i<GetAverageSectors(); i++) 157 { 158 cam->fAverageSectors->AddAt(GetAverageSector(i).Clone(),i); 159 cam->fAverageBadSectors->AddAt(GetAverageBadSector(i).Clone(),i); 160 } 161 162 return cam; 163 } 164 120 165 121 166 void MCalibrationChargeCam::Add(const UInt_t a, const UInt_t b) 122 167 { 123 168 for (UInt_t i=a; i<b; i++) 124 (*fPixels)[i] = new MCalibrationChargePix;169 fPixels->AddAt(new MCalibrationChargePix,i); 125 170 } 126 171 … … 129 174 { 130 175 for (UInt_t i=a; i<b; i++) 131 (*fAverageAreas)[i] = new MCalibrationChargePix;176 fAverageAreas->AddAt(new MCalibrationChargePix,i); 132 177 } 133 178 … … 135 180 { 136 181 for (UInt_t i=a; i<b; i++) 137 (*fAverageSectors)[i] = new MCalibrationChargePix;182 fAverageSectors->AddAt(new MCalibrationChargePix,i); 138 183 } 139 184 -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc
r5030 r5043 66 66 fCams = new TObjArray; 67 67 fCams->SetOwner(); 68 } 68 69 } 70 69 71 70 72 // -------------------------------------------------------------------------- … … 214 216 const Int_t MCalibrationIntensityCam::GetSize() const 215 217 { 216 return fCams->GetEntries ();218 return fCams->GetEntriesFast(); 217 219 } 218 220 … … 223 225 MCalibrationPix &MCalibrationIntensityCam::operator[](UInt_t i) 224 226 { 225 return (*GetCam( GetSize()-1))[i];227 return (*GetCam())[i]; 226 228 } 227 229 … … 232 234 const MCalibrationPix &MCalibrationIntensityCam::operator[](UInt_t i) const 233 235 { 234 return (*GetCam( GetSize()-1))[i];236 return (*GetCam())[i]; 235 237 } 236 238 … … 242 244 const Int_t MCalibrationIntensityCam::GetAverageAreas() const 243 245 { 244 return GetCam( GetSize()-1)->GetAverageAreas();246 return GetCam()->GetAverageAreas(); 245 247 } 246 248 … … 251 253 MCalibrationPix &MCalibrationIntensityCam::GetAverageArea(UInt_t i) 252 254 { 253 return GetCam( GetSize()-1)->GetAverageArea(i);255 return GetCam()->GetAverageArea(i); 254 256 } 255 257 … … 260 262 const MCalibrationPix &MCalibrationIntensityCam::GetAverageArea(UInt_t i) const 261 263 { 262 return GetCam( GetSize()-1)->GetAverageArea(i);264 return GetCam()->GetAverageArea(i); 263 265 } 264 266 … … 269 271 MBadPixelsPix &MCalibrationIntensityCam::GetAverageBadArea(UInt_t i) 270 272 { 271 return GetCam( GetSize()-1)->GetAverageBadArea(i);273 return GetCam()->GetAverageBadArea(i); 272 274 } 273 275 … … 278 280 const MBadPixelsPix &MCalibrationIntensityCam::GetAverageBadArea(UInt_t i) const 279 281 { 280 return GetCam( GetSize()-1)->GetAverageBadArea(i);282 return GetCam()->GetAverageBadArea(i); 281 283 } 282 284 … … 287 289 const Int_t MCalibrationIntensityCam::GetAverageSectors() const 288 290 { 289 return GetCam( GetSize()-1)->GetAverageSectors();291 return GetCam()->GetAverageSectors(); 290 292 } 291 293 … … 296 298 MCalibrationPix &MCalibrationIntensityCam::GetAverageSector(UInt_t i) 297 299 { 298 return GetCam( GetSize()-1)->GetAverageSector(i);300 return GetCam()->GetAverageSector(i); 299 301 } 300 302 … … 305 307 const MCalibrationPix &MCalibrationIntensityCam::GetAverageSector(UInt_t i) const 306 308 { 307 return GetCam( GetSize()-1)->GetAverageSector(i);309 return GetCam()->GetAverageSector(i); 308 310 } 309 311 … … 314 316 MBadPixelsPix &MCalibrationIntensityCam::GetAverageBadSector(UInt_t i) 315 317 { 316 return GetCam( GetSize()-1)->GetAverageBadSector(i);318 return GetCam()->GetAverageBadSector(i); 317 319 } 318 320 … … 323 325 const MBadPixelsPix &MCalibrationIntensityCam::GetAverageBadSector(UInt_t i) const 324 326 { 325 return GetCam( GetSize()-1)->GetAverageBadSector(i);327 return GetCam()->GetAverageBadSector(i); 326 328 } 327 329 … … 333 335 MCalibrationCam *MCalibrationIntensityCam::GetCam(Int_t i) 334 336 { 335 return static_cast<MCalibrationCam*>(fCams-> UncheckedAt(i==-1 ? GetSize()-1 : i));337 return static_cast<MCalibrationCam*>(fCams->Last()); 336 338 } 337 339 … … 342 344 const MCalibrationCam *MCalibrationIntensityCam::GetCam(Int_t i) const 343 345 { 344 return static_cast<MCalibrationCam*>(fCams-> UncheckedAt(i==-1 ? GetSize()-1 : i));346 return static_cast<MCalibrationCam*>(fCams->Last()); 345 347 } 346 348 -
trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc
r5041 r5043 75 75 #include "MCalibrationQECam.h" 76 76 77 #include <TO bjArray.h>77 #include <TOrdCollection.h> 78 78 79 79 #include "MLog.h" … … 106 106 { 107 107 for (UInt_t i=a; i<b; i++) 108 (*fPixels)[i] = new MCalibrationQEPix;108 fPixels->AddAt(new MCalibrationQEPix,i); 109 109 } 110 110 … … 112 112 { 113 113 for (UInt_t i=a; i<b; i++) 114 (*fAverageAreas)[i] = new MCalibrationQEPix;114 fAverageAreas->AddAt(new MCalibrationQEPix,i); 115 115 } 116 116 … … 118 118 { 119 119 for (UInt_t i=a; i<b; i++) 120 (*fAverageSectors)[i] = new MCalibrationQEPix;120 fAverageSectors->AddAt(new MCalibrationQEPix,i); 121 121 } 122 122 -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc
r5019 r5043 76 76 #include "MCalibrationCam.h" 77 77 78 #include <TO bjArray.h>78 #include <TOrdCollection.h> 79 79 80 80 #include "MLog.h" … … 105 105 { 106 106 for (UInt_t i=a; i<b; i++) 107 (*fPixels)[i] = new MCalibrationRelTimePix;107 fPixels->AddAt(new MCalibrationRelTimePix,i); 108 108 } 109 109 … … 112 112 { 113 113 for (UInt_t i=a; i<b; i++) 114 (*fAverageAreas)[i] = new MCalibrationRelTimePix;114 fAverageAreas->AddAt(new MCalibrationRelTimePix,i); 115 115 } 116 116 … … 118 118 { 119 119 for (UInt_t i=a; i<b; i++) 120 (*fAverageSectors)[i] = new MCalibrationRelTimePix;120 fAverageSectors->AddAt(new MCalibrationRelTimePix,i); 121 121 } 122 122
Note:
See TracChangeset
for help on using the changeset viewer.