FSUDAQ/FSUDAQ.h

103 lines
2.3 KiB
C
Raw Normal View History

#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"
2022-08-23 13:43:05 -04:00
#include "macro.h"
#include "ClassDigitizer.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"
#include "registerSetting.h"
#include "triggerSummary.h"
2022-08-23 13:43:05 -04:00
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;
2022-09-26 16:47:20 -04:00
static TGTextEdit * teLog;
2022-09-26 16:47:20 -04:00
TGTextButton *bOpenDigitizers;
TGTextButton *bStartRun;
TGTextButton *bStopRun;
static TGComboBox* cbMode;
2022-10-03 14:35:56 -04:00
static TGTextEntry * dataPrefix;
static TGNumberEntry * runIDEntry;
TGTextButton *bPlotSingleTrace;
TGTextButton *bFitTrace;
2022-08-23 13:43:05 -04:00
unsigned short nDigi;
vector<int> portID;
vector<int> boardID;
vector<int> serialNum;
static Digitizer ** digi;
BoardSetting * boardSetting;
ChannelSettingPHA * channelSettingPHA;
ChannelSettingPSD * channelSettingPSD;
RegisterSetting * registerSetting;
TriggerSummary * triggerSummary;
//TThread * saveDataThread;
TThread * fillHistThread;
static TH1F * hEnergy [MaxNBoards][MaxNChannels];
static TH1F * hChannel[MaxNBoards];
static TGraph * gAnaTrace1; /// analogy trace 1
static TGraph * gAnaTrace2; /// analogy trace 2
static TGraph * gDigiTrace1; /// digital trace 1
static TGraph * gDigiTrace2; /// digital trace 1
public:
MainWindow(const TGWindow *p, UInt_t w, UInt_t h);
virtual ~MainWindow();
void HandleMenu(Int_t id);
void OpenDigitizers();
void ChangeBoard();
void StartRun();
void StopRun();
//static void * SaveData(void* ptr ); /// thread
//void OpenScalar();
static void * FillHistogram(void * ptr); /// thread
2022-09-23 17:43:30 -04:00
void PlotSingleTrace();
void FitTrace();
void Oscilloscope();
void OpenChannelSetting(Int_t);
void LogMsg(char * );
void GoodBye();
};