\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`\"{}LSEC/LSEC\_\-msgs.h\char`\"{}}\par
{\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`\"{}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\_\-gem\-Locate.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/ACD\_\-unpack.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/ACD\_\-rec.h\char`\"{}}\par


Include dependency graph for encode.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=301pt]{encode_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{encode_8c_a0}{encode\-Gem} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Perform the desired action upon the GEM. \item\end{CompactList}\item 
static void \hyperlink{encode_8c_a1}{encode\-Acd} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Perform the desired action upon the ACD. \item\end{CompactList}\item 
static void \hyperlink{encode_8c_a2}{encode\-Cal} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Encode the CAL portion of the event. \item\end{CompactList}\item 
static void \hyperlink{encode_8c_a3}{encode\-Tkr} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Perform the desired action on the tracker event contribution. \item\end{CompactList}\item 
unsigned \hyperlink{encode_8c_a4}{LSEC\_\-encode\-Acd} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir, unsigned char $\ast$buf)
\begin{CompactList}\small\item\em Perform the desired action on the ACD. \item\end{CompactList}\item 
unsigned \hyperlink{encode_8c_a5}{LSEC\_\-encode\-Cal} (\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_a6}{LSEC\_\-encode\-Tkr} (\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 -- \href{mailto:jswain@slac.stanford.edu}{\tt jswain@slac.stanford.edu}\end{Desc}


\subsection{Function Documentation}
\hypertarget{encode_8c_a1}{
\index{encode.c@{encode.c}!encodeAcd@{encodeAcd}}
\index{encodeAcd@{encodeAcd}!encode.c@{encode.c}}
\subsubsection[encodeAcd]{\setlength{\rightskip}{0pt plus 5cm}void encode\-Acd (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{encode_8c_a1}


Perform the desired action upon the ACD. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure \item[{\em dir}]Pointer to the directory of the current event\end{description}
\end{Desc}
\hypertarget{encode_8c_a2}{
\index{encode.c@{encode.c}!encodeCal@{encodeCal}}
\index{encodeCal@{encodeCal}!encode.c@{encode.c}}
\subsubsection[encodeCal]{\setlength{\rightskip}{0pt plus 5cm}void encode\-Cal (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{encode_8c_a2}


Encode the CAL portion of the event. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure \item[{\em dir}]Pointer to a directory of the event\end{description}
\end{Desc}
\hypertarget{encode_8c_a0}{
\index{encode.c@{encode.c}!encodeGem@{encodeGem}}
\index{encodeGem@{encodeGem}!encode.c@{encode.c}}
\subsubsection[encodeGem]{\setlength{\rightskip}{0pt plus 5cm}void encode\-Gem (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})}}
\label{encode_8c_a0}


Perform the desired action upon the GEM. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure \item[{\em dir}]Pointer to the directory of the current event\end{description}
\end{Desc}
\hypertarget{encode_8c_a3}{
\index{encode.c@{encode.c}!encodeTkr@{encodeTkr}}
\index{encodeTkr@{encodeTkr}!encode.c@{encode.c}}
\subsubsection[encodeTkr]{\setlength{\rightskip}{0pt plus 5cm}void encode\-Tkr (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{encode_8c_a3}


Perform the desired action on the tracker event contribution. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure \item[{\em dir}]Pointer to a directory of the event\end{description}
\end{Desc}
\hypertarget{encode_8c_a4}{
\index{encode.c@{encode.c}!LSEC_encodeAcd@{LSEC\_\-encodeAcd}}
\index{LSEC_encodeAcd@{LSEC\_\-encodeAcd}!encode.c@{encode.c}}
\subsubsection[LSEC\_\-encodeAcd]{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-encode\-Acd (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir}, unsigned char $\ast$ {\em buf})}}
\label{encode_8c_a4}


Perform the desired action on the ACD. 

\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_a5}{
\index{encode.c@{encode.c}!LSEC_encodeCal@{LSEC\_\-encodeCal}}
\index{LSEC_encodeCal@{LSEC\_\-encodeCal}!encode.c@{encode.c}}
\subsubsection[LSEC\_\-encodeCal]{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-encode\-Cal (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir}, unsigned char $\ast$ {\em buf})}}
\label{encode_8c_a5}


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_a6}{
\index{encode.c@{encode.c}!LSEC_encodeTkr@{LSEC\_\-encodeTkr}}
\index{LSEC_encodeTkr@{LSEC\_\-encodeTkr}!encode.c@{encode.c}}
\subsubsection[LSEC\_\-encodeTkr]{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-encode\-Tkr (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir}, unsigned char $\ast$ {\em buf})}}
\label{encode_8c_a6}


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}
