Changeset 3184
- Timestamp:
- 02/16/04 11:56:44 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3183 r3184 59 59 - added constant number for max format version - preliminary 60 60 (should by a static data member) 61 62 * mcalib/MHCalibrationPINDiode.cc: 63 - do not delete pointers in the destructor which are already 64 deleted in the base class 65 - reset histograms in Clear() 66 67 * mcalib/MHCalibrationPixel.cc: 68 - after deletion of instances in Clear() initialize pointer to NULL 61 69 62 70 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationPINDiode.cc
r3173 r3184 76 76 MHCalibrationPINDiode::~MHCalibrationPINDiode() 77 77 { 78 79 delete fHPINDiodeCharge; 80 delete fHPINDiodeChargevsN; 81 82 if (fChargeGausFit) 83 delete fChargeGausFit; 84 if (fFitLegend) 85 delete fFitLegend; 78 delete fHPINDiodeCharge; 79 delete fHPINDiodeChargevsN; 86 80 } 87 81 88 82 void MHCalibrationPINDiode::Clear(Option_t *o) 89 83 { 90 91 fTotalEntries = 0; 84 fTotalEntries = 0; 92 85 93 fChargeFirstHiGain= -100.5;94 fChargeLastHiGain= 1999.5;86 fChargeFirstHiGain = -100.5; 87 fChargeLastHiGain = 1999.5; 95 88 96 fChargeChisquare = -1.;97 fChargeProb = -1.;98 fChargeNdf= -1;89 fChargeChisquare = -1; 90 fChargeProb = -1; 91 fChargeNdf = -1; 99 92 100 if (fChargeGausFit) 101 delete fChargeGausFit; 102 if (fFitLegend) 103 delete fFitLegend; 104 105 return; 106 93 MHCalibrationPixel::Clear(); 107 94 } 108 95 109 96 void MHCalibrationPINDiode::Reset() 110 97 { 98 Clear(); 111 99 112 Clear(); 113 114 fHPINDiodeCharge->Reset(); 115 fHPINDiodeChargevsN->Reset(); 100 fHPINDiodeCharge->Reset(); 101 fHPINDiodeChargevsN->Reset(); 116 102 } 117 103 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc
r3152 r3184 161 161 void MHCalibrationPixel::Clear(Option_t *o) 162 162 { 163 164 fTotalEntries = 0; 165 fCurrentSize = 1024; 166 167 fChargeFirstHiGain = -100.5; 168 fChargeLastHiGain = 1999.5; 169 fChargeFirstLoGain = -100.5; 170 fChargeLastLoGain = 9999.5; 171 172 fChargeChisquare = -1.; 173 fChargeProb = -1.; 174 fChargeNdf = -1; 175 176 fAbsTimeFirstHiGain = -1.; 177 fAbsTimeFirstLoGain = -1.; 178 fAbsTimeLastHiGain = -1.; 179 fAbsTimeLastLoGain = -1.; 180 181 fAbsTimeMean = -1.; 182 fAbsTimeMeanErr = -1.; 183 fAbsTimeRms = -1.; 184 185 fOffset = 0.; 186 fSlope = 0.; 187 188 if (fChargeGausFit) 189 delete fChargeGausFit; 190 if (fPSDExpFit) 191 delete fPSDExpFit; 192 if (fHPSD) 193 delete fHPSD; 194 if (fFitLegend) 195 delete fFitLegend; 196 if (fHivsLoGain) 197 delete fHivsLoGain; 198 if (fChargeXaxis) 199 delete fChargeXaxis; 200 if (fPSDXaxis) 201 delete fPSDXaxis; 202 if (fPSDHiGain) 203 delete fPSDHiGain; 204 if (fPSDLoGain) 205 delete fPSDLoGain; 206 207 CLRBIT(fFlags,kUseLoGain); 208 CLRBIT(fFlags,kChargeFitOK); 209 CLRBIT(fFlags,kOscillating); 210 211 return; 163 fTotalEntries = 0; 164 fCurrentSize = 1024; 165 166 fChargeFirstHiGain = -100.5; 167 fChargeLastHiGain = 1999.5; 168 fChargeFirstLoGain = -100.5; 169 fChargeLastLoGain = 9999.5; 170 171 fChargeChisquare = -1; 172 fChargeProb = -1; 173 fChargeNdf = -1; 174 175 fAbsTimeFirstHiGain = -1; 176 fAbsTimeFirstLoGain = -1; 177 fAbsTimeLastHiGain = -1; 178 fAbsTimeLastLoGain = -1; 179 180 fAbsTimeMean = -1; 181 fAbsTimeMeanErr = -1; 182 fAbsTimeRms = -1; 183 184 fOffset = 0.; 185 fSlope = 0.; 186 187 if (fChargeGausFit) 188 { 189 delete fChargeGausFit; 190 fChargeGausFit=0; 191 } 192 if (fPSDExpFit) 193 { 194 delete fPSDExpFit; 195 fPSDExpFit=0; 196 } 197 if (fHPSD) 198 { 199 delete fHPSD; 200 fHPSD=0; 201 } 202 if (fFitLegend) 203 { 204 delete fFitLegend; 205 fFitLegend=0; 206 } 207 if (fHivsLoGain) 208 { 209 delete fHivsLoGain; 210 fHivsLoGain=0; 211 } 212 if (fChargeXaxis) 213 { 214 delete fChargeXaxis; 215 fChargeXaxis=0; 216 } 217 if (fPSDXaxis) 218 { 219 delete fPSDXaxis; 220 fPSDXaxis=0; 221 } 222 if (fPSDHiGain) 223 { 224 delete fPSDHiGain; 225 fPSDHiGain=0; 226 } 227 if (fPSDLoGain) 228 { 229 delete fPSDLoGain; 230 fPSDLoGain=0; 231 } 232 233 CLRBIT(fFlags, kUseLoGain); 234 CLRBIT(fFlags, kChargeFitOK); 235 CLRBIT(fFlags, kOscillating); 212 236 } 213 237 … … 215 239 void MHCalibrationPixel::Reset() 216 240 { 217 218 Clear(); 219 220 fHChargeHiGain->Reset(); 221 fHChargeLoGain->Reset(); 222 223 fHAbsTimeHiGain->Reset(); 224 fHAbsTimeLoGain->Reset(); 225 226 fHiGains->Set(1024); 227 fLoGains->Set(1024); 228 229 fHiGains->Reset(0.); 230 fLoGains->Reset(0.); 231 241 Clear(); 242 243 fHChargeHiGain->Reset(); 244 fHChargeLoGain->Reset(); 245 246 fHAbsTimeHiGain->Reset(); 247 fHAbsTimeLoGain->Reset(); 248 249 fHiGains->Set(1024); 250 fLoGains->Set(1024); 251 252 fHiGains->Reset(0.); 253 fLoGains->Reset(0.); 232 254 } 233 255
Note:
See TracChangeset
for help on using the changeset viewer.