Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/compact on MAIN
CompactReader.java+6-901.40 -> 1.41
JM: make some internal util methods private

GeomConverter/src/org/lcsim/geometry/compact
CompactReader.java 1.40 -> 1.41
diff -u -r1.40 -r1.41
--- CompactReader.java	13 Mar 2008 02:32:27 -0000	1.40
+++ CompactReader.java	14 Jan 2009 20:14:39 -0000	1.41
@@ -28,7 +28,7 @@
  * org.lcsim.geometry.GeometryReader class, which extends this.
  *
  * @author tonyj
- * @version $Id: CompactReader.java,v 1.40 2008/03/13 02:32:27 jeremy Exp $
+ * @version $Id: CompactReader.java,v 1.41 2009/01/14 20:14:39 jeremy Exp $
  *
  */
 public class CompactReader
@@ -234,7 +234,7 @@
     
     
     /** Create impl objects of materials and their references. */
-    void readMaterials(org.jdom.Element lccdd, Detector det) throws JDOMException
+    private void readMaterials(org.jdom.Element lccdd, Detector det) throws JDOMException
     {
         XMLMaterialManager matmgr = det.getMaterialManager();
         matmgr.addReferencesFromCompact(lccdd);
@@ -249,7 +249,7 @@
      * @throws JDOMException
      * @throws ElementCreationException
      */
-    void readVisAttributes(Element lccdd, Detector det) throws JDOMException, ElementCreationException
+    private void readVisAttributes(Element lccdd, Detector det) throws JDOMException, ElementCreationException
     {
         Element display = lccdd.getChild("display");
         if ( display != null )
@@ -264,7 +264,7 @@
         }
     }
     
-    public static void registerCLHEPConstants(JDOMExpressionFactory f)
+    private static void registerCLHEPConstants(JDOMExpressionFactory f)
     {    
     	Constants constants = Constants.getInstance();
     	for (Entry<String,Double> unit : constants.entrySet())
@@ -274,7 +274,7 @@
     	}
     }
     
-    public void resetDocument()
+    protected void resetDocument()
     {
         doc = null;  
     }
@@ -306,89 +306,5 @@
                 throw new RuntimeException(x);
             }
         }
-    }
-    
-    /**
-     * Setup scaling variables for compact description.
-     * These are usable within subsequent <detector> elements. 
-     * 
-     * ---Examples---
-     * 
-     * HcalBarrel_outer_radius
-     * HcalBarrel_total_thickness
-     * 
-     * HcalEndcap_zmax
-     * HcalEndcap_total_thickness
-     * 
-     * @param expr
-     * @param subdet
-     */
-    /*private void setupScalingVariables(JDOMExpressionFactory expr, Subdetector subdet)
-    {
-    	System.out.println("subdet <" + subdet.getName() + "> is type <" + subdet.getClass().getCanonicalName() +">");
-    	
-    	// Get the layering.
-    	
-    	Layering layering=null;
-    	try {
-    		layering = subdet.getLayering();
-    		if ( layering == null )
-    		{
-    			//System.out.println("layering is null for <" + subdet.getName()+">");
-    			return;
-    		}
-    	}
-    	catch ( Throwable x )
-    	{
-    		//System.out.println("exception getting layering for <" + subdet.getName()+">");
-    		return;
-    	}
-    	
-    	
-    	//System.out.println("Computing scaling variables for " + subdet.getName());
-    	    	    	
-    	// Compute total thickness from layers.
-    	//double totalLayerThickness = layering.getThickness();
-    	//String name = subdet.getName() + "_total_thickness";
-    	String name = subdet.getName();
-    	    	
-    	// Add to JDOMExpressionFactory.
-    	//expr.addConstant(name, totalLayerThickness);
-    	    
-    	// Handle specific subtypes here.
-    	if ( subdet instanceof CylindricalBarrelCalorimeter )
-    	{
-    		CylindricalBarrelCalorimeter cal = (CylindricalBarrelCalorimeter)subdet;
-    		double outerRadius = cal.getOuterRadius();
-    		double innerRadius = cal.getInnerRadius();
-    		expr.addConstant(name + "_outer_r", outerRadius);
-    		expr.addConstant(name + "_total_thickess", outerRadius - innerRadius);
-    	}
-    	else if ( subdet instanceof CylindricalEndcapCalorimeter )
-    	{
-    		CylindricalEndcapCalorimeter cal = (CylindricalEndcapCalorimeter)subdet;
-    		double zmax = cal.getZMax();
-    		double zmin = cal.getZMin();
-    		expr.addConstant(name + "_outer_z", zmax);
-    		expr.addConstant(name + "_total_thickness", zmax - zmin);    		
-    	}
-    	else {
-    		System.out.println("no scaling variables set for <" + name + ">");
-    	}
-    	
-    	else if ( subdet instanceof MultiLayerTracker )
-    	{
-    		MultiLayerTracker tkr = (MultiLayerTracker)subdet;
-    		Layering l = tkr.getLayering();
-    		double outerRadius = tkr.getLayering().getDistanceToLayerBack(l.getNumberOfLayers()-1);
-    		expr.addConstant(tkr.getName() + "_outer_radius", outerRadius);
-    	}
-    	else if ( subdet instanceof DiskTracker )
-    	{
-    		DiskTracker tkr = (DiskTracker)subdet;
-    		Layering l = tkr.getLayering();
-    		double zmax = tkr.getLayering().getDistanceToLayerBack(l.getNumberOfLayers()-1);
-    		expr.addConstant(tkr.getName() + "_outer_z", zmax);
-    	}
-    }*/
+    }   
 }
\ No newline at end of file
CVSspam 0.2.8