Print

Print


Commit in hps-java/src/main/java/org/lcsim/hps/conditions/svt on MAIN
SvtConditions.java+24-401.3 -> 1.4
make setter methods package protected; minor code cleanup

hps-java/src/main/java/org/lcsim/hps/conditions/svt
SvtConditions.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- SvtConditions.java	23 Sep 2013 23:09:10 -0000	1.3
+++ SvtConditions.java	23 Sep 2013 23:24:14 -0000	1.4
@@ -8,7 +8,7 @@
 /**
  * 
  * @author Omar Moreno <[log in to unmask]>
- * @version $Id: SvtConditions.java,v 1.3 2013/09/23 23:09:10 jeremy Exp $
+ * @version $Id: SvtConditions.java,v 1.4 2013/09/23 23:24:14 jeremy Exp $
  */
 public class SvtConditions {
 
@@ -18,24 +18,42 @@
     private Map<SiSensor, Double> t0ShiftMap = new HashMap<SiSensor, Double>();
 
     /**
-     * Ctor
+     * Class constructor.
      */
     protected SvtConditions() {
     }     
     
-    public void setNoise(SiSensor sensor, int channel, Double noise) {
+    /**
+     * Set the noise value on a sensor's channel.
+     * @param sensor The SiSensor object.
+     * @param channel The channel number.
+     * @param noise The noise value.
+     */
+    void setNoise(SiSensor sensor, int channel, Double noise) {
         if (noiseMap.get(sensor) == null)
             noiseMap.put(sensor, new double[640]);   
         noiseMap.get(sensor)[channel] = noise;
     }
     
-    public void setPedestal(SiSensor sensor, int channel, double pedestal) {
+    /**
+     * Set the pedestal value on a sensor's channel.
+     * @param sensor The SiSensor object.
+     * @param channel The channel number.
+     * @param pedestal The pedestal value.
+     */
+    void setPedestal(SiSensor sensor, int channel, double pedestal) {
         if (pedestalMap.get(sensor) == null)
             pedestalMap.put(sensor, new double[640]);
         pedestalMap.get(sensor)[channel] = pedestal;
     }
     
-    public void setShapingTime(SiSensor sensor, int channel, double shapingTime) {
+    /**
+     * Set the shaping time value on a sensor's channel.
+     * @param sensor The SiSensor object.
+     * @param channel The channel number.
+     * @param shapingTime The shaping time.
+     */
+    void setShapingTime(SiSensor sensor, int channel, double shapingTime) {
         if (tpMap.get(sensor) == null)
             tpMap.put(sensor, new double[640]);
         tpMap.put(sensor, new double[640]);
@@ -90,39 +108,5 @@
         } else {
             return tp[channel];
         }
-    }
-    
-    /*
-    public static void loadSvtConditions(ConditionsConverter<ChannelConstants> converter) {
-
-        ConditionsManager conditionsManager = ConditionsManager.defaultInstance();
-
-        SvtCalibrationConverter calibrationsConverter = new SvtCalibrationConverter();
-        ChannelConstants channelConstants;
-
-        while (calibrationsConverter.hasNext()) {
-
-            channelConstants = calibrationsConverter.getData(conditionsManager, "svt_calibrations");
-
-            int fpga = channelConstants.getFpga();
-            int hybrid = channelConstants.getHybrid();
-            int channel = channelConstants.getChannel();
-
-            Pair<Integer, Integer> daqPair = new Pair<Integer, Integer>(fpga, hybrid);
-            SiSensor sensor = SvtUtils.getInstance().getSensor(daqPair);
-
-            if (noiseMap.get(sensor) == null)
-                noiseMap.put(sensor, new double[640]);
-            if (pedestalMap.get(sensor) == null)
-                pedestalMap.put(sensor, new double[640]);
-            if (tpMap.get(sensor) == null)
-                tpMap.put(sensor, new double[640]);
-
-            noiseMap.get(sensor)[channel] = channelConstants.getNoise();
-            pedestalMap.get(sensor)[channel] = channelConstants.getPedestal();
-            tpMap.get(sensor)[channel] = channelConstants.getShapingTime();
-
-        }
-    }
-            */
+    }    
 }
CVSspam 0.2.12


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