Commit in lcsim/test/org/lcsim on MAIN
MokkaTest.java+53-511.1 -> 1.2
JM: indent

lcsim/test/org/lcsim
MokkaTest.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- MokkaTest.java	9 Aug 2007 20:12:09 -0000	1.1
+++ MokkaTest.java	4 Sep 2007 22:03:29 -0000	1.2
@@ -21,58 +21,60 @@
 /**
  *
  * @author jeremym
- * @version $Id: MokkaTest.java,v 1.1 2007/08/09 20:12:09 jeremy Exp $
+ * @version $Id: MokkaTest.java,v 1.2 2007/09/04 22:03:29 jeremy Exp $
  */
 public class MokkaTest extends TestCase
 {
-   
-   public MokkaTest(String testName)
-   {
-      super(testName);
-   }
-   
-   public static Test suite()
-   {
-      return new TestSuite(MokkaTest.class);
-   }
-   
-   public void testMokka() throws Exception
-   {
-      // URL url = new
-      // URL("http://www.lcsim.org/test/lcio/D12_mokka_muons.slcio");
-      URL url = new URL(
-              "http://www.lcsim.org/test/lcio/hcalFeRPC1_Mokka_muons.slcio");
-      FileCache cache = new FileCache();
-      File file = cache.getCachedFile(url);
-      
-      LCSimLoop loop = new LCSimLoop();
-      loop.setLCIORecordSource(file);
-      loop.add(new MokkaDriver());
-      loop.loop(-1);
-      loop.dispose();
-   }
-   
-   private class MokkaDriver extends Driver
-   {
-      protected void process(EventHeader event)
-      {
-         List<List<CalorimeterHit>> calHitColls = event.get(CalorimeterHit.class);
-         for ( List<CalorimeterHit> calHits : calHitColls )
-         {
-            LCMetaData meta = event.getMetaData(calHits);
-            IDDecoder decoder = meta.getIDDecoder();
-            
-            for ( CalorimeterHit hit : calHits )
-            {
-               decoder.setID(hit.getCellID());
-               
-               int M = decoder.getValue("M");
-               int S = decoder.getValue("S");
-               int I = decoder.getValue("I");
-               int J = decoder.getValue("J");
-               int layer = decoder.getValue("layer");
-            }
-         }
-      }
-   }
+
+	public MokkaTest(String testName)
+	{
+		super(testName);
+	}
+
+	public static Test suite()
+	{
+		return new TestSuite(MokkaTest.class);
+	}
+
+	public void testMokka() throws Exception
+	{
+		// URL url = new
+		// URL("http://www.lcsim.org/test/lcio/D12_mokka_muons.slcio");
+		URL url = new URL(
+		"http://www.lcsim.org/test/lcio/hcalFeRPC1_Mokka_muons.slcio");
+		FileCache cache = new FileCache();
+		File file = cache.getCachedFile(url);
+
+		LCSimLoop loop = new LCSimLoop();
+		loop.setLCIORecordSource(file);
+		loop.add(new MokkaDriver());
+		loop.loop(-1);
+		loop.dispose();
+	}
+
+	private class MokkaDriver extends Driver
+	{
+		protected void process(EventHeader event)
+		{
+			System.out.println(event.getDetector().getName());
+			
+			List<List<CalorimeterHit>> calHitColls = event.get(CalorimeterHit.class);
+			for ( List<CalorimeterHit> calHits : calHitColls )
+			{
+				LCMetaData meta = event.getMetaData(calHits);
+				IDDecoder decoder = meta.getIDDecoder();
+
+				for ( CalorimeterHit hit : calHits )
+				{
+					decoder.setID(hit.getCellID());
+
+					int M = decoder.getValue("M");
+					int S = decoder.getValue("S");
+					int I = decoder.getValue("I");
+					int J = decoder.getValue("J");
+					int layer = decoder.getValue("layer");
+				}
+			}
+		}
+	}
 }
CVSspam 0.2.8