2022-08-04 17:27:33 -04:00
|
|
|
#include <TQObject.h>
|
|
|
|
#include <RQ_OBJECT.h>
|
|
|
|
#include <TROOT.h>
|
|
|
|
#include <TClass.h>
|
|
|
|
#include <TGClient.h>
|
|
|
|
#include <TGMenu.h>
|
|
|
|
#include <TGTextEdit.h>
|
|
|
|
#include <TThread.h>
|
|
|
|
#include <TH1F.h>
|
|
|
|
#include <TGraph.h>
|
|
|
|
#include <TBenchmark.h>
|
|
|
|
#include <TGTextEditor.h>
|
2022-09-29 15:26:40 -04:00
|
|
|
#include <TGTextEntry.h>
|
|
|
|
|
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
#include "CAENDigitizer.h"
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
#include "macro.h"
|
2022-09-29 15:26:40 -04:00
|
|
|
#include "ClassDigitizer.h"
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
#include "boardSetting.h"
|
2022-09-23 17:43:30 -04:00
|
|
|
#include "channelSettingPHA.h"
|
2022-09-26 12:45:52 -04:00
|
|
|
#include "channelSettingPSD.h"
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
///#include "settingsSummary.h"
|
|
|
|
///#include "scalarPanel.h"
|
|
|
|
class TGWindow;
|
|
|
|
class TGMainFrame;
|
|
|
|
class TRootEmbeddedCanvas;
|
|
|
|
class TGNumberEntry;
|
2022-09-29 15:26:40 -04:00
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
class MainWindow{
|
2022-09-29 15:26:40 -04:00
|
|
|
RQ_OBJECT("MainWindow")
|
2022-08-04 17:27:33 -04:00
|
|
|
private:
|
2022-09-29 15:26:40 -04:00
|
|
|
TGMainFrame *fMain;
|
|
|
|
static TRootEmbeddedCanvas *fEcanvas;
|
|
|
|
|
|
|
|
TGMenuBar *fMenuBar;
|
|
|
|
TGPopupMenu *fMenuFile, *fMenuDigitizers, *fMenuUtility;
|
|
|
|
|
|
|
|
static TGNumberEntry * boardIDEntry, *chIDEntry;
|
2022-09-26 16:47:20 -04:00
|
|
|
|
2022-09-29 15:26:40 -04:00
|
|
|
static TGTextEdit * teLog;
|
|
|
|
|
2022-09-26 16:47:20 -04:00
|
|
|
TGTextButton *bOpenDigitizers;
|
2022-09-29 15:26:40 -04:00
|
|
|
TGTextButton *bStartRun;
|
|
|
|
TGTextButton *bStopRun;
|
2022-10-03 14:17:15 -04:00
|
|
|
static TGComboBox* cbMode;
|
2022-09-29 15:26:40 -04:00
|
|
|
TGTextEntry * dataPrefix;
|
|
|
|
TGNumberEntry * runIDEntry;
|
|
|
|
|
|
|
|
TGTextButton *bPlotSingleTrace;
|
|
|
|
TGTextButton *bFitTrace;
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-09-29 15:26:40 -04:00
|
|
|
unsigned short nDigi;
|
|
|
|
vector<int> portID;
|
|
|
|
vector<int> boardID;
|
|
|
|
vector<int> serialNum;
|
|
|
|
static Digitizer ** digi;
|
|
|
|
|
|
|
|
BoardSetting * boardSetting;
|
|
|
|
ChannelSettingPHA * channelSettingPHA;
|
|
|
|
ChannelSettingPSD * channelSettingPSD;
|
|
|
|
//SettingsSummary * settingsSummary;
|
|
|
|
|
|
|
|
//ScalarPanel * scalarPanel;
|
|
|
|
//
|
|
|
|
//TThread * saveDataThread;
|
|
|
|
TThread * fillHistThread;
|
|
|
|
|
|
|
|
static TH1F * hEnergy [MaxNBoards][MaxNChannels];
|
|
|
|
static TH1F * hChannel[MaxNBoards];
|
|
|
|
|
2022-10-03 14:17:15 -04:00
|
|
|
static TGraph * gAnaTrace1; /// analogy trace 1
|
|
|
|
static TGraph * gAnaTrace2; /// analogy trace 2
|
|
|
|
static TGraph * gDigiTrace1; /// digital trace 1
|
|
|
|
static TGraph * gDigiTrace2; /// digital trace 1
|
2022-09-22 16:26:33 -04:00
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
public:
|
2022-09-29 15:26:40 -04:00
|
|
|
MainWindow(const TGWindow *p, UInt_t w, UInt_t h);
|
|
|
|
virtual ~MainWindow();
|
|
|
|
|
|
|
|
void HandleMenu(Int_t id);
|
|
|
|
|
|
|
|
void OpenDigitizers();
|
|
|
|
void ChangeBoard();
|
|
|
|
|
|
|
|
void StartRun();
|
|
|
|
void StopRun();
|
|
|
|
//static void * SaveData(void* ptr ); /// thread
|
|
|
|
|
|
|
|
//void OpenScalar();
|
|
|
|
static void * FillHistogram(void * ptr); /// thread
|
2022-09-23 17:43:30 -04:00
|
|
|
|
2022-09-29 15:26:40 -04:00
|
|
|
void PlotSingleTrace();
|
|
|
|
void FitTrace();
|
|
|
|
|
|
|
|
void Oscilloscope();
|
2022-09-27 17:58:14 -04:00
|
|
|
|
2022-09-29 15:26:40 -04:00
|
|
|
void OpenChannelSetting(Int_t);
|
|
|
|
void LogMsg(char * );
|
|
|
|
void GoodBye();
|
2022-08-04 17:27:33 -04:00
|
|
|
};
|