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-11-03 16:31:33 -04:00
|
|
|
#include "influxdb.h"
|
2022-10-31 21:26:10 -04:00
|
|
|
#include "programSetting.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-10-04 16:54:01 -04:00
|
|
|
#include "registerSetting.h"
|
2022-10-05 14:28:55 -04:00
|
|
|
#include "triggerSummary.h"
|
2022-11-01 18:38:01 -04:00
|
|
|
#include "startStopDialog.h"
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
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-11-01 18:38:01 -04:00
|
|
|
static TGTextView * teLog;
|
2022-09-29 15:26:40 -04:00
|
|
|
|
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-10-03 14:35:56 -04:00
|
|
|
static TGTextEntry * dataPrefix;
|
|
|
|
static TGNumberEntry * runIDEntry;
|
2022-10-31 16:39:19 -04:00
|
|
|
static TGCheckButton * cbDataRun;
|
2022-09-29 15:26:40 -04:00
|
|
|
|
|
|
|
TGTextButton *bPlotSingleTrace;
|
|
|
|
TGTextButton *bFitTrace;
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-10-14 18:27:31 -04:00
|
|
|
std::vector<int> portID;
|
|
|
|
std::vector<int> boardID;
|
|
|
|
std::vector<int> serialNum;
|
2022-09-29 15:26:40 -04:00
|
|
|
|
2022-10-07 17:03:27 -04:00
|
|
|
static BoardSetting * boardSetting;
|
2022-09-29 15:26:40 -04:00
|
|
|
ChannelSettingPHA * channelSettingPHA;
|
|
|
|
ChannelSettingPSD * channelSettingPSD;
|
2022-10-04 16:54:01 -04:00
|
|
|
RegisterSetting * registerSetting;
|
2022-10-05 14:28:55 -04:00
|
|
|
TriggerSummary * triggerSummary;
|
2022-10-14 18:27:31 -04:00
|
|
|
ProgramSetting * programSetting;
|
2022-11-01 18:38:01 -04:00
|
|
|
StartStopDialog * startStopDialog;
|
2022-10-05 14:28:55 -04:00
|
|
|
|
2022-10-31 16:39:19 -04:00
|
|
|
TThread * runThread;
|
2022-11-03 16:31: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();
|
2022-10-06 17:10:54 -04:00
|
|
|
void LoadSettingFromFile();
|
2022-10-26 18:38:55 -04:00
|
|
|
|
|
|
|
void UpdateExpName();
|
|
|
|
|
2022-09-29 15:26:40 -04:00
|
|
|
void StartRun();
|
|
|
|
void StopRun();
|
|
|
|
|
2022-10-31 16:39:19 -04:00
|
|
|
static void * Run(void * ptr); /// thread
|
2022-09-23 17:43:30 -04:00
|
|
|
|
2022-09-29 15:26:40 -04:00
|
|
|
void PlotSingleTrace();
|
|
|
|
void FitTrace();
|
|
|
|
|
2022-10-25 14:52:57 -04:00
|
|
|
void ChangePlot();
|
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-10-31 15:00:04 -04:00
|
|
|
static void DrawDummyGraph();
|
2022-10-31 21:26:10 -04:00
|
|
|
|
|
|
|
static void MakeElogEntry(bool start); /// call elogEntry.sh bash script
|
2022-10-26 18:38:55 -04:00
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
};
|