Author: [log in to unmask]
Date: Sat Nov 1 16:48:19 2014
New Revision: 1389
Log:
Change the steering file to HPS2014ReadoutToLcio. Also, grab the test file from the web instead of a local path.
Modified:
java/branches/hps_java_trunk_HPSJAVA-255/integration-tests/src/test/java/org/hps/EcalReadoutSimTest.java
Modified: java/branches/hps_java_trunk_HPSJAVA-255/integration-tests/src/test/java/org/hps/EcalReadoutSimTest.java
=============================================================================
--- java/branches/hps_java_trunk_HPSJAVA-255/integration-tests/src/test/java/org/hps/EcalReadoutSimTest.java (original)
+++ java/branches/hps_java_trunk_HPSJAVA-255/integration-tests/src/test/java/org/hps/EcalReadoutSimTest.java Sat Nov 1 16:48:19 2014
@@ -5,6 +5,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -21,6 +22,7 @@
import org.lcsim.job.JobControlManager;
import org.lcsim.util.Driver;
import org.lcsim.util.aida.AIDA;
+import org.lcsim.util.cache.FileCache;
import org.lcsim.util.loop.LCSimLoop;
/**
@@ -90,13 +92,14 @@
// Resource locations.
//static final String steeringResource = "/org/hps/steering/test/EcalReadoutSimTest.lcsim";
- static final String steeringResource = "/org/hps/steering/readout/TestRunReadoutToLcio.lcsim";
+ //static final String steeringResource = "/org/hps/steering/readout/TestRunReadoutToLcio.lcsim";
+ static final String steeringResource = "/org/hps/steering/readout/HPS2014ReadoutToLcio.lcsim";
static final String triggeredEventsResource = "/org/hps/test/EcalReadoutSimTest/triggered_events.txt";
// File information.
- //static final String fileLocation = "http://www.lcsim.org/test/hps-java/EcalReadoutSimTest.slcio";
- static final File inputFile = new File("/nfs/slac/g/lcd/mc/prj/www/lcsim/test/hps-java/EcalReadoutSimTest.slcio");
+ static final String fileLocation = "http://www.lcsim.org/test/hps-java/EcalReadoutSimTest.slcio";
+ //static final File inputFile = new File("/nfs/slac/g/lcd/mc/prj/www/lcsim/test/hps-java/EcalReadoutSimTest.slcio");
static final File outputDir = new File("./target/test-output/" + className);
static final File outputFile = new File(outputDir + File.separator + className);
@@ -127,6 +130,9 @@
*/
public void testEcalReadoutSim() throws Exception {
+ FileCache cache = new FileCache();
+ File inputFile = cache.getCachedFile(new URL(fileLocation));
+
// Create output dir.
outputDir.mkdirs();
if (!outputDir.exists()) {
|