There is now a configuration file for enabling and disabling the
preservation of the temporary files generated by CRLOGIC
This commit is contained in:
@@ -581,7 +581,10 @@ public class Acquisition {
|
||||
}
|
||||
else if(a instanceof ShellAction){
|
||||
ShellAction sa = (ShellAction) a;
|
||||
alist.add(new ch.psi.fda.core.actions.ShellAction(sa.getCommand()));
|
||||
ch.psi.fda.core.actions.ShellAction action = new ch.psi.fda.core.actions.ShellAction(sa.getCommand());
|
||||
action.setCheckExitValue(sa.isCheckExitValue());
|
||||
action.setExitValue(sa.getExitValue());
|
||||
alist.add(action);
|
||||
}
|
||||
else if(a instanceof ScriptAction){
|
||||
|
||||
@@ -1025,6 +1028,7 @@ public class Acquisition {
|
||||
boolean zigZag = dimension.isZigzag(); // default value is false
|
||||
|
||||
CrlogicLoop actionLoop = new CrlogicLoop(configuration.getOtfCrlogicPrefix(), configuration.getOtfNfsServer(), configuration.getOtfNfsShare(), configuration.getOtfSmbShare(), zigZag);
|
||||
actionLoop.setKeepTmpFiles(configuration.isOtfCrlogicKeepTmpFiles());
|
||||
|
||||
actionLoop.getPreActions().addAll(mapActions(dimension.getPreAction()));
|
||||
|
||||
|
||||
@@ -38,13 +38,14 @@ public class AcquisitionEngineConfiguration {
|
||||
|
||||
private static final AcquisitionEngineConfiguration instance = new AcquisitionEngineConfiguration();
|
||||
|
||||
private String otfChannelPrefix = "";
|
||||
private String otfNfsServer = "";
|
||||
private String otfNfsShare = "";
|
||||
private String otfSmbShare = "";
|
||||
private String otfScalerPrefix = "";
|
||||
private boolean otfUseCrlogic = false;
|
||||
private String otfCrlogicPrefix = "";
|
||||
private String otfChannelPrefix;
|
||||
private String otfNfsServer;
|
||||
private String otfNfsShare;
|
||||
private String otfSmbShare;
|
||||
private String otfScalerPrefix;
|
||||
private boolean otfUseCrlogic;
|
||||
private String otfCrlogicPrefix;
|
||||
private boolean otfCrlogicKeepTmpFiles;
|
||||
|
||||
/**
|
||||
* Base directory for data. The directory may contain date macros. The string may contain any @see java.text.SimpleDateFormat
|
||||
@@ -102,7 +103,7 @@ public class AcquisitionEngineConfiguration {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// The defaults are set here
|
||||
otfChannelPrefix = properties.getProperty(AcquisitionEngineConfiguration.class.getPackage().getName()+".otf.channelPrefix", "");
|
||||
otfScalerPrefix = properties.getProperty(AcquisitionEngineConfiguration.class.getPackage().getName()+".otf.scalerPrefix", "");
|
||||
otfNfsServer = properties.getProperty(AcquisitionEngineConfiguration.class.getPackage().getName()+".otf.nfsServer", "");
|
||||
@@ -110,6 +111,7 @@ public class AcquisitionEngineConfiguration {
|
||||
otfSmbShare = properties.getProperty(AcquisitionEngineConfiguration.class.getPackage().getName()+".otf.smbShare", "");
|
||||
otfUseCrlogic = new Boolean(properties.getProperty(AcquisitionEngineConfiguration.class.getPackage().getName()+".otf.useCrlogic", "false"));
|
||||
otfCrlogicPrefix = properties.getProperty(AcquisitionEngineConfiguration.class.getPackage().getName()+".otf.crlogicPrefix", "");
|
||||
otfCrlogicKeepTmpFiles = new Boolean(properties.getProperty(AcquisitionEngineConfiguration.class.getPackage().getName()+".otf.crlogicKeepTmpFiles", "false"));
|
||||
|
||||
// Workaround
|
||||
// dataBaseDirectory = properties.getProperty(AcquisitionEngineConfiguration.class.getPackage().getName()+".data.baseDirectory", ".");
|
||||
@@ -202,6 +204,13 @@ public class AcquisitionEngineConfiguration {
|
||||
return otfCrlogicPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the otfCrlogicKeepTmpFiles
|
||||
*/
|
||||
public boolean isOtfCrlogicKeepTmpFiles() {
|
||||
return otfCrlogicKeepTmpFiles;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the actorMoveTimeout
|
||||
*/
|
||||
|
||||
@@ -67,7 +67,7 @@ public class CrlogicLoop implements ActionLoop {
|
||||
*/
|
||||
private boolean dataGroup = false;
|
||||
|
||||
boolean keepTmpFiles = true;
|
||||
private boolean keepTmpFiles = false;
|
||||
|
||||
private BlockingQueue<String> readQueue = new LinkedBlockingQueue<String>();
|
||||
private volatile boolean stopReadoutThread = false;
|
||||
@@ -876,5 +876,23 @@ public class CrlogicLoop implements ActionLoop {
|
||||
}
|
||||
return new DataQueue(dataQueue, m);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the keepTmpFiles
|
||||
*/
|
||||
public boolean isKeepTmpFiles() {
|
||||
return keepTmpFiles;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param keepTmpFiles the keepTmpFiles to set
|
||||
*/
|
||||
public void setKeepTmpFiles(boolean keepTmpFiles) {
|
||||
this.keepTmpFiles = keepTmpFiles;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -194,7 +194,13 @@
|
||||
<xsd:complexType name="ShellAction">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="Action">
|
||||
<xsd:attribute name="command" type="xsd:string" use="required"></xsd:attribute>
|
||||
<xsd:attribute name="command" type="xsd:string"
|
||||
use="required">
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="exitValue" type="xsd:int" default="0"></xsd:attribute>
|
||||
<xsd:attribute name="checkExitValue"
|
||||
type="xsd:boolean" default="true">
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration numberOfExecution="0" xmlns="http://www.psi.ch/~ebner/models/scan/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.psi.ch/~ebner/models/scan/1.0 ../../src/model-v1.xsd">
|
||||
<!--
|
||||
1D Scan reading out scalar channels and the timestamp for each point
|
||||
-->
|
||||
<data format="txt"/>
|
||||
<scan id="">
|
||||
|
||||
<preAction xsi:type="ShellAction" command="src/test/resources/testscripts/testscript1.sh one two" exitValue="1" checkExitValue="false"/>
|
||||
</scan>
|
||||
|
||||
</configuration>
|
||||
@@ -2,7 +2,7 @@
|
||||
handlers = java.util.logging.ConsoleHandler
|
||||
|
||||
# Set the default logging level for the root logger
|
||||
.level=ALL
|
||||
.level=INFO
|
||||
|
||||
# Set the default logging level for new ConsoleHandler instances
|
||||
java.util.logging.ConsoleHandler.level=ALL
|
||||
|
||||
Reference in New Issue
Block a user