Print

Print


Author: [log in to unmask]
Date: Mon May 16 14:30:47 2016
New Revision: 4354

Log:
Allow ECal channels to be read even if detector is not setup (geometry map will not be available).

Modified:
    java/branches/HPSJAVA-409/conditions/src/main/java/org/hps/conditions/ecal/EcalChannel.java

Modified: java/branches/HPSJAVA-409/conditions/src/main/java/org/hps/conditions/ecal/EcalChannel.java
 =============================================================================
--- java/branches/HPSJAVA-409/conditions/src/main/java/org/hps/conditions/ecal/EcalChannel.java	(original)
+++ java/branches/HPSJAVA-409/conditions/src/main/java/org/hps/conditions/ecal/EcalChannel.java	Mon May 16 14:30:47 2016
@@ -3,6 +3,7 @@
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.logging.Logger;
 
 import org.hps.conditions.api.AbstractIdentifier;
 import org.hps.conditions.api.BaseConditionsObject;
@@ -29,6 +30,8 @@
 @Table(names = {"ecal_channels", "test_run_ecal_channels"})
 @Converter(converter = EcalChannel.EcalChannelConverter.class)
 public final class EcalChannel extends BaseConditionsObject {
+    
+    private static Logger LOGGER = Logger.getLogger(EcalChannel.class.getPackage().getName());
 
     /**
      * The <code>ChannelId</code> is a unique number identifying the channel within its conditions collection. The
@@ -298,9 +301,10 @@
                     throw new IllegalStateException("The ECal subdetector's detector element is not setup.");
                 }
             } else {
+                LOGGER.warning("ECal subdetector is not initialized so geometry map was not initialized");
                 // Bad detector or conditions system not initialized properly.
-                throw new IllegalStateException("The ECal subdetector object is null.");
-            }
+                //throw new IllegalStateException("The ECal subdetector object is null.");
+            }            
             return collection;
         }