Commit in GeomConverter/test/org/lcsim/geometry/compact on MAIN
CompactReaderTest.java+11-41.6 -> 1.7
sdjan03_compact.xml+81.13 -> 1.14
+19-4
2 modified files
JM: Added additional test to CompactReaderTest making sure that multiple subdetectors on the same readout returns the correct readout.  (This seems to work fine.)

GeomConverter/test/org/lcsim/geometry/compact
CompactReaderTest.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- CompactReaderTest.java	1 Dec 2005 03:35:24 -0000	1.6
+++ CompactReaderTest.java	17 Jan 2006 19:15:25 -0000	1.7
@@ -32,13 +32,13 @@
         det = reader.read(in);
     }
     
-    /* subdetector count */
+    /* Make sure count of subdetectors is correct. */
     public void testDetectorCount()
     {
-        assertEquals(11,det.getSubdetectors().size());
+        assertEquals(12, det.getSubdetectors().size());
     }
     
-    /* limits test */
+    /* Test that limits were created. */
     public void testLimits()
     {
         LimitSet limitset = det.getLimitSet("MyLimits");        
@@ -52,10 +52,17 @@
         assertEquals(limit.getParticles(), "*");
     }
     
-    /* regions test */
+    /* Test that a region was created. */
     public void testRegions()
     {
         Region region = det.getRegion("MyRegion");
         assert(region != null);
     }
+    
+    /* Make sure that multiple subdetectors on same readout returns correct readout. */
+    public void testMultiSubdetectorReadout()
+    {
+        assert( det.getSubdetector("HADBarrel").getReadout().getName().compareTo("HcalBarrHits") == 0 );
+        assert( det.getSubdetector("HADBarrel2").getReadout().getName().compareTo("HcalBarrHits") == 0 );
+    }
 }
\ No newline at end of file

GeomConverter/test/org/lcsim/geometry/compact
sdjan03_compact.xml 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- sdjan03_compact.xml	1 Dec 2005 03:35:24 -0000	1.13
+++ sdjan03_compact.xml	17 Jan 2006 19:15:25 -0000	1.14
@@ -173,6 +173,14 @@
            <slice material = "Polystyrene" thickness = "1.0*cm" sensitive = "yes" />
          </layer>
     </detector>
+    <!-- test whether multiple readouts on same detector works okay -->
+    <detector id="10" name="HADBarrel2" type="CylindricalBarrelCalorimeter" readout="HcalBarrHits">
+         <dimensions inner_r = "144.0*cm" outer_z = "286.0*cm" />
+         <layer repeat="1">
+           <slice material = "Steel235" thickness = "2.0*cm" />
+           <slice material = "Polystyrene" thickness = "1.0*cm" sensitive = "yes" />
+         </layer>
+    </detector>
     <detector id ="7" name="HAD_ENDCAP" reflect="true" type="CylindricalEndcapCalorimeter" readout="HcalEndcapHits">
         <dimensions inner_r = "20.0*cm" inner_z = "184.0*cm" outer_r = "142.0*cm" />
         <layer repeat="34" >
CVSspam 0.2.8