\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 $<$QSEP/QSEP.h$>$}\par
{\tt \#include $<$QSEP/QSEP\_\-evt0.h$>$}\par
{\tt \#include $<$QSEP\_\-pvtdef.h$>$}\par
{\tt \#include $<$QSEP\_\-ctxUpdate.h$>$}\par
{\tt \#include $<$QDFP\_\-ctx.h$>$}\par
{\tt \#include $<$QDFP\_\-evt.h$>$}\par
{\tt \#include $<$QSE/QSE\_\-ctxUpdate.h$>$}\par
{\tt \#include $<$QSP/QSP\_\-names.h$>$}\par
{\tt \#include $<$QSP/QFCP\_\-cache.h$>$}\par
{\tt \#include $<$QSD/QFC\_\-cache.h$>$}\par
{\tt \#include $<$QSD/QFR\_\-file.h$>$}\par
{\tt \#include $<$LSF/LSF\_\-scan.h$>$}\par
{\tt \#include $<$LSE/LSE\_\-ids.h$>$}\par
{\tt \#include $<$PBI/PTR.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__RootUpdateCtx}{\_\-RootUpdateCtx}
\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_bad728ceb0d7aa6d3dc908000a0ee344}{RND8}(\_\-x)~(((PTR\_\-as\_\-uint)(\_\-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_b3c5075570be8c17ea92a254aa5e0eea}{
\#define \textbf{ARND8}(\_\-x)~((void $\ast$)RND8((\_\-x)))}
\label{QSEP_8c_b3c5075570be8c17ea92a254aa5e0eea}

\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{QSEP_8c_044714d51e5f9325209df30f0d2156d3}{
typedef struct \hyperlink{struct__RootUpdateCtx}{\_\-RootUpdateCtx} \hyperlink{QSEP_8c_044714d51e5f9325209df30f0d2156d3}{RootUpdateCtx}}
\label{QSEP_8c_044714d51e5f9325209df30f0d2156d3}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__RootUpdateCtx}{\_\-RootUpdateCtx}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static LSF\_\-scanRecordHandler \hyperlink{QSEP_8c_c9c6f88c0a9eaff375ba4bb38a055e6b}{root\_\-update} (\hyperlink{struct__RootUpdateCtx}{RootUpdateCtx} $\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\_\-fileCtx $\ast$ \hyperlink{QSEP_8c_21c3fef9748734630922031be34acf7e}{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_2b9791dadfea7d11bf016a13f2951864}{qsep\_\-dtxCtx\_\-construct} (\hyperlink{struct__QSEP__dtxCtx}{QSEP\_\-dtxCtx} $\ast$dtxCtx, 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\_\-fileCtx $\ast$qfr, int depth, void $\ast$ptr)
\begin{CompactList}\small\item\em Initializes the physics application specific private context. \item\end{CompactList}\item 
static void $\ast$ \hyperlink{QSEP_8c_ff4e611f9c6a54d9a34b204c4235111d}{qsep\_\-dtxEvt\_\-construct} (\hyperlink{struct__QSEP__dtxEvt}{QSEP\_\-dtxEvt} $\ast$dtxEvt, int level, void $\ast$prm, void $\ast$ptr)
\begin{CompactList}\small\item\em Initializes the physics application specific private context. \item\end{CompactList}\item 
static \_\-\_\-inline void $\ast$ \hyperlink{QSEP_8c_a49b1d30beb9ec45b42df970ed3f1dfc}{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\_\-fileCtx $\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_21be45ece660587e104ff8e8a3f9a161}{QSEP\_\-alloc} (int resource\_\-level)
\begin{CompactList}\small\item\em Allocates and constructs the QSEP handle. \item\end{CompactList}\item 
int \hyperlink{QSEP_8c_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 
int \hyperlink{QSEP_8c_050d23b44331382944a3dd2566804a7c}{QSEP\_\-ebfSizeof} (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_f3cffbb5440b8cc943a34f16e3ba7ba4}{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_83ae58cba9ff73f10496df8263f6dc67}{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_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_8c_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_8c_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_8c_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 
const char $\ast$ \hyperlink{QSEP_8c_484f9bfcd8762fb95508e0d42810e811}{QSEP\_\-statusString} (int status)
\begin{CompactList}\small\item\em Translates a QSEP status code to a string. \item\end{CompactList}\item 
const \hyperlink{struct__QSEP__ctx}{QSEP\_\-ctx} $\ast$ \hyperlink{QSEP_8c_68b9d50123de3f48c9c52d4710175d17}{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 
const QSE\_\-ctx $\ast$ \hyperlink{QSEP_8c_226611109a2ed2cd1816f50d7dccc2f5}{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}\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.17 2011/03/29 18:49:04 russell Exp $
\end{verbatim}
\normalsize
 

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


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}


Referenced by QSEP\_\-sizeof().

\subsection{Function Documentation}
\hypertarget{QSEP_8c_21be45ece660587e104ff8e8a3f9a161}{
\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}{\bf QSEP} $\ast$ QSEP\_\-alloc (int {\em resource\_\-level})}}
\label{QSEP_8c_21be45ece660587e104ff8e8a3f9a161}


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_8c_68b9d50123de3f48c9c52d4710175d17}{
\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\_\-appCtxGet (const {\bf QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8c_68b9d50123de3f48c9c52d4710175d17}


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_8c_f3cffbb5440b8cc943a34f16e3ba7ba4}{
\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}{\bf QSEP} $\ast$ QSEP\_\-construct ({\bf QSEP} $\ast$ {\em qsep}, \/  unsigned int {\em resource\_\-level}, \/  void $\ast$ {\em prm})}}
\label{QSEP_8c_f3cffbb5440b8cc943a34f16e3ba7ba4}


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_8c_83ae58cba9ff73f10496df8263f6dc67}{
\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 ({\bf QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8c_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_8c_a49b1d30beb9ec45b42df970ed3f1dfc}{
\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 ({\bf QSEP\_\-dtx} $\ast$ {\em dtx}, \/  int {\em level}, \/  void $\ast$ {\em prm}, \/  {\bf QSEP} $\ast$ {\em qsep}, \/  {\bf QSEP\_\-ctx} $\ast$ {\em qsep\_\-ctx}, \/  QSE\_\-ctx $\ast$ {\em qse\_\-ctx}, \/  QFR\_\-fileCtx $\ast$ {\em qfr}, \/  int {\em depth}, \/  void $\ast$ {\em ptr})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_a49b1d30beb9ec45b42df970ed3f1dfc}


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}


References \_\-QSEP\_\-dtx::ctx, \_\-QSEP\_\-dtx::evt, qsep\_\-dtxCtx\_\-construct(), and qsep\_\-dtxEvt\_\-construct().

Referenced by QSEP\_\-construct().\hypertarget{QSEP_8c_2b9791dadfea7d11bf016a13f2951864}{
\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\_\-dtxCtx\_\-construct ({\bf QSEP\_\-dtxCtx} $\ast$ {\em dtxCtx}, \/  int {\em level}, \/  void $\ast$ {\em prm}, \/  {\bf QSEP} $\ast$ {\em qsep}, \/  {\bf QSEP\_\-ctx} $\ast$ {\em qsep\_\-ctx}, \/  QSE\_\-ctx $\ast$ {\em qse\_\-ctx}, \/  QFR\_\-fileCtx $\ast$ {\em qfr}, \/  int {\em depth}, \/  void $\ast$ {\em ptr})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_2b9791dadfea7d11bf016a13f2951864}


Initializes the physics application specific private context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dtxCtx}]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}


References \_\-QSEP\_\-dtxRsd::buffer, \_\-QSEP\_\-dtxCtx::cache, \_\-QSEP\_\-cacheCfg::calGains, \_\-QSEP\_\-cacheCfg::calPeds, \_\-QSEP\_\-cache::cfg, \_\-QSEP\_\-dtxCtx::files, \_\-QSEP\_\-dtxCtx::max\_\-level, \_\-QSEP\_\-dtxRsd::mbytes, \_\-QSEP\_\-dtxRsd::nbytes, \_\-QSEP\_\-dtxCtx::qdfp, QDFP\_\-ctxConstruct(), \_\-QSEP\_\-dtxCtx::qse, \_\-QSEP\_\-dtxCtx::qsep, \_\-QSEP\_\-dtxCtx::rsd, and \_\-QSEP\_\-cache::std.

Referenced by qsep\_\-dtx\_\-construct().\hypertarget{QSEP_8c_ff4e611f9c6a54d9a34b204c4235111d}{
\index{QSEP.c@{QSEP.c}!qsep\_\-dtxEvt\_\-construct@{qsep\_\-dtxEvt\_\-construct}}
\index{qsep\_\-dtxEvt\_\-construct@{qsep\_\-dtxEvt\_\-construct}!QSEP.c@{QSEP.c}}
\subsubsection[{qsep\_\-dtxEvt\_\-construct}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline void $\ast$ qsep\_\-dtxEvt\_\-construct ({\bf QSEP\_\-dtxEvt} $\ast$ {\em dtxEvt}, \/  int {\em level}, \/  void $\ast$ {\em prm}, \/  void $\ast$ {\em ptr})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_ff4e611f9c6a54d9a34b204c4235111d}


Initializes the physics application specific private context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dtxEvt}]The physics application specific private event 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 ptr}]The memory pool \end{description}
\end{Desc}


References \_\-QSEP\_\-dtxEvt::qdfp, and QDFP\_\-evtConstruct().

Referenced by qsep\_\-dtx\_\-construct().\hypertarget{QSEP_8c_050d23b44331382944a3dd2566804a7c}{
\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\_\-ebfSizeof (void)}}
\label{QSEP_8c_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_8c_de1edc589218539ec446d30625036c8f}{
\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 ({\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_8c_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_8c_21c3fef9748734630922031be34acf7e}{
\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\_\-fileCtx $\ast$ qsep\_\-file\_\-ctx\_\-get (void)\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_21c3fef9748734630922031be34acf7e}


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. 

Referenced by QSEP\_\-construct().\hypertarget{QSEP_8c_f4fcc433095a491a803eebbdc496194a}{
\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_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_8c_484f9bfcd8762fb95508e0d42810e811}{
\index{QSEP.c@{QSEP.c}!QSEP\_\-statusString@{QSEP\_\-statusString}}
\index{QSEP\_\-statusString@{QSEP\_\-statusString}!QSEP.c@{QSEP.c}}
\subsubsection[{QSEP\_\-statusString}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ QSEP\_\-statusString (int {\em status})}}
\label{QSEP_8c_484f9bfcd8762fb95508e0d42810e811}


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_8c_226611109a2ed2cd1816f50d7dccc2f5}{
\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\_\-stdCtxGet (const {\bf QSEP} $\ast$ {\em qsep})}}
\label{QSEP_8c_226611109a2ed2cd1816f50d7dccc2f5}


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_8c_249c9323b6b06ff836aab39c4227cf4f}{
\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\_\-updateAtContribution ({\bf QSEP} $\ast$ {\em qsep}, \/  const LSF\_\-contribution $\ast$ {\em ctb})}}
\label{QSEP_8c_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_8c_4d7e81ec28da11fdd4e2bb76ecfe4394}{
\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\_\-updateAtDatagram ({\bf QSEP} $\ast$ {\em qsep}, \/  const LSF\_\-datagram $\ast$ {\em dgm})}}
\label{QSEP_8c_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_8c_4b69a59477cf2bbd34dd29e400903907}{
\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\_\-updateAtRecord ({\bf QSEP} $\ast$ {\em qsep}, \/  const LSF\_\-record $\ast$ {\em rec})}}
\label{QSEP_8c_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.\hypertarget{QSEP_8c_c9c6f88c0a9eaff375ba4bb38a055e6b}{
\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\_\-scanRecordHandler root\_\-update ({\bf RootUpdateCtx} $\ast$ {\em rux}, \/  const LSF\_\-contribution $\ast$ {\em ctb})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSEP_8c_c9c6f88c0a9eaff375ba4bb38a055e6b}


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}


References \_\-QSEP::atx, \_\-RootUpdateCtx::chg, \_\-QSEP::ctx, \_\-RootUpdateCtx::flags, \_\-RootUpdateCtx::qsep, QSEP\_\-ctxUpdateAtRoot(), and \_\-RootUpdateCtx::tim.

Referenced by QSEP\_\-updateAtDatagram().