java/trunk/integration-tests
--- java/trunk/integration-tests/pom.xml 2014-09-16 06:36:46 UTC (rev 1025)
+++ java/trunk/integration-tests/pom.xml 2014-09-16 18:43:13 UTC (rev 1026)
@@ -1,30 +1,38 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
<modelVersion>4.0.0</modelVersion>
<artifactId>hps-integration-tests</artifactId>
<name>integration-tests</name>
<description>Integration test suite</description>
-
<parent>
<groupId>org.hps</groupId>
<artifactId>hps-parent</artifactId>
<relativePath>../parent/pom.xml</relativePath>
<version>3.0.3-SNAPSHOT</version>
</parent>
-
<scm>
<url>http://java.freehep.org/svn/repos/hps/list/java/trunk/integration-tests/</url>
<connection>scm:svn:svn://svn.freehep.org/hps/java/trunk/integration-tests/</connection>
<developerConnection>scm:svn:svn://svn.freehep.org/hps/java/trunk/integration-tests/</developerConnection>
</scm>
-
<dependencies>
<dependency>
<groupId>org.hps</groupId>
<artifactId>hps-distribution</artifactId>
</dependency>
</dependencies>
-
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>org/hps/GenerateEcalReadoutSimData.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<profiles>
<profile>
<id>non-slac</id>
java/trunk/integration-tests/src/test/java/org/hps
--- java/trunk/integration-tests/src/test/java/org/hps/GenerateEcalReadoutSimData.java (rev 0)
+++ java/trunk/integration-tests/src/test/java/org/hps/GenerateEcalReadoutSimData.java 2014-09-16 18:43:13 UTC (rev 1026)
@@ -0,0 +1,36 @@
+package org.hps;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.lcsim.job.JobControlManager;
+import org.lcsim.util.loop.LCSimLoop;
+import org.lcsim.util.test.TestUtil.TestOutputFile;
+
+/**
+ * Run the ECAL readout simulation on current SLIC MC data.
+ * @author Jeremy McCormick <[log in to unmask]>
+ */
+public class GenerateEcalReadoutSimData extends TestCase {
+
+ // This file is tridents, AP and backgrounds merged together into one event file.
+ static String dataPath = "/u1/work/hps_test/ap025mev_egs_tri_2.2gev_0.00125x0_200na_5e5b_30mr_001_SLIC-v04-00-00_Geant4-v10-00-02_QGSP_BERT_HPS-Proposal2014-v8-6pt6.slcio";
+
+ public void testGenerateReadoutSimData() throws Exception {
+
+ // Generate ecal readout simulation data from an MC input file.
+ JobControlManager job = new JobControlManager();
+ job.addVariableDefinition("outputFile", new TestOutputFile("readout").getPath());
+ job.addInputFile(new File(dataPath));
+ job.setup("/org/hps/steering/readout/HPS2014TruthReadoutToLcio.lcsim");
+ job.configure();
+ job.run();
+
+ // Read in the readout file and print summary info.
+ LCSimLoop loop = new LCSimLoop();
+ loop.setLCIORecordSource(new TestOutputFile("readout.slcio"));
+ loop.loop(-1);
+ System.out.println("# Events written: " + loop.getTotalSupplied());
+ }
+}