Ignore:
Timestamp:
09/08/11 21:48:27 (13 years ago)
Author:
tbretz
Message:
Added the correct path to DimWriteStatistics; fixed the extraction region in the call of CalibData::GetPixelMax; do not limit sending rate of DRS calib result for feedback; set g_maxProc to 3
File:
1 edited

Legend:

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

    r11968 r12040  
    136136            if (access((name+"drs.fits").c_str(), F_OK) == 0)
    137137                break;
     138
    138139        }
    139140
     
    166167
    167168        fPath = path;
     169
     170        fDimWriteStats.SetCurrentFolder(fPath);
    168171
    169172        return InitRunNumber();
     
    199202
    200203        memset(fNumEvts, 0, sizeof(fNumEvts));
    201 
    202204        fDimEvents.Update(fNumEvts);
    203205
     
    287289
    288290        g_runStat = kModeRun;
     291        g_maxProc = 3;
    289292
    290293        fMsg.Message("Starting EventBuilder thread");
     
    401404    int  GetNumConnected(int i) const { return gi_NumConnect[i]; }
    402405
     406    /*
     407    bool IsConnected(int i) const     { return gi_NumConnect[i]>0; }
     408    bool IsConnecting(int i) const    { return !IsConnected(i) && !IsDisconnected(i); }
     409    bool IsDisconnected(int i) const  { return gi_NumConnect[i]<=0 && g_port[i].sockDef==0; }
     410    int  GetNumConnected(int i) const { return gi_NumConnect[i]; }
     411    */
     412
    403413    void SetIgnore(int i, bool b) const { if (g_port[i].sockDef!=0) g_port[i].sockDef=b?-1:1; }
    404414    bool IsIgnored(int i) const { return g_port[i].sockDef==-1; }
     
    564574    }
    565575
    566     int runWrite(FileHandle_t handler, EVENT *e, size_t)
     576    int runWrite(FileHandle_t handler, EVENT *e, size_t sz)
    567577    {
    568578        DataProcessorImp *file = reinterpret_cast<DataProcessorImp*>(handler);
     
    870880                break;
    871881
     882        /*
    872883        // FIXME: Time limit?!
    873         /*
    874884        static Time oldt(boost::date_time::neg_infin);
    875885        Time newt;
    876886
    877887        // FIXME: Only send events if the have newer run-numbers
    878         if (newt<oldt+boost::posix_time::seconds(1))
    879             return 0;
     888        if (newt<oldt+boost::posix_time::milliseconds(100))
     889            return;
    880890
    881891        oldt = newt;
     
    883893
    884894        // FIXME: Check event type here
    885         return;
    886895
    887896        const size_t sz = sizeof(EVENT)+event->Roi*2*1440;
     
    894903        DataCalib::Apply(vec, event->Adc_Data, event->StartPix, event->Roi);
    895904
    896         vector<float> data2(1440); // Mean, RMS, Max, Pos
    897         CalibData::GetPixelMax(data2.data(), vec, event->Roi, 0, event->Roi);
    898 
     905        vector<float> data2(1440); // Mean, RMS, Max, Pos, first, last
     906        CalibData::GetPixelMax(data2.data(), vec, event->Roi, 0, event->Roi-1);
     907
     908//        dim_lock();
    899909        fDimFeedbackData.Update(data2);
     910//        dim_unlock();
    900911    }
    901912
Note: See TracChangeset for help on using the changeset viewer.