Print

Print


Commit in lcsim/test/org/lcsim/recon/cluster/directedtree on MAIN
DirectedTreeProdTest.java+37added 1.1
JM: simple test for producing an output file with DT clusters

lcsim/test/org/lcsim/recon/cluster/directedtree
DirectedTreeProdTest.java added at 1.1
diff -N DirectedTreeProdTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ DirectedTreeProdTest.java	26 Jun 2008 22:58:14 -0000	1.1
@@ -0,0 +1,37 @@
+package org.lcsim.recon.cluster.directedtree;
+import java.io.File;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.lcsim.digisim.DigiSimDriver;
+import org.lcsim.digisim.SimCalorimeterHitsDriver;
+import org.lcsim.recon.cluster.util.CalHitMapDriver;
+import org.lcsim.util.cache.FileCache;
+import org.lcsim.util.loop.LCIODriver;
+import org.lcsim.util.loop.LCSimLoop;
+import org.lcsim.util.test.TestUtil.TestOutputFile;
+
+/**
+ * Runs the DirectedTreeDriver and writes the output to the ./target/test-output directory.
+ * @author Jeremy McCormick 
+ */
+public class DirectedTreeProdTest extends TestCase
+{
+	public void testDirectedTreeProd() throws Exception
+	{
+		URL url = new URL("http://www.lcsim.org/test/lcio/pythiaZPoleuds-0-1000_SLIC-v2r3p7_geant4-v9r0p1_LCPhys_sid01.slcio");
+		FileCache cache = new FileCache();
+		File file = cache.getCachedFile(url);
+		LCSimLoop loop = new LCSimLoop();
+		loop.setLCIORecordSource(file);
+		
+		loop.add(new CalHitMapDriver());
+		loop.add(new DigiSimDriver());
+		loop.add(new SimCalorimeterHitsDriver());		
+		loop.add(new DirectedTreeDriver());
+		loop.add(new LCIODriver(new TestOutputFile("DirectedTreeProdTest.slcio")));
+		loop.loop(1);
+		loop.dispose();		
+	}
+}
CVSspam 0.2.8