\hypertarget{QSEP_8h}{
\section{QSEP.h File Reference}
\label{QSEP_8h}\index{QSEP.h@{QSEP.h}}
}
Interface to physics event context handling and updating routines. 



This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=114pt]{QSEP_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef enum \hyperlink{QSEP_8h_a22}{\_\-QSEP\_\-STATUS\_\-K} \hyperlink{QSEP_8h_a0}{QSEP\_\-STATUS\_\-K}
\begin{CompactList}\small\item\em Typedef for QSEP\_\-STATUS\_\-K. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{QSEP_8h_a22}{\_\-QSEP\_\-STATUS\_\-K} \{ \par
\hyperlink{QSEP_8h_a22a1}{QSEP\_\-STATUS\_\-K\_\-ERR} =  -1, 
\par
\hyperlink{QSEP_8h_a22a2}{QSEP\_\-STATUS\_\-K\_\-TOO\_\-SMALL} =  -2, 
\par
\hyperlink{QSEP_8h_a22a3}{QSEP\_\-STATUS\_\-K\_\-INSRSC} =  -3, 
\par
\hyperlink{QSEP_8h_a22a4}{QSEP\_\-STATUS\_\-K\_\-UNKLVL} =  -7, 
\par
\hyperlink{QSEP_8h_a22a5}{QSEP\_\-STATUS\_\-K\_\-NOGEM} =  -8, 
\par
\hyperlink{QSEP_8h_a22a6}{QSEP\_\-STATUS\_\-K\_\-OVRRUN} =  -9, 
\par
\hyperlink{QSEP_8h_a22a7}{QSEP\_\-STATUS\_\-K\_\-UNDRUN} =  -10, 
\par
\hyperlink{QSEP_8h_a22a8}{QSEP\_\-STATUS\_\-K\_\-INCLEN} =  -11, 
\par
\hyperlink{QSEP_8h_a22a9}{QSEP\_\-STATUS\_\-K\_\-DECOMPRESS} =  -12
 \}
\begin{CompactList}\small\item\em Enumeration of the status codes. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hypertarget{QSEP_8h_a10}{
QSEP $\ast$ {\bf QSEP\_\-alloc} (int resource\_\-level)}
\label{QSEP_8h_a10}

\item 
\hypertarget{QSEP_8h_a11}{
int {\bf QSEP\_\-ebf\-Sizeof} (void)}
\label{QSEP_8h_a11}

\item 
\hypertarget{QSEP_8h_a12}{
void {\bf QSEP\_\-update\-At\-Datagram} (QSEP $\ast$qsep, const LSF\_\-datagram $\ast$dgm)}
\label{QSEP_8h_a12}

\item 
\hypertarget{QSEP_8h_a13}{
void {\bf QSEP\_\-update\-At\-Contribution} (QSEP $\ast$qsep, const LSF\_\-contribution $\ast$ctb)}
\label{QSEP_8h_a13}

\item 
\hypertarget{QSEP_8h_a14}{
int {\bf QSEP\_\-update\-At\-Record} (QSEP $\ast$qsep, const LSF\_\-record $\ast$rec)}
\label{QSEP_8h_a14}

\item 
\hypertarget{QSEP_8h_a15}{
int {\bf QSEP\_\-expand} (QSEP $\ast$qsep, const LSF\_\-record $\ast$rec, QSE\_\-ebf\-Evt $\ast$ebf, int ebf\_\-size, int $\ast$ret\_\-size)}
\label{QSEP_8h_a15}

\item 
\hypertarget{QSEP_8h_a16}{
void {\bf QSEP\_\-destruct} (QSEP $\ast$qsep)}
\label{QSEP_8h_a16}

\item 
\hypertarget{QSEP_8h_a17}{
const QSE\_\-ctx $\ast$ {\bf QSEP\_\-std\-Ctx\-Get} (const QSEP $\ast$qsep)}
\label{QSEP_8h_a17}

\item 
\hypertarget{QSEP_8h_a18}{
const QSEP\_\-ctx $\ast$ {\bf QSEP\_\-app\-Ctx\-Get} (const QSEP $\ast$qsep)}
\label{QSEP_8h_a18}

\item 
\hypertarget{QSEP_8h_a19}{
int {\bf QSEP\_\-sizeof} (unsigned int resource\_\-level, void $\ast$prm)}
\label{QSEP_8h_a19}

\item 
\hypertarget{QSEP_8h_a20}{
QSEP $\ast$ {\bf QSEP\_\-construct} (QSEP $\ast$qsep, unsigned int resource\_\-level, void $\ast$prm)}
\label{QSEP_8h_a20}

\item 
\hypertarget{QSEP_8h_a21}{
const QSE\_\-evt $\ast$ {\bf QSEP\_\-decode} (QSEP $\ast$qsep, const LSF\_\-record $\ast$rec, unsigned int options)}
\label{QSEP_8h_a21}

\end{CompactItemize}


\subsection{Detailed Description}
Interface to physics event context handling and updating routines. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}   CVS $Id: QSEP.h,v 1.7 2007/10/27 00:58:15 russell Exp $
\end{verbatim}
\normalsize


