\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`\"{}compact.h\char`\"{}}\par
{\tt \#include \char`\"{}compress.ic\char`\"{}}\par
{\tt \#include \char`\"{}LSEC\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEC/LSEC\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}LDT/HDE.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-cal.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-cid.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-tem.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-tkr.h\char`\"{}}\par
{\tt \#include \char`\"{}LCBD/LATP.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/WCT.h\char`\"{}}\par
{\tt \#include $<$string.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int $\ast$ \hyperlink{encode_8c_5737bcff0a9c8ead861e302f78bea02a}{LSEC\_\-encodeCal} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc, const \hyperlink{struct__LSEC__calEvent}{LSEC\_\-calEvent} $\ast$event, unsigned int $\ast$buf)
\begin{CompactList}\small\item\em Encode the CAL portion of the event. \item\end{CompactList}\item 
unsigned int $\ast$ \hyperlink{encode_8c_49632142d2e1f78daf2a66a728bf20a0}{LSEC\_\-encodeTkr} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc, const EBF\_\-dir $\ast$dir, unsigned int $\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}
{\bf \$Id:} \hyperlink{encode_8c}{encode.c},v 1.15 2010/08/12 21:15:39 saxton Exp \$ 

\subsection{Function Documentation}
\hypertarget{encode_8c_5737bcff0a9c8ead861e302f78bea02a}{
\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 int$\ast$ LSEC\_\-encodeCal ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, const {\bf LSEC\_\-calEvent} $\ast$ {\em event}, unsigned int $\ast$ {\em buf})}}
\label{encode_8c_5737bcff0a9c8ead861e302f78bea02a}


Encode the CAL portion of the event. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em event}]Pointer to the saved event\item[{\em buf}]Pointer to the buffer receiving the encoded data\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Address of the word after the encoded data \end{Desc}
\hypertarget{encode_8c_49632142d2e1f78daf2a66a728bf20a0}{
\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 int$\ast$ LSEC\_\-encodeTkr ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, const EBF\_\-dir $\ast$ {\em dir}, unsigned int $\ast$ {\em buf})}}
\label{encode_8c_49632142d2e1f78daf2a66a728bf20a0}


Encode the TKR portion of the event. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em dir}]Pointer to the event directory\item[{\em buf}]Pointer to the buffer receiving the encoded data\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Address of the word after the encoded data \end{Desc}
