hep.io.mcfio
Class MCFIOWriter
java.lang.Object
hep.io.mcfio.MCFIOWriter
public class MCFIOWriter
- extends java.lang.Object
A class for writing MCFIO files.
- Version:
- $Id: MCFIOWriter.java 13660 2009-10-09 23:26:27Z tonyj $
- Author:
- Tony Johnson (tonyj@slac.stanford.edu)
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
- See Also:
- Constant Field Values
MCF_XDR_VERSION_LENGTH
public static final int MCF_XDR_VERSION_LENGTH
- See Also:
- Constant Field Values
MCF_DEFAULT_TABLE_SIZE
public static final int MCF_DEFAULT_TABLE_SIZE
- See Also:
- Constant Field Values
FILEHEADER
public static final int FILEHEADER
- See Also:
- Constant Field Values
EVENTTABLE
public static final int EVENTTABLE
- See Also:
- Constant Field Values
EVENTHEADER
public static final int EVENTHEADER
- See Also:
- Constant Field Values
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
- Throws:
java.io.IOException
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.
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(MCFIOEvent event)
throws java.io.IOException
- Write an event
- Throws:
java.io.IOException
Copyright © 2000-2010 FreeHEP. All Rights Reserved.