1 package org.lcsim.detector.converter.compact; 2 3 import java.io.InputStream; 4 5 import junit.framework.TestCase; 6 7 import org.lcsim.detector.converter.heprep.DetectorElementToHepRepConverter; 8 import org.lcsim.geometry.Detector; 9 import org.lcsim.geometry.GeometryReader; 10 import org.lcsim.util.test.TestUtil.TestOutputFile; 11 12 public class PolyhedraEndcapCalorimeter2Test extends TestCase 13 { 14 Detector detector; 15 16 private static final String resource = 17 "/org/lcsim/detector/converter/compact/PolyhedraEndcapCalorimeter2Test.xml"; 18 19 public void setUp() 20 { 21 InputStream in = 22 this.getClass(). 23 getResourceAsStream(resource); 24 25 GeometryReader reader = new GeometryReader(); 26 27 try 28 { 29 detector = reader.read(in); 30 } 31 catch (Throwable x) 32 { 33 throw new RuntimeException(x); 34 } 35 } 36 37 public void testWriteHepRep() 38 { 39 try 40 { 41 DetectorElementToHepRepConverter.writeHepRep((new TestOutputFile("PolyhedraEndcapCalorimeter2Test.heprep")).getPath()); 42 } 43 catch (Exception x) 44 { 45 throw new RuntimeException(x); 46 } 47 } 48 }