Concrete implementation of LCWriter using SIO. More...
#include <SIO/SIOWriter.h>
Public Member Functions | |
| SIOWriter () | |
| Default constructor. | |
| virtual | ~SIOWriter () |
| Destructor. | |
| virtual void | open (const std::string &filename) throw (IO::IOException, std::exception) |
| Opens a file for writing. More... | |
| virtual void | open (const std::string &filename, int writeMode) throw (IO::IOException, std::exception) |
| Opens a file for writing. More... | |
| virtual void | setCompressionLevel (int level) |
| Set the compression level - needs to be called before open() otherwise call will have no effect. More... | |
| virtual void | writeRunHeader (const EVENT::LCRunHeader *hdr) throw (IO::IOException, std::exception) |
| Writes the given run header to file. More... | |
| virtual void | writeEvent (const EVENT::LCEvent *evt) throw (IO::IOException, std::exception) |
| Writes the given event to file. More... | |
| virtual void | close () throw (IO::IOException, std::exception) |
| Closes the output file/stream etc. More... | |
| virtual void | flush () throw (IO::IOException, std::exception) |
| Flushes the output file/stream etc. More... | |
Public Member Functions inherited from IO::LCWriter | |
| virtual | ~LCWriter () |
| Destructor. | |
Protected Member Functions | |
| void | setUpHandlers (const EVENT::LCEvent *evt) |
| Sets up the handlers for writing the current event. More... | |
| void | getSIOFileName (const std::string &filename, std::string &sioFilename) |
| Creates a proper filename with extension 'slcio' in sioFilename. | |
Protected Attributes | |
| SIO_stream * | _stream |
| int | _compressionLevel |
| LCIORandomAccessMgr | _raMgr |
Friends | |
| class | SIOReader |
| class | SIOUnpack |
Concrete implementation of LCWriter using SIO.
Use LCFactory to instantiate.
|
virtual | |||||||||||||||||
Closes the output file/stream etc.
| IOException |
Implements IO::LCWriter.
References SIO::LCIORandomAccessMgr::clear(), and SIO::LCIORandomAccessMgr::writeRandomAccessRecords().
|
virtual | |||||||||||||||||
|
virtual | ||||||||||||||||||
Opens a file for writing.
If file with given name exists, an exception is thrown. Use append or new mode instead.
| IOException |
Implements IO::LCWriter.
|
virtual | ||||||||||||||||||||||||
Opens a file for writing.
Possible write modes are: LCIO::WRITE_NEW (existing files are replaced) and LCIO::WRITE_APPEND.
| IOException |
Implements IO::LCWriter.
References SIO::LCSIO::getValidSIOName(), and SIO::LCSIO::seekStream().
|
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:
Experimental code - don't use for production.
| level | compression level |
Implements IO::LCWriter.
|
protected |
Sets up the handlers for writing the current event.
Creates Handlers needed for writing the event on this stream.
Needs to be called for every event.
References EVENT::LCEvent::getCollection(), EVENT::LCEvent::getCollectionNames(), EVENT::LCCollection::getTypeName(), and EVENT::LCCollection::isTransient().
|
virtual | ||||||||||||||||||
|
virtual | ||||||||||||||||||
1.8.6