Changeset 10962


Ignore:
Timestamp:
06/09/11 19:56:48 (13 years ago)
Author:
tbretz
Message:
Fixed ThresholdDisableOthers
Location:
trunk/FACT++/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/FactGui.h

    r10959 r10962  
    11661166        // fPatch converts from software id to software patch id
    11671167        for (int i=0; i<1440; i++)
    1168             dat[i] = sdata.fRatePatch[fPatch[i]];
     1168        {
     1169            const int isw = fPatch[i];
     1170            const int ihw = fPatchMapHW[isw];
     1171            dat[i] = sdata.fRatePatch[ihw];
     1172        }
    11691173
    11701174        c = fRatesCanv->GetCanvas();
     
    19251929
    19261930            ostringstream str;
    1927             str << "  HW=" << ihw << "  Patch=" << idx << "  (Crate=" << crate << " Board=" << board << " Patch=" << patch << ")";
     1931            str << " (hw=" << ihw << ")  Patch=" << idx << "  (hw=" << fPatchMapHW[idx] << "; Crate=" << crate << " Board=" << board << " Patch=" << patch << ")";
    19281932
    19291933            tipText += str.str().c_str();
     
    19741978        fPatchRate->setValue(cam.GetData(isw));
    19751979
     1980        // Loop over the software idx of all pixels
    19761981        for (unsigned int i=0; i<fPatch.size(); i++)
    19771982            if (fPatch[i]==isw)
     
    20642069
    20652070        Dim::SendCommand("FTM_CONTROL/DISABLE_ALL_PIXELS_EXCEPT", ihw);
     2071    }
     2072
     2073    void on_fThresholdDisableOthers_clicked()
     2074    {
     2075        const uint16_t isw = fThresholdIdx->value();
     2076        const uint16_t ihw = fPatchMapHW[isw];
     2077
     2078        Dim::SendCommand("FTM_CONTROL/DISABLE_ALL_PATCHES_EXCEPT", ihw);
    20662079    }
    20672080
  • trunk/FACT++/gui/MainWindow.cc

    r10959 r10962  
    245245}
    246246
    247 void MainWindow::on_fThresholdDisableOthers_clicked()
    248 {
    249     Dim::SendCommand("FTM_CONTROL/DISABLE_ALL_PATCHES_EXCEPT",
    250                      uint16_t(fThresholdIdx->value()));
    251 }
    252 
    253247void MainWindow::on_fEnableTrigger_stateChanged(int b)
    254248{
  • trunk/FACT++/gui/MainWindow.h

    r10953 r10962  
    8585
    8686    // Tab: Rates
    87     void on_fPixelEnable_stateChanged(int);
    88     void on_fThresholdVal_valueChanged(int);
     87    virtual void on_fPixelEnable_stateChanged(int) { }
     88    virtual void on_fThresholdVal_valueChanged(int) { }
    8989    virtual void on_fThresholdIdx_valueChanged(int) { }
    9090    virtual void on_fThresholdCrate_valueChanged(int) { }
     
    9393    virtual void on_fPixelIdx_valueChanged(int) { }
    9494
    95     void on_fPixelDisableOthers_clicked();
    96     virtual void on_fThresholdDisableOthers_clicked();
     95    void on_fPixelEnableAll_clicked();
     96    void on_fPixelDisableAll_clicked();
     97
     98    virtual void on_fPixelDisableOthers_clicked() { }
     99    virtual void on_fThresholdDisableOthers_clicked() { }
    97100
    98101    virtual void on_fRatePatch1_valueChanged(int) { }
Note: See TracChangeset for help on using the changeset viewer.