Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SIO::SIOWriter Class Reference

#include <SIOWriter.h>

Inheritance diagram for SIO::SIOWriter:

IO::LCWriter List of all members.

Public Member Functions

 SIOWriter ()
virtual ~SIOWriter ()
virtual void open (const std::string &filename) throw (IO::IOException, std::exception)
virtual void open (const std::string &filename, int writeMode) throw (IO::IOException, std::exception)
virtual void writeRunHeader (const EVENT::LCRunHeader *hdr) throw (IO::IOException, std::exception)
virtual void writeEvent (const EVENT::LCEvent *evt) throw (IO::IOException, std::exception)
virtual void close () throw (IO::IOException, std::exception)
virtual void flush () throw (IO::IOException, std::exception)

Protected Member Functions

void setUpHandlers (const EVENT::LCEvent *evt)
void getSIOFileName (const std::string &filename, std::string &sioFilename)

Protected Attributes

SIO_stream_stream

Static Protected Attributes

SIO_record_evtRecord
SIO_record_hdrRecord
SIO_record_runRecord

Private Attributes

SIOEventHandler_hdrHandler
SIORunHeaderHandler_runHandler
std::vector< SIO_block * > _connectedBlocks

Friends

class SIOReader
class SIOUnpack

Detailed Description

Concrete implementation of LCWriter using SIO. Use LCFactory to instantiate.

See also:
LCFactory
Author:
gaede
Version:
Mar 6, 2003

Definition at line 32 of file SIOWriter.h.


Constructor & Destructor Documentation

SIO::SIOWriter::SIOWriter  ) 
 

Default constructor.

Definition at line 38 of file SIOWriter.cc.

References _hdrHandler, _runHandler, SIO_blockManager::setVerbosity(), SIO_recordManager::setVerbosity(), SIO_streamManager::setVerbosity(), SIO_ALL, and SIO_SILENT.

SIO::SIOWriter::~SIOWriter  )  [virtual]
 

Destructor

Definition at line 63 of file SIOWriter.cc.

References SIO_blockManager::clear().


Member Function Documentation

void SIO::SIOWriter::close  )  throw (IO::IOException, std::exception) [virtual]
 

Closes the output file/stream etc.

Exceptions:
IOException 

Implements IO::LCWriter.

Definition at line 338 of file SIOWriter.cc.

References _stream, SIO_stream::getName(), and SIO_streamManager::remove().

void SIO::SIOWriter::flush  )  throw (IO::IOException, std::exception) [virtual]
 

Flushes the output file/stream etc.

Exceptions:
IOException 

Implements IO::LCWriter.

Definition at line 350 of file SIOWriter.cc.

References _stream, SIO_stream::flush(), and SIO_stream::getName().

void SIO::SIOWriter::getSIOFileName const std::string &  filename,
std::string &  sioFilename
[protected]
 

Creates a proper filename with extension 'slcio' in sioFilename.

Definition at line 101 of file SIOWriter.cc.

void SIO::SIOWriter::open const std::string &  filename,
int  writeMode
throw (IO::IOException, std::exception) [virtual]
 

Opens a file for writing. Possible write modes are: LCIO::WRITE_NEW (existing files are replaced) and LCIO::WRITE_APPEND.

Exceptions:
IOException 

Implements IO::LCWriter.

Definition at line 118 of file SIOWriter.cc.

References SIO_recordManager::add(), SIO_streamManager::add(), SIO_recordManager::get(), SIO_stream::open(), and SIO_record::setCompress().

void SIO::SIOWriter::open const std::string &  filename  )  throw (IO::IOException, std::exception) [virtual]
 

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

Exceptions:
IOException 

Implements IO::LCWriter.

Definition at line 82 of file SIOWriter.cc.

void SIO::SIOWriter::setUpHandlers const EVENT::LCEvent evt  )  [protected]
 

Sets up the handlers for writing the current event.

Definition at line 210 of file SIOWriter.cc.

References _evtRecord, _hdrHandler, _hdrRecord, SIO_record::connect(), SIO_record::disconnect(), SIO_record::disconnectAll(), SIO_blockManager::get(), EVENT::LCEvent::getCollection(), EVENT::LCEvent::getCollectionNames(), EVENT::LCCollection::getTypeName(), EVENT::LCCollection::isTransient(), and SIO::SIOCollectionHandler::setCollection().

void SIO::SIOWriter::writeEvent const EVENT::LCEvent evt  )  throw (IO::IOException, std::exception) [virtual]
 

Writes the given event to file.

Exceptions:
IOException 

Implements IO::LCWriter.

Definition at line 298 of file SIOWriter.cc.

References SIO::SIOCollectionHandler::setEvent().

void SIO::SIOWriter::writeRunHeader const EVENT::LCRunHeader hdr  )  throw (IO::IOException, std::exception) [virtual]
 

Writes the given run header to file.

Exceptions:
IOException 

Implements IO::LCWriter.

Definition at line 170 of file SIOWriter.cc.

References SIO_record::connect(), SIO_record::disconnect(), and SIO_record::write().


Friends And Related Function Documentation

friend class SIOReader [friend]
 

Definition at line 35 of file SIOWriter.h.

friend class SIOUnpack [friend]
 

Definition at line 36 of file SIOWriter.h.


Member Data Documentation

std::vector<SIO_block*> SIO::SIOWriter::_connectedBlocks [private]
 

Definition at line 110 of file SIOWriter.h.

SIO_record * SIO::SIOWriter::_evtRecord [static, protected]
 

Definition at line 33 of file SIOWriter.cc.

Referenced by setUpHandlers().

SIOEventHandler* SIO::SIOWriter::_hdrHandler [private]
 

Definition at line 108 of file SIOWriter.h.

Referenced by setUpHandlers(), and SIOWriter().

SIO_record * SIO::SIOWriter::_hdrRecord [static, protected]
 

Definition at line 34 of file SIOWriter.cc.

Referenced by setUpHandlers().

SIORunHeaderHandler* SIO::SIOWriter::_runHandler [private]
 

Definition at line 109 of file SIOWriter.h.

Referenced by SIOWriter().

SIO_record * SIO::SIOWriter::_runRecord [static, protected]
 

Definition at line 35 of file SIOWriter.cc.

SIO_stream* SIO::SIOWriter::_stream [protected]
 

Definition at line 104 of file SIOWriter.h.

Referenced by close(), and flush().


The documentation for this class was generated from the following files:
Generated on Sun Jun 3 06:32:34 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1