GeomConverter/src/org/lcsim/geometry
diff -u -r1.9 -r1.10
--- IDDecoder.java 28 Oct 2005 00:34:16 -0000 1.9
+++ IDDecoder.java 7 Feb 2006 17:04:43 -0000 1.10
@@ -1,5 +1,6 @@
package org.lcsim.geometry;
+import org.lcsim.geometry.subdetector.BarrelEndcapFlag;
import org.lcsim.geometry.util.IDDescriptor;
/**
@@ -10,49 +11,86 @@
{
/* /\/\/\ ID decoding /\/\/\ */
- /* Load the decoder with a 64-bit id value from the hit. */
- public void setID(long id);
+ /** Load the decoder with a 64-bit id value from the hit. */
+ public void setID(long id);
- /* @return value of the field from the name */
+ /** Get an expanded identifier that maps strings to integer values. */
+ public ExpandedIdentifier getExpandedIdentifier();
+
+ /** Same as getIDExpanded() except sets id. */
+ public ExpandedIdentifier getExpandedIdentifier(long id);
+
+ /** @return value of the field from the name */
+ @Deprecated
public int getValue(String field);
- /* @return value of the field from the index */
+ /** @return value of the field from the index */
+ @Deprecated
public int getValue(int index);
- /* @return true if setID() has been called, false if not */
- public boolean isValid();
+ /** @return true if setID() has been called, false if not */
+ //public boolean isValid();
/* /\/\/\ ID description /\/\/\ */
- /* @return number of fields in the descriptor*/
+ /** @return number of fields in the descriptor*/
+ @Deprecated
public int getFieldCount();
- /* @return name of the field from the index */
+ /** @return name of the field from the index */
+ @Deprecated
public String getFieldName(int index);
- /* @return index of the field from the name */
+ /** @return index of the field from the name */
+ @Deprecated
public int getFieldIndex(String name);
- /* Load the IDDecoder with an IDDescriptor. */
+ /** Load the IDDecoder with an IDDescriptor. */
+ @Deprecated
public void setIDDescription(IDDescriptor id);
- /* @return currently loaded IDDescriptor */
+ /** @return currently loaded IDDescriptor */
+ @Deprecated
public IDDescriptor getIDDescription();
- /*
- * @return layer number
- * WARNING: Used in at least 31 places.
- * FIXME: This redundant, because it is already accessible by calling getValue("layer").
- * --JM
- */
+ /** @return layer number */
public int getLayer();
- /* /\/\/\ Position interface /\/\/\ */
- /* FIXME: Why can't the user just get this information from the hit, instead? --JM */
+ /* /\/\/\ Position interface /\/\/\ */
+
+ // FIXME: change to Hep3Vector and eliminate the X/Y/Z/theta/phi methods
+
+ /** @return position as double array of length 3 */
public double[] getPosition();
+
+ /** @return X coordinate */
public double getX();
+
+ /** @return Y coordinate */
public double getY();
+
+ /** @return Z coordinate */
public double getZ();
+
+ /** @return phi angle */
public double getPhi();
+
+ /** @return theta angle */
public double getTheta();
+
+ /*/\/\/\ Miscellaneous /\/\/\ */
+
+ /** Get the flag that indicates barrel or endcap, i.e. the "barrel" field. */
+ BarrelEndcapFlag getBarrelEndcapFlag();
+
+ /** Get the system ID, i.e. the "system" field. */
+ //int getSystemID();
+
+ /** Get the Subdetector associated with this IDDecoder, or null if not applicable. */
+ public Subdetector getSubdetector();
+
+ /* /\/\/\ Neighbours /\/\/\ */
+ public boolean supportsNeighbours();
+ public long[] getNeighbourIDs();
+ public long[] getNeighbourIDs(int deltaLayer, int deltaTheta, int deltaPhi);
}
\ No newline at end of file