2023-06-02 15:41:26 -04:00
|
|
|
#ifndef ANALYZER_H
|
|
|
|
#define ANALYZER_H
|
2023-05-26 18:06:37 -04:00
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QChart>
|
|
|
|
#include <QChartView>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QGridLayout>
|
|
|
|
#include <QGroupBox>
|
|
|
|
|
|
|
|
#include "macro.h"
|
|
|
|
#include "ClassDigitizer.h"
|
|
|
|
#include "CustomThreads.h"
|
|
|
|
#include "CustomWidgets.h"
|
|
|
|
#include "OnlineEventBuilder.h"
|
|
|
|
|
|
|
|
/**************************************
|
|
|
|
|
|
|
|
This class is for, obviously, Online analysis.
|
|
|
|
|
|
|
|
It provides essential event building, histograms, and filling.
|
|
|
|
|
|
|
|
This is the mother of all other derivative analysis class.
|
|
|
|
|
|
|
|
derivative class should define the SetUpCanvas() and UpdateHistogram();
|
|
|
|
|
|
|
|
***************************************/
|
2023-06-02 18:13:47 -04:00
|
|
|
#include "Histogram1D.h"
|
|
|
|
#include "Histogram2D.h"
|
2023-05-26 18:06:37 -04:00
|
|
|
|
|
|
|
//^==============================================
|
|
|
|
//^==============================================
|
2023-06-02 15:41:26 -04:00
|
|
|
class Analyzer : public QMainWindow{
|
2023-05-26 18:06:37 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-06-02 15:41:26 -04:00
|
|
|
Analyzer(Digitizer ** digi, unsigned int nDigi, QMainWindow * parent = nullptr);
|
|
|
|
virtual ~Analyzer();
|
2023-05-26 18:06:37 -04:00
|
|
|
|
|
|
|
virtual void SetUpCanvas();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void StartThread();
|
|
|
|
void StopThread();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
virtual void UpdateHistograms(); // where event-building, analysis, and ploting
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
Digitizer ** digi;
|
|
|
|
unsigned short nDigi;
|
|
|
|
|
|
|
|
OnlineEventBuilder ** oeb;
|
|
|
|
TimingThread * buildTimerThread;
|
|
|
|
|
|
|
|
QGridLayout * layout;
|
|
|
|
|
2023-05-30 10:08:39 -04:00
|
|
|
//======================== custom histograms
|
|
|
|
Histogram2D * h2;
|
2023-05-31 17:30:46 -04:00
|
|
|
Histogram1D * h1;
|
2023-05-30 10:08:39 -04:00
|
|
|
|
2023-05-26 18:06:37 -04:00
|
|
|
};
|
|
|
|
#endif
|