Changeset 12475 for trunk


Ignore:
Timestamp:
11/09/11 21:47:01 (13 years ago)
Author:
tbretz
Message:
Write ROI at the beginning of fStats so that we can skip it when writing the data correctly; added RunDescription to Open
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/DataCalib.cc

    r12469 r12475  
    5858}
    5959
    60 bool DataCalib::Open(RUN_HEAD* h)
     60bool DataCalib::Open(const RUN_HEAD* h, const FAD::RunDescription &d)
    6161{
    6262    if (h->NPix != 1440)
     
    141141    fData.fNumTm = hastm ? 160 : 0;
    142142
    143     return DataWriteFits::Open(h);
     143    return DataWriteFits::Open(h, d);
    144144}
    145145
     
    259259        return;
    260260
    261     if (!file.WriteData(buf.data(), (1440*1024*4 + 1440*roi*2 + ntm*roi*2 + 3)*sizeof(float)))
     261    if (!file.WriteData(buf.data()+sizeof(float), (1440*1024*4 + 1440*roi*2 + ntm*roi*2 + 3)*sizeof(float)))
    262262        return;
    263263
     
    280280        // Scale ADC data from 12bit to 2000mV
    281281        GetSampleStats(fStats.data()+4, 2000./4096);
    282         reinterpret_cast<uint32_t*>(fStats.data())[0] = GetRunId();;
     282        reinterpret_cast<uint32_t*>(fStats.data())[1] = GetRunId();;
    283283    }
    284284    if (fData.fStep==1)
     
    298298        // Scale ADC data from 12bit to 2000mV
    299299        GetSampleStats(fStats.data()+1024*1440*2+4, 2000./4096/fData.fNumOffset);//0.5);
    300         reinterpret_cast<uint32_t*>(fStats.data())[1] = GetRunId();;
     300        reinterpret_cast<uint32_t*>(fStats.data())[2] = GetRunId();;
    301301    }
    302302    if (fData.fStep==2)
     
    307307        // Scale ADC data from 12bit to 2000mV
    308308        GetSampleStats(fStats.data()+1024*1440*4+4, 2000./4096/fData.fNumOffset);//0.5);
    309         reinterpret_cast<uint32_t*>(fStats.data())[2] = GetRunId();
    310         reinterpret_cast<uint32_t*>(fStats.data())[3] = fNumSamples;
     309        reinterpret_cast<uint32_t*>(fStats.data())[0] = fNumSamples;
     310        reinterpret_cast<uint32_t*>(fStats.data())[3] = GetRunId();
    311311    }
    312312
  • trunk/FACT++/src/DataCalib.h

    r12343 r12475  
    2121    DimDescribedService &fDim; // DimService through which statistics updates are transmitted
    2222
     23//    uint16_t fDAC[8];
     24
    2325    void WriteFits();
    2426
     
    3133    static void Update(DimDescribedService &dim);
    3234
    33     bool Open(RUN_HEAD* h);
     35    bool Open(const RUN_HEAD* h, const FAD::RunDescription &d);
    3436    bool WriteEvt(EVENT *e);
    3537    bool Close(RUN_TAIL * = 0);
Note: See TracChangeset for help on using the changeset viewer.