From 63f447ab41634d5b2ce4ca1442f95944a0db4f52 Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS-DAQ" Date: Thu, 15 May 2025 18:22:45 -0500 Subject: [PATCH] added code specifically for the SOLARIS DAQ, the root path is always under /mnt/data1/ --- mainwindow.cpp | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index c13714a..b87a537 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -11,8 +11,8 @@ #include #include #include -#include -#include +//#include +//#include #include #include #include @@ -1527,7 +1527,15 @@ void MainWindow::ProgramSettingsPanel(){ expDataPath = masterExpDataPath + "/" + expName; rawDataPath = expDataPath + "/data_raw/"; - rootDataPath = expDataPath + "/root_data/"; + rootDataPath = expDataPath + "/root_data/"; + QString pcName = qEnvironmentVariable("PCName"); + if( pcName == "solaris-daq" ){ + LogMsg("This is SOLARIS DAQ...."); + rawDataPath = expDataPath + "/"; + LogMsg("Raw Data Path : " + rawDataPath); + rootDataPath = "/mnt/data1/" + expName + "/"; + LogMsg("Root Data Path : " + rootDataPath); + } leExpName->setText(expName); leRawDataPath->setText(rawDataPath); @@ -1629,6 +1637,15 @@ bool MainWindow::LoadProgramSettings(){ rawDataPath = expDataPath + "/data_raw/"; rootDataPath = expDataPath + "/root_data/"; + QString pcName = qEnvironmentVariable("PCName"); + if( pcName == "solaris-daq" ){ + LogMsg("This is SOLARIS DAQ...."); + rawDataPath = expDataPath + "/"; + LogMsg("Raw Data Path : " + rawDataPath); + rootDataPath = "/mnt/data1/" + expName + "/"; + LogMsg("Root Data Path : " + rootDataPath); + } + leExpName->setText(expName); ret = true; @@ -2123,6 +2140,15 @@ void MainWindow::CreateNewExperiment(const QString newExpName){ rawDataPath = expDataPath + "/data_raw/"; rootDataPath = expDataPath + "/root_data/"; + QString pcName = qEnvironmentVariable("PCName"); + if( pcName == "solaris-daq" ){ + LogMsg("This is SOLARIS DAQ...."); + rawDataPath = expDataPath + "/"; + LogMsg("Raw Data Path : " + rawDataPath); + rootDataPath = "/mnt/data1/" + expName + "/"; + LogMsg("Root Data Path : " + rootDataPath); + } + CreateRawDataFolder(); WriteExpNameSh(); @@ -2190,11 +2216,11 @@ void MainWindow::CreateNewExperiment(const QString newExpName){ logMsgHTMLMode = true; LogMsg(" !!!! Please Create a new Elog with name " + newExpName + ". "); - expDataPath = masterExpDataPath + "/" + newExpName; - rawDataPath = expDataPath + "/data_raw/"; - rootDataPath = expDataPath + "/root_data/"; + // expDataPath = masterExpDataPath + "/" + newExpName; + // rawDataPath = expDataPath + "/data_raw/"; + // rootDataPath = expDataPath + "/root_data/"; - CreateRawDataFolder(); + // CreateRawDataFolder(); CreateDataSymbolicLink(); leRawDataPath->setText(rawDataPath); @@ -2291,9 +2317,9 @@ void MainWindow::CreateDataSymbolicLink(){ } if (file.link(rawDataPath, linkName)) { - LogMsg("Symbolic link " + linkName +" -> " + rawDataPath + " created."); + LogMsg("Symbolic link " + linkName +" -> " + rawDataPath + " created."); } else { - LogMsg("Symbolic link " + linkName +" -> " + rawDataPath + " cannot be created. "); + LogMsg("Symbolic link " + linkName +" -> " + rawDataPath + " cannot be created. "); } linkName = analysisPath + "/root_data"; @@ -2303,9 +2329,9 @@ void MainWindow::CreateDataSymbolicLink(){ } if (file.link(rootDataPath, linkName)) { - LogMsg("Symbolic link " + linkName +" -> " + rootDataPath + " created."); + LogMsg("Symbolic link " + linkName +" -> " + rootDataPath + " created."); } else { - LogMsg("Symbolic link " + linkName +" -> " + rootDataPath + " cannot be created. "); + LogMsg("Symbolic link " + linkName +" -> " + rootDataPath + " cannot be created. "); }