Changeset 5043 for trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
- Timestamp:
- 09/15/04 20:14:15 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.