72 lines
1.5 KiB
C++
72 lines
1.5 KiB
C++
#ifndef PROGRAM_SETTING_H
|
|
#define PROGRAM_SETTING_H
|
|
|
|
#include <TQObject.h>
|
|
#include <RQ_OBJECT.h>
|
|
#include <TGNumberEntry.h>
|
|
#include <TGButton.h>
|
|
#include <TGComboBox.h>
|
|
#include <TThread.h>
|
|
#include <TGLabel.h>
|
|
#include <TGTextEdit.h>
|
|
#include "ClassDigitizer.h"
|
|
#include "macro.h"
|
|
|
|
class TGWindow;
|
|
class TGMainFrame;
|
|
|
|
class ProgramSetting{
|
|
RQ_OBJECT("ProgramSetting")
|
|
private:
|
|
TGMainFrame * fMain;
|
|
|
|
TGTextEntry * txtIP;
|
|
TGTextEntry * txtDBName;
|
|
TGTextEntry * txtDataPath;
|
|
TGTextEntry * txtExpName;
|
|
TGTextEntry * txtElogIP;
|
|
|
|
TGCheckButton * cbDatabase;
|
|
TGCheckButton * cbElog;
|
|
|
|
TGNumberEntry * numPort;
|
|
TGNumberEntry * numBoard;
|
|
|
|
public:
|
|
ProgramSetting(const TGWindow *p);
|
|
virtual ~ProgramSetting();
|
|
|
|
void CloseWindow() { delete this;}
|
|
|
|
static std::string databaseIP;
|
|
static std::string databaseName;
|
|
static std::string DataSavingPath;
|
|
static std::string ExpName;
|
|
static std::string ElogIP;
|
|
|
|
static bool EnableElog;
|
|
static bool EnableDatabase;
|
|
|
|
static unsigned short maxPort;
|
|
static unsigned short maxBoardPrePort;
|
|
|
|
const static std::string settingFileName; // fixed as FSUDAQ.sh
|
|
const static std::string programPath;
|
|
|
|
void SetSetting(); // *SIGNAL*
|
|
void LogMsg(TString msg); // *SIGNAL*
|
|
|
|
static void PrintSettings();
|
|
static void LoadProgramSetting();
|
|
static int SaveProgramSetting(); /// return 1 for OK. return 0 for not OK
|
|
|
|
void SetFolder();
|
|
|
|
void SetDataBaseElogOnOff();
|
|
|
|
void SetSearchRange();
|
|
|
|
};
|
|
|
|
#endif
|