Changeset 13924 for trunk/FACT++


Ignore:
Timestamp:
05/26/12 17:41:52 (12 years ago)
Author:
tbretz
Message:
Update a short service whic only transmits the run-numbers for the DRS calibration.
Location:
trunk/FACT++/src
Files:
3 edited

Legend:

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

    r12809 r13924  
    3333}
    3434
    35 bool DataCalib::ResetTrgOff(DimDescribedService &dim)
     35bool DataCalib::ResetTrgOff(DimDescribedService &dim, DimDescribedService &runs)
    3636{
    3737    if (fData.fStep!=3)
     
    4545
    4646    fData.fStep = 1;
    47     Update(dim);
     47    Update(dim, runs);
    4848    fData.fStep = 2;
    4949
     
    5151}
    5252
    53 void DataCalib::Update(DimDescribedService &dim)
     53void DataCalib::Update(DimDescribedService &dim, DimDescribedService &runs)
    5454{
    5555    const uint16_t roi = fData.fRoi;
     
    7676
    7777    dim.Update(buf);
     78
     79    runs.setData(buf.data(), 4*sizeof(uint32_t));
     80    runs.Update();
    7881}
    7982
     
    334337        WriteFits();
    335338
    336     Update(fDim);
     339    Update(fDim, fDimRuns);
    337340
    338341    fData.fStep++;
  • trunk/FACT++/src/DataCalib.h

    r13647 r13924  
    1919    static bool fProcessing;
    2020
    21     DimDescribedService &fDim; // DimService through which statistics updates are transmitted
     21    DimDescribedService &fDim;     // DimService through which statistics updates are transmitted
     22    DimDescribedService &fDimRuns; // DimService through which statistics updates are transmitted
    2223
    2324//    uint16_t fDAC[8];
     
    2829
    2930public:
    30     DataCalib(const std::string &path, uint32_t id, DimDescribedService &dim, MessageImp &imp) : DataWriteFits(path, id, imp), fDim(dim)
     31    DataCalib(const std::string &path, uint32_t id, DimDescribedService &dim, DimDescribedService &runs, MessageImp &imp) : DataWriteFits(path, id, imp), fDim(dim), fDimRuns(runs)
    3132    {
    3233    }
    3334
    3435    static void Restart();
    35     static bool ResetTrgOff(DimDescribedService &dim);
    36     static void Update(DimDescribedService &dim);
     36    static bool ResetTrgOff(DimDescribedService &dim, DimDescribedService &runs);
     37    static void Update(DimDescribedService &dim, DimDescribedService &runs);
    3738
    3839    bool Open(const RUN_HEAD* h, const FAD::RunDescription &d);
  • trunk/FACT++/src/EventBuilderWrapper.h

    r13561 r13924  
    9999    DimDescribedService fDimRoi;
    100100    DimDescribedService fDimDac;
     101    DimDescribedService fDimDrsRuns;
    101102    DimDescribedService fDimDrsCalibration;
    102103    DimDescribedService fDimStatistics1;
     
    208209                                                            "DAC settings of each FAD board"
    209210                                                           "|DAC[int]:DAC counts, sequentially DAC 0 board 0, 0/1, 0/2... (plus min max)"),
     211        fDimDrsRuns     ("FAD_CONTROL/DRS_RUNS",           "I:1;I:3", ""),
    210212        fDimDrsCalibration("FAD_CONTROL/DRS_CALIBRATION",  "I:1;I:3;F:1474560;F:1474560;F:1474560;F:1474560;F:1474560;F:1474560;F:163840;F:163840", ""),
    211213        fDimStatistics1 ("FAD_CONTROL/STATISTICS1",        "I:3;I:5;X:4;I:3;I:3;I:40;I:1;I:2;C:40;I:40;I:40;X:40",
     
    453455        {
    454456            DataCalib::Restart();
    455             DataCalib::Update(fDimDrsCalibration);
     457            DataCalib::Update(fDimDrsCalibration, fDimDrsRuns);
    456458            fMsg.Message("Resetted DRS calibration.");
    457459        }
     
    460462    virtual int ResetSecondaryDrsBaseline()
    461463    {
    462         if (DataCalib::ResetTrgOff(fDimDrsCalibration))
     464        if (DataCalib::ResetTrgOff(fDimDrsCalibration, fDimDrsRuns))
    463465        {
    464466            fFileFormat = FAD::kCalib;
     
    510512            return;
    511513        fMsg.Info("Successfully loaded DRS calibration from "+string(fname));
    512         DataCalib::Update(fDimDrsCalibration);
     514        DataCalib::Update(fDimDrsCalibration, fDimDrsRuns);
    513515    }
    514516
     
    616618        case FAD::kFits:    file = new DataWriteFits2(fPath, runid,  fMsg); break;
    617619        case FAD::kRaw:     file = new DataWriteRaw(fPath, runid,   fMsg); break;
    618         case FAD::kCalib:   file = new DataCalib(fPath, runid, fDimDrsCalibration, fMsg); break;
     620        case FAD::kCalib:   file = new DataCalib(fPath, runid, fDimDrsCalibration, fDimDrsRuns, fMsg); break;
    619621        }
    620622
Note: See TracChangeset for help on using the changeset viewer.