public class LCIOWriter extends Object
Collections for which the LCIOConstants.BITTransient
bit is set in the meta-data
are never written out.
Modifier and Type | Class and Description |
---|---|
private static class |
LCIOWriter.DefaultRunHeader |
Modifier and Type | Field and Description |
---|---|
private File |
file |
private Set<String> |
ignore |
private String |
lastDetectorName |
private int |
lastRunNumber |
private static Logger |
log |
private HandlerManager |
manager |
private Set<String> |
only |
private hep.io.sio.SIOWriter |
writer |
Constructor and Description |
---|
LCIOWriter(File file)
Create a writer for writing LCIO files
|
LCIOWriter(File file,
Collection<String> ignoreCollections)
Create a writer for writing LCIO files
|
LCIOWriter(String file)
Create a writer for writing LCIO files
|
LCIOWriter(String file,
Collection<String> ignoreCollections)
Create a writer for writing LCIO files
|
Modifier and Type | Method and Description |
---|---|
void |
addAllIgnore(Collection<String> collections) |
void |
addAllWriteOnly(Collection<String> collections) |
void |
addIgnore(String collection)
Add an entry to the list of collections to ignore (not write out)
|
void |
addWriteOnly(String collection)
Add an entry to the list of collections to write out
|
void |
clearIgnore()
Clear the list of ignored collections.
|
void |
clearWriteOnly()
Clear the list of collections to be written out
|
void |
close() |
void |
flush() |
private boolean |
isValidCollectionName(String name) |
void |
removeIgnore(String collection)
Remove an entry to the list of collections to ignore (not write out)
|
void |
removeWriteOnly(String collection)
Remove an entry to the list of collections to write out
|
void |
reOpen() |
void |
write(EventHeader event) |
void |
write(LCIORunHeader header) |
private void |
writeData(EventHeader event,
boolean headerOnly) |
private void |
writeData(LCIORunHeader header) |
private static final Logger log
private hep.io.sio.SIOWriter writer
private final HandlerManager manager
private int lastRunNumber
private String lastDetectorName
private File file
public LCIOWriter(File file) throws IOException
file
- The file to writeIOException
public LCIOWriter(String file) throws IOException
file
- The name of the file to writeIOException
public LCIOWriter(File file, Collection<String> ignoreCollections) throws IOException
file
- The file to writeignoreCollections
- The collections that should not be written out.IOException
public LCIOWriter(String file, Collection<String> ignoreCollections) throws IOException
file
- The name of the file to writeignoreCollections
- The collections that should not be written out.IOException
public void addIgnore(String collection)
collection
- The collection to taddpublic void addAllIgnore(Collection<String> collections)
public void removeIgnore(String collection)
collection
- The collection to removepublic void clearIgnore()
public void addWriteOnly(String collection)
collection
- The collection to taddpublic void addAllWriteOnly(Collection<String> collections)
public void removeWriteOnly(String collection)
collection
- The collection to removepublic void clearWriteOnly()
public void close() throws IOException
IOException
public void flush() throws IOException
IOException
public void reOpen() throws IOException
IOException
private void writeData(EventHeader event, boolean headerOnly) throws IOException
IOException
private void writeData(LCIORunHeader header) throws IOException
IOException
public void write(EventHeader event) throws IOException
IOException
public void write(LCIORunHeader header) throws IOException
IOException
private boolean isValidCollectionName(String name)
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.