source: fact/tools/Edd/Edd.h@ 12072

Last change on this file since 12072 was 11360, checked in by ogrimm, 13 years ago
Updates to make Edd more responsive with high incoming event rate
File size: 2.6 KB
Line 
1#ifndef EDD_H_SEEN
2#define EDD_H_SEEN
3
4#include "../../Evidence/GUI.h"
5#include "RawDataCTX.h"
6#include "PixelMap.h"
7
8#define SVN_REVISION "$Revision: 10143 $"
9
10class TP_DAQ;
11
12// Event oscilloscope
13class EventScope: public EddBasePlot, public PixelMap, public EddWidget {
14 Q_OBJECT
15
16 private:
17 struct ItemDetails {
18 unsigned int Board, Chip, Channel;
19 QwtPlotCurve *Signal;
20 QwtPlotMarker *Trigger;
21 };
22 QList<struct ItemDetails> List;
23
24 class TP_DAQ *DAQPage;
25 QString Name;
26 bool Active;
27 QAction *PhysPipeAction;
28 QAction *PersistanceAction;
29 FILE *Tmpfile;
30 QTemporaryFile File;
31 QString LastPath;
32
33 public:
34 EventScope(class TP_DAQ *, QWidget * = NULL);
35 ~EventScope();
36
37 void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int=-1);
38 void UpdateFirst(int, int, int);
39 void AddTrace(int, int, int);
40 void SetActive(bool);
41 QString ToPixel(unsigned int, unsigned int, unsigned int, unsigned int);
42 RawDataCTX *RD;
43 CTX_ErrCode ErrCode;
44
45 private slots:
46 void PlotTraces();
47 void DeleteCurve(QwtPlotCurve *);
48 void NewEventNum(int);
49
50 public slots:
51 void OpenRawFile(QString=QString());
52
53 signals:
54 void PixelData(QVector<double>);
55};
56
57
58// Tab page classes
59class TP_Environment: public QWidget {
60 Q_OBJECT
61
62 public:
63 TP_Environment();
64};
65
66class TP_Bias: public QWidget {
67 Q_OBJECT
68
69 public:
70 TP_Bias();
71};
72
73class TP_FADctrl: public QWidget {
74 Q_OBJECT
75
76 public:
77 TP_FADctrl();
78};
79
80class TP_Feedback: public QWidget {
81 Q_OBJECT
82
83 public:
84 TP_Feedback();
85};
86
87class TP_DAQ: public QWidget {
88 Q_OBJECT
89 static const int MAXPIXEL = 1440;
90
91 private:
92 QFormLayout *FormLayout;
93 QWidget *Display;
94 QPushButton **Pixel;
95 QPushButton *StartStopButton;
96
97 private slots:
98 void TranslatePixelID(int);
99 void UpdateScope(int);
100 void KeepCurrent();
101 void StartStop(bool);
102 void ShowPixelDisplay();
103 void SetPixelData(QVector<double>);
104 void OpenDataFile();
105
106 public:
107 TP_DAQ(bool);
108 ~TP_DAQ();
109
110 EventScope *Scope;
111 QSpinBox *Channel, *Chip, *Board, *PixelID, *Event;
112 QPlainTextEdit *RunHeaderDisplay, *EventHeaderDisplay;
113 QLineEdit *FilenameBox;
114};
115
116class TP_Evidence: public QWidget {
117 Q_OBJECT
118
119 private slots:
120 void ToggleAlarm(bool);
121 void StartDIMBrowser();
122 void StartELog();
123
124 public:
125 TP_Evidence();
126};
127
128
129// Main window class
130class GUI: public QMainWindow, public DimBrowser {
131 Q_OBJECT
132
133 private:
134 QTabWidget *TabWidget;
135
136 void closeEvent(QCloseEvent *);
137
138 public:
139 GUI();
140
141 private slots:
142 void MenuAbout();
143 void MenuNewHistory();
144 void MenuCommand();
145 void MenuRawDataBrowser();
146 void DetachTab(int, bool=false);
147 void CheckAlarm();
148};
149
150#endif
Note: See TracBrowser for help on using the repository browser.