Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN
HPSDataProcessingModule.java+14-61.9 -> 1.10
write to data buffer

hps-java/src/main/java/org/lcsim/hps/recon/tracking
HPSDataProcessingModule.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- HPSDataProcessingModule.java	31 Mar 2012 01:59:00 -0000	1.9
+++ HPSDataProcessingModule.java	5 Apr 2012 23:57:26 -0000	1.10
@@ -23,7 +23,7 @@
 /**
  *
  * @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSDataProcessingModule.java,v 1.9 2012/03/31 01:59:00 omoreno Exp $
+ * @version $Id: HPSDataProcessingModule.java,v 1.10 2012/04/05 23:57:26 jeremy Exp $
  */
 public class HPSDataProcessingModule extends Driver {
     
@@ -44,6 +44,7 @@
     
     // Collection of all SVT data
     List<HPSSVTData> svtData;
+    List<HPSSVTData> svtFpgaData;
     
     // 1-5 rms noise [ADC Counts] <--- This is going to change
 //    int[] noiseThreshold = {1657, 1675, 1692, 1709, 1728}; 
@@ -77,7 +78,7 @@
         rawHits = new ArrayList<RawTrackerHit>();
         rawHitsNoCuts = new ArrayList<RawTrackerHit>();
         svtData = new ArrayList<HPSSVTData>();
-
+        svtFpgaData = new ArrayList<HPSSVTData>();
     }
     
     /**
@@ -243,6 +244,9 @@
         
         // Loop through all sensors and the corresponding blocks
         for(Map.Entry<Long, Map<Integer, List<Double>>> sensor : sensorToBlocksMap.entrySet()){
+        	
+            // Get the FPGA address
+            fpgaAddress = HPSSVTDAQMaps.sensorToDAQPair.get(sensorMap.get(sensor.getKey())).getSecondElement();
             
             for(Map.Entry<Integer, List<Double>> block : sensor.getValue().entrySet()){
             
@@ -276,9 +280,7 @@
                 // If all cuts are satisfied, create a RawTrackerHit
                 rawHits.add(makeRawTrackerHit(block.getKey(), sensorMap.get(sensor.getKey()), adc));
                 
-                // Get the FPGA address
-                fpgaAddress = HPSSVTDAQMaps.sensorToDAQPair.get(sensorMap.get(sensor.getKey())).getSecondElement();
-                
+
                 // Get the hybrid number
                 hybridNumber = HPSSVTDAQMaps.sensorToDAQPair.get(sensorMap.get(sensor.getKey())).getFirstElement();
 
@@ -287,9 +289,15 @@
                 
                 // Create an svtData packet
                 svtData.add(new HPSSVTData(hybridNumber, apvNumber, block.getKey()%128, fpgaAddress, adc ));
-                            
+                svtFpgaData.add(new HPSSVTData(hybridNumber, apvNumber, block.getKey()%128, fpgaAddress, adc ));
+
                 block.getValue().clear();
             }
+            
+            HPSSVTDataBuffer.addToBuffer(svtFpgaData, fpgaAddress);
+            
+            // Clear data buffer.
+            svtFpgaData.clear();
         }
         
         System.out.println(this.getClass().getName() + ": Total RawTrackerHits before cuts: " + rawHitsNoCuts.size());
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