From 89d9dd4d5e45df1fc8b9b24a4ab072fc42063ee3 Mon Sep 17 00:00:00 2001 From: ebner Date: Tue, 18 Aug 2015 11:45:21 +0200 Subject: [PATCH] cleanup configuration --- .../main/java/ch/psi/fda/aq/Acquisition.java | 16 +-- .../psi/fda/aq/AcquisitionConfiguration.java | 110 +++--------------- 2 files changed, 16 insertions(+), 110 deletions(-) diff --git a/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Acquisition.java b/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Acquisition.java index 72901a3..556e0ad 100644 --- a/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Acquisition.java +++ b/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/Acquisition.java @@ -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 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); - } - - } - - + } } diff --git a/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/AcquisitionConfiguration.java b/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/AcquisitionConfiguration.java index fc05601..a9b86d2 100644 --- a/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/AcquisitionConfiguration.java +++ b/ch.psi.fda.xscan/src/main/java/ch/psi/fda/aq/AcquisitionConfiguration.java @@ -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; - } }