java/trunk/conditions/src/main/java/org/hps/conditions
--- java/trunk/conditions/src/main/java/org/hps/conditions/ConditionsDriver.java 2014-09-10 01:51:44 UTC (rev 977)
+++ java/trunk/conditions/src/main/java/org/hps/conditions/ConditionsDriver.java 2014-09-10 02:08:31 UTC (rev 978)
@@ -73,6 +73,7 @@
/**
* Set the class of the conditions reader to use.
*/
+ /*
public void setConditionsReaderClass(String className) {
try {
Object object = Class.forName(className).newInstance();
@@ -85,6 +86,7 @@
throw new RuntimeException(e);
}
}
+ */
public void setEcalSubdetectorName(String ecalSubdetectorName) {
this.ecalSubdetectorName = ecalSubdetectorName;
java/trunk/conditions/src/main/java/org/hps/conditions
--- java/trunk/conditions/src/main/java/org/hps/conditions/DatabaseConditionsManager.java 2014-09-10 01:51:44 UTC (rev 977)
+++ java/trunk/conditions/src/main/java/org/hps/conditions/DatabaseConditionsManager.java 2014-09-10 02:08:31 UTC (rev 978)
@@ -53,7 +53,7 @@
protected List<TableMetaData> tableMetaData;
protected List<ConditionsConverter> converters;
protected File connectionPropertiesFile;
- protected ConditionsReader baseReader;
+ //protected ConditionsReader baseReader;
protected static Logger logger = null;
protected ConnectionParameters connectionParameters;
protected Connection connection;
@@ -66,7 +66,7 @@
*/
public DatabaseConditionsManager() {
registerConditionsConverter(new DetectorConditionsConverter());
- baseReader = new BaseClasspathConditionsReader();
+ //baseReader = new BaseClasspathConditionsReader();
setupConnectionFromSystemProperty();
}
@@ -160,10 +160,10 @@
* @param detectorName the name of the detector
*/
void setup(String detectorName) {
- if (baseReader instanceof BaseClasspathConditionsReader) {
- ((BaseClasspathConditionsReader) baseReader).setResourcePath(detectorName);
- logger.config("set resource path " + detectorName + " on conditions reader");
- }
+ //if (baseReader instanceof BaseClasspathConditionsReader) {
+ // ((BaseClasspathConditionsReader) baseReader).setResourcePath(detectorName);
+ // logger.config("set resource path " + detectorName + " on conditions reader");
+ //}
if (!isConnected())
openConnection();
else
@@ -242,10 +242,12 @@
* conditions such as the compact.xml file for the detector.
* @param reader The base ConditionsReader.
*/
- public void setBaseConditionsReader(ConditionsReader baseReader) {
- logger.config("setting conditions reader to " + baseReader.getClass().getCanonicalName());
- this.baseReader = baseReader;
- }
+ // FIXME: This doesn't work because the super class has some convoluted logic that always overrides
+ // whatever is set manually as the conditions reader.
+ //public void setBaseConditionsReader(ConditionsReader baseReader) {
+ // logger.config("setting conditions reader to " + baseReader.getClass().getCanonicalName());
+ // this.baseReader = baseReader;
+ //}
/**
* Get the next collection ID for a database conditions table.
java/trunk/conditions/src/main/java/org/hps/conditions/config
--- java/trunk/conditions/src/main/java/org/hps/conditions/config/TestRunReadOnlyConfiguration.java 2014-09-10 01:51:44 UTC (rev 977)
+++ java/trunk/conditions/src/main/java/org/hps/conditions/config/TestRunReadOnlyConfiguration.java 2014-09-10 02:08:31 UTC (rev 978)
@@ -1,36 +1,19 @@
package org.hps.conditions.config;
-import org.hps.conditions.deprecated.TestRunConditionsReader;
-
/**
* <p>
* This is a static utility class for setting up the conditions system for test cases in
* this package and sub-packages.
- * </p>
* <p>
* It uses the SLAC Test Run 2012 conditions database, with a relative reference to a file
* containing connection parameters in the hps-conditions module. The XML configuration is
* read from a classpath resource in the same module.
- * </p>
* <p>
* The detector is set to <i>HPS-conditions-test</i>, which is a test detector without
* real data associated to it. There are a few files used in the test cases that use this
* detector.
- * </p>
* <p>
* The run number is initially set to <i>1351</i> which is one of the "good runs".
- * </p>
- * <p>
- * Full setup can be performed with this method chain: <code>
- * DatabaseConditionsManager manager = new DefaultTestSetup().configure().setup();
- * </code>
- * </p>
- * <p>
- * To only configure the system without setting up detector and run, use the following:
- * <code>
- * new DefaultTestSetup().configure();
- * </code>
- * </p>
*
* @author Jeremy McCormick <[log in to unmask]>
*/
@@ -46,8 +29,8 @@
public TestRunReadOnlyConfiguration(boolean setup) {
super(config, prop);
if (setup) {
- setup();
- load(detectorName, runNumber);
+ setup();
+ load(detectorName, runNumber);
}
- }
+ }
}
\ No newline at end of file