\hypertarget{encode_8c}{
\section{encode.c File Reference}
\label{encode_8c}\index{encode.c@{encode.c}}
}
Encode the event against the previously populated histograms. 

{\tt \#include \char`\"{}encode.h\char`\"{}}\par
{\tt \#include \char`\"{}compact\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}compress.ic\char`\"{}}\par
{\tt \#include \char`\"{}raw.h\char`\"{}}\par
{\tt \#include \char`\"{}acdraw.h\char`\"{}}\par
{\tt \#include \char`\"{}gemraw.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEC/LSEC\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-gem.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-cal.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-tkr.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-tem.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/FFS.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-gemLocate.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/ACD\_\-unpack.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/ACD\_\-rec.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned \hyperlink{encode_8c_739311df1f6131e3985f049b53cab232}{LSEC\_\-encodeAcd} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir, unsigned char $\ast$buf)
\begin{CompactList}\small\item\em Encode the ACD event data. \item\end{CompactList}\item 
unsigned \hyperlink{encode_8c_7b835d2930c5fd4fa50b7ae6398f209c}{LSEC\_\-encodeCal} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir, unsigned char $\ast$buf)
\begin{CompactList}\small\item\em Encode the CAL portion of the event. \item\end{CompactList}\item 
unsigned \hyperlink{encode_8c_bfe11995187656e82df468f32163e77d}{LSEC\_\-encodeTkr} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir, unsigned char $\ast$buf)
\begin{CompactList}\small\item\em Encode the TKR portion of the event. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Encode the event against the previously populated histograms. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\end{Desc}


\subsection{Function Documentation}
\hypertarget{encode_8c_739311df1f6131e3985f049b53cab232}{
\index{encode.c@{encode.c}!LSEC_encodeAcd@{LSEC\_\-encodeAcd}}
\index{LSEC_encodeAcd@{LSEC\_\-encodeAcd}!encode.c@{encode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-encodeAcd ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir}, unsigned char $\ast$ {\em buf})}}
\label{encode_8c_739311df1f6131e3985f049b53cab232}


Encode the ACD event data. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em buf}]Start of the buffer to place compressed data\item[{\em dir}]Pointer to a directory of the event\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Size of the compressed event, in 32 bit words, or 0 if there is an error \end{Desc}
\hypertarget{encode_8c_7b835d2930c5fd4fa50b7ae6398f209c}{
\index{encode.c@{encode.c}!LSEC_encodeCal@{LSEC\_\-encodeCal}}
\index{LSEC_encodeCal@{LSEC\_\-encodeCal}!encode.c@{encode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-encodeCal ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir}, unsigned char $\ast$ {\em buf})}}
\label{encode_8c_7b835d2930c5fd4fa50b7ae6398f209c}


Encode the CAL portion of the event. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em buf}]Start of the buffer to place compressed data\item[{\em dir}]Pointer to a directory of the event\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Size of the compressed event, in 32 bit words, or 0 if there is an error \end{Desc}
\hypertarget{encode_8c_bfe11995187656e82df468f32163e77d}{
\index{encode.c@{encode.c}!LSEC_encodeTkr@{LSEC\_\-encodeTkr}}
\index{LSEC_encodeTkr@{LSEC\_\-encodeTkr}!encode.c@{encode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-encodeTkr ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir}, unsigned char $\ast$ {\em buf})}}
\label{encode_8c_bfe11995187656e82df468f32163e77d}


Encode the TKR portion of the event. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em buf}]Start of the buffer to place compressed data\item[{\em dir}]Pointer to a directory of the event\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Size of the compressed event, in 32 bit words, or 0 if there is an error \end{Desc}
