\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.  


\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef enum \hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702}{\_\-QSEP\_\-STATUS\_\-K} \hyperlink{QSEP_8h_4f6090de5a07c9148f8ed1f732023f3a}{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_37f0d4666fd8a53d1ea85ff68030d702}{\_\-QSEP\_\-STATUS\_\-K} \{ \par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d7029bc596e402a48faa6721d9bc36f4188f}{QSEP\_\-STATUS\_\-K\_\-ERR} =  -1, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702db560fa0d21039c1999c43f3baa7f846}{QSEP\_\-STATUS\_\-K\_\-TOO\_\-SMALL} =  -2, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702dc2faa2db4c9be7e86f1e8af551fc9df}{QSEP\_\-STATUS\_\-K\_\-INSRSC} =  -3, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d7020987d7c4728bc1192030a9b743b4964e}{QSEP\_\-STATUS\_\-K\_\-UNKLVL} =  -7, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702181568b0903d68c55d6aa5a2d298e63d}{QSEP\_\-STATUS\_\-K\_\-NOGEM} =  -8, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70206874ca6b9279f832d80782a3dea1f4e}{QSEP\_\-STATUS\_\-K\_\-UNDRUN} =  -9, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d7022cb8100aeb0a37b593686afca927ad6e}{QSEP\_\-STATUS\_\-K\_\-OVRRUN} =  -10, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70245d084c853150e7a0b5244b52d63e952}{QSEP\_\-STATUS\_\-K\_\-INCLEN} =  -11, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70209665ead351700baf4285b7eb914797a}{QSEP\_\-STATUS\_\-K\_\-DECOMPRESS} =  -12, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70242bd5a5c0fc459c6625f83cd3c7af62a}{QSEP\_\-STATUS\_\-K\_\-CHECKSUM} =  -13, 
\par
\hyperlink{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702a850d9c9a9d9a6aff1431077a6e2a2a5}{QSEP\_\-STATUS\_\-K\_\-LAST\_\-VALID} =  -13
 \}
