\section{S\-I\-O\-:\-:S\-I\-O\-Writer Class Reference}
\label{classSIO_1_1SIOWriter}\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}}


Concrete implementation of L\-C\-Writer using \doxyref{S\-I\-O}{p.}{namespaceSIO}.  




{\ttfamily \#include $<$S\-I\-O/\-S\-I\-O\-Writer.\-h$>$}

Inheritance diagram for S\-I\-O\-:\-:S\-I\-O\-Writer\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classSIO_1_1SIOWriter}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf S\-I\-O\-Writer} ()\label{classSIO_1_1SIOWriter_a092ac34508bbd3362b965e0c2083804e}

\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
virtual {\bf $\sim$\-S\-I\-O\-Writer} ()\label{classSIO_1_1SIOWriter_a1d54b809b1878ed62db2731f6c05c4ca}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void {\bf open} (const std\-::string \&filename)  throw (\-I\-O\-::\-I\-O\-Exception, std\-::exception)
\begin{DoxyCompactList}\small\item\em Opens a file for writing. \end{DoxyCompactList}\item 
virtual void {\bf open} (const std\-::string \&filename, int write\-Mode)  throw (\-I\-O\-::\-I\-O\-Exception, std\-::exception)
\begin{DoxyCompactList}\small\item\em Opens a file for writing. \end{DoxyCompactList}\item 
virtual void {\bf set\-Compression\-Level} (int level)
\begin{DoxyCompactList}\small\item\em Set the compression level -\/ needs to be called before \doxyref{open()}{p.}{classSIO_1_1SIOWriter_aa94c43fb7b5fa3c46b999ae089147eb8} otherwise call will have no effect. \end{DoxyCompactList}\item 
virtual void {\bf write\-Run\-Header} (const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Run\-Header} $\ast$hdr)  throw (\-I\-O\-::\-I\-O\-Exception, std\-::exception)
\begin{DoxyCompactList}\small\item\em Writes the given run header to file. \end{DoxyCompactList}\item 
virtual void {\bf write\-Event} (const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Event} $\ast$evt)  throw (\-I\-O\-::\-I\-O\-Exception, std\-::exception)
\begin{DoxyCompactList}\small\item\em Writes the given event to file. \end{DoxyCompactList}\item 
virtual void {\bf close} ()  throw (\-I\-O\-::\-I\-O\-Exception, std\-::exception)
\begin{DoxyCompactList}\small\item\em Closes the output file/stream etc. \end{DoxyCompactList}\item 
virtual void {\bf flush} ()  throw (\-I\-O\-::\-I\-O\-Exception, std\-::exception)
\begin{DoxyCompactList}\small\item\em Flushes the output file/stream etc. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf set\-Up\-Handlers} (const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Event} $\ast$evt)
\begin{DoxyCompactList}\small\item\em Sets up the handlers for writing the current event. \end{DoxyCompactList}\item 
void {\bf get\-S\-I\-O\-File\-Name} (const std\-::string \&filename, std\-::string \&sio\-Filename)\label{classSIO_1_1SIOWriter_afc43d9d3898ab5226a2cec7080131600}

\begin{DoxyCompactList}\small\item\em Creates a proper filename with extension 'slcio' in sio\-Filename. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
S\-I\-O\-\_\-stream $\ast$ {\bfseries \-\_\-stream}\label{classSIO_1_1SIOWriter_a0fa158ef65b4de77b9bee591f0a7044c}

\item 
int {\bfseries \-\_\-compression\-Level}\label{classSIO_1_1SIOWriter_a8c1c90144329d9eb1688feb69379a194}

\item 
{\bf L\-C\-I\-O\-Random\-Access\-Mgr} {\bfseries \-\_\-ra\-Mgr}\label{classSIO_1_1SIOWriter_a35aa4991264d1a077e59068445e3d523}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class {\bfseries S\-I\-O\-Reader}\label{classSIO_1_1SIOWriter_ab0d56c3b4cd939598b403f602b9b1684}

\item 
class {\bfseries S\-I\-O\-Unpack}\label{classSIO_1_1SIOWriter_ad6fd4b82ed0fe5219d165b20e9c40eac}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Concrete implementation of L\-C\-Writer using \doxyref{S\-I\-O}{p.}{namespaceSIO}. 

Use L\-C\-Factory to instantiate.

\begin{DoxySeeAlso}{See Also}
L\-C\-Factory 
\end{DoxySeeAlso}
\begin{DoxyAuthor}{Author}
gaede 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
Mar 6, 2003 
\end{DoxyVersion}


