FACT++  1.0
MainWindow.h
Go to the documentation of this file.
1 #ifndef FACT_MainWindow
2 #define FACT_MainWindow
3 
4 #include "design.h"
5 
6 #include <QMainWindow>
7 
8 class TObject;
9 class TCanvas;
10 
11 class MainWindow : public QMainWindow, protected Ui::MainWindow
12 {
13  Q_OBJECT;
14 
15  void MakeLEDs(QPushButton **arr, QGridLayout *lay, const char *slot) const;
16 
17  void SelectTab(const QString &name);
18  void SetTriggerSequence();
19  void SetTriggerCoincidence();
20  void SetCalibCoincidence();
21 
22 protected:
23  QPushButton *fFtuLED[40];
24  QPushButton *fFadLED[40];
25 
26  bool fInHandler;
27 
28 public:
29  MainWindow(QWidget *p=0);
30 
31 private slots:
32  // Helper
35 
36  void on_fFadStart_clicked();
37  void on_fFadStop_clicked();
38  void on_fFadAbort_clicked();
41 
44 
47  void on_fMcpReset_clicked();
48 
49  // Comment Sql Table
51 
52  // System status
53  void on_fShutdown_clicked();
55 
56  // Status LEDs signals
62  //void on_fStatusFTMEnable_stateChanged(int state);
63 
64  // Tab Widget
65  void on_fTabWidget_tabCloseRequested(int which);
66  virtual void on_fTabWidget_currentChanged(int) = 0;
67 
68  // Tab: FAD
69  void slot_fFadLED_clicked();
70 
71 // void on_fFadStartRun_clicked();
72 // void on_fFadStopRun_clicked();
73  void on_fFadDrsOn_clicked();
74  void on_fFadDrsOff_clicked();
89 
90  void FadSetFileFormat(uint16_t fmt);
91 
97 
100  void on_fFadRoiCmd_valueChanged(int = 0);
102 
103  void FadDacCmd_valueChanged(uint16_t, uint16_t);
104 
113 
116 
119 
120  // Tab: Adc
121  virtual void DisplayEventData() = 0;
126 
127  // Tab: FTM
129  void on_fEnableExt1_stateChanged(int);
130  void on_fEnableExt2_stateChanged(int);
132  void on_fEnableVeto_stateChanged(int);
133 
137 
142 
146  void on_fDeadTime_valueChanged(int);
147 /*
148  void on_fClockCondR0_valueChanged(int) { }
149  void on_fClockCondR1_valueChanged(int) { }
150  void on_fClockCondR8_valueChanged(int) { }
151  void on_fClockCondR9_valueChanged(int) { }
152  void on_fClockCondR11_valueChanged(int) { }
153  void on_fClockCondR13_valueChanged(int) { }
154  void on_fClockCondR14_valueChanged(int) { }
155  void on_fClockCondR15_valueChanged(int) { }
156 */
158 
159  void on_fClockCondFreq_activated(int);
160 
167 
168  // Tab: FTUs
169  void slot_fFtuLED_clicked();
170  void on_fFtuPing_toggled(bool);
171  void on_fFtuAllOn_clicked();
172  void on_fFtuAllOff_clicked();
173 
174  // Tab: Feedback
182 
183  // Tab: Bias
184  virtual void BiasHvChannelChanged() = 0;
185  virtual void BiasCamChannelChanged() = 0;
192 
194 
195  void on_fBiasVoltMin_valueChanged(int); // FIXME: Could be set as slot in the designer
196  void on_fBiasVoltMax_valueChanged(int); // FIXME: Could be set as slot in the designer
197 
198  void on_fBiasCurrentMin_valueChanged(int); // FIXME: Could be set as slot in the designer
199  void on_fBiasCurrentMax_valueChanged(int); // FIXME: Could be set as slot in the designer
200 
205 
207  void on_fBiasReset_clicked();
208 
209  virtual void on_fBiasDispRefVolt_stateChanged(int) = 0;
210 
211  // Tab: Rates
212  //virtual void UpdateThresholdIdx() = 0;
213  virtual void on_fPixelIdx_valueChanged(int) = 0;
214  //void on_fThresholdCrate_valueChanged(int) { UpdateThresholdIdx() ; }
215  //void on_fThresholdBoard_valueChanged(int) { UpdateThresholdIdx() ; }
216  //void on_fThresholdPatch_valueChanged(int) { UpdateThresholdIdx() ; }
217 
218  virtual void on_fPixelEnable_stateChanged(int) = 0;
219  virtual void on_fThresholdVal_valueChanged(int) = 0;
220  //virtual void on_fThresholdIdx_valueChanged(int) = 0;
221 
222  virtual void on_fBoardRatesEnabled_toggled(bool) = 0;
223 
224  void on_fNoutof4Val_valueChanged(int);
225 
226  void on_fRatesMin_valueChanged(int); // FIXME: Could be set as slot in the designer
227  void on_fRatesMax_valueChanged(int); // FIXME: Could be set as slot in the designer
230 
231  virtual void on_fPixelDisableOthers_clicked() = 0;
232  virtual void on_fThresholdDisableOthers_clicked() = 0;
233  virtual void on_fThresholdEnablePatch_clicked() = 0;
234  virtual void on_fThresholdDisablePatch_clicked() = 0;
235 
236  virtual void DisplayRates() = 0;
241 
242  // Tab: RateScan
243 
244  virtual void DisplayRateScan() = 0;
249 
250  // Tab: Chat
251  void on_fChatSend_clicked();
252 
253  // Tab: Commands
255  virtual void on_fDimCmdSend_clicked() = 0;
256 
257  // Main menu
258  // void on_fMenuLogSaveAs_triggered(bool)
259 
260  virtual void slot_RootEventProcessed(TObject *, unsigned int, TCanvas *) = 0;
261  virtual void slot_RootUpdate() = 0;
262  virtual void slot_ChoosePixelThreshold(int) = 0;
263  virtual void slot_ChooseBiasChannel(int) = 0;
264  virtual void slot_CameraDoubleClick(int) = 0;
265  virtual void slot_CameraMouseMove(int) = 0;
266  void slot_TimeUpdate();
267 };
268 
269 #endif
void on_fFadSocket0_clicked()
Definition: MainWindow.cc:313
void on_fFadBusyOnOff_clicked()
Definition: MainWindow.cc:298
void on_fLpIntGroup1_stateChanged(int)
Definition: MainWindow.cc:580
void on_fFadButtonFileFormatNone_clicked()
Definition: MainWindow.h:92
void on_fRateBoard1_valueChanged(int)
Definition: MainWindow.h:239
void on_fLpExtIntensity_valueChanged(int)
Definition: MainWindow.cc:574
void on_fFadDac6Cmd_valueChanged(int v)
Definition: MainWindow.h:111
virtual void DisplayEventData()=0
void on_fFadDac4Cmd_valueChanged(int v)
Definition: MainWindow.h:109
void on_fRatePatch1_valueChanged(int)
Definition: MainWindow.h:237
void SelectTab(const QString &name)
Definition: MainWindow.cc:100
void on_fDrsCalibReset_clicked()
Definition: MainWindow.cc:401
virtual void on_fBiasDispRefVolt_stateChanged(int)=0
void on_fFadRoiCh9Cmd_valueChanged(int)
Definition: MainWindow.h:101
void on_fFadButtonFileFormatRaw_clicked()
Definition: MainWindow.h:95
void on_fMcpReset_clicked()
Definition: MainWindow.cc:211
void on_fTimeMarkerDelay_valueChanged(int)
Definition: MainWindow.cc:476
void on_fFadDac7Cmd_valueChanged(int v)
Definition: MainWindow.h:112
void on_fFadDac5Cmd_valueChanged(int v)
Definition: MainWindow.h:110
void on_fAdcBoard_valueChanged(int)
Definition: MainWindow.h:123
void on_fBiasApplyChDac_clicked()
Definition: MainWindow.cc:683
void on_fRateScanPatch1_valueChanged(int)
Definition: MainWindow.h:245
void on_fStatusFTMLed_clicked()
Definition: MainWindow.cc:750
void SetTriggerCoincidence()
void on_fLpExtGroup2_stateChanged(int)
Definition: MainWindow.cc:598
void on_fTabWidget_tabCloseRequested(int which)
Definition: MainWindow.cc:145
bool fInHandler
Definition: MainWindow.h:26
void on_fFadResetTriggerId_clicked()
Definition: MainWindow.cc:323
void on_fPhysicsWindow_valueChanged(int)
Definition: MainWindow.cc:446
void on_fFadHardReset_clicked()
Definition: MainWindow.cc:353
void on_fLpIntGroup2_stateChanged(int)
Definition: MainWindow.cc:592
virtual void slot_RootEventProcessed(TObject *, unsigned int, TCanvas *)=0
void on_fFadDwriteOn_clicked()
Definition: MainWindow.cc:258
void on_fFeedbackDevMax_valueChanged(int)
Definition: MainWindow.cc:610
void on_fEnableTrigger_stateChanged(int)
Definition: MainWindow.cc:504
virtual void slot_ChooseBiasChannel(int)=0
void on_fFeedbackStart_clicked()
Definition: MainWindow.cc:628
void on_fFadDac3Cmd_valueChanged(int v)
Definition: MainWindow.h:108
void on_fRatesMax_valueChanged(int)
Definition: MainWindow.cc:129
void on_fBiasHvBoard_valueChanged(int)
Definition: MainWindow.h:186
void on_fFadDac0Cmd_valueChanged(int v)
Definition: MainWindow.h:105
void on_fRateScanBoard2_valueChanged(int)
Definition: MainWindow.h:248
void slot_TimeUpdate()
Definition: MainWindow.cc:85
void on_fAdcCrate_valueChanged(int)
Definition: MainWindow.h:122
void on_fFtuPing_toggled(bool)
Definition: MainWindow.cc:550
void on_fFadBusyOffOn_clicked()
Definition: MainWindow.cc:303
void on_fFadSingleTrigger_clicked()
Definition: MainWindow.cc:268
void on_fFadContTriggerOff_clicked()
Definition: MainWindow.cc:288
void on_fFeedbackCmdMax_valueChanged(int)
Definition: MainWindow.cc:622
void on_fMcpStartRun_clicked()
Definition: MainWindow.cc:172
void on_fCalibCoincidence_valueChanged(int)
Definition: MainWindow.cc:452
void on_fFeedbackCalibrate_clicked()
Definition: MainWindow.cc:639
void on_fFtuAllOff_clicked()
Definition: MainWindow.cc:562
void on_fShutdown_clicked()
Definition: MainWindow.cc:134
void on_fClockCondFreq_activated(int)
Definition: MainWindow.cc:534
void on_fBiasCamPixel_valueChanged(int)
Definition: MainWindow.h:191
void on_fBiasSetToZero_clicked()
Definition: MainWindow.cc:657
virtual void on_fPixelIdx_valueChanged(int)=0
void on_fDrsCalibReset2_clicked()
Definition: MainWindow.h:118
void on_fRateBoard2_valueChanged(int)
Definition: MainWindow.h:240
void on_fRatePatch2_valueChanged(int)
Definition: MainWindow.h:238
virtual void on_fThresholdDisableOthers_clicked()=0
void on_fBiasCamBoard_valueChanged(int)
Definition: MainWindow.h:189
void on_fFadDac2Cmd_valueChanged(int v)
Definition: MainWindow.h:107
void on_fFtuAllOn_clicked()
Definition: MainWindow.cc:556
virtual void on_fThresholdDisablePatch_clicked()=0
void on_fFadBusyOffOff_clicked()
Definition: MainWindow.cc:308
void MakeLEDs(QPushButton **arr, QGridLayout *lay, const char *slot) const
Definition: MainWindow.cc:16
void on_fStatusLoggerLed_clicked()
Definition: MainWindow.cc:740
virtual void slot_ChoosePixelThreshold(int)=0
void on_fCalibWindow_valueChanged(int)
Definition: MainWindow.cc:458
void on_fFadDrsOff_clicked()
Definition: MainWindow.cc:253
void on_fFadRunNumberCmd_valueChanged(int)
Definition: MainWindow.cc:373
void on_fFadTriggerLineOff_clicked()
Definition: MainWindow.cc:278
void on_fFadBusyOnOn_clicked()
Definition: MainWindow.cc:293
void on_fFadStop_clicked()
Definition: MainWindow.cc:338
void on_fFadContTriggerOn_clicked()
Definition: MainWindow.cc:283
virtual void on_fTabWidget_currentChanged(int)=0
MainWindow(QWidget *p=0)
Definition: MainWindow.cc:50
void on_fLoggerStop_clicked()
Definition: MainWindow.cc:221
void on_fNoutof4Val_valueChanged(int)
Definition: MainWindow.cc:116
virtual void DisplayRates()=0
void on_fBiasApplyGlobalVolt_clicked()
Definition: MainWindow.cc:697
void on_fFadDwriteOff_clicked()
Definition: MainWindow.cc:263
void on_fMcpStopRun_clicked()
Definition: MainWindow.cc:206
void on_fFadRoiCmd_valueChanged(int=0)
Definition: MainWindow.cc:378
void on_fShutdownAll_clicked()
Definition: MainWindow.cc:139
void on_fLoggerStart_clicked()
Definition: MainWindow.cc:216
void SetCalibCoincidence()
void on_fStatusChatLed_clicked()
Definition: MainWindow.cc:745
virtual void slot_CameraMouseMove(int)=0
void on_fPhysicsCoincidence_valueChanged(int)
Definition: MainWindow.cc:440
void on_fAdcChip_valueChanged(int)
Definition: MainWindow.h:124
void on_fLpIntIntensity_valueChanged(int)
Definition: MainWindow.cc:568
void on_fFadButtonFileFormatFits_clicked()
Definition: MainWindow.h:94
virtual void BiasCamChannelChanged()=0
void FadSetFileFormat(uint16_t fmt)
Definition: MainWindow.cc:328
void on_fBiasApplyGlobalDac_clicked()
Definition: MainWindow.cc:703
void on_fStatusFTULed_clicked()
Definition: MainWindow.cc:755
virtual void on_fDimCmdSend_clicked()=0
Needs access to DimNetwork thus it is implemented in the derived class.
void on_fBiasCamCrate_valueChanged(int)
Definition: MainWindow.h:188
void on_fFadStart_clicked()
Definition: MainWindow.cc:333
virtual void on_fPixelEnable_stateChanged(int)=0
void on_fRateScanPatch2_valueChanged(int)
Definition: MainWindow.h:246
void on_fFadPrescalerCmd_valueChanged(int)
Definition: MainWindow.cc:368
void on_fBiasCamPatch_valueChanged(int)
Definition: MainWindow.h:190
void on_fEnableVeto_stateChanged(int)
Definition: MainWindow.cc:528
virtual void on_fThresholdVal_valueChanged(int)=0
void on_fPixelEnableAll_clicked()
Definition: MainWindow.cc:494
void on_fFeedbackCmdMin_valueChanged(int)
Definition: MainWindow.cc:616
void on_fFadButtonFileFormatZFits_clicked()
Definition: MainWindow.h:96
void on_fRateScanBoard1_valueChanged(int)
Definition: MainWindow.h:247
void on_fBiasVoltMin_valueChanged(int)
Definition: MainWindow.cc:709
void on_fBiasApplyChVolt_clicked()
Definition: MainWindow.cc:670
void on_fLpExtGroup1_stateChanged(int)
Definition: MainWindow.cc:586
virtual void on_fBoardRatesEnabled_toggled(bool)=0
void FadDacCmd_valueChanged(uint16_t, uint16_t)
Definition: MainWindow.cc:390
void on_fPrescalingVal_valueChanged(int)
Definition: MainWindow.cc:488
void on_fTriggerSeqLPext_valueChanged(int)
Definition: MainWindow.h:136
void on_fBiasVoltDac_valueChanged(int)
Definition: MainWindow.cc:644
void on_fBiasReset_clicked()
Definition: MainWindow.cc:663
void on_fFtmStartRun_clicked()
Definition: MainWindow.cc:226
virtual void DisplayRateScan()=0
void on_fDrsCalibStart_clicked()
Definition: MainWindow.cc:396
void on_fDeadTime_valueChanged(int)
Definition: MainWindow.cc:482
void on_fFadTriggerLineOn_clicked()
Definition: MainWindow.cc:273
void on_fRatesMin_valueChanged(int)
Definition: MainWindow.cc:124
void on_fDrsCalibStart2_clicked()
Definition: MainWindow.h:117
void slot_fFadLED_clicked()
Definition: MainWindow.cc:358
void on_fBiasVoltMax_valueChanged(int)
Definition: MainWindow.cc:715
void on_fPixelDisableAll_clicked()
Definition: MainWindow.cc:499
void on_fFadDrsOn_clicked()
Definition: MainWindow.cc:248
void on_fFeedbackStop_clicked()
Definition: MainWindow.cc:634
virtual void BiasHvChannelChanged()=0
void SetTriggerSequence()
Definition: MainWindow.cc:406
virtual void on_fThresholdEnablePatch_clicked()=0
void on_fFadDac1Cmd_valueChanged(int v)
Definition: MainWindow.h:106
void on_fBiasHvChannel_valueChanged(int)
Definition: MainWindow.h:187
void on_fTriggerSeqLPint_valueChanged(int)
Definition: MainWindow.h:135
void on_fFeedbackDevMin_valueChanged(int)
Definition: MainWindow.cc:604
void on_fStatusFADLed_clicked()
Definition: MainWindow.cc:760
void on_fFadAbort_clicked()
Definition: MainWindow.cc:343
void on_fCommentInsertRow_clicked()
Definition: MainWindow.cc:110
void on_fTriggerInterval_valueChanged(int)
Definition: MainWindow.cc:464
void on_fBiasCurrentMax_valueChanged(int)
Definition: MainWindow.cc:727
void on_fAdcChannel_valueChanged(int)
Definition: MainWindow.h:125
void on_fFadButtonFileFormatDebug_clicked()
Definition: MainWindow.h:93
QPushButton * fFtuLED[40]
Definition: MainWindow.h:23
virtual void on_fPixelDisableOthers_clicked()=0
void on_fTriggerSeqPed_valueChanged(int)
Definition: MainWindow.h:134
void on_fEnableExt1_stateChanged(int)
Definition: MainWindow.cc:510
void on_fBiasCurrentMin_valueChanged(int)
Definition: MainWindow.cc:721
void on_fChatSend_clicked()
Definition: MainWindow.cc:733
void on_fFadSocket17_clicked()
Definition: MainWindow.cc:318
void on_fEnableClockCond_stateChanged(int)
Definition: MainWindow.cc:522
virtual void slot_CameraDoubleClick(int)=0
void on_fTriggerDelay_valueChanged(int)
Definition: MainWindow.cc:470
void on_fEnableExt2_stateChanged(int)
Definition: MainWindow.cc:516
void slot_fFtuLED_clicked()
Definition: MainWindow.cc:540
virtual void slot_RootUpdate()=0
void on_fFadSoftReset_clicked()
Definition: MainWindow.cc:348
void on_fFtmStopRun_clicked()
Definition: MainWindow.cc:231
QPushButton * fFadLED[40]
Definition: MainWindow.h:24