Changeset 5046 for trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc
- Timestamp:
- 09/15/04 22:12:28 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc
r5043 r5046 28 28 // Base class for intensity calibration results 29 29 // 30 // Contains TO bjArrays for the following objects:30 // Contains TOrdCollections for the following objects: 31 31 // - fCams: Array of classes derived from MCalibrationCam, one entry 32 32 // per calibration camera result. Has to be created … … 43 43 #include "MCalibrationIntensityCam.h" 44 44 45 #include <TO bjArray.h>45 #include <TOrdCollection.h> 46 46 47 47 #include "MGeomCam.h" … … 64 64 fTitle = title ? title : "Base container for the Intensity Calibration"; 65 65 66 fCams = new TO bjArray;66 fCams = new TOrdCollection; 67 67 fCams->SetOwner(); 68 68 … … 188 188 // ------------------------------------------------------------------- 189 189 // 190 // Calls TObjArray::Expand() for fCams 191 // 192 void MCalibrationIntensityCam::InitSize(const UInt_t n) 193 { 194 fCams->Expand(n); 190 // Initialize the objects inside the TOrdCollection using the 191 // virtual function Add(). 192 // 193 // InitSize can only increase the size, but not shrink. 194 // 195 // It can be called more than one time. New Containers are 196 // added only from the current size to the argument i. 197 // 198 void MCalibrationIntensityCam::InitSize(const UInt_t i) 199 { 200 201 const UInt_t save = GetSize(); 202 203 if (i==save) 204 return; 205 206 if (i>save) 207 Add(save,i); 208 } 209 210 // ------------------------------------------------------------------- 211 // 212 // Add MCalibrationCams in the ranges from - to. In order to initialize 213 // from MCalibrationCam derived containers, overwrite this function 214 // 215 void MCalibrationIntensityCam::Add(const UInt_t from, const UInt_t to) 216 { 217 for (UInt_t i=from; i<to; i++) 218 fCams->AddAt(new MCalibrationCam,i); 195 219 } 196 220 … … 211 235 // -------------------------------------------------------------------------- 212 236 // 213 // Returns the current size of the TO bjArrayfCams237 // Returns the current size of the TOrdCollection fCams 214 238 // independently if the MCalibrationCam is filled with values or not. 215 239 // 216 240 const Int_t MCalibrationIntensityCam::GetSize() const 217 241 { 218 return fCams->Get EntriesFast();242 return fCams->GetSize(); 219 243 } 220 244 … … 240 264 // -------------------------------------------------------------------------- 241 265 // 242 // Returns the current size of the TO bjArrayfAverageAreas of the current camera.266 // Returns the current size of the TOrdCollection fAverageAreas of the current camera. 243 267 // 244 268 const Int_t MCalibrationIntensityCam::GetAverageAreas() const … … 285 309 // -------------------------------------------------------------------------- 286 310 // 287 // Returns the current size of the TO bjArrayfAverageSectors or the current camera311 // Returns the current size of the TOrdCollection fAverageSectors or the current camera 288 312 // 289 313 const Int_t MCalibrationIntensityCam::GetAverageSectors() const
Note:
See TracChangeset
for help on using the changeset viewer.