\subsection{Member Function Documentation}
\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}!close@{close}}
\index{close@{close}!SIO::SIOWriter@{S\-I\-O\-::\-S\-I\-O\-Writer}}
\subsubsection[{close}]{\setlength{\rightskip}{0pt plus 5cm}void S\-I\-O\-::\-S\-I\-O\-Writer\-::close (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) throw  {\bf I\-O\-::\-I\-O\-Exception}, std\-::exception) \hspace{0.3cm}{\ttfamily [virtual]}}\label{classSIO_1_1SIOWriter_ab50178adb3de60d972524c5ce4647214}


Closes the output file/stream etc. 


\begin{DoxyExceptions}{Exceptions}
{\em I\-O\-Exception} & \\
\hline
\end{DoxyExceptions}


Implements {\bf I\-O\-::\-L\-C\-Writer} \doxyref{}{p.}{classIO_1_1LCWriter_ac9325019beaa7f564dc50b483a97a4fe}.



References S\-I\-O\-::\-L\-C\-I\-O\-Random\-Access\-Mgr\-::clear(), and S\-I\-O\-::\-L\-C\-I\-O\-Random\-Access\-Mgr\-::write\-Random\-Access\-Records().

\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}!flush@{flush}}
\index{flush@{flush}!SIO::SIOWriter@{S\-I\-O\-::\-S\-I\-O\-Writer}}
\subsubsection[{flush}]{\setlength{\rightskip}{0pt plus 5cm}void S\-I\-O\-::\-S\-I\-O\-Writer\-::flush (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) throw  {\bf I\-O\-::\-I\-O\-Exception}, std\-::exception) \hspace{0.3cm}{\ttfamily [virtual]}}\label{classSIO_1_1SIOWriter_a0175e6e285ff98f4147d7fc2c8f03fac}


Flushes the output file/stream etc. 


\begin{DoxyExceptions}{Exceptions}
{\em I\-O\-Exception} & \\
\hline
\end{DoxyExceptions}


Implements {\bf I\-O\-::\-L\-C\-Writer} \doxyref{}{p.}{classIO_1_1LCWriter_a219b699d06cddfc57e95db2320e14a6a}.

\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}!open@{open}}
\index{open@{open}!SIO::SIOWriter@{S\-I\-O\-::\-S\-I\-O\-Writer}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}void S\-I\-O\-::\-S\-I\-O\-Writer\-::open (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{filename}
\end{DoxyParamCaption}
) throw  {\bf I\-O\-::\-I\-O\-Exception}, std\-::exception) \hspace{0.3cm}{\ttfamily [virtual]}}\label{classSIO_1_1SIOWriter_aa94c43fb7b5fa3c46b999ae089147eb8}


Opens a file for writing. 

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


\begin{DoxyExceptions}{Exceptions}
{\em I\-O\-Exception} & \\
\hline
\end{DoxyExceptions}


Implements {\bf I\-O\-::\-L\-C\-Writer} \doxyref{}{p.}{classIO_1_1LCWriter_a6cba2fe84fec49d4895832c8e2ecdf93}.

\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}!open@{open}}
\index{open@{open}!SIO::SIOWriter@{S\-I\-O\-::\-S\-I\-O\-Writer}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}void S\-I\-O\-::\-S\-I\-O\-Writer\-::open (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{filename, }
\item[{int}]{write\-Mode}
\end{DoxyParamCaption}
) throw  {\bf I\-O\-::\-I\-O\-Exception}, std\-::exception) \hspace{0.3cm}{\ttfamily [virtual]}}\label{classSIO_1_1SIOWriter_a7c99d4669c803575498098e93f147c3d}


Opens a file for writing. 

Possible write modes are\-: L\-C\-I\-O\-::\-W\-R\-I\-T\-E\-\_\-\-N\-E\-W (existing files are replaced) and L\-C\-I\-O\-::\-W\-R\-I\-T\-E\-\_\-\-A\-P\-P\-E\-N\-D.


\begin{DoxyExceptions}{Exceptions}
{\em I\-O\-Exception} & \\
\hline
\end{DoxyExceptions}


Implements {\bf I\-O\-::\-L\-C\-Writer} \doxyref{}{p.}{classIO_1_1LCWriter_a662fe4082adbb608298c770e2821a960}.



References S\-I\-O\-::\-L\-C\-S\-I\-O\-::get\-Valid\-S\-I\-O\-Name(), and S\-I\-O\-::\-L\-C\-S\-I\-O\-::seek\-Stream().

