Commit in hps-java/src/main/java/org/lcsim/hps/recon/ecal on MAIN | |||
HPSEcalConditions.java | +17 | -4 | 1.20 -> 1.21 |
Added debug output
diff -u -r1.20 -r1.21 --- HPSEcalConditions.java 21 Sep 2012 23:22:17 -0000 1.20 +++ HPSEcalConditions.java 16 Oct 2012 20:00:39 -0000 1.21 @@ -17,7 +17,7 @@
/** * * @author meeg
- * @version $Id: HPSEcalConditions.java,v 1.20 2012/09/21 23:22:17 meeg Exp $
+ * @version $Id: HPSEcalConditions.java,v 1.21 2012/10/16 20:00:39 phansson Exp $
*/ public class HPSEcalConditions extends Driver {
@@ -101,6 +101,9 @@
} public static void loadPedestals(Reader reader, int crate) {
+ + System.out.println("reading pedestals for ECal"); +
BufferedReader bufferedReader = new BufferedReader(reader); String line; while (true) {
@@ -127,8 +130,12 @@
short channel = Short.valueOf(lineTok.nextToken()); double pedestal = Double.valueOf(lineTok.nextToken()); double noise = Double.valueOf(lineTok.nextToken());
- daqToPedestalMap.put(getDaqID(crate, slot, channel), pedestal); - daqToNoiseMap.put(getDaqID(crate, slot, channel), noise);
+ long daqid = getDaqID(crate, slot, channel); + daqToPedestalMap.put(daqid, pedestal); + daqToNoiseMap.put(daqid, noise); + if (debug) { + System.out.printf("Channel %d: pede %.2f noise %.2f (crate %d slot %d channel %d)\n", daqid,pedestal,noise,crate,slot,channel); + }
} } }
@@ -174,7 +181,7 @@
expId.setValue(helper.getFieldIndex("iy"), y); badChannelsSet.add(helper.pack(expId).getValue()); if (debug) {
- System.out.println("Adding bad crystal " + x + "," + y);
+ System.out.printf("Channel %d is bad (x=%d y=%d)\n", helper.pack(expId).getValue(),x,y);
} } }
@@ -183,6 +190,9 @@
} public static void loadGains() {
+ if (debug) { + System.out.println("Loading gains"); + }
BufferedReader bufferedReader; ConditionsManager conditions = ConditionsManager.defaultInstance(); try {
@@ -216,6 +226,9 @@
int y = Integer.valueOf(lineTok.nextToken()); double gain = Double.valueOf(lineTok.nextToken()); physicalToGainMap.put(makePhysicalID(x, y), gain);
+ if (debug) { + System.out.printf("Channel %d: gain %.2f (x=%d y=%d)\n", makePhysicalID(x, y),gain,x,y); + }
} } }
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