Changeset 11684 for trunk/FACT++
- Timestamp:
- 07/28/11 11:47:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11680 r11684 207 207 { 208 208 fGain.assign(fSum.begin(), fSum.end()); 209 fNumGain = fNumEntries*32768; 210 for (int i=0; i<1024*1440; i++) 211 fOffset[i] -= 16384; 209 fNumGain = fNumEntries; 212 210 // Now we have a scale from -16384 to 16384 213 211 } … … 231 229 fGain.data(), fNumGain, 232 230 fTrgOff.data(), fNumTrgOff); 231 } 232 233 static void Apply(float *vec, int16_t *val, const int16_t *start, uint32_t roi) 234 { 235 if (fStep==0) 236 CalibData::Apply(vec, val, start, roi); 237 else 238 CalibData::Apply(vec, val, start, roi, 239 fOffset.data(), fNumOffset, 240 fGain.data(), fNumGain, 241 fTrgOff.data(), fNumTrgOff); 233 242 } 234 243 }; … … 970 979 fDimRuns ("FAD_CONTROL/RUNS", "I:5;C", ""), 971 980 fDimEvents ("FAD_CONTROL/EVENTS", "I:4", ""), 972 fDimEventData ("FAD_CONTROL/EVENT_DATA", "S:1;I:1;S:1;I:1;I:2;I:40;S:1440;S:160; S", ""),981 fDimEventData ("FAD_CONTROL/EVENT_DATA", "S:1;I:1;S:1;I:1;I:2;I:40;S:1440;S:160;F", ""), 973 982 fDimFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", "F:42", ""), 974 983 fDimRunNumber ("FAD_CONTROL/RUN_NUMBER", "I:42", ""), … … 1561 1570 oldt = newt; 1562 1571 1563 DataFileCalib::Apply(event->Adc_Data, event->StartPix, event->Roi);1564 1565 1572 const size_t sz = sizeof(EVENT)+event->Roi*2*1440; 1566 1573 1567 fDimEventData.setData(event, sz); 1568 fDimEventData.updateService(); 1574 vector<char> data(sz+event->Roi*2*1440); 1575 memcpy(data.data(), event, sizeof(EVENT)); 1576 1577 DataFileCalib::Apply(reinterpret_cast<float*>(data.data()+sizeof(EVENT)), 1578 event->Adc_Data, event->StartPix, event->Roi); 1579 1580 fDimEventData.Update(data); 1569 1581 1570 1582 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.