\begin{CompactList}\small\item\em Enumeration of the status codes. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{struct__QSEP}{QSEP} $\ast$ \hyperlink{QSEP_8h_bd3baf8ef35e275f7a2fd206abc6613c}{QSEP\_\-alloc} (int resource\_\-level)
\begin{CompactList}\small\item\em Allocates and constructs the QSEP handle. \item\end{CompactList}\item 
int \hyperlink{QSEP_8h_050d23b44331382944a3dd2566804a7c}{QSEP\_\-ebfSizeof} (void)
\begin{CompactList}\small\item\em Returns the maximum size, in bytes, of an EBF event. \item\end{CompactList}\item 
void \hyperlink{QSEP_8h_4d7e81ec28da11fdd4e2bb76ecfe4394}{QSEP\_\-updateAtDatagram} (\hyperlink{struct__QSEP}{QSEP} $\ast$qsep, const LSF\_\-datagram $\ast$dgm)
\begin{CompactList}\small\item\em Updates the run oriented information in the event context using the information from the event datagram. \item\end{CompactList}\item 
void \hyperlink{QSEP_8h_249c9323b6b06ff836aab39c4227cf4f}{QSEP\_\-updateAtContribution} (\hyperlink{struct__QSEP}{QSEP} $\ast$qsep, const LSF\_\-contribution $\ast$ctb)
\begin{CompactList}\small\item\em Updates the context based on the contribution. \item\end{CompactList}\item 
int \hyperlink{QSEP_8h_4b69a59477cf2bbd34dd29e400903907}{QSEP\_\-updateAtRecord} (\hyperlink{struct__QSEP}{QSEP} $\ast$qsep, const LSF\_\-record $\ast$rec)
\begin{CompactList}\small\item\em Updates the context based on the record. \item\end{CompactList}\item 
int \hyperlink{QSEP_8h_de1edc589218539ec446d30625036c8f}{QSEP\_\-expand} (\hyperlink{struct__QSEP}{QSEP} $\ast$qsep, const LSF\_\-record $\ast$rec, QSE\_\-ebfEvt $\ast$ebf, int ebf\_\-size, unsigned int $\ast$ret\_\-size)
\begin{CompactList}\small\item\em Expands the event into EBF format. \item\end{CompactList}\item 
void \hyperlink{QSEP_8h_83ae58cba9ff73f10496df8263f6dc67}{QSEP\_\-destruct} (\hyperlink{struct__QSEP}{QSEP} $\ast$qsep)
\begin{CompactList}\small\item\em Destroys the QSEP handle. \item\end{CompactList}\item 
const char $\ast$ \hyperlink{QSEP_8h_9f8ea2b3bb5c010f3c8e2cb3a8893ca7}{QSEP\_\-statusString} (int status)
\begin{CompactList}\small\item\em Translates a QSEP status code to a string. \item\end{CompactList}\item 
const QSE\_\-ctx $\ast$ \hyperlink{QSEP_8h_1015272f9544f3c6af5d726456b4e9a7}{QSEP\_\-stdCtxGet} (const \hyperlink{struct__QSEP}{QSEP} $\ast$qsep)
\begin{CompactList}\small\item\em Return a pointer to the standard QSE context block. \item\end{CompactList}\item 
const \hyperlink{struct__QSEP__ctx}{QSEP\_\-ctx} $\ast$ \hyperlink{QSEP_8h_2194719432ac584300e4ef66b9b06213}{QSEP\_\-appCtxGet} (const \hyperlink{struct__QSEP}{QSEP} $\ast$qsep)
\begin{CompactList}\small\item\em Return a pointer to the public QSEP application specific context block. \item\end{CompactList}\item 
int \hyperlink{QSEP_8h_f4fcc433095a491a803eebbdc496194a}{QSEP\_\-sizeof} (unsigned int resource\_\-level, void $\ast$prm)
\begin{CompactList}\small\item\em Returns the size, in bytes, of the handle for updating the standard event meta-information. \item\end{CompactList}\item 
\hyperlink{struct__QSEP}{QSEP} $\ast$ \hyperlink{QSEP_8h_24465555b5508638287a6e54e103e56c}{QSEP\_\-construct} (\hyperlink{struct__QSEP}{QSEP} $\ast$qsep, unsigned int resource\_\-level, void $\ast$prm)
\begin{CompactList}\small\item\em Construct (initializes) the handle for updating the standard event meta-information. \item\end{CompactList}\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.9 2011/03/29 18:49:03 russell Exp $
\end{verbatim}
\normalsize
 