\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}!set\-Compression\-Level@{set\-Compression\-Level}}
\index{set\-Compression\-Level@{set\-Compression\-Level}!SIO::SIOWriter@{S\-I\-O\-::\-S\-I\-O\-Writer}}
\subsubsection[{set\-Compression\-Level}]{\setlength{\rightskip}{0pt plus 5cm}void S\-I\-O\-::\-S\-I\-O\-Writer\-::set\-Compression\-Level (
\begin{DoxyParamCaption}
\item[{int}]{level}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classSIO_1_1SIOWriter_a686488b61b9f1dc237f25ef85ffe56cb}


Set the compression level -\/ needs to be called before \doxyref{open()}{p.}{classSIO_1_1SIOWriter_aa94c43fb7b5fa3c46b999ae089147eb8} otherwise call will have no effect. 

If not called the Writer will use default compression.\par
 Valid compression levels are\-: 
\begin{DoxyItemize}
\item level $<$ 0 \-: default compression  
\item level == 0 \-: no compression 
\item level $>$ 0 \-: 1 (fastest) -\/ 9 (best compression)  
\end{DoxyItemize}Experimental code -\/ don't use for production.


\begin{DoxyParams}{Parameters}
{\em level} & compression level \\
\hline
\end{DoxyParams}


Implements {\bf I\-O\-::\-L\-C\-Writer} \doxyref{}{p.}{classIO_1_1LCWriter_a3ae107a90a1be82bf986ff716ecb63a7}.

\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}!set\-Up\-Handlers@{set\-Up\-Handlers}}
\index{set\-Up\-Handlers@{set\-Up\-Handlers}!SIO::SIOWriter@{S\-I\-O\-::\-S\-I\-O\-Writer}}
\subsubsection[{set\-Up\-Handlers}]{\setlength{\rightskip}{0pt plus 5cm}void S\-I\-O\-::\-S\-I\-O\-Writer\-::set\-Up\-Handlers (
\begin{DoxyParamCaption}
\item[{const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Event} $\ast$}]{evt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classSIO_1_1SIOWriter_a37f083bc0b2d540a43cdbe8ef182ccd2}


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 E\-V\-E\-N\-T\-::\-L\-C\-Event\-::get\-Collection(), E\-V\-E\-N\-T\-::\-L\-C\-Event\-::get\-Collection\-Names(), E\-V\-E\-N\-T\-::\-L\-C\-Collection\-::get\-Type\-Name(), and E\-V\-E\-N\-T\-::\-L\-C\-Collection\-::is\-Transient().

\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}!write\-Event@{write\-Event}}
\index{write\-Event@{write\-Event}!SIO::SIOWriter@{S\-I\-O\-::\-S\-I\-O\-Writer}}
\subsubsection[{write\-Event}]{\setlength{\rightskip}{0pt plus 5cm}void S\-I\-O\-::\-S\-I\-O\-Writer\-::write\-Event (
\begin{DoxyParamCaption}
\item[{const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Event} $\ast$}]{evt}
\end{DoxyParamCaption}
) throw  {\bf I\-O\-::\-I\-O\-Exception}, std\-::exception) \hspace{0.3cm}{\ttfamily [virtual]}}\label{classSIO_1_1SIOWriter_a74b67e608b08b8378c59f1731a7ec1df}


Writes the given event to file. 


\begin{DoxyExceptions}{Exceptions}
{\em I\-O\-Exception} & \\
\hline
\end{DoxyExceptions}


Implements {\bf I\-O\-::\-L\-C\-Writer} \doxyref{}{p.}{classIO_1_1LCWriter_a145ee14a6b88915621b2074dbdea6a4b}.

\index{S\-I\-O\-::\-S\-I\-O\-Writer@{S\-I\-O\-::\-S\-I\-O\-Writer}!write\-Run\-Header@{write\-Run\-Header}}
\index{write\-Run\-Header@{write\-Run\-Header}!SIO::SIOWriter@{S\-I\-O\-::\-S\-I\-O\-Writer}}
\subsubsection[{write\-Run\-Header}]{\setlength{\rightskip}{0pt plus 5cm}void S\-I\-O\-::\-S\-I\-O\-Writer\-::write\-Run\-Header (
\begin{DoxyParamCaption}
\item[{const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Run\-Header} $\ast$}]{hdr}
\end{DoxyParamCaption}
) throw  {\bf I\-O\-::\-I\-O\-Exception}, std\-::exception) \hspace{0.3cm}{\ttfamily [virtual]}}\label{classSIO_1_1SIOWriter_a6aa54b37c17f01690f89c97c896e3926}


Writes the given run header to file. 


\begin{DoxyExceptions}{Exceptions}
{\em I\-O\-Exception} & \\
\hline
\end{DoxyExceptions}


Implements {\bf I\-O\-::\-L\-C\-Writer} \doxyref{}{p.}{classIO_1_1LCWriter_a7620c00e0b9ceb62541b5bd1cdc28fbf}.



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
S\-I\-O\-Writer.\-h\item 
S\-I\-O\-Writer.\-cc\end{DoxyCompactItemize}
