3 modified files
lcsim/test/org/lcsim
diff -u -r1.1 -r1.2
--- ReferenceIOTest.java 9 Oct 2007 22:56:23 -0000 1.1
+++ ReferenceIOTest.java 24 Oct 2007 16:11:34 -0000 1.2
@@ -64,7 +64,9 @@
half.add(particle);
}
}
- event.put("SomeParticles",half,MCParticle.class,LCIOUtil.bitMask(LCIOConstants.BITSubset));
+ //event.put("SomeParticles",half,MCParticle.class,LCIOUtil.bitMask(LCIOConstants.BITSubset));
+ event.put("SomeParticles",half);
+ event.getMetaData(half).setSubset(true);
}
}
class TestReferenceDriver extends Driver
lcsim/src/org/lcsim/util/event
diff -u -r1.23 -r1.24
--- BaseLCSimEvent.java 11 Sep 2007 00:21:03 -0000 1.23
+++ BaseLCSimEvent.java 24 Oct 2007 16:11:35 -0000 1.24
@@ -23,6 +23,8 @@
import org.lcsim.geometry.IDDecoder;
import org.lcsim.geometry.util.BaseIDDecoder;
import org.lcsim.geometry.util.IDDescriptor;
+import org.lcsim.util.lcio.LCIOConstants;
+import org.lcsim.util.lcio.LCIOUtil;
/**
* A base implementation for EventHeader
@@ -333,5 +335,25 @@
{
return BaseLCSimEvent.this;
}
+
+ public void setSubset(boolean isSubset)
+ {
+ LCIOUtil.bitSet(flags,LCIOConstants.BITSubset,isSubset);
+ }
+
+ public boolean isSubset()
+ {
+ return LCIOUtil.bitTest(flags,LCIOConstants.BITSubset);
+ }
+
+ public void setTransient(boolean isTransient)
+ {
+ LCIOUtil.bitSet(flags,LCIOConstants.BITTransient,isTransient);
+ }
+
+ public boolean isTransient()
+ {
+ return LCIOUtil.bitTest(flags,LCIOConstants.BITTransient);
+ }
}
}
lcsim/src/org/lcsim/event
diff -u -r1.16 -r1.17
--- EventHeader.java 6 Aug 2007 22:15:18 -0000 1.16
+++ EventHeader.java 24 Oct 2007 16:11:35 -0000 1.17
@@ -10,7 +10,7 @@
* The event header from which information about the rest of the event
* can be obtained.
* @author Tony Johnson
- * @version $Id: EventHeader.java,v 1.16 2007/08/06 22:15:18 tonyj Exp $
+ * @version $Id: EventHeader.java,v 1.17 2007/10/24 16:11:35 tonyj Exp $
*/
public interface EventHeader extends MCEvent
{
@@ -133,6 +133,22 @@
Map<String,float[]> getFloatParameters();
Map<String,String[]> getStringParameters();
+ /** Get the event with which this meta-data is associated. */
EventHeader getEvent();
+ /**
+ * Flag whether the collection associated with this meta-data is a subset
+ * of some other collection. When flagged in this way the collection will be
+ * written to an LCIO file as a reference collection, ie as a set of pointers
+ * to objects in the master collection.
+ */
+ void setSubset(boolean isSubset);
+ boolean isSubset();
+ /**
+ * Flag whether the collection associated with this meta-data should be
+ * treated as transient. Transient collections are never written out to
+ * LCIO files.
+ */
+ void setTransient(boolean isTransient);
+ boolean isTransient();
}
}
CVSspam 0.2.8