PixieDAQ/pixieDAQ.h

90 lines
1.7 KiB
C
Raw Normal View History

#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>
#include <TGTextEdit.h>
#include <TThread.h>
#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-03-15 19:59:36 -04:00
#include "Pixie16Class.h"
#include "global_macro.h"
#include "settingsSummary.h"
2022-03-30 16:09:12 -04:00
#include "scalarPanel.h"
#include "moduleSetting.h"
#include "channelSetting.h"
class TGWindow;
class TGMainFrame;
class TRootEmbeddedCanvas;
2022-03-15 19:59:36 -04:00
class TGNumberEntry;
class MainWindow{
RQ_OBJECT("MainWindow")
private:
TGMainFrame *fMain;
static TRootEmbeddedCanvas *fEcanvas;
2022-03-15 19:59:36 -04:00
TGMenuBar *fMenuBar;
TGPopupMenu *fMenuFile, *fMenuSettings;
static TGNumberEntry * modIDEntry, *chEntry;
TGNumberEntry * runIDEntry;
TGTextEntry * tePath;
static TGTextEdit * teLog;
2022-03-15 19:59:36 -04:00
TGTextButton *bStartRun;
TGTextButton *bStopRun;
2022-04-11 18:56:48 -04:00
TGTextButton *bFitTrace;
static Pixie16 * pixie;
SettingsSummary * settingsSummary;
ModuleSetting * moduleSetting;
ChannelSetting * channelSetting;
2022-03-30 16:09:12 -04:00
ScalarPanel * scalarPanel;
TThread * saveDataThread;
TThread * fillHistThread;
static TH1F * hEnergy[MAXMOD][MAXCH];
static bool isEnergyHistFilled;
2022-04-01 18:54:59 -04:00
2022-04-11 18:56:48 -04:00
TGraph * gTrace;
2022-03-15 19:59:36 -04: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);
void GetADCTrace();
void GetBaseLine();
void Scope();
2022-04-11 18:56:48 -04:00
void FitTrace();
void StartRun();
static void * SaveData(void* ptr ); /// thread
void StopRun();
2022-03-30 16:09:12 -04:00
void OpenScalar();
static void * FillHistogram(void * ptr); /// thread
void ChangeMod();
void ChangeChannel();
2022-04-11 18:56:48 -04:00
void LogMsg(TString msg);
void GoodBye();
};