Interface for writing data with LCIO. More...
#include <pre-generated/IO/LCWriter.h>
Public Member Functions | |
virtual | ~LCWriter () |
Destructor. | |
virtual void | open (const std::string &filename)=0 |
Opens a file for writing. | |
virtual void | open (const std::string &filename, int writeMode)=0 |
Opens a file for writing. | |
virtual void | setCompressionLevel (int level)=0 |
Set the compression level - needs to be called before open() otherwise call will have no effect. | |
virtual void | writeRunHeader (const EVENT::LCRunHeader *hdr)=0 |
Writes the given run header to file. | |
virtual void | writeEvent (const EVENT::LCEvent *evt)=0 |
Writes the given event to file. | |
virtual void | close ()=0 |
Closes the output file/stream. | |
virtual void | flush ()=0 |
Flushes the output file/stream. |
Interface for writing data with LCIO.
Uses interfaces from EVENT/hep.lcio.event. Use LCFactory to instantiate a corresponding LCWriter object for the output format at hand (SIO only, so far).
virtual void IO::LCWriter::close | ( | ) | [pure virtual] |
Closes the output file/stream.
IOException |
Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.
Referenced by UTIL::LCSplitWriter::close(), UTIL::LCSplitWriter::writeEvent(), and UTIL::LCSplitWriter::writeRunHeader().
virtual void IO::LCWriter::flush | ( | ) | [pure virtual] |
Flushes the output file/stream.
IOException |
Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.
Referenced by UTIL::LCSplitWriter::flush(), UTIL::LCSplitWriter::writeEvent(), and UTIL::LCSplitWriter::writeRunHeader().
virtual void IO::LCWriter::open | ( | const std::string & | filename, | |
int | writeMode | |||
) | [pure virtual] |
Opens a file for writing.
Possible write modes are: LCIO::WRITE_NEW (existing files are replaced) and LCIO::WRITE_APPEND.
IOException |
Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.
virtual void IO::LCWriter::open | ( | const std::string & | filename | ) | [pure virtual] |
Opens a file for writing.
If file with given name exists, an exception is thrown. Use append or new mode instead.
IOException |
Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.
Referenced by UTIL::LCSplitWriter::open(), UTIL::LCSplitWriter::writeEvent(), and UTIL::LCSplitWriter::writeRunHeader().
virtual void IO::LCWriter::setCompressionLevel | ( | int | level | ) | [pure virtual] |
Set the compression level - needs to be called before open() otherwise call will have no effect.
If not called the Writer will use default compression.
Valid compression levels are:
Status: (v01-09)
C++: experimental code - don't use for production
Java: not implemented
level | compression level |
Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.
Referenced by UTIL::LCSplitWriter::setCompressionLevel().
virtual void IO::LCWriter::writeEvent | ( | const EVENT::LCEvent * | evt | ) | [pure virtual] |
Writes the given event to file.
IOException |
Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.
Referenced by UTIL::LCSplitWriter::writeEvent().
virtual void IO::LCWriter::writeRunHeader | ( | const EVENT::LCRunHeader * | hdr | ) | [pure virtual] |
Writes the given run header to file.
IOException |
Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.
Referenced by UTIL::LCSplitWriter::writeRunHeader().