Commit in GeomConverter/src/org/lcsim/geometry/compact on MAIN
Subdetector.java+108-991.6 -> 1.7
Method added to retrieve subdet id.  (Commit for WL.)

GeomConverter/src/org/lcsim/geometry/compact
Subdetector.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- Subdetector.java	20 Jul 2005 19:11:58 -0000	1.6
+++ Subdetector.java	23 Jul 2005 00:41:33 -0000	1.7
@@ -1,100 +1,109 @@
-package org.lcsim.geometry.compact;
-
-import org.jdom.Attribute;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.lcsim.geometry.layer.Layering;
-import org.lcsim.geometry.IDDecoder;
-import org.lcsim.geometry.subdetector.SubdetectorIDDecoder;
-
-/**
- *
- * @author tonyj
- */
-public class Subdetector implements org.lcsim.geometry.Subdetector
-{
-    private boolean reflect;
-    private Readout readout;
-    private String name;
-    
-    protected Subdetector(Element element) throws JDOMException
-    {
-        name = element.getAttributeValue("name");
-        Attribute r = element.getAttribute("reflect");
-        reflect = r != null &&  r.getBooleanValue();
-    }
-    
-    protected void setReadout(Readout r)
-    {
-        this.readout = r;
-    }
-    
-    /**
-     * 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;
-    }
-    
-    /* 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;
-    }
-    
-    public boolean isBarrel() 
-    {
-        return false;
-    }
-    
-    public boolean isEndcap()
-    {
-        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;
-    }
-    
-    public Layering getLayering()
-    {
-        return null;
-    }
-    
-    public double[] transformLocalToGlobal(double[] locPos)
-    {
-        return locPos;
-    }
-    
-    public boolean getReflect()
-    {
-        return reflect;
-    }
+package org.lcsim.geometry.compact;
+
+import org.jdom.Attribute;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.lcsim.geometry.layer.Layering;
+import org.lcsim.geometry.IDDecoder;
+import org.lcsim.geometry.subdetector.SubdetectorIDDecoder;
+
+/**
+ *
+ * @author tonyj
+ */
+public class Subdetector implements org.lcsim.geometry.Subdetector
+{
+    private boolean reflect;
+    private Readout readout;
+    private String  name;
+    private int     systemID;
+    
+    protected Subdetector(Element element) throws JDOMException
+    {
+        name = element.getAttributeValue("name");
+        Attribute r = element.getAttribute("reflect");
+        reflect = r != null &&  r.getBooleanValue();
+        Attribute id = element.getAttribute("id");
+        systemID = 0;
+        if (id != null) systemID = id.getIntValue();
+    }
+    
+    protected void setReadout(Readout r)
+    {
+        this.readout = r;
+    }
+    
+    /**
+     * 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;
+    }
+    
+    /* 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;
+    }
+    
+    public int getSystemID()
+    {
+        return(systemID);
+    }
+    
+    public boolean isBarrel() 
+    {
+        return false;
+    }
+    
+    public boolean isEndcap()
+    {
+        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;
+    }
+    
+    public Layering getLayering()
+    {
+        return null;
+    }
+    
+    public double[] transformLocalToGlobal(double[] locPos)
+    {
+        return locPos;
+    }
+    
+    public boolean getReflect()
+    {
+        return reflect;
+    }
 }
\ No newline at end of file
CVSspam 0.2.8