hps-java/src/test/java/org/lcsim/hps/conditions
diff -N ConditionsLoaderTest.java
--- ConditionsLoaderTest.java 4 Oct 2013 06:02:19 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,59 +0,0 @@
-package org.lcsim.hps.conditions;
-
-import junit.framework.TestCase;
-
-import org.lcsim.conditions.ConditionsManager;
-import org.lcsim.conditions.ConditionsManager.ConditionsNotFoundException;
-import org.lcsim.hps.conditions.ecal.EcalConditions;
-import org.lcsim.hps.conditions.svt.SvtConditions;
-import org.lcsim.util.loop.LCSimConditionsManagerImplementation;
-
-/**
- * This class tests the {@link ConditionsLoader} which loads SVT and ECAL conditions.
- * @author Jeremy McCormick <[log in to unmask]>
- */
-public class ConditionsLoaderTest extends TestCase {
-
- /** An example detector from hps-detectors. */
- private static final String detectorName = "HPS-conditions-test";
-
- /** The run number of the conditions set in the database. */
- private static final int runNumber = 777;
-
- /** The number of channels that should be in the SVT channel map. */
- private static final int SVT_CHANNELS = 12800;
-
- /** The number of channels that should be in the ECAL channel map. */
- private static final int ECAL_CHANNELS = 442;
-
- // TODO: Add more assertions to this test.
- public void test() {
-
- // Setup the conditions manager.
- ConditionsManager.setDefaultConditionsManager(new LCSimConditionsManagerImplementation());
- ConditionsManager manager = ConditionsManager.defaultInstance();
- try {
- manager.setDetector(detectorName, runNumber);
- } catch (ConditionsNotFoundException e) {
- throw new RuntimeException(e);
- }
-
- // Load the SVT and ECAL conditions.
- ConditionsLoader loader = new ConditionsLoader(manager);
- loader.load();
-
- // Check SVT conditions.
- SvtConditions svt = loader.getSvtConditions();
- assertNotNull(svt);
- System.out.println("Printing SVT conditions ...");
- System.out.println(svt);
- assertEquals("Wrong number of SVT channels in map.", SVT_CHANNELS, svt.getChannelMap().size());
-
- // Check ECAL conditions.
- EcalConditions ecal = loader.getEcalConditions();
- assertNotNull(ecal);
- System.out.println("Printing ECAL conditions ...");
- System.out.println(ecal);
- assertEquals("Wrong number of ECAL channels in map.", ECAL_CHANNELS, ecal.getChannelMap().size());
- }
-}
\ No newline at end of file