2022-03-07 16:22:04 -05:00
|
|
|
#include <TQObject.h>
|
|
|
|
#include <RQ_OBJECT.h>
|
|
|
|
|
2022-03-15 19:59:36 -04:00
|
|
|
#include <TROOT.h>
|
|
|
|
#include <TClass.h>
|
|
|
|
#include <TGClient.h>
|
|
|
|
#include <TGMenu.h>
|
2022-03-30 13:13:24 -04:00
|
|
|
#include <TGTextEdit.h>
|
|
|
|
#include <TThread.h>
|
2022-03-31 20:10:38 -04:00
|
|
|
#include <TH1F.h>
|
2022-04-11 18:56:48 -04:00
|
|
|
#include <TGraph.h>
|
2022-04-01 18:54:59 -04:00
|
|
|
#include <TBenchmark.h>
|
2022-04-13 16:22:10 -04:00
|
|
|
#include <TGTextEditor.h>
|
2022-03-15 19:59:36 -04:00
|
|
|
|
2022-03-15 15:55:31 -04:00
|
|
|
#include "Pixie16Class.h"
|
2022-04-13 15:34:04 -04:00
|
|
|
#include "global_macro.h"
|
2022-03-30 13:13:24 -04:00
|
|
|
#include "settingsSummary.h"
|
2022-03-30 16:09:12 -04:00
|
|
|
#include "scalarPanel.h"
|
2022-03-30 18:33:44 -04:00
|
|
|
#include "moduleSetting.h"
|
2022-03-30 18:48:58 -04:00
|
|
|
#include "channelSetting.h"
|
2022-03-15 15:55:31 -04:00
|
|
|
|
2022-03-07 16:22:04 -05:00
|
|
|
class TGWindow;
|
|
|
|
class TGMainFrame;
|
|
|
|
class TRootEmbeddedCanvas;
|
2022-03-15 19:59:36 -04:00
|
|
|
class TGNumberEntry;
|
2022-03-07 16:22:04 -05:00
|
|
|
|
2022-03-30 13:13:24 -04:00
|
|
|
class MainWindow{
|
2022-03-07 16:22:04 -05:00
|
|
|
RQ_OBJECT("MainWindow")
|
|
|
|
private:
|
|
|
|
TGMainFrame *fMain;
|
2022-03-31 20:10:38 -04:00
|
|
|
static TRootEmbeddedCanvas *fEcanvas;
|
2022-03-15 19:59:36 -04:00
|
|
|
|
|
|
|
TGMenuBar *fMenuBar;
|
2022-04-13 16:22:10 -04:00
|
|
|
TGPopupMenu *fMenuFile, *fMenuSettings, *fMenuUtility;
|
2022-03-15 19:59:36 -04:00
|
|
|
|
2022-04-13 15:34:04 -04:00
|
|
|
static TGNumberEntry * modIDEntry, *chEntry;
|
|
|
|
|
|
|
|
TGNumberEntry * runIDEntry;
|
2022-03-30 13:13:24 -04:00
|
|
|
TGTextEntry * tePath;
|
2022-04-13 15:34:04 -04:00
|
|
|
|
2022-03-31 20:10:38 -04:00
|
|
|
static TGTextEdit * teLog;
|
2022-03-15 19:59:36 -04:00
|
|
|
|
2022-03-30 18:33:44 -04:00
|
|
|
TGTextButton *bStartRun;
|
|
|
|
TGTextButton *bStopRun;
|
2022-04-11 18:56:48 -04:00
|
|
|
|
|
|
|
TGTextButton *bFitTrace;
|
|
|
|
|
2022-03-30 18:33:44 -04:00
|
|
|
static Pixie16 * pixie;
|
2022-03-15 15:55:31 -04:00
|
|
|
|
2022-03-30 18:33:44 -04:00
|
|
|
SettingsSummary * settingsSummary;
|
|
|
|
ModuleSetting * moduleSetting;
|
2022-03-30 18:48:58 -04:00
|
|
|
ChannelSetting * channelSetting;
|
2022-03-30 16:09:12 -04:00
|
|
|
ScalarPanel * scalarPanel;
|
|
|
|
|
2022-04-13 15:34:04 -04:00
|
|
|
TThread * saveDataThread;
|
2022-03-31 20:10:38 -04:00
|
|
|
TThread * fillHistThread;
|
|
|
|
|
2022-04-13 15:34:04 -04:00
|
|
|
static TH1F * hEnergy[MAXMOD][MAXCH];
|
2022-04-13 16:22:10 -04:00
|
|
|
static TH1F * hChannel[MAXMOD];
|
2022-04-13 15:34:04 -04:00
|
|
|
static bool isEnergyHistFilled;
|
2022-04-01 18:54:59 -04:00
|
|
|
|
2022-04-11 18:56:48 -04:00
|
|
|
TGraph * gTrace;
|
2022-04-13 16:22:10 -04:00
|
|
|
|
|
|
|
TGTextEditor * configEditor;
|
2022-04-11 18:56:48 -04:00
|
|
|
|
2022-03-15 19:59:36 -04:00
|
|
|
|
2022-03-07 16:22:04 -05:00
|
|
|
public:
|
|
|
|
MainWindow(const TGWindow *p, UInt_t w, UInt_t h);
|
|
|
|
virtual ~MainWindow();
|
|
|
|
|
2022-03-15 19:59:36 -04:00
|
|
|
void HandleMenu(Int_t id);
|
|
|
|
|
2022-03-30 13:13:24 -04:00
|
|
|
void GetADCTrace();
|
|
|
|
void GetBaseLine();
|
|
|
|
void Scope();
|
2022-04-11 18:56:48 -04:00
|
|
|
void FitTrace();
|
2022-03-30 13:13:24 -04:00
|
|
|
|
2022-03-30 18:33:44 -04:00
|
|
|
void StartRun();
|
2022-03-30 13:13:24 -04:00
|
|
|
static void * SaveData(void* ptr ); /// thread
|
2022-03-16 21:10:12 -04:00
|
|
|
void StopRun();
|
2022-03-15 15:55:31 -04:00
|
|
|
|
2022-03-30 16:09:12 -04:00
|
|
|
void OpenScalar();
|
|
|
|
|
2022-03-31 20:10:38 -04:00
|
|
|
static void * FillHistogram(void * ptr); /// thread
|
2022-04-13 15:34:04 -04:00
|
|
|
void ChangeMod();
|
|
|
|
void ChangeChannel();
|
2022-03-30 13:13:24 -04:00
|
|
|
|
2022-04-11 18:56:48 -04:00
|
|
|
|
2022-03-30 13:13:24 -04:00
|
|
|
void LogMsg(TString msg);
|
|
|
|
|
2022-03-15 14:38:58 -04:00
|
|
|
void GoodBye();
|
|
|
|
|
2022-03-07 16:22:04 -05:00
|
|
|
};
|