From 6a37002b5d6092de8866eafc05e2c2d1f35e5fc1 Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS-DAQ" Date: Mon, 27 Mar 2023 15:58:20 -0400 Subject: [PATCH] put Settings and Logs into working --- SOLARISpanel.cpp | 2 +- digiSettingsPanel.cpp | 2 +- mainwindow.cpp | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/SOLARISpanel.cpp b/SOLARISpanel.cpp index f1c2834..894f24c 100644 --- a/SOLARISpanel.cpp +++ b/SOLARISpanel.cpp @@ -31,7 +31,7 @@ SOLARISpanel::SOLARISpanel(Digitizer2Gen **digi, unsigned short nDigi, this->mapping = mapping; this->detType = detType; this->detMaxID = detMaxID; - this->digiSettingPath = analysisPath + "/Settings/"; + this->digiSettingPath = analysisPath + "/working/Settings/"; //Check number of detector type; Array 0-199, Recoil 200-299, other 300- int nDetType = detType.size(); diff --git a/digiSettingsPanel.cpp b/digiSettingsPanel.cpp index 9882793..f573d84 100644 --- a/digiSettingsPanel.cpp +++ b/digiSettingsPanel.cpp @@ -70,7 +70,7 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi this->nDigi = MaxNumberOfChannel; qDebug() << "Please increase the MaxNumberOfChannel"; } - this->digiSettingPath = analysisPath + "/Settings/"; + this->digiSettingPath = analysisPath + "/working/Settings/"; ID = 0; enableSignalSlot = false; diff --git a/mainwindow.cpp b/mainwindow.cpp index 31b2950..1c5ed73 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -268,7 +268,10 @@ MainWindow::~MainWindow(){ LogMsg("Closing SOLARIS DAQ."); - QFile file(analysisPath + "/working/Log_" + QDateTime::currentDateTime().toString("yyyyMMdd_hhmmss") + ".dat"); + QDir dir(analysisPath + "/working/Logs/"); + if( !dir.exists() ) dir.mkpath("."); + + QFile file(analysisPath + "/working/Logs/Log_" + QDateTime::currentDateTime().toString("yyyyMMdd_hhmmss") + ".dat"); printf("-------- Save log msg to %s\n", file.fileName().toStdString().c_str()); if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { QTextStream stream(&file); @@ -593,7 +596,7 @@ void MainWindow::OpenDigitizers(){ int nDigiConnected = 0; //Check path exist - QDir dir(analysisPath + "/Settings/"); + QDir dir(analysisPath + "/working/Settings/"); if( !dir.exists() ) dir.mkpath("."); for( int i = 0; i < nDigi; i++){