Commit in hps-java/src on MAIN | |||
main/java/org/lcsim/hps/conditions/DatabaseConditionsReader.java | +5 | -5 | 1.13 -> 1.14 |
main/java/org/lcsim/hps/conditions/ecal/EcalCalibrationCollection.java | +2 | 1.2 -> 1.3 | |
/EcalCalibrationConverter.java | +1 | -1 | 1.2 -> 1.3 |
/EcalChannelMap.java | +2 | -1 | 1.2 -> 1.3 |
/EcalGainCollection.java | +3 | -1 | 1.4 -> 1.5 |
main/java/org/lcsim/hps/conditions/svt/ChannelConstantsCollection.java | +4 | -1 | 1.3 -> 1.4 |
/PulseParametersCollection.java | +2 | 1.1 -> 1.2 | |
/SvtCalibrationCollection.java | +2 | 1.2 -> 1.3 | |
/SvtGainCollection.java | +2 | -1 | 1.1 -> 1.2 |
test/java/org/lcsim/hps/conditions/ConditionsLoaderTest.java | +2 | -2 | 1.1 -> 1.2 |
/DatabaseConditionsReaderTest.java | +7 | -8 | 1.8 -> 1.9 |
+32 | -20 |
modifications to class constructor access; make a few classes public that users might want to access directly
diff -u -r1.13 -r1.14 --- DatabaseConditionsReader.java 4 Oct 2013 01:54:16 -0000 1.13 +++ DatabaseConditionsReader.java 4 Oct 2013 02:03:32 -0000 1.14 @@ -45,7 +45,7 @@
* </p> * * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: DatabaseConditionsReader.java,v 1.13 2013/10/04 01:54:16 jeremy Exp $
+ * @version $Id: DatabaseConditionsReader.java,v 1.14 2013/10/04 02:03:32 jeremy Exp $
*/ public class DatabaseConditionsReader extends ConditionsReader {
@@ -117,9 +117,9 @@
*/ public boolean update(ConditionsManager manager, String detectorName, int run) throws IOException {
- logger.info("update"); - logger.info(" detectorName: " + detectorName); - logger.info(" run: " + run);
+ logger.info("update ..."); + logger.info("detectorName: " + detectorName); + logger.info("run: " + run);
// Setup detector. if (this.detectorName == null) {
@@ -132,7 +132,7 @@
// Check if conditions for this run are already loaded. if (run <= maxRun && run >= minRun) {
- logger.info("Conditions already cached for this run.");
+ logger.warning("Conditions already cached for this run.");
return false; }
diff -u -r1.2 -r1.3 --- EcalCalibrationCollection.java 4 Oct 2013 01:43:47 -0000 1.2 +++ EcalCalibrationCollection.java 4 Oct 2013 02:03:32 -0000 1.3 @@ -7,4 +7,6 @@
* @author Jeremy McCormick <[log in to unmask]> */ public class EcalCalibrationCollection extends LinkedHashMap<Integer,EcalCalibration> {
+ EcalCalibrationCollection() { + }
}
diff -u -r1.2 -r1.3 --- EcalCalibrationConverter.java 4 Oct 2013 01:43:47 -0000 1.2 +++ EcalCalibrationConverter.java 4 Oct 2013 02:03:32 -0000 1.3 @@ -11,7 +11,7 @@
import org.lcsim.hps.conditions.DatabaseConditionsConverter; /**
- * This class creates a list of {@link EcalCalibration} objects from the conditions database.
+ * This class creates a list of {@link EcalCalibrationCollection} from the conditions database.
* @author Jeremy McCormick <[log in to unmask]> */ public class EcalCalibrationConverter extends DatabaseConditionsConverter<EcalCalibrationCollection> {
diff -u -r1.2 -r1.3 --- EcalChannelMap.java 1 Oct 2013 01:22:33 -0000 1.2 +++ EcalChannelMap.java 4 Oct 2013 02:03:33 -0000 1.3 @@ -13,7 +13,8 @@
*/ public class EcalChannelMap extends HashMap<Integer, EcalChannel> {
- EcalChannelMap() {}
+ EcalChannelMap() {
+ }
/** * Find a channel by using DAQ information.
diff -u -r1.4 -r1.5 --- EcalGainCollection.java 4 Oct 2013 01:43:47 -0000 1.4 +++ EcalGainCollection.java 4 Oct 2013 02:03:33 -0000 1.5 @@ -5,5 +5,7 @@
/** * This class maps integer IDs from the database to ECal gain parameters. */
-class EcalGainCollection extends LinkedHashMap<Integer,EcalGain> {
+public class EcalGainCollection extends LinkedHashMap<Integer,EcalGain> {
+ EcalGainCollection() {
+ }
}
diff -u -r1.3 -r1.4 --- ChannelConstantsCollection.java 2 Oct 2013 23:19:54 -0000 1.3 +++ ChannelConstantsCollection.java 4 Oct 2013 02:03:33 -0000 1.4 @@ -7,7 +7,10 @@
* This is a set of ChannelConstant objects mapped to their IDs (from the database). * @author Jeremy McCormick <[log in to unmask]> */
-class ChannelConstantsCollection extends LinkedHashMap<Integer,ChannelConstants> {
+public class ChannelConstantsCollection extends LinkedHashMap<Integer,ChannelConstants> {
+
+ ChannelConstantsCollection() {
+ }
ChannelConstants getChannelConstants(Integer channelId) { return this.get(channelId);
diff -u -r1.1 -r1.2 --- PulseParametersCollection.java 4 Oct 2013 01:43:48 -0000 1.1 +++ PulseParametersCollection.java 4 Oct 2013 02:03:33 -0000 1.2 @@ -7,4 +7,6 @@
* @author Jeremy McCormick <[log in to unmask]> */ public class PulseParametersCollection extends LinkedHashMap<Integer,PulseParameters> {
+ PulseParametersCollection() { + }
}
diff -u -r1.2 -r1.3 --- SvtCalibrationCollection.java 4 Oct 2013 01:43:48 -0000 1.2 +++ SvtCalibrationCollection.java 4 Oct 2013 02:03:33 -0000 1.3 @@ -8,4 +8,6 @@
* @author Jeremy McCormick <[log in to unmask]> */ public class SvtCalibrationCollection extends LinkedHashMap<Integer,SvtCalibration> {
+ SvtCalibrationCollection() { + }
}
diff -u -r1.1 -r1.2 --- SvtGainCollection.java 4 Oct 2013 01:43:48 -0000 1.1 +++ SvtGainCollection.java 4 Oct 2013 02:03:33 -0000 1.2 @@ -8,5 +8,6 @@
* @author Jeremy McCormick <[log in to unmask]> */ public class SvtGainCollection extends LinkedHashMap<Integer, SvtGain> {
-
+ SvtGainCollection() { + }
}
diff -u -r1.1 -r1.2 --- ConditionsLoaderTest.java 4 Oct 2013 01:43:48 -0000 1.1 +++ ConditionsLoaderTest.java 4 Oct 2013 02:03:33 -0000 1.2 @@ -26,6 +26,7 @@
/** 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.
@@ -52,12 +53,11 @@
// Check ECAL conditions. EcalConditions ecal = loader.getEcalConditions();
- System.out.println();
System.out.println("Printing ECAL conditions ..."); System.out.println(); System.out.println(ecal); assertNotNull(ecal);
- assertEquals("Wrong number of ECAL channels in map.", ECAL_CHANNELS, ecal.getChannelMap().size());
+ assertEquals("Wrong number of ECAL channels in map.", ECAL_CHANNELS, ecal.getChannelMap().size());
} }
diff -u -r1.8 -r1.9 --- DatabaseConditionsReaderTest.java 4 Oct 2013 01:43:48 -0000 1.8 +++ DatabaseConditionsReaderTest.java 4 Oct 2013 02:03:33 -0000 1.9 @@ -7,8 +7,7 @@
import org.lcsim.conditions.CachedConditions; import org.lcsim.conditions.ConditionsManager; import org.lcsim.conditions.ConditionsManager.ConditionsNotFoundException;
-import org.lcsim.conditions.ConditionsSet; -//import org.lcsim.hps.conditions.svt.ChannelConstantsCollection;
+import org.lcsim.hps.conditions.svt.ChannelConstantsCollection;
/** * This class tests the DatabaseConditionsReader on dummy data.
@@ -48,11 +47,11 @@
ps.println(r.toString()); }
- //CachedConditions<ChannelConstantsCollection> c = manager.getCachedConditions(ChannelConstantsCollection.class, conditionsSetName); - //ChannelConstantsCollection calibration = c.getCachedData(); - //assertTrue("Calibration object is null.", calibration != null); - //System.out.println("Got calibration conditions ... "); - //System.out.println(calibration); - //System.out.println("Success!");
+ CachedConditions<ChannelConstantsCollection> c = manager.getCachedConditions(ChannelConstantsCollection.class, conditionsSetName); + ChannelConstantsCollection calibration = c.getCachedData(); + assertTrue("Calibration object is null.", calibration != null); + System.out.println("Got calibration conditions ... "); + System.out.println(calibration); + System.out.println("Success!");
} }
\ No newline at end of file
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