101 lines
2.2 KiB
C++
101 lines
2.2 KiB
C++
#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>
|
|
#include <TGTextEntry.h>
|
|
|
|
#include "CAENDigitizer.h"
|
|
|
|
#include "macro.h"
|
|
#include "ClassDigitizer.h"
|
|
#include "influxdb.h"
|
|
#include "programSetting.h"
|
|
#include "boardSetting.h"
|
|
#include "channelSettingPHA.h"
|
|
#include "channelSettingPSD.h"
|
|
#include "registerSetting.h"
|
|
#include "triggerSummary.h"
|
|
#include "startStopDialog.h"
|
|
|
|
class TGWindow;
|
|
class TGMainFrame;
|
|
class TRootEmbeddedCanvas;
|
|
class TGNumberEntry;
|
|
|
|
class MainWindow{
|
|
RQ_OBJECT("MainWindow")
|
|
private:
|
|
TGMainFrame *fMain;
|
|
static TRootEmbeddedCanvas *fEcanvas;
|
|
|
|
TGMenuBar *fMenuBar;
|
|
TGPopupMenu *fMenuFile, *fMenuDigitizers, *fMenuUtility;
|
|
|
|
static TGNumberEntry * boardIDEntry, *chIDEntry;
|
|
|
|
static TGTextView * teLog;
|
|
|
|
TGTextButton *bOpenDigitizers;
|
|
TGTextButton *bStartRun;
|
|
TGTextButton *bStopRun;
|
|
static TGComboBox* cbMode;
|
|
static TGTextEntry * dataPrefix;
|
|
static TGNumberEntry * runIDEntry;
|
|
static TGCheckButton * cbDataRun;
|
|
|
|
TGTextButton *bPlotSingleTrace;
|
|
TGTextButton *bFitTrace;
|
|
|
|
std::vector<int> portID;
|
|
std::vector<int> boardID;
|
|
std::vector<int> serialNum;
|
|
|
|
static BoardSetting * boardSetting;
|
|
ChannelSettingPHA * channelSettingPHA;
|
|
ChannelSettingPSD * channelSettingPSD;
|
|
RegisterSetting * registerSetting;
|
|
TriggerSummary * triggerSummary;
|
|
ProgramSetting * programSetting;
|
|
StartStopDialog * startStopDialog;
|
|
|
|
TThread * runThread;
|
|
|
|
public:
|
|
MainWindow(const TGWindow *p, UInt_t w, UInt_t h);
|
|
virtual ~MainWindow();
|
|
|
|
void HandleMenu(Int_t id);
|
|
|
|
void OpenDigitizers();
|
|
void ChangeBoard();
|
|
void LoadSettingFromFile();
|
|
|
|
void UpdateExpName();
|
|
|
|
void StartRun();
|
|
void StopRun();
|
|
|
|
static void * Run(void * ptr); /// thread
|
|
|
|
void PlotSingleTrace();
|
|
void FitTrace();
|
|
|
|
void ChangePlot();
|
|
|
|
void OpenChannelSetting(Int_t);
|
|
void LogMsg(char * );
|
|
void GoodBye();
|
|
static void DrawDummyGraph();
|
|
|
|
static void MakeElogEntry(bool start); /// call elogEntry.sh bash script
|
|
|
|
};
|