\section{I\-O\-:\-:L\-C\-Writer Class Reference}
\label{classIO_1_1LCWriter}\index{I\-O\-::\-L\-C\-Writer@{I\-O\-::\-L\-C\-Writer}}


Interface for writing data with L\-C\-I\-O.  




{\ttfamily \#include $<$pre-\/generated/\-I\-O/\-L\-C\-Writer.\-h$>$}

Inheritance diagram for I\-O\-:\-:L\-C\-Writer\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classIO_1_1LCWriter}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual {\bf $\sim$\-L\-C\-Writer} ()\label{classIO_1_1LCWriter_a15db020819eb3134b9b68d08f4636613}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void {\bf open} (const std\-::string \&filename)=0  throw (\-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)=0  throw (\-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)=0
\begin{DoxyCompactList}\small\item\em Set the compression level -\/ needs to be called before \doxyref{open()}{p.}{classIO_1_1LCWriter_a6cba2fe84fec49d4895832c8e2ecdf93} 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)=0  throw (\-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)=0  throw (\-I\-O\-Exception, std\-::exception )
\begin{DoxyCompactList}\small\item\em Writes the given event to file. \end{DoxyCompactList}\item 
virtual void {\bf close} ()=0  throw (\-I\-O\-Exception, std\-::exception )
\begin{DoxyCompactList}\small\item\em Closes the output file/stream. \end{DoxyCompactList}\item 
virtual void {\bf flush} ()=0  throw (\-I\-O\-Exception, std\-::exception )
\begin{DoxyCompactList}\small\item\em Flushes the output file/stream. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface for writing data with L\-C\-I\-O. 

Uses interfaces from E\-V\-E\-N\-T/hep.\-lcio.\-event. Use L\-C\-Factory to instantiate a corresponding \doxyref{L\-C\-Writer}{p.}{classIO_1_1LCWriter} object for the output format at hand (\doxyref{S\-I\-O}{p.}{namespaceSIO} only, so far).

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


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


Closes the output file/stream. 


\begin{DoxyExceptions}{Exceptions}
{\em \doxyref{I\-O\-Exception}{p.}{classIO_1_1IOException}} & \\
\hline
\end{DoxyExceptions}


Implemented in {\bf S\-I\-O\-::\-S\-I\-O\-Writer} \doxyref{}{p.}{classSIO_1_1SIOWriter_ab50178adb3de60d972524c5ce4647214}, and {\bf U\-T\-I\-L\-::\-L\-C\-Split\-Writer} \doxyref{}{p.}{classUTIL_1_1LCSplitWriter_a739548b91831d839601ef1f593615c6a}.

\index{I\-O\-::\-L\-C\-Writer@{I\-O\-::\-L\-C\-Writer}!flush@{flush}}
\index{flush@{flush}!IO::LCWriter@{I\-O\-::\-L\-C\-Writer}}
\subsubsection[{flush}]{\setlength{\rightskip}{0pt plus 5cm}virtual void I\-O\-::\-L\-C\-Writer\-::flush (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) throw  {\bf I\-O\-Exception}, std\-::exception) \hspace{0.3cm}{\ttfamily [pure virtual]}}\label{classIO_1_1LCWriter_a219b699d06cddfc57e95db2320e14a6a}


Flushes the output file/stream. 


\begin{DoxyExceptions}{Exceptions}
{\em \doxyref{I\-O\-Exception}{p.}{classIO_1_1IOException}} & \\
\hline
\end{DoxyExceptions}


Implemented in {\bf S\-I\-O\-::\-S\-I\-O\-Writer} \doxyref{}{p.}{classSIO_1_1SIOWriter_a0175e6e285ff98f4147d7fc2c8f03fac}, and {\bf U\-T\-I\-L\-::\-L\-C\-Split\-Writer} \doxyref{}{p.}{classUTIL_1_1LCSplitWriter_a91e2b888173c6757b66bd93a7fc08794}.

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


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 \doxyref{I\-O\-Exception}{p.}{classIO_1_1IOException}} & \\
\hline
\end{DoxyExceptions}


Implemented in {\bf S\-I\-O\-::\-S\-I\-O\-Writer} \doxyref{}{p.}{classSIO_1_1SIOWriter_aa94c43fb7b5fa3c46b999ae089147eb8}, and {\bf U\-T\-I\-L\-::\-L\-C\-Split\-Writer} \doxyref{}{p.}{classUTIL_1_1LCSplitWriter_a6e70f92ba71f4e5dc32c37a3b6c8b801}.

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


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 \doxyref{I\-O\-Exception}{p.}{classIO_1_1IOException}} & \\
\hline
\end{DoxyExceptions}


