lcsim/test
diff -u -r1.9 -r1.10
--- LCIOReadTest.java 4 Aug 2005 03:08:57 -0000 1.9
+++ LCIOReadTest.java 8 Feb 2006 01:18:47 -0000 1.10
@@ -16,62 +16,70 @@
import org.lcsim.util.loop.LCSimLoop;
/**
- *
* @author tonyj
*/
public class LCIOReadTest extends TestCase
{
-
- public LCIOReadTest(String testName)
- {
- super(testName);
- }
-
- public static Test suite()
- {
- return new TestSuite(LCIOReadTest.class);
- }
-
- public void testLCIORead() throws Exception
- {
- URL url = new URL("http://www.lcsim.org/datasamples/slic_sdjan03_K0S_Theta90_1-10GeV.slcio");
- FileCache cache = new FileCache();
- File file = cache.getCachedFile(url);
-
- LCSimLoop loop = new LCSimLoop();
- loop.setLCIORecordSource(file);
- loop.add(new CheatClusterDriver());
- loop.add(new ReadDriver());
- loop.add(new LCIODriver(new File("test.slcio")));
- loop.loop(-1);
- assertEquals(1000,loop.getTotalCountableSupplied());
- loop.dispose();
- }
- public void testLCIOReadChain() throws Exception
- {
- URL url = new URL("http://www.lcsim.org/datasamples/slic_sdjan03_K0S_Theta90_1-10GeV.slcio");
- FileCache cache = new FileCache();
- File file = cache.getCachedFile(url);
-
- List<File> files = new ArrayList<File>();
- files.add(file);
- files.add(file);
- LCIOEventSource es = new LCIOEventSource("TestChain", files);
-
- LCSimLoop loop = new LCSimLoop();
- loop.setLCIORecordSource(es);
- loop.loop(-1);
- assertEquals(2000,loop.getTotalCountableSupplied());
- loop.dispose();
- }
- private class ReadDriver extends Driver
- {
- private int n;
- public void process(EventHeader event)
- {
- // Look for clusters
- List<List<Cluster>> collections = event.get(Cluster.class);
- if (n++ == 0) assertEquals(3,collections.size());
- }
- }
+
+ public LCIOReadTest(String testName)
+ {
+ super(testName);
+ }
+
+ public static Test suite()
+ {
+ return new TestSuite(LCIOReadTest.class);
+ }
+
+ public void testLCIORead() throws Exception
+ {
+ // URL url = new
+ // URL("http://www.lcsim.org/datasamples/slic_sdjan03_K0S_Theta90_1-10GeV.slcio");
+ URL url = new URL("http://www.lcsim.org/test/lcio/muons_SLIC_v1r9p1_sidmay05.slcio");
+ FileCache cache = new FileCache();
+ File file = cache.getCachedFile(url);
+
+ LCSimLoop loop = new LCSimLoop();
+ loop.setLCIORecordSource(file);
+ loop.add(new CheatClusterDriver());
+ loop.add(new ReadDriver());
+ loop.add(new LCIODriver(new File("test.slcio")));
+ loop.loop(-1);
+ // assertEquals(1000, loop.getTotalCountableSupplied());
+ assertEquals(200, loop.getTotalCountableSupplied());
+ loop.dispose();
+ }
+
+ public void testLCIOReadChain() throws Exception
+ {
+ // URL url = new
+ // URL("http://www.lcsim.org/datasamples/slic_sdjan03_K0S_Theta90_1-10GeV.slcio");
+ URL url = new URL("http://www.lcsim.org/test/lcio/muons_SLIC_v1r9p1_sidmay05.slcio");
+ FileCache cache = new FileCache();
+ File file = cache.getCachedFile(url);
+
+ List<File> files = new ArrayList<File>();
+ files.add(file);
+ files.add(file);
+ LCIOEventSource es = new LCIOEventSource("TestChain", files);
+
+ LCSimLoop loop = new LCSimLoop();
+ loop.setLCIORecordSource(es);
+ loop.loop(-1);
+ // assertEquals(2000, loop.getTotalCountableSupplied());
+ assertEquals(400, loop.getTotalCountableSupplied());
+ loop.dispose();
+ }
+ private class ReadDriver extends Driver
+ {
+ private int n;
+
+ public void process(EventHeader event)
+ {
+ // Look for clusters
+ List<List<Cluster>> collections = event.get(Cluster.class);
+ if (n++ == 0)
+ assertEquals(3, collections.size());
+ }
+ }
}
\ No newline at end of file
lcsim/test
diff -u -r1.1 -r1.2
--- SamplingFractionTest.java 2 Aug 2005 17:18:08 -0000 1.1
+++ SamplingFractionTest.java 8 Feb 2006 01:18:47 -0000 1.2
@@ -31,7 +31,8 @@
public void testLCIORead() throws Exception
{
- URL url = new URL("http://www.lcsim.org/datasamples/slic_sdjan03_K0S_Theta90_1-10GeV.slcio");
+// URL url = new URL("http://www.lcsim.org/datasamples/slic_sdjan03_K0S_Theta90_1-10GeV.slcio");
+ URL url = new URL("http://www.lcsim.org/test/lcio/muons_SLIC_v1r9p1_sidmay05.slcio");
FileCache cache = new FileCache();
File file = cache.getCachedFile(url);