Print

Print


Commit in lcsim on MAIN
src/org/lcsim/plugin/browser/LCGenericObjectTableModel.java+2-21.1 -> 1.2
src/org/lcsim/util/lcio/AbstractBlockHandler.java+6-21.9 -> 1.10
                       /SIOGenericObjectBlockHandler.java+101.6 -> 1.7
test/org/lcsim/recon/analysis/BetterRMS90CalculatorTest.java-31.1 -> 1.2
+18-7
4 modified files
More generic object bug fixes

lcsim/src/org/lcsim/plugin/browser
LCGenericObjectTableModel.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- LCGenericObjectTableModel.java	9 Aug 2005 01:34:01 -0000	1.1
+++ LCGenericObjectTableModel.java	1 Apr 2011 22:05:04 -0000	1.2
@@ -15,7 +15,7 @@
  * i.e. using nInt, nFloat and nDouble.
  *
  * @author gaede
- * @version $Id: LCGenericObjectTableModel.java,v 1.1 2005/08/09 01:34:01 tonyj Exp $
+ * @version $Id: LCGenericObjectTableModel.java,v 1.2 2011/04/01 22:05:04 tonyj Exp $
  */
 class LCGenericObjectTableModel extends AbstractTableModel implements EventBrowserTableModel
 {
@@ -37,7 +37,7 @@
       String[] desc = meta.getStringParameters().get("DataDescription");
       isFixedSize = LCIOUtil.bitTest(flags, LCIOConstants.GOBIT_FIXED);
       
-      if( isFixedSize && desc.length != 0 && desc[0].length() != 0 )
+      if( isFixedSize && desc != null && desc.length != 0 && desc[0].length() != 0 )
       {
          // some helper vectors
          Vector colVec = new Vector() ;

lcsim/src/org/lcsim/util/lcio
AbstractBlockHandler.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- AbstractBlockHandler.java	17 Oct 2007 02:06:23 -0000	1.9
+++ AbstractBlockHandler.java	1 Apr 2011 22:05:04 -0000	1.10
@@ -29,10 +29,14 @@
       int flags = in.readInt();
       
       SIOLCParameters colParameters = version > 1001 ? new SIOLCParameters(in) : new SIOLCParameters();
+      return readCollection(in,flags,colParameters,event,block, version);
+   }
+
+   LCIOCallback readCollection(SIOInputStream in, int flags, SIOLCParameters colParameters, LCIOEvent event, SIOBlock block, int version) throws IOException {
       int n = in.readInt();
       LCIOCollection collection = new LCIOCollection(getClassForType(), flags, n, colParameters);
-      event.put(block.getBlockName(),collection);
-      return addCollectionElements(event,collection,in,n,version);
+      event.put(block.getBlockName(), collection);
+      return addCollectionElements(event, collection, in, n, version);
    }
    abstract LCIOCallback addCollectionElements(LCIOEvent event, LCIOCollection collection, SIOInputStream in, int n, int version) throws IOException;
    

lcsim/src/org/lcsim/util/lcio
SIOGenericObjectBlockHandler.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- SIOGenericObjectBlockHandler.java	1 Apr 2011 18:31:25 -0000	1.6
+++ SIOGenericObjectBlockHandler.java	1 Apr 2011 22:05:04 -0000	1.7
@@ -1,5 +1,6 @@
 package org.lcsim.util.lcio;
 
+import hep.io.sio.SIOBlock;
 import hep.io.sio.SIOInputStream;
 import hep.io.sio.SIOOutputStream;
 import hep.io.sio.SIOWriter;
@@ -18,6 +19,13 @@
 {
    public String getType() { return "LCGenericObject"; }
    public Class getClassForType() { return GenericObject.class; }
+
+   @Override
+   LCIOCallback readCollection(SIOInputStream in, int flags, SIOLCParameters colParameters, LCIOEvent event, SIOBlock block, int version) throws IOException {
+      LCIOCollection collection = new LCIOCollection(getClassForType(), flags, 0, colParameters);
+      event.put(block.getBlockName(), collection);
+      return addCollectionElements(event, collection, in, 0, version);
+   }
    LCIOCallback addCollectionElements(LCIOEvent event, LCIOCollection collection, SIOInputStream in, int n, int version) throws IOException
    {
       int flags = collection.getFlags();
@@ -26,11 +34,13 @@
          int nInt = in.readInt();
          int nFloat = in.readInt();
          int nDouble = in.readInt();
+         n = in.readInt();
          for (int i = 0; i < n; i++)
             collection.add(new SIOGenericObject(in, flags, version, nInt, nFloat, nDouble));
       }
       else
       {
+         n = in.readInt();
          for (int i = 0; i < n; i++)
             collection.add(new SIOGenericObject(in, flags, version));
       }

lcsim/test/org/lcsim/recon/analysis
BetterRMS90CalculatorTest.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- BetterRMS90CalculatorTest.java	16 Nov 2010 03:31:56 -0000	1.1
+++ BetterRMS90CalculatorTest.java	1 Apr 2011 22:05:04 -0000	1.2
@@ -1,8 +1,5 @@
 package org.lcsim.recon.analysis;
 
-import hep.aida.ICloud1D;
-import hep.aida.IEvaluator;
-import hep.aida.ITuple;
 import junit.framework.TestCase;
 import org.lcsim.recon.analysis.BetterRMS90Calculator.Result;
 
CVSspam 0.2.8