Commit in lcsim/src/org/lcsim/event/base on MAIN
BaseCalorimeterHit.java+5-11.9 -> 1.10
getRawEnergy now throws a runtime exception if called from a base CalorimeterHit

lcsim/src/org/lcsim/event/base
BaseCalorimeterHit.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- BaseCalorimeterHit.java	4 May 2010 17:48:24 -0000	1.9
+++ BaseCalorimeterHit.java	5 May 2010 15:53:07 -0000	1.10
@@ -15,7 +15,7 @@
  */
 public abstract class BaseCalorimeterHit extends BaseHitWithPosition implements CalorimeterHit 
 {   	
-    protected double rawEnergy;    
+    protected double rawEnergy = UNSET_CORRECTED_ENERGY;
     protected double corrEnergy = UNSET_CORRECTED_ENERGY;
     protected double[] position;
     protected Hep3Vector positionVec;
@@ -37,6 +37,10 @@
 
     public double getRawEnergy() 
     {
+        if( rawEnergy == UNSET_CORRECTED_ENERGY)
+        {
+            throw new RuntimeException("No raw energy available for CalorimeterHit");
+        }
         return rawEnergy;
     }
 
CVSspam 0.2.8