FSUDAQ/FSUDAQ.h

104 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 "boardSetting.h"
#include "channelSettingPHA.h"
#include "channelSettingPSD.h"
///#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;
TGPopupMenu *fMenuFile, *fMenuDigitizers, *fMenuUtility;
static TGNumberEntry * boardIDEntry, *chIDEntry;
static TGTextEdit * teLog;
TGTextButton *bOpenDigitizers;
TGTextButton *bStartRun;
TGTextButton *bStopRun;
TGComboBox* cbMode;
TGTextEntry * dataPrefix;
TGNumberEntry * runIDEntry;
TGTextButton *bPlotSingleTrace;
TGTextButton *bFitTrace;
unsigned short nDigi;
vector<int> portID;
vector<int> boardID;
vector<int> serialNum;
static Digitizer ** digi;
BoardSetting * boardSetting;
ChannelSettingPHA * channelSettingPHA;
ChannelSettingPSD * channelSettingPSD;
//SettingsSummary * settingsSummary;
//ScalarPanel * scalarPanel;
//
//TThread * saveDataThread;
TThread * fillHistThread;
static TH1F * hEnergy [MaxNBoards][MaxNChannels];
static TH1F * hChannel[MaxNBoards];
TGraph * gAnaTrace1; /// analogy trace 1
TGraph * gAnaTrace2; /// analogy trace 2
TGraph * gDigiTrace1; /// digital trace 1
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
void PlotSingleTrace();
void FitTrace();
void Oscilloscope();
void OpenChannelSetting(Int_t);
void LogMsg(char * );
void GoodBye();
};