Changeset 11699 for trunk/FACT++
- Timestamp:
- 07/29/11 14:31:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DrsCalib.h
r11687 r11699 3 3 protected: 4 4 uint64_t fNumEntries; 5 uint64_t fNumCounter;6 5 7 6 size_t fNumSamples; … … 271 270 vector<double>::iterator ie = error.begin(); 272 271 273 int cnt = 0;274 272 while (it!=fSum.end()) 275 273 { … … 281 279 it++; 282 280 i2++; 283 cnt++;284 281 } 285 282 … … 293 290 294 291 return make_pair(mean, error); 292 } 293 294 void GetSampleStats(float *ptr, float scale) const 295 { 296 if (fNumEntries==0) 297 { 298 memset(ptr, 0, sizeof(float)*1024*1440); 299 return; 300 } 301 302 vector<int64_t>::const_iterator it = fSum.begin(); 303 vector<int64_t>::const_iterator i2 = fSum2.begin(); 304 305 while (it!=fSum.end()) 306 { 307 *ptr = scale*double(*it)/fNumEntries; 308 *(ptr+1024*1440) = scale*sqrt(double(*i2*int64_t(fNumEntries) - *it * *it))/fNumEntries; 309 310 ptr++; 311 it++; 312 i2++; 313 } 295 314 } 296 315
Note:
See TracChangeset
for help on using the changeset viewer.