Hi Jeremy,
yes, this test is there just to dump to the screen (or to a text file via redirection) LED information that is saved on the database. If there's a better way to do this, with the print command, we can proceed this way.
Regarding point 2, I did even know that tests are performed in the automatic build.. and no, I do not know how to avoid this.
Finally, the LED conditions are not actually not used in any place (analysis or reconstruction): the slow control system is not interacting with the conditions database to determine how to run LEDs, but relies on its own data files (this is how it was designed.. and it is not trivial at all to change this). Therefore, I think that it is good to have them in the database, but this is just for reference.
Also, I think I found some mismatches in the values that are there: It is fine for me to change these LED values in the database, however, you should instruct me how to do this.
Bests,
Andrea
On 12/01/2014 04:40 PM, McCormick, Jeremy I. wrote:
Hi, Andrea.
A couple things here about this test you added...
1) You put me down for the author in the comments on a commit that you made. Your information should be listed here instead.
2) This test doesn't actually do anything, i.e. there aren't any assertions made so it questionable whether the test should even be in the code.
If you still want it in the conditions package for reference, then I believe it should not be run with the automatic builds. (e.g. it should be added to the test
exclusions in the pom file...do you know how to do this yourself?)
3) You can dump the LED conditions using the 'print' command line option, which I'm not sure you're aware of so if that's all that is needed here,
then let me know and I'll tell you how to do it. There doesn't need to be a test case if that's all you want to do here.
BTW, Nathan had indicated he wasn't sure why LED conditions needed to be in the database. Can you elaborate on how you might use these
in the LCSim code for analysis or recon?
(FYI, this message is not CC'd to software list.)
--Jeremy
-----Original Message-----
From: [log in to unmask] [mailto:[log in to unmask]] On Behalf Of [log in to unmask]
Sent: Monday, December 01, 2014 1:14 PM
To: hps-svn
Subject: r1604 - /java/trunk/conditions/src/test/java/org/hps/conditions/ecal/EcalLedTest.java
Author: [log in to unmask]
Date: Mon Dec 1 13:14:13 2014
New Revision: 1604
Log:
Added LED condition tests with database system
Added:
java/trunk/conditions/src/test/java/org/hps/conditions/ecal/EcalLedTest.java
Added: java/trunk/conditions/src/test/java/org/hps/conditions/ecal/EcalLedTest.java
==============================================================================
--- java/trunk/conditions/src/test/java/org/hps/conditions/ecal/EcalLedTest.java (added)
+++ java/trunk/conditions/src/test/java/org/hps/conditions/ecal/EcalLedTest.java Mon Dec 1 13:14:13 2014
@@ -0,0 +1,47 @@
+package org.hps.conditions.ecal;
+
+import junit.framework.TestCase;
+
+import org.hps.conditions.database.DatabaseConditionsManager;
+import org.hps.conditions.database.TableConstants;
+//import org.hps.conditions.config.DevReadOnlyConfiguration;
+import org.hps.conditions.ecal.EcalLed.EcalLedCollection;
+import
+org.lcsim.conditions.ConditionsManager.ConditionsNotFoundException;
+
+/**
+ * A very basic test to make sure ECAL LED information is
+ * readable from the conditions dev database.
+ * @author Jeremy McCormick <[log in to unmask]> */ public
+class EcalLedTest extends TestCase {
+
+
+ DatabaseConditionsManager conditionsManager;
+ public void setUp() {
+ conditionsManager = DatabaseConditionsManager.getInstance();
+ try {
+ conditionsManager.setDetector("HPS-Proposal2014-v7-2pt2", 0);
+ } catch (ConditionsNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+
+
+ public void testEcalLed() {
+ DatabaseConditionsManager manager = DatabaseConditionsManager.getInstance();
+ EcalLedCollection collection = manager.getConditionsData(EcalLedCollection.class, TableConstants.ECAL_LEDS);
+ for (EcalLed led : collection) {
+
+ System.out.println(led);
+ //System.out.println("ECAL LED info ...");
+ //System.out.println("ecal_channel_id: " + led.getEcalChannelId());
+ //System.out.println("crate: " + led.getCrateNumber());
+ //System.out.println("number: " + led.getLedNumber());
+ //System.out.println("time_delay: " + led.getTimeDelay());
+ //System.out.println("amplitude_low: " + led.getAmplitudeLow());
+ //System.out.println("amplitude_high: " + led.getAmplitudeHigh());
+ //System.out.println();
+ }
+ }
+}
Use REPLY-ALL to reply to list
To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1