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

Last change on this file since 14815 was 12940, checked in by ogrimm, 13 years ago
History handling in Edd faster, improved drag and drop functionality, version of Edd for La Palma
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 *Curve;
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 NewEventNum(int);
48
49 public slots:
50 void OpenRawFile(QString=QString());
51
52 signals:
53 void PixelData(QVector<double>);
54};
55
56
57// Tab page classes
58class TP_Environment: public QWidget {
59 Q_OBJECT
60
61 public:
62 TP_Environment();
63};
64
65class TP_Bias: public QWidget {
66 Q_OBJECT
67
68 public:
69 TP_Bias();
70};
71
72class TP_FADctrl: public QWidget {
73 Q_OBJECT
74
75 public:
76 TP_FADctrl();
77};
78
79class TP_Feedback: public QWidget {
80 Q_OBJECT
81
82 public:
83 TP_Feedback();
84};
85
86class TP_DAQ: public QWidget {
87 Q_OBJECT
88 static const int MAXPIXEL = 1440;
89
90 private:
91 QFormLayout *FormLayout;
92 QWidget *Display;
93 QPushButton **Pixel;
94 QPushButton *StartStopButton;
95
96 private slots:
97 void TranslatePixelID(int);
98 void UpdateScope(int);
99 void KeepCurrent();
100 void StartStop(bool);
101 void ShowPixelDisplay();
102 void SetPixelData(QVector<double>);
103 void OpenDataFile();
104
105 public:
106 TP_DAQ(bool);
107 ~TP_DAQ();
108
109 EventScope *Scope;
110 QSpinBox *Channel, *Chip, *Board, *PixelID, *Event;
111 QPlainTextEdit *RunHeaderDisplay, *EventHeaderDisplay;
112 QLineEdit *FilenameBox;
113};
114
115class TP_Evidence: public QWidget {
116 Q_OBJECT
117
118 private slots:
119 void ToggleAlarm(bool);
120 void StartDIMBrowser();
121 void StartELog();
122
123 public:
124 TP_Evidence();
125};
126
127
128// Main window class
129class GUI: public QMainWindow, public DimBrowser {
130 Q_OBJECT
131
132 private:
133 QTabWidget *TabWidget;
134
135 void closeEvent(QCloseEvent *);
136
137 public:
138 GUI();
139
140 private slots:
141 void MenuAbout();
142 void MenuNewHistory();
143 void MenuCommand();
144 void MenuRawDataBrowser();
145 void DetachTab(int, bool=false);
146 void CheckAlarm();
147};
148
149#endif
Note: See TracBrowser for help on using the repository browser.