Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/segmentation on MAIN
CartesianGridXY.java+25-21.4 -> 1.5
CartesianGridXZ.java+3-11.2 -> 1.3
+28-3
2 modified files


GeomConverter/src/org/lcsim/geometry/segmentation
CartesianGridXY.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- CartesianGridXY.java	21 Sep 2009 23:04:42 -0000	1.4
+++ CartesianGridXY.java	7 Oct 2009 21:24:39 -0000	1.5
@@ -75,6 +75,9 @@
 	// TODO: Bounds check on x and y indices.
 	public long[] getNeighbourIDs(int layerRange, int xRange, int yRange)
 	{
+		if (this.getDecoder().getID() == 0)
+			throw new RuntimeException("No current ID is set.");
+		
 		// Get the IdentifierHelper.
 		IIdentifierHelper helper = detector.getDetectorElement().getIdentifierHelper();
 		
@@ -266,7 +269,8 @@
 	public void setIDDescription(IDDescriptor id)
 	{
 		super.setIDDescription(id);
-					
+				
+                // TODO: put this setup code into separate method	
 		if (geomFields == null)
 		{
 			geomFields = new ArrayList<Integer>();
@@ -330,5 +334,24 @@
 		IExpandedIdentifier geomIdExp = detector.getDetectorElement().getIdentifierHelper().unpack(new Identifier(id), geomFields);
 		return detector.getDetectorElement().getIdentifierHelper().pack(geomIdExp);
 	}
+/*	
+	public double getMinValue(String field, long id)
+	{
+		double min = 0;
+		if (field.equals("x"))
+		{
+			
+		}
+		else if (field.equals("y"))
+		{
+			
+		}
+		else
+		{
+			
+		}
+		return min;
+	}
+*/
 	
-}
\ No newline at end of file
+}

GeomConverter/src/org/lcsim/geometry/segmentation
CartesianGridXZ.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- CartesianGridXZ.java	21 Sep 2009 23:04:42 -0000	1.2
+++ CartesianGridXZ.java	7 Oct 2009 21:24:39 -0000	1.3
@@ -15,7 +15,6 @@
 import org.lcsim.detector.identifier.IIdentifier;
 import org.lcsim.detector.identifier.IIdentifierHelper;
 import org.lcsim.detector.identifier.Identifier;
-import org.lcsim.detector.solids.Box;
 import org.lcsim.detector.solids.Inside;
 import org.lcsim.detector.solids.Trd;
 import org.lcsim.geometry.util.IDDescriptor;
@@ -76,6 +75,9 @@
 	// TODO: Put into util or superclass.
 	public long[] getNeighbourIDs(int layerRange, int xRange, int zRange)
 	{
+		if (this.getDecoder().getID() == 0)
+			throw new RuntimeException("No current ID is set.");
+		
 		// Get the IdentifierHelper.
 		IIdentifierHelper helper = detector.getDetectorElement().getIdentifierHelper();
 		
CVSspam 0.2.8