Changeset 15610


Ignore:
Timestamp:
05/16/13 15:16:01 (12 years ago)
Author:
tbretz
Message:
Decoupled updating ROI from eventCheck.
File:
1 edited

Legend:

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

    r15606 r15610  
    112112    Queue<tuple<Time,bool,FAD::EventHeader>> fDimQueue2;
    113113    Queue<pair<Time,array<uint32_t,4>>> fDimQueue3;
     114    Queue<pair<Time,array<uint16_t,2>>> fDimQueue4;
    114115   
    115116    bool fDebugStream;
     
    271272        fDimQueue2(std::bind(&EventBuilderWrapper::procHeader, this, placeholders::_1)),
    272273        fDimQueue3(std::bind(&EventBuilderWrapper::updateEvents, this, placeholders::_1)),
     274        fDimQueue4(std::bind(&EventBuilderWrapper::updateRoi, this, placeholders::_1)),
    273275        fDebugStream(false), fDebugRead(false), fDebugLog(false), fNightAsInt(0)
    274276    {
     
    421423    {
    422424        fMsg.Message("Signal abort to EventBuilder thread...");
    423         g_runStat = kAbort;
     425        g_reset = 1;
    424426    }
    425427
     
    903905    array<uint16_t,2> fVecRoi;
    904906
     907    void updateRoi(const pair<Time, array<uint16_t,2>> &roi)
     908    {
     909        fDimRoi.setData(roi.second.data(), sizeof(uint16_t)*2);
     910        fDimRoi.Update(roi.first);
     911    }
     912
    905913    int eventCheck(uint32_t runNr, PEVNT_HEADER *fadhd, EVENT *event, int /*iboard*/)
    906914    {
     
    920928
    921929        if (roi!=fVecRoi)
    922         {
    923             Update(fDimRoi, roi);
     930        {
     931            fDimQueue4.post(make_pair(Time(), roi));
    924932            fVecRoi = roi;
    925933        }
Note: See TracChangeset for help on using the changeset viewer.