Implemented in {\bf S\-I\-O\-::\-S\-I\-O\-Writer} \doxyref{}{p.}{classSIO_1_1SIOWriter_a7c99d4669c803575498098e93f147c3d}, and {\bf U\-T\-I\-L\-::\-L\-C\-Split\-Writer} \doxyref{}{p.}{classUTIL_1_1LCSplitWriter_a4a0e7edf27b30a8e3b6607ac50d3b46b}.

\index{I\-O\-::\-L\-C\-Writer@{I\-O\-::\-L\-C\-Writer}!set\-Compression\-Level@{set\-Compression\-Level}}
\index{set\-Compression\-Level@{set\-Compression\-Level}!IO::LCWriter@{I\-O\-::\-L\-C\-Writer}}
\subsubsection[{set\-Compression\-Level}]{\setlength{\rightskip}{0pt plus 5cm}virtual void I\-O\-::\-L\-C\-Writer\-::set\-Compression\-Level (
\begin{DoxyParamCaption}
\item[{int}]{level}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [pure virtual]}}\label{classIO_1_1LCWriter_a3ae107a90a1be82bf986ff716ecb63a7}


Set the compression level -\/ needs to be called before \doxyref{open()}{p.}{classIO_1_1LCWriter_a6cba2fe84fec49d4895832c8e2ecdf93} 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 \-: compression level (typically 1 (fastest) -\/ 9 (best compression))  
\end{DoxyItemize}

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


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


Implemented in {\bf S\-I\-O\-::\-S\-I\-O\-Writer} \doxyref{}{p.}{classSIO_1_1SIOWriter_a686488b61b9f1dc237f25ef85ffe56cb}, and {\bf U\-T\-I\-L\-::\-L\-C\-Split\-Writer} \doxyref{}{p.}{classUTIL_1_1LCSplitWriter_aa261e4cf49e2451ef69b820b94558421}.



Referenced by U\-T\-I\-L\-::\-L\-C\-Split\-Writer\-::set\-Compression\-Level().

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


Writes the given event to file. 


\begin{DoxyExceptions}{Exceptions}
{\em \doxyref{I\-O\-Exception}{p.}{classIO_1_1IOException}} & \\
\hline
\end{DoxyExceptions}


Implemented in {\bf S\-I\-O\-::\-S\-I\-O\-Writer} \doxyref{}{p.}{classSIO_1_1SIOWriter_a74b67e608b08b8378c59f1731a7ec1df}, and {\bf U\-T\-I\-L\-::\-L\-C\-Split\-Writer} \doxyref{}{p.}{classUTIL_1_1LCSplitWriter_a65946d1d80c70ebb6747534ef6236a06}.

\index{I\-O\-::\-L\-C\-Writer@{I\-O\-::\-L\-C\-Writer}!write\-Run\-Header@{write\-Run\-Header}}
\index{write\-Run\-Header@{write\-Run\-Header}!IO::LCWriter@{I\-O\-::\-L\-C\-Writer}}
\subsubsection[{write\-Run\-Header}]{\setlength{\rightskip}{0pt plus 5cm}virtual void I\-O\-::\-L\-C\-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\-Exception}, std\-::exception) \hspace{0.3cm}{\ttfamily [pure virtual]}}\label{classIO_1_1LCWriter_a7620c00e0b9ceb62541b5bd1cdc28fbf}


Writes the given run header to file. 


\begin{DoxyExceptions}{Exceptions}
{\em \doxyref{I\-O\-Exception}{p.}{classIO_1_1IOException}} & \\
\hline
\end{DoxyExceptions}


Implemented in {\bf S\-I\-O\-::\-S\-I\-O\-Writer} \doxyref{}{p.}{classSIO_1_1SIOWriter_a6aa54b37c17f01690f89c97c896e3926}, and {\bf U\-T\-I\-L\-::\-L\-C\-Split\-Writer} \doxyref{}{p.}{classUTIL_1_1LCSplitWriter_ad2b31bf94b9ccc677be65d8f1d562a0b}.



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
L\-C\-Writer.\-h\end{DoxyCompactItemize}
