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


{\tt \#include $<$expand.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-gem.h$>$}\par
{\tt \#include $<$QSE/QSE\_\-ebf.h$>$}\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]\hyperlink{decode_8h}{decode.h},v 1.5 2011/03/28 19:32:29 saxton Exp \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[{QSEC\_\-decode}]{\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}


References QSEC\_\-summary::aem, QSEC\_\-expansion\_\-::dtx, QSEC\_\-summary::gem, QSEC\_\-expansion\_\-::gem, QSEC\_\-expansion\_\-::mode, QSEC\_\-CURRENT\_\-VERSION, QSEC\_\-unpackRaw(), QSEC\_\-VERS\_\-FIXED\_\-CAL, QSEC\_\-VERS\_\-NEW\_\-SCHEME, QSEC\_\-VERS\_\-NEWER, QSEC\_\-gemDecompress::raw, QSEC\_\-summary::tem, and QSEC\_\-expansion\_\-::ver.

Referenced by QSEC\_\-expand().\hypertarget{decode_8h_ba9ac8250f9a04ab05ae6aa4bdfa6a78}{
\index{decode.h@{decode.h}!QSEC\_\-update@{QSEC\_\-update}}
\index{QSEC\_\-update@{QSEC\_\-update}!decode.h@{decode.h}}
\subsubsection[{QSEC\_\-update}]{\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}


References QSEC\_\-expansion\_\-::dtx, QSEC\_\-expansion\_\-::gem, QSEC\_\-expansion\_\-::mode, QSEC\_\-unpackRaw(), QSEC\_\-VERS\_\-FIXED\_\-CAL, QSEC\_\-VERS\_\-ORIGINAL, QSEC\_\-gemDecompress::raw, and QSEC\_\-expansion\_\-::ver.

Referenced by QSEC\_\-updateAtRecord().