\hypertarget{decode_8h}{
\section{decode.h File Reference}
\label{decode_8h}\index{decode.h@{decode.h}}
}
Top-level decoding routines. 

{\tt \#include \char`\"{}expand.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-gem.h\char`\"{}}\par
{\tt \#include \char`\"{}QSE/QSE\_\-ebf.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{decode_8h_a5f6c15dc1ca8b02d1b36696384b37c6}{QSEC\_\-decode} (\hyperlink{structQSEC__expansion__}{QSEC\_\-expansion} $\ast$exp, QSE\_\-ebfEvt $\ast$oevt, const unsigned int $\ast$ievt)
\begin{CompactList}\small\item\em Decode the event held in the expansion structure into the QSE\_\-evt structure. \item\end{CompactList}\item 
void \hyperlink{decode_8h_ba9ac8250f9a04ab05ae6aa4bdfa6a78}{QSEC\_\-update} (\hyperlink{structQSEC__expansion__}{QSEC\_\-expansion} $\ast$exp, EBF\_\-gem $\ast$gem, unsigned int $\ast$seq, const unsigned int $\ast$ievt)
\begin{CompactList}\small\item\em Decode the GEM contribution and extract the 17 bit event sequence. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Top-level decoding routines. 

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


\subsection{Function Documentation}
\hypertarget{decode_8h_a5f6c15dc1ca8b02d1b36696384b37c6}{
\index{decode.h@{decode.h}!QSEC_decode@{QSEC\_\-decode}}
\index{QSEC_decode@{QSEC\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int QSEC\_\-decode ({\bf QSEC\_\-expansion} $\ast$ {\em exp}, QSE\_\-ebfEvt $\ast$ {\em oevt}, const unsigned int $\ast$ {\em ievt})}}
\label{decode_8h_a5f6c15dc1ca8b02d1b36696384b37c6}


Decode the event held in the expansion structure into the QSE\_\-evt structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em exp}]Pointer to the expansion structure holding the histograms and encoder context\item[{\em oevt}]Pointer to the location to output the decoded event\item[{\em ievt}]Pointer to the location to input the encoded event\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Length, in bytes, of the event data \end{Desc}
\hypertarget{decode_8h_ba9ac8250f9a04ab05ae6aa4bdfa6a78}{
\index{decode.h@{decode.h}!QSEC_update@{QSEC\_\-update}}
\index{QSEC_update@{QSEC\_\-update}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void QSEC\_\-update ({\bf QSEC\_\-expansion} $\ast$ {\em exp}, EBF\_\-gem $\ast$ {\em gem}, unsigned int $\ast$ {\em seq}, const unsigned int $\ast$ {\em ievt})}}
\label{decode_8h_ba9ac8250f9a04ab05ae6aa4bdfa6a78}


Decode the GEM contribution and extract the 17 bit event sequence. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em exp}]Pointer to the expansion structure holding the histograms and encoder context\item[{\em gem}]Pointer to the location to place the decoded GEM contribution\item[{\em seq}]Pointer to the location to place the 17-bit event sequence number\item[{\em ievt}]Pointer to the location to input the encoded event number for use in QSE\_\-ctxUpdateAtEvent \end{description}
\end{Desc}
