hep.io.mcfio
Class MCFIOWriter
java.lang.Object
|
+--hep.io.mcfio.MCFIOWriter
- All Implemented Interfaces:
- hep.io.mcfio.MCFIOConstants
- Direct Known Subclasses:
- StdhepWriter
- public class MCFIOWriter
- extends java.lang.Object
- implements hep.io.mcfio.MCFIOConstants
A class for writing MCFIO files.
Constructor Summary |
MCFIOWriter(java.lang.String file,
java.lang.String title,
java.lang.String comment,
int numevts,
int[] blockIds,
java.lang.String[] blockNames)
Open an MCFIO file for writing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
compatibilityMode
protected static boolean compatibilityMode
MCF_XDR_F_TITLE_LENGTH
public static final int MCF_XDR_F_TITLE_LENGTH
MCF_XDR_VERSION_LENGTH
public static final int MCF_XDR_VERSION_LENGTH
MCF_DEFAULT_TABLE_SIZE
public static final int MCF_DEFAULT_TABLE_SIZE
FILEHEADER
public static final int FILEHEADER
EVENTTABLE
public static final int EVENTTABLE
EVENTHEADER
public static final int EVENTHEADER
MCFIOWriter
public MCFIOWriter(java.lang.String file,
java.lang.String title,
java.lang.String comment,
int numevts,
int[] blockIds,
java.lang.String[] blockNames)
throws java.io.IOException
- Open an MCFIO file for writing.
- Parameters:
title
- The title of the filecomment
- The comment associate with the filenumevts
- The number of events expected to be writtenblockIds
- The user defined blocks that will be included in this fileblockNames
- Names for the blocks defined by blockIds
close
public void close()
throws java.io.IOException
write
public void write(MCFIOEvent event)
throws java.io.IOException
- Write an event
setCompatibilityMode
public void setCompatibilityMode(boolean mode)
- Set compatibility mode. In the old C implementation
there were various limits, such as the length of
some strings and the maximum number of particles that
could be written to stdhep events. There is no reason
to have any of these limits in the Java implementation,
but if we ignore them then the resulting file might not
be readable by the old C implementation. By default this
implementation enforces the same limits as the C implementation,
but setting compatibilyMode to false will turn off this
limitation.