\subsection{Typedef Documentation}
\hypertarget{QSEP_8h_4f6090de5a07c9148f8ed1f732023f3a}{
\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}{\bf QSEP\_\-STATUS\_\-K}}}
\label{QSEP_8h_4f6090de5a07c9148f8ed1f732023f3a}


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_37f0d4666fd8a53d1ea85ff68030d702}{
\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 {\bf \_\-QSEP\_\-STATUS\_\-K}}}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702}


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_37f0d4666fd8a53d1ea85ff68030d7029bc596e402a48faa6721d9bc36f4188f}{
QSEP\_\-STATUS\_\-K\_\-ERR}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d7029bc596e402a48faa6721d9bc36f4188f}
}]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_37f0d4666fd8a53d1ea85ff68030d702db560fa0d21039c1999c43f3baa7f846}{
QSEP\_\-STATUS\_\-K\_\-TOO\_\-SMALL}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702db560fa0d21039c1999c43f3baa7f846}
}]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_37f0d4666fd8a53d1ea85ff68030d702dc2faa2db4c9be7e86f1e8af551fc9df}{
QSEP\_\-STATUS\_\-K\_\-INSRSC}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702dc2faa2db4c9be7e86f1e8af551fc9df}
}]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_37f0d4666fd8a53d1ea85ff68030d7020987d7c4728bc1192030a9b743b4964e}{
QSEP\_\-STATUS\_\-K\_\-UNKLVL}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d7020987d7c4728bc1192030a9b743b4964e}
}]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_37f0d4666fd8a53d1ea85ff68030d702181568b0903d68c55d6aa5a2d298e63d}{
QSEP\_\-STATUS\_\-K\_\-NOGEM}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702181568b0903d68c55d6aa5a2d298e63d}
}]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\_\-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_37f0d4666fd8a53d1ea85ff68030d70206874ca6b9279f832d80782a3dea1f4e}{
QSEP\_\-STATUS\_\-K\_\-UNDRUN}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70206874ca6b9279f832d80782a3dea1f4e}
}]There was data left in the input after the event 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\_\-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_37f0d4666fd8a53d1ea85ff68030d7022cb8100aeb0a37b593686afca927ad6e}{
QSEP\_\-STATUS\_\-K\_\-OVRRUN}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d7022cb8100aeb0a37b593686afca927ad6e}
}]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_37f0d4666fd8a53d1ea85ff68030d70245d084c853150e7a0b5244b52d63e952}{
QSEP\_\-STATUS\_\-K\_\-INCLEN}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70245d084c853150e7a0b5244b52d63e952}
}]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_37f0d4666fd8a53d1ea85ff68030d70209665ead351700baf4285b7eb914797a}{
QSEP\_\-STATUS\_\-K\_\-DECOMPRESS}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70209665ead351700baf4285b7eb914797a}
}]Decompression failure. This is purely an internal error likely within the compression/decompression routines \index{QSEP\_\-STATUS\_\-K\_\-CHECKSUM@{QSEP\_\-STATUS\_\-K\_\-CHECKSUM}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP\_\-STATUS\_\-K\_\-CHECKSUM@{QSEP\_\-STATUS\_\-K\_\-CHECKSUM}}\item[{\em 
\hypertarget{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70242bd5a5c0fc459c6625f83cd3c7af62a}{
QSEP\_\-STATUS\_\-K\_\-CHECKSUM}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d70242bd5a5c0fc459c6625f83cd3c7af62a}
}]Checksum failure. This can be either an internal error, or more likely, a hardware failure that violated an assumption made by the compression routines \index{QSEP\_\-STATUS\_\-K\_\-LAST\_\-VALID@{QSEP\_\-STATUS\_\-K\_\-LAST\_\-VALID}!QSEP.h@{QSEP.h}}\index{QSEP.h@{QSEP.h}!QSEP\_\-STATUS\_\-K\_\-LAST\_\-VALID@{QSEP\_\-STATUS\_\-K\_\-LAST\_\-VALID}}\item[{\em 
\hypertarget{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702a850d9c9a9d9a6aff1431077a6e2a2a5}{
QSEP\_\-STATUS\_\-K\_\-LAST\_\-VALID}
\label{QSEP_8h_37f0d4666fd8a53d1ea85ff68030d702a850d9c9a9d9a6aff1431077a6e2a2a5}
}]Last valid status code \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{QSEP_8h_bd3baf8ef35e275f7a2fd206abc6613c}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-alloc@{QSEP\_\-alloc}}
\index{QSEP\_\-alloc@{QSEP\_\-alloc}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-alloc}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QSEP}$\ast$ QSEP\_\-alloc (int {\em resource\_\-level})}}
\label{QSEP_8h_bd3baf8ef35e275f7a2fd206abc6613c}


Allocates and constructs the QSEP handle. 

\begin{Desc}
\item[Returns:]A pointer to the allocated and constructed QSEP handle\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em resource\_\-level}]The maximum resource level that is needed\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]Setting the {\em resource\_\-level\/} parameter to a high value to {\em be\/} {\em safe\/} may result in the attempting to garner resources that only are not necessary but may not be available. For example, the highest levels of compression need access to CAL pedestal files. In this case, QSEP\_\-construct will attempt to open the files and if they cannot be located, will fail.\end{Desc}
\begin{Desc}
\item[]In this case, this routine may have needlessly failed. The watch word here is set it only as high as necessary. \end{Desc}


