Changeset 5018 for trunk/MagicSoft
- Timestamp:
- 09/14/04 20:56:15 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5017 r5018 38 38 * mbadpixels/MBadPixelsIntensityCam.[h,cc] 39 39 * mcalib/MCalibrationIntensity*Cam.[h,cc] 40 * mcalib/MCalibration*Cam.[h,cc] 40 41 - replace TClonesArray by TObjArray 41 42 -
trunk/MagicSoft/Mars/mcalib/MCalibrationBlindCam.h
r4986 r5018 8 8 class MCalibrationBlindCam : public MCalibrationCam 9 9 { 10 public: 10 private: 11 12 void Add(const UInt_t a, const UInt_t b); 13 14 public: 11 15 12 16 MCalibrationBlindCam(Int_t nblind=1,const char *name=NULL, const char *title=NULL); … … 18 22 void InitSize ( const UInt_t n ); 19 23 20 ClassDef(MCalibrationBlindCam, 1) // Container Blind Pixels Calibration Results Camera24 ClassDef(MCalibrationBlindCam, 2) // Container Blind Pixels Calibration Results Camera 21 25 }; 22 26 -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r4986 r5018 29 29 // Base class for Camera Calibration results. 30 30 // 31 // Contains T ClonesArrays for the following objects:31 // Contains TObjArrays 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 T ClonesArrays have to enlarged by the corresponding calls to (e.g. in MGeomApply):44 // All TObjArrays 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 <T ClonesArray.h>52 #include <TObjArray.h> 53 53 54 54 #include "MGeomCam.h" … … 79 79 // - fNumLoGainFADCSlices to 0. 80 80 // 81 // Creates a T ClonesArray of MBadPixelsPix containers for the TClonesArray's:81 // Creates a TObjArray of MBadPixelsPix containers for the TObjArray's: 82 82 // - fAverageBadAreas 83 83 // - fAverageBadSectors … … 88 88 // 89 89 MCalibrationCam::MCalibrationCam(const char *name, const char *title) 90 : fPulserColor(kNONE), 91 fPixels(NULL), fAverageAreas(NULL), fAverageSectors(NULL), 92 fAverageBadAreas(NULL), fAverageBadSectors(NULL) 93 { 90 : fPulserColor(kNONE) 91 { 92 93 fPixels = new TObjArray; 94 fPixels->SetOwner(); 95 96 fAverageAreas = new TObjArray; 97 fAverageAreas->SetOwner(); 98 99 fAverageSectors = new TObjArray; 100 fAverageSectors->SetOwner(); 101 102 fAverageBadAreas = new TObjArray; 103 fAverageBadAreas->SetOwner(); 104 105 fAverageBadSectors = new TObjArray; 106 fAverageBadSectors->SetOwner(); 107 94 108 95 109 fNumHiGainFADCSlices.Set(1); … … 99 113 // -------------------------------------------------------------------------- 100 114 // 101 // Deletes the following T ClonesArray's of MCalibrationPix containers (if exist):115 // Deletes the following TObjArray's of MCalibrationPix containers (if exist): 102 116 // - fPixels 103 117 // - fAverageAreas 104 118 // - fAverageSectors 105 119 // 106 // Deletes the following T ClonesArray's of MBadPixelsPix containers (if exist):120 // Deletes the following TObjArray's of MBadPixelsPix containers (if exist): 107 121 // - fAverageBadAreas 108 122 // - fAverageBadSectors … … 133 147 // -------------------------------------- 134 148 // 135 // Calls the ForEach macro for the T ClonesArray fPixels with the argument Clear()149 // Calls the ForEach macro for the TObjArray fPixels with the argument Clear() 136 150 // 137 151 // Loops over the fAverageAreas, calling the function Clear() for … … 205 219 // ------------------------------------------------------------------- 206 220 // 207 // Calls T ClonesArray::ExpandCreate() for fPixels221 // Calls TObjArray::ExpandCreate() for fPixels 208 222 // 209 223 void MCalibrationCam::InitSize(const UInt_t i) 210 224 { 211 fPixels->ExpandCreate(i); 212 } 225 226 const UInt_t save = GetSize(); 227 228 if (i==save) 229 return; 230 231 fPixels->Expand(i); 232 233 if (i>save) 234 Add(save,i); 235 } 236 237 void MCalibrationCam::Add(const UInt_t a, const UInt_t b) 238 { 239 for (UInt_t i=a; i<b; i++) 240 (*fPixels)[i] = new MCalibrationPix; 241 } 242 243 void MCalibrationCam::AddArea(const UInt_t a, const UInt_t b) 244 { 245 for (UInt_t i=a; i<b; i++) 246 (*fAverageAreas)[i] = new MCalibrationPix; 247 } 248 249 void MCalibrationCam::AddSector(const UInt_t a, const UInt_t b) 250 { 251 for (UInt_t i=a; i<b; i++) 252 (*fAverageSectors)[i] = new MCalibrationPix; 253 } 254 213 255 214 256 // ------------------------------------------------------------------- 215 257 // 216 // Calls T ClonesArray::ExpandCreate() for:258 // Calls TObjArray::ExpandCreate() for: 217 259 // - fAverageAreas 218 260 // - fAverageBadAreas … … 220 262 void MCalibrationCam::InitAverageAreas(const UInt_t i) 221 263 { 222 fAverageAreas->ExpandCreate(i); 223 fAverageBadAreas->ExpandCreate(i); 224 225 for (UInt_t j=0; j<i; j++) 226 GetAverageArea(j).SetPixId(j); 227 264 265 const UInt_t save = GetAverageAreas(); 266 267 if (i==save) 268 return; 269 270 fAverageAreas->Expand(i); 271 fAverageBadAreas->Expand(i); 272 228 273 fNumUnsuitable.Set(i); 229 274 fNumUnreliable.Set(i); 230 275 fNumHiGainFADCSlices.Set(i); 231 276 fNumLoGainFADCSlices.Set(i); 277 278 if (i < save) 279 return; 280 281 for (UInt_t j=save; j<i; j++) 282 (*fAverageBadAreas)[j] = new MBadPixelsPix; 283 284 AddArea(save,i); 285 286 for (UInt_t j=save; j<i; j++) 287 GetAverageArea(j).SetPixId(j); 288 232 289 } 233 290 234 291 // ------------------------------------------------------------------- 235 292 // 236 // Calls T ClonesArray::ExpandCreate() for:293 // Calls TObjArray::ExpandCreate() for: 237 294 // - fAverageSectors 238 295 // - fAverageBadSectors … … 240 297 void MCalibrationCam::InitAverageSectors(const UInt_t i) 241 298 { 242 fAverageSectors->ExpandCreate(i); 243 fAverageBadSectors->ExpandCreate(i); 244 245 for (UInt_t j=0; j<i; j++) 299 300 const UInt_t save = GetAverageSectors(); 301 302 if (i==save) 303 return; 304 305 fAverageSectors->Expand(i); 306 fAverageBadSectors->Expand(i); 307 308 if (i < save) 309 return; 310 311 for (UInt_t j=save; j<i; j++) 312 (*fAverageBadSectors)[j] = new MBadPixelsPix; 313 314 AddSector(save,i); 315 316 for (UInt_t j=save; j<i; j++) 246 317 GetAverageSector(j).SetPixId(j); 247 248 318 } 249 319 … … 328 398 // -------------------------------------------------------------------------- 329 399 // 330 // Returns the current size of the T ClonesArray fAverageAreas400 // Returns the current size of the TObjArray fAverageAreas 331 401 // independently if the MCalibrationPix is filled with values or not. 332 402 // … … 338 408 // -------------------------------------------------------------------------- 339 409 // 340 // Returns the current size of the T ClonesArray fAverageSectors410 // Returns the current size of the TObjArray fAverageSectors 341 411 // independently if the MCalibrationPix is filled with values or not. 342 412 // … … 367 437 // -------------------------------------------------------------------------- 368 438 // 369 // Returns the current size of the T ClonesArray fPixels439 // Returns the current size of the TObjArray fPixels 370 440 // independently if the MCalibrationPix is filled with values or not. 371 441 // 372 442 const Int_t MCalibrationCam::GetSize() const 373 443 { 374 return fPixels->GetEntries Fast();444 return fPixels->GetEntries(); 375 445 } 376 446 -
trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc
r4986 r5018 75 75 #include "MCalibrationQECam.h" 76 76 77 #include <T ClonesArray.h>77 #include <TObjArray.h> 78 78 79 79 #include "MLog.h" … … 93 93 // Default constructor. 94 94 // 95 // Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated96 // to hold one container per pixel. Later, a call to MCalibrationQECam::InitSize()97 // has to be performed (in MGeomApply).98 //99 // Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated100 // to hold one container per pixel AREA. Later, a call to MCalibrationQECam::InitAreas()101 // has to be performed (in MGeomApply).102 //103 // Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated104 // to hold one container per camera SECTOR. Later, a call to MCalibrationQECam::InitSectors()105 // has to be performed (in MGeomApply).106 //107 95 MCalibrationQECam::MCalibrationQECam(const char *name, const char *title) 108 96 { … … 110 98 fTitle = title ? title : "Storage container for the calibrated Quantum Efficiency of the camera"; 111 99 112 fPixels = new TClonesArray("MCalibrationQEPix",1);113 fAverageAreas = new TClonesArray("MCalibrationQEPix",1);114 fAverageSectors = new TClonesArray("MCalibrationQEPix",1);115 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1);116 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1);117 118 100 fFlags.Set(MCalibrationCam::gkNumPulserColors); 119 101 120 102 Clear(); 103 } 104 105 void MCalibrationQECam::Add(const UInt_t a, const UInt_t b) 106 { 107 for (UInt_t i=a; i<b; i++) 108 (*fPixels)[i] = new MCalibrationQEPix; 109 } 110 111 void MCalibrationQECam::AddArea(const UInt_t a, const UInt_t b) 112 { 113 for (UInt_t i=a; i<b; i++) 114 (*fAverageAreas)[i] = new MCalibrationQEPix; 115 } 116 117 void MCalibrationQECam::AddSector(const UInt_t a, const UInt_t b) 118 { 119 for (UInt_t i=a; i<b; i++) 120 (*fAverageSectors)[i] = new MCalibrationQEPix; 121 121 } 122 122 -
trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.h
r4967 r5018 26 26 kPINDiodeMethodValid, kCombinedMethodValid }; // Possible validity bits 27 27 28 void Add(const UInt_t a, const UInt_t b); 29 void AddArea(const UInt_t a, const UInt_t b); 30 void AddSector(const UInt_t a, const UInt_t b); 31 32 28 33 protected: 29 34 … … 71 76 void SetPINDiodeMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col); 72 77 73 ClassDef(MCalibrationQECam, 1) // Container Quantum Efficieny Calibration Results Camera78 ClassDef(MCalibrationQECam, 2) // Container Quantum Efficieny Calibration Results Camera 74 79 }; 75 80
Note:
See TracChangeset
for help on using the changeset viewer.