lcsim/src/org/lcsim/event
diff -N GenericObject.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ GenericObject.java 8 Aug 2005 07:16:19 -0000 1.1
@@ -0,0 +1,55 @@
+package org.lcsim.event;
+
+/** Simple interface to store generic user data.
+ * To store your own classes they have to implement
+ * this interface.
+ *
+ */
+
+public interface GenericObject
+{
+
+ /** Number of integer values stored in this object.
+ */
+ public int getNInt();
+
+ /** Number of float values stored in this object.
+ */
+ public int getNFloat();
+
+ /** Number of double values stored in this object.
+ */
+ public int getNDouble();
+
+ /** Returns the integer value for the given index.
+ */
+ public int getIntVal(int index);
+
+ /** Returns the float value for the given index.
+ */
+ public float getFloatVal(int index);
+
+ /** Returns the double value for the given index.
+ */
+ public double getDoubleVal(int index);
+
+ /** True if objects of the implementation class have a fixed size, i.e
+ * getNInt, getNFloat and getNDouble will return values that are constant during
+ * the lifetime of the object.
+ */
+ public boolean isFixedSize();
+
+ /** The type name of the user class (typically the class name)
+ * This type name is stored as a collection parameter "TypeName"
+ * with every collection of LCGenericObject subclasses.<br>
+ *
+ */
+ public String getTypeName();
+
+ /** The description string. A comma separated list of pairs of
+ * type identifier, one of 'i','f','d' followed by ':'
+ * and an attribute name, e.g. "i:cellId,f:offset,f:gain".
+ */
+ public String getDataDescription();
+} // class or interface
+