Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/pandora on MAIN
Main.java+14-61.11 -> 1.12
fix off by one error in SF

GeomConverter/src/org/lcsim/geometry/compact/converter/pandora
Main.java 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- Main.java	19 May 2010 22:26:06 -0000	1.11
+++ Main.java	27 May 2010 16:57:31 -0000	1.12
@@ -45,7 +45,7 @@
  * geometry input format.
  * 
  * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: Main.java,v 1.11 2010/05/19 22:26:06 jeremy Exp $
+ * @version $Id: Main.java,v 1.12 2010/05/27 16:57:31 jeremy Exp $
  */
 public class Main implements Converter
 {
@@ -154,6 +154,8 @@
         protected CalorimeterConditions(Calorimeter calorimeter, ConditionsSet conditions)
         {
             this.name = calorimeter.getName();
+            
+            //System.out.println("CalorimeterConditions: " + this.name);
 
             // Figure out which layering conditions to use based on the CalorimeterType.
             String layeringName = null;
@@ -216,18 +218,16 @@
                 int nextLayer = Integer.valueOf(nextToken);
                 layers.add(nextLayer);
             }
-            for (int i = 0; i < layers.size(); i++)
-            {
-                int l = layers.get(i);
-            }
 
             // FIXME Hack to get the correct starting index for the sampling fractions.  Ideally, the sampling fractions
             //       should be separated by subdetector name.
             int samplingIndex = 0;
             if (calorimeter.getCalorimeterType() == HAD_BARREL || calorimeter.getCalorimeterType() == HAD_ENDCAP)
             {
-                samplingIndex = (new StringTokenizer(conditions.getString("ECalLayering"), ",").countTokens() - 1);
+                samplingIndex = (new StringTokenizer(conditions.getString("ECalLayering"), ",").countTokens());
             }
+            
+            //System.out.println("samplingIndex: " + samplingIndex);
 
             // Create the SamplingLayerRange list.
             samplingLayers = new SamplingLayers();
@@ -249,6 +249,12 @@
                                                                                upperLayer,
                                                                                emSamplingFraction,
                                                                                hadSamplingFraction);
+                
+                //System.out.println("lowerLayer: " + lowerLayer);
+                //System.out.println("upperLayer: " + upperLayer);
+                //System.out.println("emSamplingFraction: " + emSamplingFraction);
+                //System.out.println("hadSamplingFraction: " + hadSamplingFraction);
+                
                 samplingLayers.add(samplingLayerRange);
 
                 ++samplingIndex;
@@ -267,6 +273,8 @@
                 mipCondition = "HCalMip_MPV";
             }                                                
             mipEnergy = conditions.getDouble(mipCondition);
+            
+            //System.out.println();
         }
 
         public SamplingLayerRange getSamplingLayerRange(int layer)
CVSspam 0.2.8