Commit 89c82b5a authored by Oliver Bock's avatar Oliver Bock
Browse files

Optimized DataStorage plugin

* Removed "file://" URL scheme as we most certainly use relative paths only
* Removed default output-path parameter setting (".") and fixed its description
* Removed DataStorage output-path setting in all provided simulations
* Slightly bigger plot dialog default size (800x600)


git-svn-id: https://svn.origo.ethz.ch/fidelity@29 53d1999f-d1a8-4366-aa61-588fded17473
parent 688989c2
......@@ -72,10 +72,10 @@ void DataStorage::initAttributes()
m_OutputPath->setIdentifier("output-path");
m_OutputPath->setLabel("Output path");
m_OutputPath->setUnit("");
m_OutputPath->setDescription("The path the output.fsd file will be written to after the simulation");
m_OutputPath->setDescription("The path the data output file(s) will be written to after the simulation");
m_OutputPath->setType(ConstantParameter);
m_OutputPath->setExposeToParent(true);
m_OutputPath->setValue(".");
m_OutputPath->setValue("");
// Add new parameter to parameter table
m_ParamTable->insert(m_OutputPath->Identifier(), m_OutputPath);
......@@ -259,7 +259,9 @@ void DataStorage::finalise()
QPointer<VOTD> col3;
QString path = m_OutputPath->Value();
path = path.endsWith(QDir::separator()) ? path : path += QDir::separator();
if(!path.isEmpty()) {
path = path.endsWith(QDir::separator()) ? path : path += QDir::separator();
}
// TODO: file names should use the FSX file name
QFile fileXml(path + m_Label + ".fdx");
QFile fileData(path + m_Label + ".fdb");
......@@ -326,7 +328,7 @@ void DataStorage::finalise()
if (binaryStorageEnabled) {
data.setBinary(&binary);
binary.setStream(&stream);
stream.setHREF("file://" + fileData.fileName());
stream.setHREF(fileData.fileName());
if (!fileData.open(QIODevice::WriteOnly)) {
qCritical() << "[DataStorage] File \"" + fileData.fileName() + "\" could not be opened for writing!";
......@@ -397,6 +399,7 @@ void DataStorage::finalise()
// Plot the results if requested by the user
if(m_ShowPlot) {
PlotDialog plot(QApplication::activeWindow());
plot.resize(800, 600);
plot.setWindowIcon(QApplication::activeWindow()->windowIcon());
plot.setPlotTitle(m_OutputDescription->Value());
// Prepare first channel
......
......@@ -149,7 +149,7 @@ public:
private:
/**
* The path the output.fsd file will be written to after the simulation run.
* The path the data output file(s) will be written to after the simulation run.
*/
Parameter<QString>* m_OutputPath;
......
......@@ -33,7 +33,7 @@
<parameter identifier="description" unit="" datatype="string" >Time series of light power output of PD1 based on tuning of FP1</parameter>
<parameter identifier="channel2-label" unit="" datatype="string" >Cavity Tuning (East Mirror)</parameter>
<parameter identifier="channel2-unit" unit="" datatype="string" >deg</parameter>
<parameter identifier="output-path" unit="" datatype="string" >.</parameter>
<parameter identifier="output-path" unit="" datatype="string" ></parameter>
<parameter identifier="enable-channel2" unit="" datatype="bool" >true</parameter>
<parameter identifier="enable-binary-storage" unit="" datatype="bool" >true</parameter>
</component>
......
......@@ -23,7 +23,7 @@
<parameter identifier="description" unit="" datatype="string" >Time series of light power output of PD1 and PD2 based on tuning of M2</parameter>
<parameter identifier="channel2-label" unit="" datatype="string" >Light Power PD2</parameter>
<parameter identifier="channel2-unit" unit="" datatype="string" >W</parameter>
<parameter identifier="output-path" unit="" datatype="string" >.</parameter>
<parameter identifier="output-path" unit="" datatype="string" ></parameter>
<parameter identifier="enable-channel2" unit="" datatype="bool" >true</parameter>
<parameter identifier="enable-binary-storage" unit="" datatype="bool" >true</parameter>
</component>
......
......@@ -32,7 +32,7 @@
<parameter identifier="description" unit="" datatype="string" >Time series of light power output of PD1 based on tuning of M2</parameter>
<parameter identifier="channel2-label" unit="" datatype="string" >Tuning of M2</parameter>
<parameter identifier="channel2-unit" unit="" datatype="string" >deg</parameter>
<parameter identifier="output-path" unit="" datatype="string" >.</parameter>
<parameter identifier="output-path" unit="" datatype="string" ></parameter>
<parameter identifier="enable-channel2" unit="" datatype="bool" >true</parameter>
<parameter identifier="enable-binary-storage" unit="" datatype="bool" >true</parameter>
</component>
......
......@@ -18,7 +18,7 @@
<parameter identifier="description" unit="" datatype="string" >Time series of light power output of PD1 based on tuning of M2</parameter>
<parameter identifier="channel2-label" unit="" datatype="string" >Tuning of M2</parameter>
<parameter identifier="channel2-unit" unit="" datatype="string" >deg</parameter>
<parameter identifier="output-path" unit="" datatype="string" >.</parameter>
<parameter identifier="output-path" unit="" datatype="string" ></parameter>
<parameter identifier="enable-channel2" unit="" datatype="bool" >true</parameter>
<parameter identifier="enable-binary-storage" unit="" datatype="bool" >true</parameter>
</component>
......
......@@ -36,7 +36,7 @@
<parameter identifier="description" unit="" datatype="string" >Interferometer Output / South Port</parameter>
<parameter identifier="channel2-label" unit="" datatype="string" >ME Tuning</parameter>
<parameter identifier="channel2-unit" unit="" datatype="string" >deg</parameter>
<parameter identifier="output-path" unit="" datatype="string" >.</parameter>
<parameter identifier="output-path" unit="" datatype="string" ></parameter>
<parameter identifier="enable-channel2" unit="" datatype="bool" >true</parameter>
<parameter identifier="enable-binary-storage" unit="" datatype="bool" >true</parameter>
</component>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment