cleanup configuration

This commit is contained in:
2015-08-18 11:45:21 +02:00
parent 9de6a0b5a5
commit 89d9dd4d5e
2 changed files with 16 additions and 110 deletions
@@ -973,7 +973,7 @@ public class Acquisition {
// Create loop
boolean zigZag = dimension.isZigzag(); // default value is false
CrlogicLoopStream actionLoop = new CrlogicLoopStream(cservice, configuration.getOtfCrlogicPrefix(), configuration.getStreamIoc(), zigZag);
CrlogicLoopStream actionLoop = new CrlogicLoopStream(cservice, configuration.getCrlogicPrefix(), configuration.getCrlogicIoc(), zigZag);
actionLoop.getPreActions().addAll(mapActions(dimension.getPreAction()));
@@ -1066,17 +1066,5 @@ public class Acquisition {
throw new RuntimeException("Unable to create channel: "+name,e);
}
}
private void createTemplateChannels(Object o, Map<String,String> macro){
try {
cservice.createAnnotatedChannels(o, macro);
templates.add(o);
} catch (ChannelException | InterruptedException | TimeoutException e) {
throw new RuntimeException("Unable to initialize template: "+o.getClass().getName(),e);
}
}
}
}
@@ -37,17 +37,8 @@ public class AcquisitionConfiguration {
public final static String FDA_CONFIG_FILE = "ch.psi.fda.xscan.config.file";
private String otfChannelPrefix;
private String otfNfsServer;
private String otfNfsShare;
private String otfSmbShare;
private String otfScalerPrefix;
private boolean otfUseCrlogic;
private String otfCrlogicPrefix;
private boolean otfCrlogicKeepTmpFiles;
private boolean useStream;
private String streamIoc;
private String crlogicPrefix;
private String crlogicIoc;
/**
* Base directory for data. The directory may contain date macros. The string may contain any @see java.text.SimpleDateFormat
@@ -101,18 +92,8 @@ public class AcquisitionConfiguration {
}
// The defaults are set here
otfChannelPrefix = properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.channelPrefix", "");
otfScalerPrefix = properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.scalerPrefix", "");
otfNfsServer = properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.nfsServer", "");
otfNfsShare = properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.nfsShare", "");
otfSmbShare = properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.smbShare", "");
otfUseCrlogic = new Boolean(properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.useCrlogic", "false"));
otfCrlogicPrefix = properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.crlogicPrefix", "");
otfCrlogicKeepTmpFiles = new Boolean(properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.crlogicKeepTmpFiles", "false"));
useStream = new Boolean(properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.useStream", "false"));
streamIoc= properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".otf.streamIOC", "");
crlogicPrefix = properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".crlogic.prefix", "");
crlogicIoc= properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".crlogic.ioc", "");
dataBaseDirectory = properties.getProperty(AcquisitionConfiguration.class.getPackage().getName()+".data.dir",".");
if(cfile!=null && dataBaseDirectory.matches("^\\.\\.?/.*")){ // if basedir starts with . or .. we assume the data directory to be relative to the directory of the configuration file
@@ -155,79 +136,22 @@ public class AcquisitionConfiguration {
return newString;
}
// Getter and setter functions
public String getOtfChannelPrefix() {
return otfChannelPrefix;
public String getCrlogicPrefix() {
return crlogicPrefix;
}
public void setOtfChannelPrefix(String otfChannelPrefix) {
this.otfChannelPrefix = otfChannelPrefix;
}
public String getOtfNfsServer() {
return otfNfsServer;
}
public void setOtfNfsServer(String otfNfsServer) {
this.otfNfsServer = otfNfsServer;
}
public String getOtfNfsShare() {
return otfNfsShare;
}
public void setOtfNfsShare(String otfNfsShare) {
this.otfNfsShare = otfNfsShare;
}
public String getOtfSmbShare() {
return otfSmbShare;
}
public void setOtfSmbShare(String otfSmbShare) {
this.otfSmbShare = otfSmbShare;
}
public String getOtfScalerPrefix() {
return otfScalerPrefix;
}
public void setOtfScalerPrefix(String otfScalerPrefix) {
this.otfScalerPrefix = otfScalerPrefix;
}
public boolean isOtfUseCrlogic() {
return otfUseCrlogic;
}
public void setOtfUseCrlogic(boolean otfUseCrlogic) {
this.otfUseCrlogic = otfUseCrlogic;
public void setCrlogicPrefix(String crlogicPrefix) {
this.crlogicPrefix = crlogicPrefix;
}
public void setUseStream(boolean useStream) {
this.useStream = useStream;
public void setCrlogicIoc(String crlogicIoc) {
this.crlogicIoc = crlogicIoc;
}
public String getCrlogicIoc() {
return crlogicIoc;
}
public boolean isUseStream(){
return this.useStream;
}
public String getOtfCrlogicPrefix() {
return otfCrlogicPrefix;
}
public void setOtfCrlogicPrefix(String otfCrlogicPrefix) {
this.otfCrlogicPrefix = otfCrlogicPrefix;
}
public boolean isOtfCrlogicKeepTmpFiles() {
return otfCrlogicKeepTmpFiles;
}
public void setOtfCrlogicKeepTmpFiles(boolean otfCrlogicKeepTmpFiles) {
this.otfCrlogicKeepTmpFiles = otfCrlogicKeepTmpFiles;
}
public String getDataBaseDirectory() {
return dataBaseDirectory;
@@ -260,10 +184,4 @@ public class AcquisitionConfiguration {
public void setSmptServer(String smptServer) {
this.smptServer = smptServer;
}
public void setStreamIoc(String streamIoc) {
this.streamIoc = streamIoc;
}
public String getStreamIoc() {
return streamIoc;
}
}