Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/compact on MAIN
Subdetector.java+13-131.15 -> 1.16
JM: Cache the associated JDOM Element so org.lcsim.detector converters can access.

GeomConverter/src/org/lcsim/geometry/compact
Subdetector.java 1.15 -> 1.16
diff -u -r1.15 -r1.16
--- Subdetector.java	15 Mar 2007 02:09:15 -0000	1.15
+++ Subdetector.java	23 Mar 2007 00:45:21 -0000	1.16
@@ -9,7 +9,10 @@
 
 /**
  *
- * @author tonyj
+ * Basic implementation of org.lcsim.geometry.Subdetector.
+ *
+ * @author Tony Johnson <[log in to unmask]>
+ * @author Jeremy McCormick <[log in to unmask]>
  */
 public class Subdetector 
 extends DetectorElement
@@ -21,11 +24,14 @@
     private int     systemID;
     private ParameterSet _parameters;
     private VisAttributes vis;
+    private Element node;
     
     protected Subdetector(Element element) throws JDOMException
     {        
     	super(element.getAttributeValue("name"));
         
+        node = element;
+        
     	name = element.getAttributeValue("name");
         
         Attribute r = element.getAttribute("reflect");
@@ -46,9 +52,9 @@
    
     /**
      * Get the readout associated with this detector.
+     * 
      * @return The readout, or <CODE>null</CODE> if no readout is associated with the detector.
      */
-
     public Readout getReadout()
     {
         return readout;
@@ -64,18 +70,11 @@
         return _parameters;
     }
     
-    /* org.lcsim.geometry.Subdetector */
     public IDDecoder getIDDecoder()
     {
         return getReadout().getIDDecoder();
     }
-
-//    public SubdetectorIDDecoder getSubdetectorIDDecoder()
-//    {
-//        return (SubdetectorIDDecoder)getIDDecoder();
-//    }
    
-    /* org.lcsim.geometry.Subdetector */
     public String getName()
     {
         return name;
@@ -96,20 +95,16 @@
         return false;
     }
 
-    /* org.lcsim.geometry.Subdetector */
     public boolean isCalorimeter()
     {
         return false;
     }
 
-    /* org.lcsim.geometry.Subdetector */
-
     public boolean isTracker()
     {
         return false;
     }
 
-    /* org.lcsim.geometry.Subdetector */
     public boolean isLayered()
     {
         return false;
@@ -139,4 +134,9 @@
     {
     	return this.vis;
     }
+    
+    public Element getNode()
+    {
+        return node;
+    }
 }
CVSspam 0.2.8