clean up FSQDAQ.h/cpp a bit
This commit is contained in:
parent
58cb570542
commit
f29dfb1438
164
FSUDAQ.cpp
164
FSUDAQ.cpp
|
@ -36,80 +36,100 @@ enum MenuIdentifiers{
|
||||||
};
|
};
|
||||||
///make static members
|
///make static members
|
||||||
Digitizer ** MainWindow::digi = NULL;
|
Digitizer ** MainWindow::digi = NULL;
|
||||||
DigitizerPHA ** MainWindow::pha = NULL;
|
|
||||||
DigitizerPSD ** MainWindow::psd = NULL;
|
|
||||||
TGTextEdit * MainWindow::teLog = NULL;
|
TGTextEdit * MainWindow::teLog = NULL;
|
||||||
TRootEmbeddedCanvas * MainWindow::fEcanvas = NULL;
|
TRootEmbeddedCanvas * MainWindow::fEcanvas = NULL;
|
||||||
|
|
||||||
MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) {
|
MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) {
|
||||||
|
|
||||||
nDigi = 0;
|
nDigi = 0;
|
||||||
nPSD = 0;
|
|
||||||
nPHA = 0;
|
|
||||||
|
|
||||||
/// Create a main frame
|
/// Create a main frame
|
||||||
fMain = new TGMainFrame(p,w,h);
|
fMain = new TGMainFrame(p,w,h);
|
||||||
///fMain->SetWMPosition(500, 500); //does not work
|
///fMain->SetWMPosition(500, 500); //does not work
|
||||||
fMain->Connect("CloseWindow()", "MainWindow", this, "GoodBye()");
|
fMain->Connect("CloseWindow()", "MainWindow", this, "GoodBye()");
|
||||||
///======================= menu
|
|
||||||
fMenuBar = new TGMenuBar(fMain, 1, 1, kHorizontalFrame);
|
|
||||||
fMain->AddFrame(fMenuBar, new TGLayoutHints(kLHintsTop | kLHintsExpandX));
|
|
||||||
fMenuFile = new TGPopupMenu(gClient->GetRoot());
|
|
||||||
fMenuFile->AddEntry("&Open File", M_FILE_OPEN);
|
|
||||||
fMenuFile->AddSeparator();
|
|
||||||
fMenuFile->AddEntry("E&xit", M_EXIT);
|
|
||||||
fMenuFile->Connect("Activated(Int_t)", "MainWindow", this, "HandleMenu(Int_t)");
|
|
||||||
fMenuBar->AddPopup("&File", fMenuFile, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
|
|
||||||
|
|
||||||
fMenuDigitizers = new TGPopupMenu(gClient->GetRoot());
|
{///======================= menu
|
||||||
fMenuDigitizers->AddEntry("&Open Digitizers", M_DIGITIZER_OPEN);
|
fMenuBar = new TGMenuBar(fMain, 1, 1, kHorizontalFrame);
|
||||||
fMenuDigitizers->AddEntry("&Load Settings", M_LOAD_SETTINGS);
|
fMain->AddFrame(fMenuBar, new TGLayoutHints(kLHintsTop | kLHintsExpandX));
|
||||||
fMenuDigitizers->AddEntry("&Trigger Summary", M_TRIGGER_SUMMARY);
|
fMenuFile = new TGPopupMenu(gClient->GetRoot());
|
||||||
fMenuDigitizers->AddSeparator();
|
fMenuFile->AddEntry("&Open File", M_FILE_OPEN);
|
||||||
fMenuDigitizers->AddEntry("Digitizer &Settings", M_BOARD_SETTINGS);
|
fMenuFile->AddSeparator();
|
||||||
fMenuDigitizers->AddEntry("&Channel Settings (PHA)", M_CH_SETTING_PHA);
|
fMenuFile->AddEntry("E&xit", M_EXIT);
|
||||||
fMenuDigitizers->AddEntry("&Channel Settings (PSD)", M_CH_SETTING_PSD);
|
fMenuFile->Connect("Activated(Int_t)", "MainWindow", this, "HandleMenu(Int_t)");
|
||||||
fMenuDigitizers->AddSeparator();
|
fMenuBar->AddPopup("&File", fMenuFile, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
|
||||||
fMenuDigitizers->AddEntry("&Program Settings", M_PROGRAM_SETTINGS);
|
|
||||||
fMenuDigitizers->Connect("Activated(Int_t)", "MainWindow", this, "HandleMenu(Int_t)");
|
fMenuDigitizers = new TGPopupMenu(gClient->GetRoot());
|
||||||
fMenuBar->AddPopup("&Digitizers", fMenuDigitizers, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
|
fMenuDigitizers->AddEntry("&Open Digitizers", M_DIGITIZER_OPEN);
|
||||||
|
fMenuDigitizers->AddEntry("&Load Settings", M_LOAD_SETTINGS);
|
||||||
fMenuDigitizers->DisableEntry( M_TRIGGER_SUMMARY);
|
fMenuDigitizers->AddEntry("&Trigger Summary", M_TRIGGER_SUMMARY);
|
||||||
fMenuDigitizers->DisableEntry( M_LOAD_SETTINGS);
|
fMenuDigitizers->AddSeparator();
|
||||||
//fMenuDigitizers->DisableEntry( M_BOARD_SETTINGS);
|
fMenuDigitizers->AddEntry("Digitizer &Settings", M_BOARD_SETTINGS);
|
||||||
//fMenuDigitizers->DisableEntry( M_CH_SETTING);
|
fMenuDigitizers->AddEntry("&Channel Settings (PHA)", M_CH_SETTING_PHA);
|
||||||
|
fMenuDigitizers->AddEntry("&Channel Settings (PSD)", M_CH_SETTING_PSD);
|
||||||
|
fMenuDigitizers->AddSeparator();
|
||||||
|
fMenuDigitizers->AddEntry("&Program Settings", M_PROGRAM_SETTINGS);
|
||||||
|
fMenuDigitizers->Connect("Activated(Int_t)", "MainWindow", this, "HandleMenu(Int_t)");
|
||||||
|
fMenuBar->AddPopup("&Digitizers", fMenuDigitizers, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
|
||||||
|
|
||||||
|
fMenuDigitizers->DisableEntry( M_TRIGGER_SUMMARY);
|
||||||
|
fMenuDigitizers->DisableEntry( M_LOAD_SETTINGS);
|
||||||
|
//fMenuDigitizers->DisableEntry( M_BOARD_SETTINGS);
|
||||||
|
//fMenuDigitizers->DisableEntry( M_CH_SETTING);
|
||||||
|
|
||||||
fMenuUtility = new TGPopupMenu(gClient->GetRoot());
|
fMenuUtility = new TGPopupMenu(gClient->GetRoot());
|
||||||
fMenuUtility->AddEntry("Plot Channels Rate", M_SHOW_CHANNELS_RATE);
|
fMenuUtility->AddEntry("Plot Channels Rate", M_SHOW_CHANNELS_RATE);
|
||||||
fMenuDigitizers->AddSeparator();
|
fMenuDigitizers->AddSeparator();
|
||||||
fMenuUtility->AddEntry("Find &Peaks", M_FINDPEAKS);
|
fMenuUtility->AddEntry("Find &Peaks", M_FINDPEAKS);
|
||||||
fMenuUtility->Connect("Activated(Int_t)", "MainWindow", this, "HandleMenu(Int_t)");
|
fMenuUtility->Connect("Activated(Int_t)", "MainWindow", this, "HandleMenu(Int_t)");
|
||||||
fMenuBar->AddPopup("&Utility", fMenuUtility, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
|
fMenuBar->AddPopup("&Utility", fMenuUtility, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
|
||||||
TGLayoutHints * uniLayoutHints = new TGLayoutHints(kLHintsNormal, 2,2,10,0); ///left, right, top, bottom
|
}
|
||||||
|
|
||||||
///================= Create a horizontal frame widget with buttons
|
|
||||||
TGHorizontalFrame *hframe = new TGHorizontalFrame(fMain,200,40);
|
|
||||||
fMain->AddFrame(hframe, new TGLayoutHints(kLHintsCenterX,2,2,2,2));
|
|
||||||
|
|
||||||
///================= Open digitizers
|
TGHorizontalFrame *hframe = new TGHorizontalFrame(fMain); fMain->AddFrame(hframe, new TGLayoutHints(kLHintsCenterX,2,2,2,2));
|
||||||
bOpenDigitizers = new TGTextButton(hframe,"Open Digitizers");
|
|
||||||
bOpenDigitizers->Connect("Clicked()","MainWindow",this,"OpenDigitizers()");
|
|
||||||
hframe->AddFrame(bOpenDigitizers, uniLayoutHints);
|
|
||||||
|
|
||||||
///================= Start Run
|
|
||||||
TGTextButton *bStartRun = new TGTextButton(hframe,"Start Run"); hframe->AddFrame(bStartRun, uniLayoutHints);
|
|
||||||
|
|
||||||
///================= Stop Run
|
|
||||||
TGTextButton *bStopRun = new TGTextButton(hframe,"Stop Run"); hframe->AddFrame(bStopRun, uniLayoutHints);
|
|
||||||
|
|
||||||
///================= signal Channel group
|
{///================= Create a horizontal frame widget with buttons
|
||||||
TGGroupFrame * group1 = new TGGroupFrame(hframe, "Single Channel", kHorizontalFrame);
|
TGGroupFrame * group0 = new TGGroupFrame(hframe, "Hahaha", kHorizontalFrame); hframe->AddFrame(group0 );
|
||||||
hframe->AddFrame(group1 );
|
TGHorizontalFrame *hfg0 = new TGHorizontalFrame(group0,200,30); group0->AddFrame(hfg0 ,new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
|
||||||
|
|
||||||
|
TGLayoutHints * uniLayoutHints = new TGLayoutHints(kLHintsNormal, 2,2,10,0); ///left, right, top, bottom
|
||||||
|
|
||||||
|
bOpenDigitizers = new TGTextButton(hfg0,"Open Digitizers"); hfg0->AddFrame(bOpenDigitizers, uniLayoutHints);
|
||||||
|
bOpenDigitizers->Connect("Clicked()","MainWindow",this,"OpenDigitizers()");
|
||||||
|
|
||||||
|
TGTextButton *bStartRun = new TGTextButton(hfg0,"Start Run"); hfg0->AddFrame(bStartRun, uniLayoutHints);
|
||||||
|
bStartRun->Connect("Clicked()", "MainWindow", this, "StartRun()");
|
||||||
|
|
||||||
|
TGTextButton *bStopRun = new TGTextButton(hfg0,"Stop Run"); hfg0->AddFrame(bStopRun, uniLayoutHints);
|
||||||
|
bStopRun->Connect("Clicked()", "MainWindow", this, "StopRun()");
|
||||||
|
|
||||||
|
TGCheckButton* bSaveData = new TGCheckButton(hfg0, "ACQ Start/Arm", 1); hfg0->AddFrame(bSaveData, uniLayoutHints);
|
||||||
|
bSaveData->SetState(kButtonDown);
|
||||||
|
}
|
||||||
|
|
||||||
TGHorizontalFrame *hframe1 = new TGHorizontalFrame(group1,200,30);
|
{///================= sigle Channel group
|
||||||
group1->AddFrame(hframe1 );
|
TGGroupFrame * group1 = new TGGroupFrame(hframe, "Single Channel", kHorizontalFrame); hframe->AddFrame(group1 );
|
||||||
|
TGHorizontalFrame *hfg1 = new TGHorizontalFrame(group1,200,30); group1->AddFrame(hfg1 ,new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
|
||||||
///================= Create canvas widget
|
|
||||||
|
TGLayoutHints * haha = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 10, 0); ///left, right, top, bottom
|
||||||
|
|
||||||
|
|
||||||
|
TGLabel * lb0 = new TGLabel(hfg1, "Board"); hfg1->AddFrame(lb0, haha);
|
||||||
|
TGNumberEntry * boardIDEntry = new TGNumberEntry(hfg1, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hfg1->AddFrame(boardIDEntry, haha);
|
||||||
|
boardIDEntry->SetWidth(50);
|
||||||
|
//boardIDEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, nBoard-1);
|
||||||
|
|
||||||
|
TGLabel * lb1 = new TGLabel(hfg1, "Channel"); hfg1->AddFrame(lb1, haha);
|
||||||
|
TGNumberEntry* chIDEntry = new TGNumberEntry(hfg1, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEAAnyNumber); hfg1->AddFrame(chIDEntry, haha);
|
||||||
|
chIDEntry->SetWidth(50);
|
||||||
|
|
||||||
|
TGLabel * lbMode = new TGLabel(hfg1, "Mode"); hfg1->AddFrame(lbMode, haha);
|
||||||
|
TGComboBox* cbMode = new TGComboBox(hfg1); hfg1->AddFrame(cbMode, haha);
|
||||||
|
cbMode->AddEntry("Energy Hist", 0);
|
||||||
|
cbMode->AddEntry("Ocs.", 1);
|
||||||
|
cbMode->Select(1, false);
|
||||||
|
cbMode->Resize(80, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
///================= canvas widget
|
||||||
fEcanvas = new TRootEmbeddedCanvas("Ecanvas",fMain,900,400);
|
fEcanvas = new TRootEmbeddedCanvas("Ecanvas",fMain,900,400);
|
||||||
fMain->AddFrame(fEcanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,10));
|
fMain->AddFrame(fEcanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,10));
|
||||||
///================= Log massage
|
///================= Log massage
|
||||||
|
@ -141,9 +161,9 @@ MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) {
|
||||||
|
|
||||||
LogMsg("Please \"Open Digitizers\" to start.");
|
LogMsg("Please \"Open Digitizers\" to start.");
|
||||||
|
|
||||||
HandleMenu(M_DIGITIZER_OPEN);
|
//HandleMenu(M_DIGITIZER_OPEN);
|
||||||
|
|
||||||
HandleMenu(M_BOARD_SETTINGS);
|
//HandleMenu(M_BOARD_SETTINGS);
|
||||||
//HandleMenu(M_CH_SETTING_PHA);
|
//HandleMenu(M_CH_SETTING_PHA);
|
||||||
//HandleMenu(M_CH_SETTING_PSD);
|
//HandleMenu(M_CH_SETTING_PSD);
|
||||||
|
|
||||||
|
@ -259,6 +279,7 @@ void MainWindow::HandleMenu(Int_t id){
|
||||||
void MainWindow::OpenDigitizers(){
|
void MainWindow::OpenDigitizers(){
|
||||||
|
|
||||||
LogMsg("============= detect digitizers");
|
LogMsg("============= detect digitizers");
|
||||||
|
vector<int> DPPType;
|
||||||
DPPType.clear();
|
DPPType.clear();
|
||||||
portID.clear();
|
portID.clear();
|
||||||
boardID.clear();
|
boardID.clear();
|
||||||
|
@ -276,8 +297,6 @@ void MainWindow::OpenDigitizers(){
|
||||||
boardID.push_back(board);
|
boardID.push_back(board);
|
||||||
serialNum.push_back(dig->GetSerialNumber());
|
serialNum.push_back(dig->GetSerialNumber());
|
||||||
dig->CloseDigitizer();
|
dig->CloseDigitizer();
|
||||||
if( dig->GetDPPType() == V1730_DPP_PHA_CODE ) nPHA ++;
|
|
||||||
if( dig->GetDPPType() == V1730_DPP_PSD_CODE ) nPSD ++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -286,9 +305,6 @@ void MainWindow::OpenDigitizers(){
|
||||||
for( int i = 0 ; i < nDigi ; i++){
|
for( int i = 0 ; i < nDigi ; i++){
|
||||||
LogMsg(Form("port: %d, board: %d, DPP Type : %d", portID[i], boardID[i], DPPType[i]));
|
LogMsg(Form("port: %d, board: %d, DPP Type : %d", portID[i], boardID[i], DPPType[i]));
|
||||||
}
|
}
|
||||||
LogMsg(Form("Number of PHA : %d", nPHA));
|
|
||||||
LogMsg(Form("Number of PSD : %d", nPSD));
|
|
||||||
|
|
||||||
|
|
||||||
if( nDigi > 0 ) {
|
if( nDigi > 0 ) {
|
||||||
LogMsg(Form("============= Connect %d digitizer(s)...", nDigi));
|
LogMsg(Form("============= Connect %d digitizer(s)...", nDigi));
|
||||||
|
@ -339,6 +355,22 @@ void MainWindow::GoodBye(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::StartRun(){
|
||||||
|
LogMsg(Form("%s",__func__));
|
||||||
|
if( digi == NULL) return;
|
||||||
|
|
||||||
|
digi[0]->StartACQ();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::StopRun(){
|
||||||
|
LogMsg(Form("%s",__func__));
|
||||||
|
if( digi == NULL) return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::OpenChannelSetting(Int_t boardID){
|
void MainWindow::OpenChannelSetting(Int_t boardID){
|
||||||
|
|
||||||
printf("#### %s \n", __func__);
|
printf("#### %s \n", __func__);
|
||||||
|
@ -406,7 +438,7 @@ void MainWindow::PlotTrace(){
|
||||||
printf("0----------%d \n", traceLength);
|
printf("0----------%d \n", traceLength);
|
||||||
|
|
||||||
if( traceLength == 0 ) {
|
if( traceLength == 0 ) {
|
||||||
LogMsg("no trace");
|
LogMsg((char *)"no trace");
|
||||||
}else{
|
}else{
|
||||||
for( int i = 0; i < traceLength ; i++) {
|
for( int i = 0; i < traceLength ; i++) {
|
||||||
//printf("%d, ", (data->Waveform1[0][0])[i]);
|
//printf("%d, ", (data->Waveform1[0][0])[i]);
|
||||||
|
|
11
FSUDAQ.h
11
FSUDAQ.h
|
@ -48,14 +48,10 @@ private:
|
||||||
TGTextButton *bOpenDigitizers;
|
TGTextButton *bOpenDigitizers;
|
||||||
|
|
||||||
unsigned short nDigi;
|
unsigned short nDigi;
|
||||||
vector<int> DPPType;
|
|
||||||
vector<int> portID;
|
vector<int> portID;
|
||||||
vector<int> boardID;
|
vector<int> boardID;
|
||||||
vector<int> serialNum;
|
vector<int> serialNum;
|
||||||
static Digitizer ** digi;
|
static Digitizer ** digi;
|
||||||
unsigned short nPHA, nPSD;
|
|
||||||
static DigitizerPHA ** pha;
|
|
||||||
static DigitizerPSD ** psd;
|
|
||||||
|
|
||||||
BoardSetting * boardSetting;
|
BoardSetting * boardSetting;
|
||||||
ChannelSettingPHA * channelSettingPHA;
|
ChannelSettingPHA * channelSettingPHA;
|
||||||
|
@ -68,15 +64,12 @@ private:
|
||||||
//TThread * fillHistThread;
|
//TThread * fillHistThread;
|
||||||
//static TH1F * hEnergy[MAXMOD][MAXCH];
|
//static TH1F * hEnergy[MAXMOD][MAXCH];
|
||||||
//static TH1F * hChannel[MAXMOD];
|
//static TH1F * hChannel[MAXMOD];
|
||||||
//static bool isEnergyHistFilled;
|
|
||||||
|
|
||||||
TGraph * gAnaTrace1; /// analogy trace 1
|
TGraph * gAnaTrace1; /// analogy trace 1
|
||||||
TGraph * gAnaTrace2; /// analogy trace 2
|
TGraph * gAnaTrace2; /// analogy trace 2
|
||||||
TGraph * gDigiTrace1; /// digital trace 1
|
TGraph * gDigiTrace1; /// digital trace 1
|
||||||
TGraph * gDigiTrace2; /// digital trace 1
|
TGraph * gDigiTrace2; /// digital trace 1
|
||||||
//TGTextEditor * configEditor;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindow(const TGWindow *p, UInt_t w, UInt_t h);
|
MainWindow(const TGWindow *p, UInt_t w, UInt_t h);
|
||||||
virtual ~MainWindow();
|
virtual ~MainWindow();
|
||||||
|
@ -89,9 +82,9 @@ public:
|
||||||
//void GetBaseLine();
|
//void GetBaseLine();
|
||||||
//void Scope();
|
//void Scope();
|
||||||
//void FitTrace();
|
//void FitTrace();
|
||||||
//void StartRun();
|
void StartRun();
|
||||||
//static void * SaveData(void* ptr ); /// thread
|
//static void * SaveData(void* ptr ); /// thread
|
||||||
//void StopRun();
|
void StopRun();
|
||||||
//void OpenScalar();
|
//void OpenScalar();
|
||||||
//static void * FillHistogram(void * ptr); /// thread
|
//static void * FillHistogram(void * ptr); /// thread
|
||||||
//void ChangeMod();
|
//void ChangeMod();
|
||||||
|
|
|
@ -46,12 +46,12 @@ ChannelSettingPHA::ChannelSettingPHA(const TGWindow *p, UInt_t w, UInt_t h, Digi
|
||||||
NChannel = 16 ;// digi[0]->GetNChannel();
|
NChannel = 16 ;// digi[0]->GetNChannel();
|
||||||
|
|
||||||
TGLabel * lb1 = new TGLabel(hframe0, "Channel :"); hframe0->AddFrame(lb1, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 5, 5, 3, 4));
|
TGLabel * lb1 = new TGLabel(hframe0, "Channel :"); hframe0->AddFrame(lb1, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 5, 5, 3, 4));
|
||||||
chIDEntry = new TGNumberEntry(hframe0, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEAAnyNumber);
|
chIDEntry = new TGNumberEntry(hframe0, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEAAnyNumber); hframe0->AddFrame(chIDEntry, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
||||||
chIDEntry->SetWidth(50);
|
chIDEntry->SetWidth(50);
|
||||||
chIDEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, -1, NChannel-1);
|
chIDEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, -1, NChannel-1);
|
||||||
chIDEntry->SetNumber(0, false);
|
chIDEntry->SetNumber(0, false);
|
||||||
chIDEntry->Connect("Modified()", "ChannelSettingPHA", this, "ChangeCh()");
|
chIDEntry->Connect("Modified()", "ChannelSettingPHA", this, "ChangeCh()");
|
||||||
hframe0->AddFrame(chIDEntry, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
||||||
|
|
||||||
TGTextButton* bSetAllChannels = new TGTextButton(hframe0, "Set All Channels", 1); hframe0->AddFrame(bSetAllChannels, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 5, 5, 3, 4));
|
TGTextButton* bSetAllChannels = new TGTextButton(hframe0, "Set All Channels", 1); hframe0->AddFrame(bSetAllChannels, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 5, 5, 3, 4));
|
||||||
bSetAllChannels->SetState(kButtonUp);
|
bSetAllChannels->SetState(kButtonUp);
|
||||||
|
|
2
test.cpp
2
test.cpp
|
@ -173,7 +173,7 @@ int main(int argc, char* argv[]){
|
||||||
ElapsedTime = CurrentTime - PreviousTime; /// milliseconds
|
ElapsedTime = CurrentTime - PreviousTime; /// milliseconds
|
||||||
|
|
||||||
if( ElapsedTime > 1000 ){
|
if( ElapsedTime > 1000 ){
|
||||||
system("clear");
|
int temp = system("clear");
|
||||||
data->PrintStat();
|
data->PrintStat();
|
||||||
PreviousTime = CurrentTime;
|
PreviousTime = CurrentTime;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user