\subsection{Typedef Documentation}
\hypertarget{QSEP_8h_a0}{
\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K@{QSEP\_\-STATUS\_\-K}}
\index{QSEP_STATUS_K@{QSEP\_\-STATUS\_\-K}!QSEP.h@{QSEP.h}}
\subsubsection[QSEP\_\-STATUS\_\-K]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QSEP_8h_a0}{QSEP\_\-STATUS\_\-K}}}
\label{QSEP_8h_a0}


Typedef for QSEP\_\-STATUS\_\-K. 

\begin{Desc}
\item[]The errors breakdown into roughly two categories\begin{enumerate}
\item User errors\item Internal errors\end{enumerate}
\end{Desc}
\begin{Desc}
\item[User Errors]Currently there are two user errors.\begin{enumerate}
\item Attempting to decode an event with compression level that exceeds what the user configured the decoder to handle. This maximum level is specified when allocating the QSEP handle.\item The user specified an output buffer that was too small to accommodate the event.\end{enumerate}
\end{Desc}
\begin{Desc}
\item[Internal Errors]The candidates for causing these errors are\begin{enumerate}
\item Internal error on the encoding side, i.e. the software that formatted and wrote the event out has an error.\item Internal error on the decoding side, i.e. the software that is decoding the event has an error.\item The input data was corrupted (for example a memory overwrite) after it was read in.\end{enumerate}
\end{Desc}


\subsection{Enumeration Type Documentation}
\hypertarget{QSEP_8h_a22}{
\index{QSEP.h@{QSEP.h}!_QSEP_STATUS_K@{\_\-QSEP\_\-STATUS\_\-K}}
\index{_QSEP_STATUS_K@{\_\-QSEP\_\-STATUS\_\-K}!QSEP.h@{QSEP.h}}
\subsubsection[\_\-QSEP\_\-STATUS\_\-K]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{QSEP_8h_a22}{\_\-QSEP\_\-STATUS\_\-K}}}
\label{QSEP_8h_a22}


