add Locale

This commit is contained in:
Ryan Tang 2024-08-30 12:27:24 -04:00
parent 11ae70db18
commit e79f93e9ab
5 changed files with 20 additions and 15 deletions

View File

@ -279,7 +279,9 @@ int Digitizer::CloseDigitizer(){
isConnected = false;
ret = CAEN_DGTZ_SWStopAcquisition(handle);
printf("-------- Closing Digtizer Board : %d Port : %d \n", boardID, portID);
printf(" Model %s with handle %d using %s\n", BoardInfo.ModelName, handle, LinkType == CAEN_DGTZ_USB ? "USB" : "Optical Link");
if( LinkType == CAEN_DGTZ_USB ) printf(" Model %s with handle %d using USB\n", BoardInfo.ModelName, handle);
if( LinkType == CAEN_DGTZ_OpticalLink ) printf(" Model %s with handle %d using Optical Fiber\n", BoardInfo.ModelName, handle);
if( LinkType == CAEN_DGTZ_USB_A4818 ) printf(" Model %s with handle %d using A4818\n", BoardInfo.ModelName, handle);
ret |= CAEN_DGTZ_CloseDigitizer(handle);
return ret;

View File

@ -1171,8 +1171,8 @@ void FSUDAQ::StartACQ(){
}
lbScalarACQStatus->setText("<font style=\"color: green;\"><b>ACQ On</b></font>");
if( singleHistograms ) singleHistograms->startWork();
if( onlineAnalyzer ) onlineAnalyzer->startWork();
if( singleHistograms ) singleHistograms->startTimer();
if( onlineAnalyzer ) onlineAnalyzer->startTimer();
bnStartACQ->setEnabled(false);
bnStartACQ->setStyleSheet("");
@ -1240,8 +1240,8 @@ void FSUDAQ::StopACQ(){
}
if( scalar ) scalarTimer->stop();
if( singleHistograms ) singleHistograms->stopWork();
if( onlineAnalyzer ) onlineAnalyzer->stopWork();
if( singleHistograms ) singleHistograms->stopTimer();
if( onlineAnalyzer ) onlineAnalyzer->stopTimer();
lbScalarACQStatus->setText("<font style=\"color: red;\"><b>ACQ Off</b></font>");
@ -1734,8 +1734,8 @@ void FSUDAQ::OpenScope(){
scalarTimer->start(ScalarUpdateinMiliSec);
}
if( singleHistograms ) singleHistograms->startWork();
if( onlineAnalyzer ) onlineAnalyzer->startWork();
if( singleHistograms ) singleHistograms->startTimer();
if( onlineAnalyzer ) onlineAnalyzer->startTimer();
}else{
if( influx && chkInflux->isChecked() && !elogName.isEmpty()) influx->AddDataPoint("SavingData,ExpName=" + elogName.toStdString() + " value=0");
@ -1745,8 +1745,8 @@ void FSUDAQ::OpenScope(){
scalarTimer->stop();
}
if( singleHistograms ) singleHistograms->stopWork();
if( onlineAnalyzer ) onlineAnalyzer->stopWork();
if( singleHistograms ) singleHistograms->stopTimer();
if( onlineAnalyzer ) onlineAnalyzer->stopTimer();
}
@ -1818,7 +1818,7 @@ void FSUDAQ::OpenAnalyzer(){
if( id == 5 ) onlineAnalyzer = new NeutronGamma(digi, nDigi, rawDataPath);
if( id >= 0 ) onlineAnalyzer->show();
if( isACQStarted ) onlineAnalyzer->startWork();
if( isACQStarted ) onlineAnalyzer->startTimer();
}else{
@ -1834,7 +1834,7 @@ void FSUDAQ::OpenAnalyzer(){
if( id >= 0 ){
onlineAnalyzer->show();
onlineAnalyzer->activateWindow();
if( isACQStarted ) onlineAnalyzer->stopWork();
if( isACQStarted ) onlineAnalyzer->stopTimer();
}
}

View File

@ -46,11 +46,11 @@ public:
public slots:
void FillHistograms();
void ChangeHistView();
void startWork(){
void startTimer(){
// printf("timer start\n");
timer->start(maxFillTimeinMilliSec);
}
void stopWork(){
void stopTimer(){
// printf("timer stop\n");
timer->stop();
ClearInternalDataCount();

View File

@ -64,13 +64,13 @@ public:
virtual void UpdateHistograms(); // where event-building, analysis, and ploting
public slots:
void startWork(){
void startTimer(){
// printf("start timer\n");
mb->ForceStop(false);
mb->ClearEvents();
anaTimer->start(waitTimeinSec*1000);
}
void stopWork(){
void stopTimer(){
// printf("stop worker\n");
anaTimer->stop();
mb->ForceStop(true);

View File

@ -3,6 +3,7 @@
#include <QProcess>
#include <QPushButton>
#include <QFile>
#include <QLocale>
#include "FSUDAQ.h"
@ -27,6 +28,8 @@ int main(int argc, char *argv[]){
// CustomApplication a(argc, argv);
QApplication a(argc, argv);
QLocale::setDefault(QLocale::system());
setpriority(PRIO_PROCESS, 0, -20);
bool isLock = false;