LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | List of all members
IO::LCWriter Class Referenceabstract

Interface for writing data with LCIO. More...

#include <pre-generated/IO/LCWriter.h>

Inheritance diagram for IO::LCWriter:
SIO::SIOWriter UTIL::LCSplitWriter

Public Member Functions

virtual ~LCWriter ()
 Destructor.
 
virtual void open (const std::string &filename)=0 throw (IOException, std::exception )
 Opens a file for writing. More...
 
virtual void open (const std::string &filename, int writeMode)=0 throw (IOException, std::exception )
 Opens a file for writing. More...
 
virtual void setCompressionLevel (int level)=0
 Set the compression level - needs to be called before open() otherwise call will have no effect. More...
 
virtual void writeRunHeader (const EVENT::LCRunHeader *hdr)=0 throw (IOException, std::exception )
 Writes the given run header to file. More...
 
virtual void writeEvent (const EVENT::LCEvent *evt)=0 throw (IOException, std::exception )
 Writes the given event to file. More...
 
virtual void close ()=0 throw (IOException, std::exception )
 Closes the output file/stream. More...
 
virtual void flush ()=0 throw (IOException, std::exception )
 Flushes the output file/stream. More...
 

Detailed Description

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).

See Also
LCFactory
Author
gaede
Version
Mar 4, 2003

Member Function Documentation

virtual void IO::LCWriter::close ( )
throw (IOException,
std::exception
)
pure virtual

Closes the output file/stream.

Exceptions
IOException

Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.

virtual void IO::LCWriter::flush ( )
throw (IOException,
std::exception
)
pure virtual

Flushes the output file/stream.

Exceptions
IOException

Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.

virtual void IO::LCWriter::open ( const std::string &  filename)
throw (IOException,
std::exception
)
pure virtual

Opens a file for writing.

If file with given name exists, an exception is thrown. Use append or new mode instead.

Exceptions
IOException

Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.

virtual void IO::LCWriter::open ( const std::string &  filename,
int  writeMode 
)
throw (IOException,
std::exception
)
pure virtual

Opens a file for writing.

Possible write modes are: LCIO::WRITE_NEW (existing files are replaced) and LCIO::WRITE_APPEND.

Exceptions
IOException

Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.

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:

  • level < 0 : default compression
  • level == 0 : no compression
  • level > 0 : compression level (typically 1 (fastest) - 9 (best compression))

Status: (v01-09)
C++: experimental code - don't use for production
Java: not implemented

Parameters
levelcompression level

Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.

Referenced by UTIL::LCSplitWriter::setCompressionLevel().

virtual void IO::LCWriter::writeEvent ( const EVENT::LCEvent evt)
throw (IOException,
std::exception
)
pure virtual

Writes the given event to file.

Exceptions
IOException

Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.

virtual void IO::LCWriter::writeRunHeader ( const EVENT::LCRunHeader hdr)
throw (IOException,
std::exception
)
pure virtual

Writes the given run header to file.

Exceptions
IOException

Implemented in SIO::SIOWriter, and UTIL::LCSplitWriter.


The documentation for this class was generated from the following file: