added code specifically for the SOLARIS DAQ, the root path is always under /mnt/data1/<expName>
This commit is contained in:
parent
66df74920e
commit
63f447ab41
|
@ -11,8 +11,8 @@
|
||||||
#include <QRandomGenerator>
|
#include <QRandomGenerator>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QChartView>
|
//#include <QChartView>
|
||||||
#include <QValueAxis>
|
//#include <QValueAxis>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
@ -1528,6 +1528,14 @@ void MainWindow::ProgramSettingsPanel(){
|
||||||
expDataPath = masterExpDataPath + "/" + expName;
|
expDataPath = masterExpDataPath + "/" + expName;
|
||||||
rawDataPath = expDataPath + "/data_raw/";
|
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);
|
leExpName->setText(expName);
|
||||||
leRawDataPath->setText(rawDataPath);
|
leRawDataPath->setText(rawDataPath);
|
||||||
|
|
||||||
|
@ -1629,6 +1637,15 @@ bool MainWindow::LoadProgramSettings(){
|
||||||
rawDataPath = expDataPath + "/data_raw/";
|
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);
|
leExpName->setText(expName);
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
@ -2123,6 +2140,15 @@ void MainWindow::CreateNewExperiment(const QString newExpName){
|
||||||
rawDataPath = expDataPath + "/data_raw/";
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
CreateRawDataFolder();
|
CreateRawDataFolder();
|
||||||
WriteExpNameSh();
|
WriteExpNameSh();
|
||||||
|
|
||||||
|
@ -2190,11 +2216,11 @@ void MainWindow::CreateNewExperiment(const QString newExpName){
|
||||||
logMsgHTMLMode = true;
|
logMsgHTMLMode = true;
|
||||||
LogMsg("<font style=\"color red;\"> !!!! Please Create a new Elog with name <b>" + newExpName + "</b>. </font>");
|
LogMsg("<font style=\"color red;\"> !!!! Please Create a new Elog with name <b>" + newExpName + "</b>. </font>");
|
||||||
|
|
||||||
expDataPath = masterExpDataPath + "/" + newExpName;
|
// expDataPath = masterExpDataPath + "/" + newExpName;
|
||||||
rawDataPath = expDataPath + "/data_raw/";
|
// rawDataPath = expDataPath + "/data_raw/";
|
||||||
rootDataPath = expDataPath + "/root_data/";
|
// rootDataPath = expDataPath + "/root_data/";
|
||||||
|
|
||||||
CreateRawDataFolder();
|
// CreateRawDataFolder();
|
||||||
CreateDataSymbolicLink();
|
CreateDataSymbolicLink();
|
||||||
|
|
||||||
leRawDataPath->setText(rawDataPath);
|
leRawDataPath->setText(rawDataPath);
|
||||||
|
@ -2291,9 +2317,9 @@ void MainWindow::CreateDataSymbolicLink(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file.link(rawDataPath, linkName)) {
|
if (file.link(rawDataPath, linkName)) {
|
||||||
LogMsg("Symbolic link <b>" + linkName +"</b> -> " + rawDataPath + " created.");
|
LogMsg("Symbolic link <b>" + linkName +"</b> -> " + rawDataPath + " created.");
|
||||||
} else {
|
} else {
|
||||||
LogMsg("<font style=\"color:red;\">Symbolic link <b>" + linkName +"</b> -> " + rawDataPath + " cannot be created. </font>");
|
LogMsg("<font style=\"color:red;\">Symbolic link <b>" + linkName +"</b> -> " + rawDataPath + " cannot be created. </font>");
|
||||||
}
|
}
|
||||||
|
|
||||||
linkName = analysisPath + "/root_data";
|
linkName = analysisPath + "/root_data";
|
||||||
|
@ -2303,9 +2329,9 @@ void MainWindow::CreateDataSymbolicLink(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file.link(rootDataPath, linkName)) {
|
if (file.link(rootDataPath, linkName)) {
|
||||||
LogMsg("Symbolic link <b>" + linkName +"</b> -> " + rootDataPath + " created.");
|
LogMsg("Symbolic link <b>" + linkName +"</b> -> " + rootDataPath + " created.");
|
||||||
} else {
|
} else {
|
||||||
LogMsg("<font style=\"color:red;\">Symbolic link <b>" + linkName +"</b> -> " + rootDataPath + " cannot be created. </font>");
|
LogMsg("<font style=\"color:red;\">Symbolic link <b>" + linkName +"</b> -> " + rootDataPath + " cannot be created. </font>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user