References QSEP\_\-construct().\hypertarget{QSEP_8h_2194719432ac584300e4ef66b9b06213}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-appCtxGet@{QSEP\_\-appCtxGet}}
\index{QSEP\_\-appCtxGet@{QSEP\_\-appCtxGet}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-appCtxGet}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf QSEP\_\-ctx}$\ast$ QSEP\_\-appCtxGet (const {\bf QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8h_2194719432ac584300e4ef66b9b06213}


Return a pointer to the public QSEP application specific context block. 

\begin{Desc}
\item[Returns:]A pointer to the QSEP application specific context block\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qsep}]The physics event handle\end{description}
\end{Desc}
\begin{Desc}
\item[]This routine is just an accessor to keep the structure of QSEP private. \end{Desc}


References \_\-QSEP::atx.\hypertarget{QSEP_8h_24465555b5508638287a6e54e103e56c}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-construct@{QSEP\_\-construct}}
\index{QSEP\_\-construct@{QSEP\_\-construct}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-construct}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QSEP}$\ast$ QSEP\_\-construct ({\bf QSEP} $\ast$ {\em qsep}, \/  unsigned int {\em resource\_\-level}, \/  void $\ast$ {\em prm})}}
\label{QSEP_8h_24465555b5508638287a6e54e103e56c}


Construct (initializes) the handle for updating the standard event meta-information. 

\begin{Desc}
\item[Returns:]The QSEP context structure or NULL on error\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qsep}]The handle to initialize, if specified as NULL, one will be allocated \item[{\em resource\_\-level}]The maximum resource level. Attempts to expand event with resources needs above this value will return QSEP\_\-STATUS\_\-K\_\-INSRSC, that is INSUFFICIENT RESOURCES. \item[{\em prm}]A run-time set parameter used to stylize the configuration \end{description}
\end{Desc}


References \_\-QSEP::atx, \_\-QSEP::ctx, \_\-QSEP::dtx, \_\-QSEP::evt, \_\-QSEP::free, QSEP\_\-ctxConstruct(), qsep\_\-dtx\_\-construct(), qsep\_\-file\_\-ctx\_\-get(), and QSEP\_\-sizeof().

Referenced by QSEP\_\-alloc().\hypertarget{QSEP_8h_83ae58cba9ff73f10496df8263f6dc67}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-destruct@{QSEP\_\-destruct}}
\index{QSEP\_\-destruct@{QSEP\_\-destruct}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-destruct}]{\setlength{\rightskip}{0pt plus 5cm}void QSEP\_\-destruct ({\bf QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8h_83ae58cba9ff73f10496df8263f6dc67}


Destroys the QSEP handle. 

\begin{Desc}
\item[Returns:]The QSEP context structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qsep}]The handle to destroy \end{description}
\end{Desc}


References \_\-QSEP::free.\hypertarget{QSEP_8h_050d23b44331382944a3dd2566804a7c}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-ebfSizeof@{QSEP\_\-ebfSizeof}}
\index{QSEP\_\-ebfSizeof@{QSEP\_\-ebfSizeof}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-ebfSizeof}]{\setlength{\rightskip}{0pt plus 5cm}int QSEP\_\-ebfSizeof (void)}}
\label{QSEP_8h_050d23b44331382944a3dd2566804a7c}


Returns the maximum size, in bytes, of an EBF event. 

