Print

Print


Commit in GeomConverter/src/org/lcsim/detector on MAIN
DetectorIdentifierHelper.java+16-181.2 -> 1.3
JM: change some method names (may require changes to Rich P. and Rob K. sandbox code)

GeomConverter/src/org/lcsim/detector
DetectorIdentifierHelper.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- DetectorIdentifierHelper.java	6 Nov 2007 23:58:00 -0000	1.2
+++ DetectorIdentifierHelper.java	6 Dec 2007 01:25:57 -0000	1.3
@@ -17,27 +17,27 @@
  * </p>
  * 
  * <p>
- * The identifier fields used by this class.
+ * This class uses the following fields from the ID description.
  * <ul>
  * <li><code>system</code> - The system number that uniquely identifies a subdetector.</li>
- * <li><code>barrel</code> - The flag that indicates whether a subdetector is a barrel, endcap positive, or endcap negative.</li>
- * <li><code>layer</code> - The layer number of a subcomponent.  (Field is optional.)</li>
+ * <li><code>barrel</code> - A flag that indicates whether a subdetector is a barrel (0), endcap positive (1), or endcap negative (2).</li>
+ * <li><code>layer</code> - The layer number of a subcomponent (optional).</li>
  * </ul>
  * </p> 
  * 
  * <p>
- * The system numbers can be set from a {@see SysteMap} which is a map of strings 
+ * The system numbers can be set from a {@see SystemMap} which is a map of strings 
  * to integer values for system.  These could be read from a compact description.
  * </p>
  * 
  * <p>
  * The basic method signatures are as follows.
  * <ul>
- * <li><code>int getSomeSubdetectorValue()</code> - Get the system value of SomeSubdetector.
- * <li><code>isSomething(IIdentifier i)</code> - Check if the id is of some subdetector type or it it has matching barrel flag. 
- * <li><code>IIdentifier getSomeSubdetectorId()</code> - Get the id for SomeSubdetector.
- * <li><code>int getSomeField(IIdentifier i)</code> - Get a specific field value from an id.
- * <li><code>boolean someFieldEquals(IIdentifier i, int x)</code> - Check if field from identifier equals the argument.
+ * <li><code>int getASubdetectorValue()</code> - Get the system value of SomeSubdetector.
+ * <li><code>isASubdetector(IIdentifier i)</code> - Check if the id is of some subdetector type or it it has matching barrel flag. 
+ * <li><code>IIdentifier getASubdetectorId()</code> - Get the id for SomeSubdetector.
+ * <li><code>int getAFieldValue(IIdentifier i)</code> - Get a field value from an id.
+ * <li><code>boolean AFieldEquals(IIdentifier i, int x)</code> - Check if field from identifier equals the argument value.
  * </ul>
  * </p>
  * 
@@ -58,9 +58,7 @@
     // Index of layer field in the IdentifierDictionary.  OPTIONAL.
     int layerIndex=invalidIndex;
 
-    // Barrel or endcap flag.
-    // These values are fixed constants that follow the LCSim convention
-    // so can be static.
+    // Barrel flag values following the LCSim conventions.
     private final static int barrelValue=0;
     private final static int endcapPositiveValue=1;
     private final static int endcapNegativeValue=2;
@@ -819,7 +817,7 @@
         return isLumi(i) && isEndcapNegative(i);
     }
 
-    public int getSystem(IIdentifier i)
+    public int getSystemValue(IIdentifier i)
     {
         try {
             return unpack(i).getValue(systemIndex);
@@ -830,7 +828,7 @@
         }
     }
 
-    public int getBarrel(IIdentifier i)
+    public int getBarrelValue(IIdentifier i)
     {
         try {
             return unpack(i).getValue(barrelIndex);
@@ -841,7 +839,7 @@
         }
     }
 
-    public int getLayer(IIdentifier i)
+    public int getLayerValue(IIdentifier i)
     {
         if (layerIndex == invalidIndex)
             throw new RuntimeException("The layer number is not available, because " + getIdentifierDictionary().getName() + " does not have a layer field!");
@@ -857,17 +855,17 @@
 
     public boolean layerEquals(IIdentifier i, int layer)
     {
-        return getLayer(i) == layer;
+        return getLayerValue(i) == layer;
     }
 
     public boolean systemEquals(IIdentifier i, int system)
     {
-        return getSystem(i) == system;
+        return getSystemValue(i) == system;
     }
 
     public boolean barrelEquals(IIdentifier i, int barrel)
     {
-        return getBarrel(i) == barrel;
+        return getBarrelValue(i) == barrel;
     }
 
     public int getSystemIndex()
CVSspam 0.2.8