Commit in hps-java/src on MAIN | |||
main/java/org/lcsim/hps/conditions/svt/SvtCalibrationConverter.java | +18 | 1.1 -> 1.2 | |
test/java/org/lcsim/hps/conditions/DatabaseConditionsReaderTest.java | +7 | -7 | 1.2 -> 1.3 |
+25 | -7 |
minor stuff
diff -u -r1.1 -r1.2 --- SvtCalibrationConverter.java 18 Sep 2013 02:33:16 -0000 1.1 +++ SvtCalibrationConverter.java 18 Sep 2013 02:56:39 -0000 1.2 @@ -10,12 +10,26 @@
import org.lcsim.hps.conditions.ConnectionParameters; import org.lcsim.hps.conditions.DatabaseConditionsConverter;
+/** + * Read from conditions database and create SVT calibration data. + * + * @author jeremym + * @version $Id: SvtCalibrationConverter.java,v 1.2 2013/09/18 02:56:39 jeremy Exp $ + */
public class SvtCalibrationConverter extends DatabaseConditionsConverter<SvtCalibrationConstants> {
+ /** + * Constructor with argument. + * @param connectionParameters The connection information for the condition database. + */
public SvtCalibrationConverter(ConnectionParameters connectionParameters) { super(connectionParameters); }
+ /** + * Primary hook for loading data, which is called by the ConditionsReader. + * It produces a calibration object based on the appropriate database records. + */
public SvtCalibrationConstants getData(ConditionsManager manager, String name) { Connection connection = null; Statement statement = null;
@@ -60,6 +74,10 @@
return calibration; }
+ /** + * Get the type handled by this converter. + * @return The type handled by this converter. + */
public Class<SvtCalibrationConstants> getType() { return SvtCalibrationConstants.class; }
diff -u -r1.2 -r1.3 --- DatabaseConditionsReaderTest.java 18 Sep 2013 02:33:16 -0000 1.2 +++ DatabaseConditionsReaderTest.java 18 Sep 2013 02:56:39 -0000 1.3 @@ -17,22 +17,22 @@
*/ public class DatabaseConditionsReaderTest extends TestCase {
- /* Example detector from hps-detectors. */
+ /** Example detector from hps-detectors. */
private final String detectorName = "HPS-conditions-test";
- /* Run number of conditions set. */
+ /** Run number of conditions set. */
private final int runNumber = 0;
- /* Name of conditions set. */ - private final String conditionsSetName = "calibration";
+ /** Name of conditions set. */ + private final String conditionsSetName = "svt_calibration";
- /* Print output. */
+ /** Print output. */
private final PrintStream ps = System.out; /** * Create the manager, load the detector, and then get the conditions meta-data * for the selected conditions set. Finally, use the sample converter to create
- * a Calibration object from the database rows.
+ * an SvtCalibrationConstants object from the database rows.
*/ public void test() { ConditionsManager manager = ConditionsManager.defaultInstance();
@@ -51,7 +51,7 @@
ps.println("column: " + conditions.getString("column")); ps.println("id: " + conditions.getString("id"));
- CachedConditions<SvtCalibrationConstants> c = manager.getCachedConditions(SvtCalibrationConstants.class, "svt_calibration");
+ CachedConditions<SvtCalibrationConstants> c = manager.getCachedConditions(SvtCalibrationConstants.class, conditionsSetName);
SvtCalibrationConstants calibration = c.getCachedData(); System.out.println("Got calibration conditions ... "); System.out.println(calibration);
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1