\hypertarget{QSEP_8c}{
\section{QSEP.c File Reference}
\label{QSEP_8c}\index{QSEP.c@{QSEP.c}}
}
Manages the updating of the physics event context. 

{\tt \#include \char`\"{}QSEP/QSEP.h\char`\"{}}\par
{\tt \#include \char`\"{}QSEP/QSEP\_\-evt0.h\char`\"{}}\par
{\tt \#include \char`\"{}QSEP\_\-pvtdef.h\char`\"{}}\par
{\tt \#include \char`\"{}QSEP\_\-ctx\-Update.h\char`\"{}}\par
{\tt \#include \char`\"{}QDFP\_\-ctx.h\char`\"{}}\par
{\tt \#include \char`\"{}QDFP\_\-evt.h\char`\"{}}\par
{\tt \#include \char`\"{}QSE/QSE\_\-ctx\-Update.h\char`\"{}}\par
{\tt \#include \char`\"{}QSP/QSP\_\-names.h\char`\"{}}\par
{\tt \#include \char`\"{}QSP/QFCP\_\-cache.h\char`\"{}}\par
{\tt \#include \char`\"{}QSD/QFC\_\-cache.h\char`\"{}}\par
{\tt \#include \char`\"{}QSD/QFR\_\-file.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-scan.h\char`\"{}}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par


Include dependency graph for QSEP.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=307pt]{QSEP_8c__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__RootUpdateCtx}{\_\-Root\-Update\-Ctx}
\begin{CompactList}\small\item\em Context of the root update function. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{QSEP_8c_a0}{RND8}(\_\-x)~(((int)(\_\-x) + 7) \& $\sim$0x7)
\begin{CompactList}\small\item\em Round {\em \_\-x\/} up to the nearest boundary of 8. \item\end{CompactList}\item 
\hypertarget{QSEP_8c_a1}{
\#define {\bf ARND8}(\_\-x)~((void $\ast$)RND8((\_\-x)))}
\label{QSEP_8c_a1}

\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{QSEP_8c_a2}{
typedef \hyperlink{struct__RootUpdateCtx}{\_\-Root\-Update\-Ctx} \hyperlink{QSEP_8c_a2}{Root\-Update\-Ctx}}
\label{QSEP_8c_a2}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__RootUpdateCtx}{\_\-Root\-Update\-Ctx}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static LSF\_\-scan\-Record\-Handler \hyperlink{QSEP_8c_a3}{root\_\-update} (\hyperlink{struct__RootUpdateCtx}{Root\-Update\-Ctx} $\ast$rux, const LSF\_\-contribution $\ast$ctb)
\begin{CompactList}\small\item\em Call back routine for each contribution in the root. \item\end{CompactList}\item 
static \_\-\_\-inline QFR\_\-file\-Ctx $\ast$ \hyperlink{QSEP_8c_a4}{qsep\_\-file\_\-ctx\_\-get} (void)
\begin{CompactList}\small\item\em Returns the QSEP file resolution context handle. \item\end{CompactList}\item 
static \_\-\_\-inline void $\ast$ \hyperlink{QSEP_8c_a5}{qsep\_\-dtx\-Ctx\_\-construct} (\hyperlink{struct__QSEP__dtxCtx}{QSEP\_\-dtx\-Ctx} $\ast$dtx\-Ctx, int level, void $\ast$prm, \hyperlink{struct__QSEP}{QSEP} $\ast$qsep, \hyperlink{struct__QSEP__ctx}{QSEP\_\-ctx} $\ast$qsep\_\-ctx, QSE\_\-ctx $\ast$qse\_\-ctx, QFR\_\-file\-Ctx $\ast$qfr, int depth, void $\ast$ptr)
\begin{CompactList}\small\item\em Initializes the physics application specific private context. \item\end{CompactList}\item 
\hypertarget{QSEP_8c_a6}{
static void $\ast$ {\bf qsep\_\-dtx\-Evt\_\-construct} (\hyperlink{struct__QSEP__dtxEvt}{QSEP\_\-dtx\-Evt} $\ast$dtx\-Evt, int level, void $\ast$prm, void $\ast$ptr)}
\label{QSEP_8c_a6}

\item 
static \_\-\_\-inline void $\ast$ \hyperlink{QSEP_8c_a7}{qsep\_\-dtx\_\-construct} (\hyperlink{struct__QSEP__dtx}{QSEP\_\-dtx} $\ast$dtx, int level, void $\ast$prm, \hyperlink{struct__QSEP}{QSEP} $\ast$qsep, \hyperlink{struct__QSEP__ctx}{QSEP\_\-ctx} $\ast$qsep\_\-ctx, QSE\_\-ctx $\ast$qse\_\-ctx, QFR\_\-file\-Ctx $\ast$qfr, int depth, void $\ast$ptr)
\begin{CompactList}\small\item\em Initializes the physics application specific private context. \item\end{CompactList}\item 
\hyperlink{struct__QSEP}{QSEP} $\ast$ \hyperlink{QSEP_8c_a8}{QSEP\_\-alloc} (int resource\_\-level)
\begin{CompactList}\small\item\em Allocates and constructs the QSEP handle. \item\end{CompactList}\item 
int \hyperlink{QSEP_8c_a9}{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 
int \hyperlink{QSEP_8c_a10}{QSEP\_\-ebf\-Sizeof} (void)
\begin{CompactList}\small\item\em Returns the maximum size, in bytes, of an EBF event. \item\end{CompactList}\item 
\hyperlink{struct__QSEP}{QSEP} $\ast$ \hyperlink{QSEP_8c_a11}{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}\item 
void \hyperlink{QSEP_8c_a12}{QSEP\_\-destruct} (\hyperlink{struct__QSEP}{QSEP} $\ast$qsep)
\begin{CompactList}\small\item\em Destroys the QSEP handle. \item\end{CompactList}\item 
void \hyperlink{QSEP_8c_a13}{QSEP\_\-update\-At\-Datagram} (\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_8c_a14}{QSEP\_\-update\-At\-Contribution} (\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_8c_a15}{QSEP\_\-update\-At\-Record} (\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_8c_a16}{QSEP\_\-expand} (\hyperlink{struct__QSEP}{QSEP} $\ast$qsep, const LSF\_\-record $\ast$rec, QSE\_\-ebf\-Evt $\ast$ebf, int ebf\_\-size, int $\ast$ret\_\-size)
\begin{CompactList}\small\item\em Expands the event into EBF format. \item\end{CompactList}\item 
const \hyperlink{struct__QSEP__ctx}{QSEP\_\-ctx} $\ast$ \hyperlink{QSEP_8c_a17}{QSEP\_\-app\-Ctx\-Get} (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 
const QSE\_\-ctx $\ast$ \hyperlink{QSEP_8c_a18}{QSEP\_\-std\-Ctx\-Get} (const \hyperlink{struct__QSEP}{QSEP} $\ast$qsep)
\begin{CompactList}\small\item\em Return a pointer to the standard QSE context block. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Manages the updating of the physics event context. 

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


\footnotesize\begin{verbatim}   CVS $Id: QSEP.c,v 1.10 2008/09/19 23:51:44 russell Exp $
\end{verbatim}
\normalsize


\subsection{Define Documentation}
\hypertarget{QSEP_8c_a0}{
\index{QSEP.c@{QSEP.c}!RND8@{RND8}}
\index{RND8@{RND8}!QSEP.c@{QSEP.c}}
\subsubsection[RND8]{\setlength{\rightskip}{0pt plus 5cm}\#define RND8(\_\-x)~(((int)(\_\-x) + 7) \& $\sim$0x7)}}
\label{QSEP_8c_a0}


Round {\em \_\-x\/} up to the nearest boundary of 8. 

\begin{Desc}
\item[Returns:]The rounded of value\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-x}]The value to round\end{description}
\end{Desc}


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


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}
\hypertarget{QSEP_8c_a17}{
\index{QSEP.c@{QSEP.c}!QSEP_appCtxGet@{QSEP\_\-appCtxGet}}
\index{QSEP_appCtxGet@{QSEP\_\-appCtxGet}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-appCtxGet]{\setlength{\rightskip}{0pt plus 5cm}const QSE\_\-ctx $\ast$ QSEP\_\-app\-Ctx\-Get (const \hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8c_a17}


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}
\hypertarget{QSEP_8c_a11}{
\index{QSEP.c@{QSEP.c}!QSEP_construct@{QSEP\_\-construct}}
\index{QSEP_construct@{QSEP\_\-construct}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__QSEP}{QSEP} $\ast$ QSEP\_\-construct (\hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep}, unsigned int {\em resource\_\-level}, void $\ast$ {\em prm})}}
\label{QSEP_8c_a11}


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}
\hypertarget{QSEP_8c_a12}{
\index{QSEP.c@{QSEP.c}!QSEP_destruct@{QSEP\_\-destruct}}
\index{QSEP_destruct@{QSEP\_\-destruct}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-destruct]{\setlength{\rightskip}{0pt plus 5cm}void QSEP\_\-destruct (\hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8c_a12}


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}
\hypertarget{QSEP_8c_a7}{
\index{QSEP.c@{QSEP.c}!qsep_dtx_construct@{qsep\_\-dtx\_\-construct}}
\index{qsep_dtx_construct@{qsep\_\-dtx\_\-construct}!QSEP.c@{QSEP.c}}
\subsubsection[qsep\_\-dtx\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline void $\ast$ qsep\_\-dtx\_\-construct (\hyperlink{struct__QSEP__dtx}{QSEP\_\-dtx} $\ast$ {\em dtx}, int {\em level}, void $\ast$ {\em prm}, \hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep}, \hyperlink{struct__QSEP__ctx}{QSEP\_\-ctx} $\ast$ {\em qsep\_\-ctx}, QSE\_\-ctx $\ast$ {\em qse\_\-ctx}, QFR\_\-file\-Ctx $\ast$ {\em qfr}, int {\em depth}, void $\ast$ {\em ptr})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_a7}


Initializes the physics application specific private context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dtx}]The physics application specific private context to initialize \item[{\em level}]The maximum decoding level that this structure can support. Higher compression levels demand more resources. Enough resources will be allocated to met this requested level. \item[{\em prm}]Arbitrary user parameter, unused \item[{\em qsep}]Pointer to the physics application context (full) \item[{\em qsep\_\-ctx}]Pointer to the physics application specific public context \item[{\em qse\_\-ctx}]The generic public context \item[{\em qfr}]The file resolution context \item[{\em depth}]The cache depth \item[{\em ptr}]The memory pool\end{description}
\end{Desc}
\hypertarget{QSEP_8c_a5}{
\index{QSEP.c@{QSEP.c}!qsep_dtxCtx_construct@{qsep\_\-dtxCtx\_\-construct}}
\index{qsep_dtxCtx_construct@{qsep\_\-dtxCtx\_\-construct}!QSEP.c@{QSEP.c}}
\subsubsection[qsep\_\-dtxCtx\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline void $\ast$ qsep\_\-dtx\-Ctx\_\-construct (\hyperlink{struct__QSEP__dtxCtx}{QSEP\_\-dtx\-Ctx} $\ast$ {\em dtx\-Ctx}, int {\em level}, void $\ast$ {\em prm}, \hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep}, \hyperlink{struct__QSEP__ctx}{QSEP\_\-ctx} $\ast$ {\em qsep\_\-ctx}, QSE\_\-ctx $\ast$ {\em qse\_\-ctx}, QFR\_\-file\-Ctx $\ast$ {\em qfr}, int {\em depth}, void $\ast$ {\em ptr})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_a5}


Initializes the physics application specific private context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dtx\-Ctx}]The physics application specific private context to initialize \item[{\em level}]The maximum decoding level that this structure can support. Higher compression levels demand more resources. Enough resources will be allocated to met this requested level. \item[{\em prm}]Arbitrary user parameter, unused \item[{\em qsep}]Pointer to the physcis application context (full) \item[{\em qsep\_\-ctx}]Pointer to the physics application specific public context \item[{\em qse\_\-ctx}]The generic public context \item[{\em qfr}]The file resolution context \item[{\em depth}]The cache depth \item[{\em ptr}]The memory pool\end{description}
\end{Desc}
\hypertarget{QSEP_8c_a10}{
\index{QSEP.c@{QSEP.c}!QSEP_ebfSizeof@{QSEP\_\-ebfSizeof}}
\index{QSEP_ebfSizeof@{QSEP\_\-ebfSizeof}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-ebfSizeof]{\setlength{\rightskip}{0pt plus 5cm}int QSEP\_\-ebf\-Sizeof (void)}}
\label{QSEP_8c_a10}


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_8c_a16}{
\index{QSEP.c@{QSEP.c}!QSEP_expand@{QSEP\_\-expand}}
\index{QSEP_expand@{QSEP\_\-expand}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-expand]{\setlength{\rightskip}{0pt plus 5cm}int QSEP\_\-expand (\hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep}, const LSF\_\-record $\ast$ {\em rec}, QSE\_\-ebf\-Evt $\ast$ {\em ebf}, int {\em ebf\_\-size}, int $\ast$ {\em ret\_\-size})}}
\label{QSEP_8c_a16}


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}
\hypertarget{QSEP_8c_a4}{
\index{QSEP.c@{QSEP.c}!qsep_file_ctx_get@{qsep\_\-file\_\-ctx\_\-get}}
\index{qsep_file_ctx_get@{qsep\_\-file\_\-ctx\_\-get}!QSEP.c@{QSEP.c}}
\subsubsection[qsep\_\-file\_\-ctx\_\-get]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline QFR\_\-file\-Ctx $\ast$ qsep\_\-file\_\-ctx\_\-get (void)\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_a4}


Returns the QSEP file resolution context handle. 

\begin{Desc}
\item[Returns:]The QSEP file resolution context handle\end{Desc}
This routine return the handle, creating it if necessary. This not really the right architecture. This needs to be part of a QSEP global environment. This can't be accomplished at this time because it would require a backwardly incompatiable change to QSEP\_\-construct.\hypertarget{QSEP_8c_a9}{
\index{QSEP.c@{QSEP.c}!QSEP_sizeof@{QSEP\_\-sizeof}}
\index{QSEP_sizeof@{QSEP\_\-sizeof}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}int QSEP\_\-sizeof (unsigned int {\em resource\_\-level}, void $\ast$ {\em prm})}}
\label{QSEP_8c_a9}


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}
\hypertarget{QSEP_8c_a18}{
\index{QSEP.c@{QSEP.c}!QSEP_stdCtxGet@{QSEP\_\-stdCtxGet}}
\index{QSEP_stdCtxGet@{QSEP\_\-stdCtxGet}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-stdCtxGet]{\setlength{\rightskip}{0pt plus 5cm}const QSE\_\-ctx $\ast$ QSEP\_\-std\-Ctx\-Get (const \hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8c_a18}


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}
\hypertarget{QSEP_8c_a14}{
\index{QSEP.c@{QSEP.c}!QSEP_updateAtContribution@{QSEP\_\-updateAtContribution}}
\index{QSEP_updateAtContribution@{QSEP\_\-updateAtContribution}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-updateAtContribution]{\setlength{\rightskip}{0pt plus 5cm}void QSEP\_\-update\-At\-Contribution (\hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep}, const LSF\_\-contribution $\ast$ {\em ctb})}}
\label{QSEP_8c_a14}


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}
\hypertarget{QSEP_8c_a13}{
\index{QSEP.c@{QSEP.c}!QSEP_updateAtDatagram@{QSEP\_\-updateAtDatagram}}
\index{QSEP_updateAtDatagram@{QSEP\_\-updateAtDatagram}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-updateAtDatagram]{\setlength{\rightskip}{0pt plus 5cm}void QSEP\_\-update\-At\-Datagram (\hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep}, const LSF\_\-datagram $\ast$ {\em dgm})}}
\label{QSEP_8c_a13}


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\_\-scan\-Contribtions 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.\hypertarget{QSEP_8c_a15}{
\index{QSEP.c@{QSEP.c}!QSEP_updateAtRecord@{QSEP\_\-updateAtRecord}}
\index{QSEP_updateAtRecord@{QSEP\_\-updateAtRecord}!QSEP.c@{QSEP.c}}
\subsubsection[QSEP\_\-updateAtRecord]{\setlength{\rightskip}{0pt plus 5cm}int QSEP\_\-update\-At\-Record (\hyperlink{struct__QSEP}{QSEP} $\ast$ {\em qsep}, const LSF\_\-record $\ast$ {\em rec})}}
\label{QSEP_8c_a15}


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}
\hypertarget{QSEP_8c_a3}{
\index{QSEP.c@{QSEP.c}!root_update@{root\_\-update}}
\index{root_update@{root\_\-update}!QSEP.c@{QSEP.c}}
\subsubsection[root\_\-update]{\setlength{\rightskip}{0pt plus 5cm}static LSF\_\-scan\-Record\-Handler root\_\-update (\hyperlink{struct__RootUpdateCtx}{Root\-Update\-Ctx} $\ast$ {\em rux}, const LSF\_\-contribution $\ast$ {\em ctb})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_a3}


Call back routine for each contribution in the root. 

\begin{Desc}
\item[Returns:]A possible record handler for this contribution\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rux}]The root update context \item[{\em ctb}]The contribution\end{description}
\end{Desc}
