Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN | |||
HPSDataProcessingModule.java | +17 | -16 | 1.6 -> 1.7 |
Now aquires FPGA address and hybrid number
diff -u -r1.6 -r1.7 --- HPSDataProcessingModule.java 28 Mar 2012 00:07:08 -0000 1.6 +++ HPSDataProcessingModule.java 29 Mar 2012 03:57:16 -0000 1.7 @@ -27,7 +27,7 @@
/** * * @author Omar Moreno <[log in to unmask]>
- * @version $Id: HPSDataProcessingModule.java,v 1.6 2012/03/28 00:07:08 jeremy Exp $
+ * @version $Id: HPSDataProcessingModule.java,v 1.7 2012/03/29 03:57:16 omoreno Exp $
*/ public class HPSDataProcessingModule extends Driver {
@@ -101,18 +101,6 @@
// Fill the collection of sensors sensorSet.addAll(tracker.findDescendants(SiSensor.class));
- -// -----> This needs to be changed -// tracker.getIdentifierHelper().getIdentifierDictionary().getFieldNames().toString(); -// -// IIdentifier ident = tracker.getIdentifier(); -// IIdentifier ident_sen = sensor.getIdentifier(); -// SiTrackerIdentifierHelper helper = (SiTrackerIdentifierHelper) sensor.getIdentifierHelper(); -// -// -// System.out.println("Layer:" + " " + helper.getLayerValue(ident_sen)); -// System.out.println("Module:" + " " + helper.getModuleValue(ident_sen)); -
for(SiSensor sensor : sensorSet){ // Map a sensor to its identifier
@@ -207,18 +195,20 @@
{ short[] adc = new short[6];
+ int fpgaAddress = 0; + int hybridNumber = 0; + int apvNumber = 0;
// Clear the list of raw tracker hits rawHits.clear(); rawHitCuts.clear();
+ svtData.clear();
// Loop through all sensors and the corresponding blocks for(Map.Entry<Long, Map<Integer, List<Double>>> sensor : sensorToBlocksMap.entrySet()){ for(Map.Entry<Integer, List<Double>> block : sensor.getValue().entrySet()){
- //System.out.println("proc sample"); -
// Convert ADC value to a short for(int index = 0; index < adc.length; index++){ adc[index] = block.getValue().get(index).shortValue();
@@ -229,8 +219,19 @@
// 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(); + + // Find the APV number + apvNumber = (int) Math.floor(block.getKey()/128); + +
// Create an svtData packet
- svtData.add(new HPSSVTData(sensorMap.get(sensor.getKey()), block.getKey(), adc));
+ svtData.add(new HPSSVTData(hybridNumber, apvNumber, block.getKey()%128, fpgaAddress, adc ));
// Check if a block has the appropriate number of blocks above // threshold
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