Print

Print


Commit in lcsim/src/org/lcsim/util/loop on MAIN
LCSimLoop.java+45-321.2 -> 1.3
Support added for user-supplied LCIORecordSource.

lcsim/src/org/lcsim/util/loop
LCSimLoop.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- LCSimLoop.java	14 Mar 2005 16:11:37 -0000	1.2
+++ LCSimLoop.java	29 Jul 2005 02:43:56 -0000	1.3
@@ -1,8 +1,10 @@
 package org.lcsim.util.loop;
 
+import java.util.List;
 import java.io.File;
 import java.io.IOException;
 import java.util.TooManyListenersException;
+
 import org.freehep.record.loop.SequentialRecordLoopImpl;
 import org.lcsim.util.Driver;
 import org.lcsim.util.DriverAdapter;
@@ -14,36 +16,47 @@
  */
 public class LCSimLoop extends SequentialRecordLoopImpl
 {
-   private Driver top = new Driver();
-   public LCSimLoop()
-   {
-      try
-      {
-         super.addRecordListener(new DriverAdapter(top));
-      }
-      catch (TooManyListenersException x)
-      {
-         throw new RuntimeException("Can't happen!",x);
-      }
-   }
-   public void add(Driver driver)
-   {
-      top.add(driver);
-   }
-   public void remove(Driver driver)
-   {
-      top.remove(driver);
-   }
-   public void setLCIORecordSource(File file) throws IOException
-   {
-      super.setRecordSource(new LCIOEventSource(file));
-   }
-   public void setStdhepRecordSource(File file, String detectorName) throws IOException
-   {
-      super.setRecordSource(new StdhepEventSource(file, detectorName));
-   }
-   public void setRecordSource(LCSimEventGenerator gen)
-   {
-      super.setRecordSource(new EventGeneratorRecordSource(gen, "generator"));
-   }
+    private Driver top = new Driver();
+    
+    public LCSimLoop()
+    {
+        try
+        {
+            super.addRecordListener(new DriverAdapter(top));
+        }
+        catch (TooManyListenersException x)
+        {
+            throw new RuntimeException("Can't happen!",x);
+        }
+    }
+    
+    public void add(Driver driver)
+    {
+        top.add(driver);
+    }
+    
+    public void remove(Driver driver)
+    {
+        top.remove(driver);
+    }
+    
+    public void setLCIORecordSource(File file) throws IOException
+    {
+        super.setRecordSource(new LCIOEventSource(file));
+    }
+    
+    public void setLCIORecordSource(LCIOEventSource src) throws IOException
+    {
+        super.setRecordSource(src);
+    }
+    
+    public void setStdhepRecordSource(File file, String detectorName) throws IOException
+    {
+        super.setRecordSource(new StdhepEventSource(file, detectorName));
+    }
+    
+    public void setRecordSource(LCSimEventGenerator gen)
+    {
+        super.setRecordSource(new EventGeneratorRecordSource(gen, "generator"));
+    }
 }
CVSspam 0.2.8