\begin{Desc}
\item[Returns:]The maximum size, in bytes, of an EBF event \end{Desc}
\hypertarget{QSEP_8h_de1edc589218539ec446d30625036c8f}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-expand@{QSEP\_\-expand}}
\index{QSEP\_\-expand@{QSEP\_\-expand}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-expand}]{\setlength{\rightskip}{0pt plus 5cm}int QSEP\_\-expand ({\bf QSEP} $\ast$ {\em qsep}, \/  const LSF\_\-record $\ast$ {\em rec}, \/  QSE\_\-ebfEvt $\ast$ {\em ebf}, \/  int {\em ebf\_\-size}, \/  unsigned int $\ast$ {\em ret\_\-size})}}
\label{QSEP_8h_de1edc589218539ec446d30625036c8f}


Expands the event into EBF format. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Successful}]expand \item[{\em $<$0,Failute,see}]the enumeration QSEP\_\-STATUS\_\-K for the reasons\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qsep}]The physics event handle \item[{\em rec}]The LSF record containing the event \item[{\em ebf}]The ebf buffer to expand the event into, this pointer must be 32-bit aligned \item[{\em ebf\_\-size}]The size, in bytes, of the buffer \item[{\em ret\_\-size}]Returned as the status of the expand\end{description}
\end{Desc}
\begin{Desc}
\item[]This just launders the call \end{Desc}


References \_\-QSEP\_\-dtxEvt::decode, \_\-QSEP::dtx, and \_\-QSEP\_\-dtx::evt.\hypertarget{QSEP_8h_f4fcc433095a491a803eebbdc496194a}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-sizeof@{QSEP\_\-sizeof}}
\index{QSEP\_\-sizeof@{QSEP\_\-sizeof}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-sizeof}]{\setlength{\rightskip}{0pt plus 5cm}int QSEP\_\-sizeof (unsigned int {\em resource\_\-level}, \/  void $\ast$ {\em prm})}}
\label{QSEP_8h_f4fcc433095a491a803eebbdc496194a}


Returns the size, in bytes, of the handle for updating the standard event meta-information. 

\begin{Desc}
\item[Returns:]The size, in bytes, of the handle for updating the standard event meta-information\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em resource\_\-level}]The maximum resource level. Attempts to expand event with compression levels that use resources beyond this value will return QSEP\_\-STATUS\_\-K\_\-INSRSC that is INSUFFICIENT RESOURCES. This must be a number between 0 and 15. This parameter plus {\em prm\/} must also be passed to QSEP\_\-construct \item[{\em prm}]A run-time set parameter used to stylize the configuration. This parameter plus {\em max\_\-level\/} must also be passed to QSEP\_\-construct. \end{description}
\end{Desc}


References QDFP\_\-ctxSizeof(), QDFP\_\-evtSizeof(), and RND8.

Referenced by QSEP\_\-construct().\hypertarget{QSEP_8h_9f8ea2b3bb5c010f3c8e2cb3a8893ca7}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-statusString@{QSEP\_\-statusString}}
\index{QSEP\_\-statusString@{QSEP\_\-statusString}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-statusString}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ QSEP\_\-statusString (int {\em status})}}
\label{QSEP_8h_9f8ea2b3bb5c010f3c8e2cb3a8893ca7}


Translates a QSEP status code to a string. 

\begin{Desc}
\item[Returns:]Pointer to the string\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em status}]The status code to translate \end{description}
\end{Desc}


References QSEP\_\-STATUS\_\-K\_\-LAST\_\-VALID.\hypertarget{QSEP_8h_1015272f9544f3c6af5d726456b4e9a7}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-stdCtxGet@{QSEP\_\-stdCtxGet}}
\index{QSEP\_\-stdCtxGet@{QSEP\_\-stdCtxGet}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-stdCtxGet}]{\setlength{\rightskip}{0pt plus 5cm}const QSE\_\-ctx$\ast$ QSEP\_\-stdCtxGet (const {\bf QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8h_1015272f9544f3c6af5d726456b4e9a7}


Return a pointer to the standard QSE context block. 

\begin{Desc}
\item[Returns:]A pointer to the QSE context block\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qsep}]The physics event handle\end{description}
\end{Desc}
\begin{Desc}
\item[]This routine is just an accessor to keep the structure of QSEP private. \end{Desc}


