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>
|
|
|
|
#include "CAENDigitizer.h"
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
#include "macro.h"
|
2022-08-04 17:27:33 -04:00
|
|
|
#include "DigitizerPHA.h"
|
|
|
|
#include "DigitizerPSD.h"
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
#include "boardSetting.h"
|
2022-09-23 17:43:30 -04:00
|
|
|
#include "channelSettingPHA.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;
|
|
|
|
class MainWindow{
|
|
|
|
RQ_OBJECT("MainWindow")
|
|
|
|
private:
|
|
|
|
TGMainFrame *fMain;
|
|
|
|
static TRootEmbeddedCanvas *fEcanvas;
|
|
|
|
|
|
|
|
TGMenuBar *fMenuBar;
|
2022-08-26 17:18:43 -04:00
|
|
|
TGPopupMenu *fMenuFile, *fMenuDigitizers, *fMenuUtility;
|
2022-08-04 18:02:03 -04:00
|
|
|
|
2022-08-23 13:43:05 -04:00
|
|
|
//static TGNumberEntry * boardIDEntry, *chEntry;
|
2022-08-04 17:27:33 -04:00
|
|
|
//TGNumberEntry * runIDEntry;
|
|
|
|
//TGTextEntry * tePath;
|
|
|
|
//
|
|
|
|
static TGTextEdit * teLog;
|
|
|
|
//
|
|
|
|
//TGTextButton *bStartRun;
|
|
|
|
//TGTextButton *bStopRun;
|
|
|
|
//TGTextButton *bFitTrace;
|
|
|
|
|
2022-09-16 17:53:57 -04:00
|
|
|
unsigned short nDigi;
|
2022-08-23 13:43:05 -04:00
|
|
|
vector<int> DPPType;
|
|
|
|
vector<int> portID;
|
|
|
|
vector<int> boardID;
|
|
|
|
vector<int> serialNum;
|
|
|
|
static Digitizer ** digi;
|
2022-09-16 17:53:57 -04:00
|
|
|
unsigned short nPHA, nPSD;
|
|
|
|
static DigitizerPHA ** pha;
|
|
|
|
static DigitizerPSD ** psd;
|
2022-08-04 18:02:03 -04:00
|
|
|
|
2022-08-23 13:43:05 -04:00
|
|
|
BoardSetting * boardSetting;
|
2022-09-23 17:43:30 -04:00
|
|
|
ChannelSettingPHA * channelSettingPHA;
|
2022-08-04 17:27:33 -04:00
|
|
|
//SettingsSummary * settingsSummary;
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
//ScalarPanel * scalarPanel;
|
|
|
|
//
|
|
|
|
//TThread * saveDataThread;
|
|
|
|
//TThread * fillHistThread;
|
|
|
|
//static TH1F * hEnergy[MAXMOD][MAXCH];
|
|
|
|
//static TH1F * hChannel[MAXMOD];
|
|
|
|
//static bool isEnergyHistFilled;
|
|
|
|
//TGraph * gTrace;
|
|
|
|
//
|
|
|
|
//TGTextEditor * configEditor;
|
2022-09-22 16:26:33 -04:00
|
|
|
|
2022-09-23 17:43:30 -04:00
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
public:
|
|
|
|
MainWindow(const TGWindow *p, UInt_t w, UInt_t h);
|
|
|
|
virtual ~MainWindow();
|
|
|
|
|
|
|
|
void HandleMenu(Int_t id);
|
|
|
|
|
2022-08-04 18:02:03 -04:00
|
|
|
void DetectDigitizer();
|
|
|
|
|
2022-08-04 17:27:33 -04:00
|
|
|
//void GetADCTrace();
|
|
|
|
//void GetBaseLine();
|
|
|
|
//void Scope();
|
|
|
|
//void FitTrace();
|
|
|
|
//void StartRun();
|
|
|
|
//static void * SaveData(void* ptr ); /// thread
|
|
|
|
//void StopRun();
|
|
|
|
//void OpenScalar();
|
|
|
|
//static void * FillHistogram(void * ptr); /// thread
|
|
|
|
//void ChangeMod();
|
|
|
|
//void ChangeChannel();
|
2022-09-23 17:43:30 -04:00
|
|
|
|
|
|
|
void OpenChannelSetting(Int_t);
|
2022-09-23 12:36:31 -04:00
|
|
|
void LogMsg(char * );
|
2022-08-04 17:27:33 -04:00
|
|
|
void GoodBye();
|
|
|
|
};
|