View Javadoc

1   package org.lcsim.geometry.compact.converter.lcdd;
2   
3   import java.io.BufferedOutputStream;
4   import java.io.FileOutputStream;
5   import java.io.InputStream;
6   import java.io.OutputStream;
7   
8   import junit.framework.TestCase;
9   
10  import org.lcsim.util.test.TestUtil.TestOutputFile;
11  
12  /**
13   * This test generates an LCDD file for a test SidHcal.
14   *
15   * @author Jeremy McCormick <jeremym@slac.stanford.edu>
16   * @version $Id: SidHcalConverterTest.java,v 1.2 2010/12/07 20:15:45 jeremy Exp $
17   */
18  public class SidHcalConverterTest extends TestCase
19  {                
20      public void testSiDHcalConverter() throws Exception
21      {
22          InputStream in = 
23                  PolyhedraBarrelCalorimeterConverterTest.class.
24                  getResourceAsStream("/org/lcsim/geometry/subdetector/SiDHcalTest.xml");
25          OutputStream out = new BufferedOutputStream(new FileOutputStream(new TestOutputFile("SiDHcalTest.lcdd")));
26          new Main().convert("SiDHcalTest",in,out);
27      }
28  }