Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN | |||
HPSRTM.java | +7 | -51 | 1.1 -> 1.2 |
Small updates
diff -u -r1.1 -r1.2 --- HPSRTM.java 12 Jan 2012 22:41:29 -0000 1.1 +++ HPSRTM.java 12 Mar 2012 23:03:03 -0000 1.2 @@ -7,7 +7,7 @@
/** * * @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSRTM.java,v 1.1 2012/01/12 22:41:29 omoreno Exp $
+ * @version $Id: HPSRTM.java,v 1.2 2012/03/12 23:03:03 omoreno Exp $
*/ public class HPSRTM {
@@ -35,13 +35,10 @@
adcResolution = bits; voltageIntervals = (int) Math.pow(2, bits);
- System.out.println(voltageIntervals);
adcVoltageResolution = (adcHighRef - adcLowRef)/voltageIntervals; // mV
- System.out.println(adcVoltageResolution); -
} //--- Methods ---//
@@ -54,13 +51,15 @@
*/ public Map<Integer, double[]> digitize( Map<Integer, double[]> data ) {
- analogData = data;
+ digitalData = data;
// Amplify the incoming analog signal amplifySignal(); // Loop over all apv25 analog signals and digitize them
- for(Map.Entry<Integer, double[]> entry : analogData.entrySet()){
+ for(Map.Entry<Integer, double[]> entry : digitalData.entrySet()){
+
+
// Aquire the amplified signal double[] digitalSignal = entry.getValue();
@@ -75,20 +74,8 @@
digitalData.put(entry.getKey(), digitalSignal);
-// System.out.println( "chip #: " + entry.getKey()); -// System.out.print("[ "); -// for(double element : digitalSignal ){ -// -// System.out.print(element + ","); -// } -// System.out.print(" ]"); -// System.out.println("");
}
- //---> - System.out.println(this.getClass().getName() + ": APV25 output has been digitized"); - //---> -
return digitalData; }
@@ -98,12 +85,8 @@
public void amplifySignal() {
- //---> - System.out.println(this.getClass().getName() + ": AmplyingSignal"); - //---> -
// Loop over all apv25 analog data
- for(Map.Entry<Integer, double[]> entry : analogData.entrySet() )
+ for(Map.Entry<Integer, double[]> entry : digitalData.entrySet() )
{ // Obtain the apv25 output double[] apv25Output = entry.getValue();
@@ -118,17 +101,7 @@
} // Store the amplified APV25 output
- analogData.put(entry.getKey(), apv25Output); - - // Loop over the array -// System.out.println( "chip #: " + entry.getKey()); -// System.out.print("[ "); -// for(double element : signal ){ -// -// System.out.print(element + ","); -// } -// System.out.print(" ]"); -// System.out.println("");
+ digitalData.put(entry.getKey(), apv25Output);
} }
@@ -139,10 +112,6 @@
public void setResolution( int bits ) { adcResolution = bits;
- - // adcVoltageResolution -// = Math.floor((adcHighRef - adcLowRef)/adcResolution)*1000; -
} /**
@@ -153,19 +122,6 @@
double[] data = digitalData.get("1"); System.out.println(data.length);
- //double[] data = digitalData.get("1"); - - // System.out.println("[ " + digitalData.size()); - - -// for(double element : data ) -// { -// System.out.println(element + ","); -// } -
System.out.println(" ]"); }
- - -
}
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