Ignore:
Timestamp:
09/11/11 21:38:05 (13 years ago)
Author:
tbretz
Message:
Simplified SendFeedbackData
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/EventBuilderWrapper.h

    r12057 r12070  
    849849        oldt = newt;
    850850
    851         const size_t sz = sizeof(EVENT)+event->Roi*2*1440;
    852 
    853         vector<char> data(sz+event->Roi*2*1440);
     851        vector<char> data(sizeof(EVENT)+event->Roi*sizeof(float)*1440);
    854852        memcpy(data.data(), event, sizeof(EVENT));
    855853
     
    898896        // FIXME: Check event type here
    899897
    900         const size_t sz = sizeof(EVENT)+event->Roi*2*1440;
    901 
    902         vector<char> data(sz+event->Roi*2*1440);
    903         memcpy(data.data(), event, sizeof(EVENT));
    904 
    905         float *vec = reinterpret_cast<float*>(data.data()+sizeof(EVENT));
    906 
    907         DataCalib::Apply(vec, event->Adc_Data, event->StartPix, event->Roi);
     898        vector<float> data(event->Roi*1440);
     899
     900        DataCalib::Apply(data.data(), event->Adc_Data, event->StartPix, event->Roi);
    908901
    909902        vector<float> data2(1440); // Mean, RMS, Max, Pos, first, last
    910         CalibData::GetPixelMax(data2.data(), vec, event->Roi, 0, event->Roi-1);
     903        CalibData::GetPixelMax(data2.data(), data.data(), event->Roi, 0, event->Roi-1);
    911904
    912905//        dim_lock();
Note: See TracChangeset for help on using the changeset viewer.