Commit in hps-java/src/test/java/org/lcsim on MAIN | |||
DoEvioTest.java | +4 | -3 | 1.3 -> 1.4 |
HPSTrackerEvent.java | +12 | -6 | 1.2 -> 1.3 |
+16 | -9 |
fixes
diff -u -r1.3 -r1.4 --- DoEvioTest.java 15 Feb 2012 09:07:43 -0000 1.3 +++ DoEvioTest.java 16 Feb 2012 05:18:52 -0000 1.4 @@ -49,7 +49,7 @@
* This is a test of using jevio routines to read EVIO files. * * @author homer
- * @version $Id: DoEvioTest.java,v 1.3 2012/02/15 09:07:43 homer Exp $
+ * @version $Id: DoEvioTest.java,v 1.4 2012/02/16 05:18:52 homer Exp $
*/ public class DoEvioTest extends TestCase {
@@ -133,7 +133,8 @@
} trkev.setData(rawdataInts); System.out.println("starting loop over samples");
- for (int i = 0; i < header.getNumber(); i++) {
+// for (int i = 0; i < header.getNumber(); i++) {
+ for (int i = 0; i < trkev.count(); i++) {
System.out.println("sample# = " + i); HPSTrackerSample trksamp = trkev.sample(i); System.out.println("got trksamp, trksamp = " + trksamp);
@@ -156,7 +157,7 @@
// ro.addHit(raw_hit); raw_hits.add(raw_hit); }
- break;
+// break;
} switch (header.getDataTypeEnum()) { case FLOAT32:
diff -u -r1.2 -r1.3 --- HPSTrackerEvent.java 15 Feb 2012 01:11:39 -0000 1.2 +++ HPSTrackerEvent.java 16 Feb 2012 05:18:52 -0000 1.3 @@ -52,7 +52,9 @@
// Temperature lookup table double tempTable_[] = new double[adcCnt_]; // Frame Constants
- int headSize_ = 8;
+// int headSize_ = 8;
+// looks like this is what Ryan was referring to as having changed (Homer)
+ int headSize_ = 9;
int tailSize_ = 1; int sampleSize_ = 4;
@@ -114,17 +116,21 @@
} // Get sample count
-// public int count() {
+ public int count() {
+ // since size_ is the total file size the following doesn't look right
// return ((size_ - (headSize_ + tailSize_)) / sampleSize_);
-// }
+ return (128); + }
// Get sample at index
+
public HPSTrackerSample sample(int index) {
- if (index >= 5) { // should be count()
+ if (index >= count()) { // should be count()
return (null); } else { HPSTrackerSample sample_ = new HPSTrackerSample();
- for (int ii=0;ii<sampleSize_;ii++) { - ldata_[ii] = data_[headSize_ + (index * sampleSize_) + ii];
+ for (int ii = 0; ii < sampleSize_; ii++) { + ldata_[ii] = data_[headSize_ + (index * sampleSize_) + ii]; + System.out.println("ldata[" + ii + "] = " + ldata_[ii]);
} // sample_.setData(data_[headSize_ + (index * sampleSize_)]); sample_.setData(ldata_);
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