Changeset 10620


Ignore:
Timestamp:
May 8, 2011, 4:47:30 PM (8 years ago)
Author:
tbretz
Message:
Implemented trigger sequence and trigger coincidences.
Location:
trunk/FACT++/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/MainWindow.cc

    r10602 r10620  
    121121}
    122122
     123void MainWindow::SetTriggerSequence()
     124{
     125    const uint8_t d[3] =
     126    {
     127        uint8_t(fTriggerSeqPed->value()),
     128        uint8_t(fTriggerSeqLPint->value()),
     129        uint8_t(fTriggerSeqLPext->value())
     130    };
     131
     132    Dim::SendCommand("FTM_CONTROL/SET_TRIGGER_SEQUENCE", d);
     133}
     134
     135void MainWindow::SetTriggerCoincidence()
     136{
     137    const uint16_t d[2] =
     138    {
     139        uint16_t(fPhysicsCoincidence->value()),
     140        uint16_t(fPhysicsWindow->value()/4-2)
     141    };
     142
     143    Dim::SendCommand("FTM_CONTROL/SET_TRIGGER_COINCIDENCE", d);
     144}
     145
     146void MainWindow::SetCalibCoincidence()
     147{
     148    const uint16_t d[2] =
     149    {
     150        uint16_t(fCalibCoincidence->value()),
     151        uint16_t(fCalibWindow->value()/4-2)
     152    };
     153
     154    Dim::SendCommand("FTM_CONTROL/SET_CALIBRATION_COINCIDENCE", d);
     155}
     156
    123157void MainWindow::on_fThresholdVal_valueChanged(int v)
    124158{
  • trunk/FACT++/gui/MainWindow.h

    r10602 r10620  
    1414
    1515    void SelectTab(const QString &name);
     16    void SetTriggerSequence();
     17    void SetTriggerCoincidence();
     18    void SetCalibCoincidence();
    1619
    1720protected:
     
    4750    void on_fEnableVeto_clicked(bool) { }
    4851
    49     void on_fTriggerSeqPed_valueChanged(int) { }
    50     void on_fTriggerSeqLPint_valueChanged(int) { }
    51     void on_fTriggerSeqLPext_valueChanged(int) { }
     52    void on_fTriggerSeqPed_valueChanged(int)   { SetTriggerSequence(); }
     53    void on_fTriggerSeqLPint_valueChanged(int) { SetTriggerSequence(); }
     54    void on_fTriggerSeqLPext_valueChanged(int) { SetTriggerSequence(); }
    5255
    5356
    54     void on_fPhysicsCoincidence_valueChanged(int) { }
    55     void on_fCalibCoincidence_valueChanged(int) { }
     57    void on_fPhysicsCoincidence_valueChanged(int) { SetTriggerCoincidence(); }
     58    void on_fPhysicsWindow_valueChanged(int)      { SetTriggerCoincidence(); }
    5659
    57     void on_fPhysicsWindow_valueChanged(int) { }
    58     void on_fCalibWindow_valueChanged(int) { }
     60    void on_fCalibCoincidence_valueChanged(int) { SetCalibCoincidence(); }
     61    void on_fCalibWindow_valueChanged(int)      { SetCalibCoincidence(); }
    5962
    6063    void on_fTriggerInterval_valueChanged(int);
Note: See TracChangeset for help on using the changeset viewer.