References \_\-QSEP::ctx.\hypertarget{QSEP_8h_249c9323b6b06ff836aab39c4227cf4f}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-updateAtContribution@{QSEP\_\-updateAtContribution}}
\index{QSEP\_\-updateAtContribution@{QSEP\_\-updateAtContribution}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-updateAtContribution}]{\setlength{\rightskip}{0pt plus 5cm}void QSEP\_\-updateAtContribution ({\bf QSEP} $\ast$ {\em qsep}, \/  const LSF\_\-contribution $\ast$ {\em ctb})}}
\label{QSEP_8h_249c9323b6b06ff836aab39c4227cf4f}


Updates the context based on the contribution. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,if}]the contribution is non-record \item[{\em 1,if}]the contribution is an contribution \end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qsep}]The physics event handle to update \item[{\em ctb}]The contribution \end{description}
\end{Desc}


References \_\-QSEP::ctx, \_\-QSEP::dtx, \_\-QSEP\_\-dtx::evt, QSEP\_\-evt0\_\-update(), QSEP\_\-evt2\_\-update(), and \_\-QSEP\_\-dtxEvt::update.\hypertarget{QSEP_8h_4d7e81ec28da11fdd4e2bb76ecfe4394}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-updateAtDatagram@{QSEP\_\-updateAtDatagram}}
\index{QSEP\_\-updateAtDatagram@{QSEP\_\-updateAtDatagram}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-updateAtDatagram}]{\setlength{\rightskip}{0pt plus 5cm}void QSEP\_\-updateAtDatagram ({\bf QSEP} $\ast$ {\em qsep}, \/  const LSF\_\-datagram $\ast$ {\em dgm})}}
\label{QSEP_8h_4d7e81ec28da11fdd4e2bb76ecfe4394}


Updates the run oriented information in the event context using the information from the event datagram. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qsep}]The physics event handle \item[{\em dgm}]The event datagram\end{description}
\end{Desc}
\begin{Desc}
\item[Note:]The root contribution is opaque to the caller, so QSEP must handle the contributions within the root. There are two strategies one could use\begin{enumerate}
\item Call LSF\_\-scanContribtions and let it parse through them and invoke a user call back routine\item Do the scan by hand.\end{enumerate}
\end{Desc}
Initially I have opted for strategy \#1, but the second strategy makes detailed error checking easier. For example, if the sequence of the contributions is fixed, it is likely easier to do this when doing the scan by hand. 

References \_\-RootUpdateCtx::chg, \_\-QSEP::ctx, \_\-RootUpdateCtx::flags, \_\-RootUpdateCtx::qsep, root\_\-update(), and \_\-RootUpdateCtx::tim.\hypertarget{QSEP_8h_4b69a59477cf2bbd34dd29e400903907}{
\index{QSEP.h@{QSEP.h}!QSEP\_\-updateAtRecord@{QSEP\_\-updateAtRecord}}
\index{QSEP\_\-updateAtRecord@{QSEP\_\-updateAtRecord}!QSEP.h@{QSEP.h}}
\subsubsection[{QSEP\_\-updateAtRecord}]{\setlength{\rightskip}{0pt plus 5cm}int QSEP\_\-updateAtRecord ({\bf QSEP} $\ast$ {\em qsep}, \/  const LSF\_\-record $\ast$ {\em rec})}}
\label{QSEP_8h_4b69a59477cf2bbd34dd29e400903907}


Updates the context based on the record. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Positive}]values indicate a successful update to an event record \item[{\em Negative}]values indicate an unsuccessful update to an event record \item[{\em 0}]indicates that this was not an event record\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qsep}]The physics event handle to update \item[{\em rec}]The event record \end{description}
\end{Desc}


References \_\-QSEP::ctx, \_\-QSEP::dtx, \_\-QSEP\_\-dtx::evt, and \_\-QSEP\_\-dtxEvt::update.