Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN
HPSDataProcessingModule.java+15-81.12 -> 1.13
Fixed bug!

hps-java/src/main/java/org/lcsim/hps/recon/tracking
HPSDataProcessingModule.java 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- HPSDataProcessingModule.java	21 Apr 2012 07:32:25 -0000	1.12
+++ HPSDataProcessingModule.java	25 Apr 2012 05:08:00 -0000	1.13
@@ -28,7 +28,7 @@
 /**
  *
  * @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSDataProcessingModule.java,v 1.12 2012/04/21 07:32:25 omoreno Exp $
+ * @version $Id: HPSDataProcessingModule.java,v 1.13 2012/04/25 05:08:00 omoreno Exp $
  */
 public class HPSDataProcessingModule extends Driver {
 	
@@ -64,7 +64,7 @@
 	private boolean thresholdCut = false;       // Apply threshold cut?
 	private boolean tailCut = false;            // Apply tail cut?
 	private boolean noiseSuppression = false;   // Apply noise suppression?
-	boolean debug = true;
+	boolean debug = false;
 	
 	double[] apv25DataStream;
 	
@@ -212,7 +212,7 @@
 		rawHits.clear();
 		rawHitsNoCuts.clear();
 		svtData.clear();
-
+		
 		// Loop through all sensors and the corresponding blocks
 		for (Map.Entry<SiSensor, Map<Integer, List<Double>>> sensor : sensorToSamplesMap.entrySet()) {
 
@@ -221,6 +221,9 @@
 			if(fpgaNumber > SVT_TOTAL_FPGAS || fpgaNumber < 0)
 				throw new RuntimeException("FPGA Number out of range!");
 			if(debug) System.out.println(this.getClass().getSimpleName() + ": FPGA Number: " + fpgaNumber);
+
+			// Clear the temporary list
+			svtFpgaData.clear();
 			
 			for (Map.Entry<Integer, List<Double>> samples : sensor.getValue().entrySet()) {
 				short[] adc = new short[6];
@@ -263,28 +266,30 @@
 				hybridNumber = HPSSVTDAQMaps.sensorToDAQPair.get(sensor.getKey()).getFirstElement();
 				if(hybridNumber > TOTAL_HYBRIDS_PER_FPGA || hybridNumber < 0)
 					throw new RuntimeException("Hybrid number is out of range!");
-				if(debug) System.out.println(this.getClass().getSimpleName() + ": Hybrid Number: " + hybridNumber);
+				//if(debug) System.out.println(this.getClass().getSimpleName() + ": Hybrid Number: " + hybridNumber);
 
 				// Find the APV number. Note that strip numbering is from 639 to 0
 				apvNumber = (TOTAL_APV25_PER_HYBRID - 1) - (int) Math.floor(samples.getKey()/128);
 				if(apvNumber > TOTAL_APV25_PER_HYBRID || apvNumber < 0) 
 					throw new RuntimeException("APV25 Number out of range!");
-				if(debug) System.out.println(this.getClass().getSimpleName() + ": APV Number: " + apvNumber);
+				//if(debug) System.out.println(this.getClass().getSimpleName() + ": APV Number: " + apvNumber);
 
 				// Find the raw channel number from the physical channel
 				rawChannel = samples.getKey() - (TOTAL_APV25_CHANNELS*TOTAL_APV25_PER_HYBRID - 1) 
 						+ apvNumber*TOTAL_APV25_CHANNELS + (TOTAL_APV25_CHANNELS - 1); 
 				if(rawChannel > TOTAL_APV25_CHANNELS || rawChannel < 0)
 					throw new RuntimeException("APV25 Channel " + rawChannel + " out of range!");
-				if(debug) System.out.println(this.getClass().getSimpleName() + ": Raw Channel Number: " + rawChannel);
+				//if(debug) System.out.println(this.getClass().getSimpleName() + ": Raw Channel Number: " + rawChannel);
 				
 				// Create an svtData packet
-				svtData.add(new HPSSVTData(hybridNumber, apvNumber, rawChannel , fpgaNumber, adc));
+				HPSSVTData data = new HPSSVTData(hybridNumber, apvNumber, rawChannel, fpgaNumber, adc);
+				svtData.add(data);
+				svtFpgaData.add(data);
 				
 				samples.getValue().clear();
 			}
 
-			HPSSVTDataBuffer.addToBuffer(svtData, fpgaNumber);
+			HPSSVTDataBuffer.addToBuffer(svtFpgaData, fpgaNumber);
 		}
 		if(debug) System.out.println(this.getClass().getName() + ": Total RawTrackerHits before cuts: " + rawHitsNoCuts.size());
 		if(debug) System.out.println(this.getClass().getName() + ": Total RawTrackerHits: " + rawHits.size());
@@ -380,8 +385,10 @@
 			event.put(RawTrackerHitsCollectionName, rawHits, RawTrackerHit.class, flags);
 
 			// Add SVTData to event
+			System.out.println("Adding SVTData Collection of size: " + svtData.size() + " to the Event");
 			event.put(this.svtCollectionName, this.svtData, HPSSVTData.class, 0);
 
+			
 			//
 			numberOfSamples = 0;
 		}
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