Print

Print


Commit in hps-java/src/main/java/org/lcsim/hps/conditions on MAIN
TestRunConditionsReader.java+3-51.2 -> 1.3
HpsConditionsReader.java+7-71.2 -> 1.3
+10-12
2 modified files
tweak conditions reader behavior to check detector first

hps-java/src/main/java/org/lcsim/hps/conditions
TestRunConditionsReader.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- TestRunConditionsReader.java	21 Sep 2012 23:22:17 -0000	1.2
+++ TestRunConditionsReader.java	20 Nov 2012 19:56:40 -0000	1.3
@@ -8,7 +8,7 @@
 /**
  *
  * @author Sho Uemura <[log in to unmask]>
- * @version $Id: TestRunConditionsReader.java,v 1.2 2012/09/21 23:22:17 meeg Exp $
+ * @version $Id: TestRunConditionsReader.java,v 1.3 2012/11/20 19:56:40 meeg Exp $
  */
 public class TestRunConditionsReader extends ConditionsReader {
 
@@ -20,9 +20,9 @@
 
     @Override
     public InputStream open(String name, String type) throws IOException {
-        InputStream in = getClass().getResourceAsStream("/org/lcsim/hps/calib/testrun/" + name + "." + type);
+        InputStream in = getClass().getResourceAsStream("/" + detectorName + "/" + name + "." + type);
         if (in == null) {
-            in = getClass().getResourceAsStream("/" + detectorName + "/" + name + "." + type);
+            in = getClass().getResourceAsStream("/org/lcsim/hps/calib/testrun/" + name + "." + type);
             if (in == null) {
                 throw new IOException("Conditions " + name + " for " + detectorName + " with type " + type + " were not found");
             }
@@ -45,10 +45,8 @@
 //        System.out.println(detectorName+run);
         return true;
     }
-    
 //        private void loadCalibsByRun(int run) {
 //        HPSSVTCalibrationConstants.loadCalibration(run);
 //        FieldMap.loadFieldMap(run);
 //    }
-
 }

hps-java/src/main/java/org/lcsim/hps/conditions
HpsConditionsReader.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- HpsConditionsReader.java	1 Nov 2012 00:23:07 -0000	1.2
+++ HpsConditionsReader.java	20 Nov 2012 19:56:40 -0000	1.3
@@ -8,32 +8,32 @@
 /**
  * 
  * @author Sho Uemura <[log in to unmask]>
- * @version $Id: HpsConditionsReader.java,v 1.2 2012/11/01 00:23:07 omoreno Exp $
+ * @version $Id: HpsConditionsReader.java,v 1.3 2012/11/20 19:56:40 meeg Exp $
  */
 public class HpsConditionsReader extends ConditionsReader {
 
     private String detectorName = null;
     private int run;
-    
-    public HpsConditionsReader(ConditionsReader reader){
+
+    public HpsConditionsReader(ConditionsReader reader) {
     }
 
     @Override
     public InputStream open(String name, String type) throws IOException {
-        InputStream in = getClass().getResourceAsStream("/org/lcsim/hps/calib/proposal2014/" + name + "." + type);
+        InputStream in = getClass().getResourceAsStream("/" + detectorName + "/" + name + "." + type);
         if (in == null) {
-            in = getClass().getResourceAsStream("/" + detectorName + "/" + name + "." + type);
+            in = getClass().getResourceAsStream("/org/lcsim/hps/calib/proposal2014/" + name + "." + type);
             if (in == null) {
                 throw new IOException("Conditions " + name + " for " + detectorName + " with type " + type + " were not found");
             }
         }
         return in;
     }
-    
+
     @Override
     public void close() throws IOException {
     }
-    
+
     @Override
     protected boolean update(ConditionsManager manager, String detectorName, int run) throws IOException {
         this.detectorName = detectorName;
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1