IO::LCWriter Class Reference

Interface for writing data with LCIO. More...

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

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

List of all members.

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.

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 (  )  [pure virtual]
virtual void IO::LCWriter::flush (  )  [pure virtual]

Flushes the output file/stream.

Exceptions:
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.

Exceptions:
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.

Exceptions:
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:

  • 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:
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.

Exceptions:
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.

Exceptions:
IOException 

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

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


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Friends

Generated on 6 Mar 2020 for LCIO by  doxygen 1.6.1