Enumeration of the status codes. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{QSEP_STATUS_K_ERR@{QSEP\_\-STATUS\_\-K\_\-ERR}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_ERR@{QSEP\_\-STATUS\_\-K\_\-ERR}}\item[{\em 
\hypertarget{QSEP_8h_a22a1}{
QSEP\_\-STATUS\_\-K\_\-ERR}
\label{QSEP_8h_a22a1}
}]Generic failure \index{QSEP_STATUS_K_TOO_SMALL@{QSEP\_\-STATUS\_\-K\_\-TOO\_\-SMALL}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_TOO_SMALL@{QSEP\_\-STATUS\_\-K\_\-TOO\_\-SMALL}}\item[{\em 
\hypertarget{QSEP_8h_a22a2}{
QSEP\_\-STATUS\_\-K\_\-TOO\_\-SMALL}
\label{QSEP_8h_a22a2}
}]The user provided buffer is too small to accommodate the expanded event. \index{QSEP_STATUS_K_INSRSC@{QSEP\_\-STATUS\_\-K\_\-INSRSC}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_INSRSC@{QSEP\_\-STATUS\_\-K\_\-INSRSC}}\item[{\em 
\hypertarget{QSEP_8h_a22a3}{
QSEP\_\-STATUS\_\-K\_\-INSRSC}
\label{QSEP_8h_a22a3}
}]Insuffient resources to expand the requested input event format/compression level. The format/compression level is one of the known formats, but the user did not configure the expansion software with sufficient resources to handle it \index{QSEP_STATUS_K_UNKLVL@{QSEP\_\-STATUS\_\-K\_\-UNKLVL}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_UNKLVL@{QSEP\_\-STATUS\_\-K\_\-UNKLVL}}\item[{\em 
\hypertarget{QSEP_8h_a22a4}{
QSEP\_\-STATUS\_\-K\_\-UNKLVL}
\label{QSEP_8h_a22a4}
}]Unknown input event format/compression level. This is likely an internal error or an attempt to use an older version of the QSEP code that did not, at that time, support the specified format/compression level \index{QSEP_STATUS_K_NOGEM@{QSEP\_\-STATUS\_\-K\_\-NOGEM}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_NOGEM@{QSEP\_\-STATUS\_\-K\_\-NOGEM}}\item[{\em 
\hypertarget{QSEP_8h_a22a5}{
QSEP\_\-STATUS\_\-K\_\-NOGEM}
\label{QSEP_8h_a22a5}
}]The GEM contribution could not be located in the input data. Without the GEM contribution, the extended counter information cannot be updated. This is likely caused by an internal error. It is possible that there is a bug in the encoding/decoding of the data or that the input data was somehow corrupted. \index{QSEP_STATUS_K_OVRRUN@{QSEP\_\-STATUS\_\-K\_\-OVRRUN}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_OVRRUN@{QSEP\_\-STATUS\_\-K\_\-OVRRUN}}\item[{\em 
\hypertarget{QSEP_8h_a22a6}{
QSEP\_\-STATUS\_\-K\_\-OVRRUN}
\label{QSEP_8h_a22a6}
}]There was data still in the input was still left after expanding thought it had completed. This is likely caused by an internal error. It is possible that there is a bug in the encoding/decoding of the data or that the input data was somehow corrupted. \index{QSEP_STATUS_K_UNDRUN@{QSEP\_\-STATUS\_\-K\_\-UNDRUN}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_UNDRUN@{QSEP\_\-STATUS\_\-K\_\-UNDRUN}}\item[{\em 
\hypertarget{QSEP_8h_a22a7}{
QSEP\_\-STATUS\_\-K\_\-UNDRUN}
\label{QSEP_8h_a22a7}
}]The input data was exhausted before the expansion thought it had completed. This is likely caused by an internal error. It is possible that there is a bug in the encoding/decoding of the data or that the input data was somehow corrupted. \index{QSEP_STATUS_K_INCLEN@{QSEP\_\-STATUS\_\-K\_\-INCLEN}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_INCLEN@{QSEP\_\-STATUS\_\-K\_\-INCLEN}}\item[{\em 
\hypertarget{QSEP_8h_a22a8}{
QSEP\_\-STATUS\_\-K\_\-INCLEN}
\label{QSEP_8h_a22a8}
}]An inconsistency in the calculation of the number of bytes to in the output stream and actual number. This is purely an internal error in the expansion/unpacking routines \index{QSEP_STATUS_K_DECOMPRESS@{QSEP\_\-STATUS\_\-K\_\-DECOMPRESS}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP_STATUS_K_DECOMPRESS@{QSEP\_\-STATUS\_\-K\_\-DECOMPRESS}}\item[{\em 
\hypertarget{QSEP_8h_a22a9}{
QSEP\_\-STATUS\_\-K\_\-DECOMPRESS}
\label{QSEP_8h_a22a9}
}]Decompression failure. This is purely an internal error likely within the compression/decompression routines \end{description}
\end{Desc}

