\hypertarget{QSTD_8h}{
\section{QSTD.h File Reference}
\label{QSTD_8h}\index{QSTD.h@{QSTD.h}}
}
Interface to the Science Statistics for Physics datagrams. 



This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=157pt]{QSTD_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{QSTD_8h_a0}{
typedef \hyperlink{struct__QSTD}{\_\-QSTD} {\bf QSTD}}
\label{QSTD_8h_a0}

\item 
\hypertarget{QSTD_8h_a1}{
typedef \hyperlink{struct__QSTD__ctx}{\_\-QSTD\_\-ctx} {\bf QSTD\_\-ctx}}
\label{QSTD_8h_a1}

\item 
\hypertarget{QSTD_8h_a2}{
typedef \_\-LSF\_\-datagram {\bf LSF\_\-datagram}}
\label{QSTD_8h_a2}

\item 
\hypertarget{QSTD_8h_a3}{
typedef \_\-LSF\_\-contribution {\bf LSF\_\-contribution}}
\label{QSTD_8h_a3}

\item 
\hypertarget{QSTD_8h_a4}{
typedef \_\-LSF\_\-record {\bf LSF\_\-record}}
\label{QSTD_8h_a4}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{struct__QSTD}{QSTD} $\ast$ \hyperlink{QSTD_8h_a5}{QSTD\_\-alloc} (void $\ast$must\_\-be\_\-null)
\begin{CompactList}\small\item\em Allocates and constructs a QSTD handle. \item\end{CompactList}\item 
const LSF\_\-contribution $\ast$ \hyperlink{QSTD_8h_a6}{QSTD\_\-update\-At\-Datagram} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, const LSF\_\-datagram $\ast$dgm)
\begin{CompactList}\small\item\em Updates the context at datagram time. \item\end{CompactList}\item 
int \hyperlink{QSTD_8h_a7}{QSTD\_\-update\-At\-Contribution} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, const LSF\_\-contribution $\ast$ctb)
\begin{CompactList}\small\item\em Updates the context at datagram time. \item\end{CompactList}\item 
int \hyperlink{QSTD_8h_a8}{QSTD\_\-update\-At\-Record} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, const LSF\_\-record $\ast$rec)
\begin{CompactList}\small\item\em Updates the context at record time. \item\end{CompactList}\item 
void \hyperlink{QSTD_8h_a9}{QSTD\_\-destruct} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd)
\begin{CompactList}\small\item\em The destructor for a QSTD control structure. \item\end{CompactList}\item 
const \hyperlink{struct__QSTD__ctx}{QSTD\_\-ctx} $\ast$ \hyperlink{QSTD_8h_a10}{QSTD\_\-ctx\-Get} (const \hyperlink{struct__QSTD}{QSTD} $\ast$qstd)
\begin{CompactList}\small\item\em Locates the statistics context (meta-data). \item\end{CompactList}\item 
int \hyperlink{QSTD_8h_a11}{QSTD\_\-sizeof} (void $\ast$must\_\-be\_\-null)
\begin{CompactList}\small\item\em Returns the size, in bytes, of a QSTD control structure. \item\end{CompactList}\item 
\hyperlink{struct__QSTD}{QSTD} $\ast$ \hyperlink{QSTD_8h_a12}{QSTD\_\-construct} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, void $\ast$must\_\-be\_\-null)
\begin{CompactList}\small\item\em The constructor for a QSTD control structure. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Interface to the Science Statistics for Physics datagrams. 

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


\footnotesize\begin{verbatim}   CVS $Id: QSTD.h,v 1.1 2008/06/10 22:25:45 russell Exp $
\end{verbatim}
\normalsize


\subsection{Function Documentation}
\hypertarget{QSTD_8h_a5}{
\index{QSTD.h@{QSTD.h}!QSTD_alloc@{QSTD\_\-alloc}}
\index{QSTD_alloc@{QSTD\_\-alloc}!QSTD.h@{QSTD.h}}
\subsubsection[QSTD\_\-alloc]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__QSTD}{QSTD}$\ast$ QSTD\_\-alloc (void $\ast$ {\em must\_\-be\_\-null})}}
\label{QSTD_8h_a5}


Allocates and constructs a QSTD handle. 

\begin{Desc}
\item[Returns:]Pointer to the allocated handle\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em must\_\-be\_\-null}]Reserved for future use.\end{description}
\end{Desc}
\hypertarget{QSTD_8h_a12}{
\index{QSTD.h@{QSTD.h}!QSTD_construct@{QSTD\_\-construct}}
\index{QSTD_construct@{QSTD\_\-construct}!QSTD.h@{QSTD.h}}
\subsubsection[QSTD\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__QSTD}{QSTD}$\ast$ QSTD\_\-construct (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, void $\ast$ {\em must\_\-be\_\-null})}}
\label{QSTD_8h_a12}


The constructor for a QSTD control structure. 

\begin{Desc}
\item[Returns:]Pointer to the QSTD control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The control structure to be constructed. If NULL, a control structure will be allocated \item[{\em must\_\-be\_\-null}]Reserved for future use.\end{description}
\end{Desc}
\hypertarget{QSTD_8h_a10}{
\index{QSTD.h@{QSTD.h}!QSTD_ctxGet@{QSTD\_\-ctxGet}}
\index{QSTD_ctxGet@{QSTD\_\-ctxGet}!QSTD.h@{QSTD.h}}
\subsubsection[QSTD\_\-ctxGet]{\setlength{\rightskip}{0pt plus 5cm}const \hyperlink{struct__QSTD__ctx}{QSTD\_\-ctx}$\ast$ QSTD\_\-ctx\-Get (const \hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd})}}
\label{QSTD_8h_a10}


Locates the statistics context (meta-data). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The statistics context\end{description}
\end{Desc}
\hypertarget{QSTD_8h_a9}{
\index{QSTD.h@{QSTD.h}!QSTD_destruct@{QSTD\_\-destruct}}
\index{QSTD_destruct@{QSTD\_\-destruct}!QSTD.h@{QSTD.h}}
\subsubsection[QSTD\_\-destruct]{\setlength{\rightskip}{0pt plus 5cm}void QSTD\_\-destruct (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd})}}
\label{QSTD_8h_a9}


The destructor for a QSTD control structure. 

\begin{Desc}
\item[Returns:]Pointer to the QSS control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The control structure to be destructed.\end{description}
\end{Desc}
\hypertarget{QSTD_8h_a11}{
\index{QSTD.h@{QSTD.h}!QSTD_sizeof@{QSTD\_\-sizeof}}
\index{QSTD_sizeof@{QSTD\_\-sizeof}!QSTD.h@{QSTD.h}}
\subsubsection[QSTD\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}int QSTD\_\-sizeof (void $\ast$ {\em must\_\-be\_\-null})}}
\label{QSTD_8h_a11}


Returns the size, in bytes, of a QSTD control structure. 

\begin{Desc}
\item[Returns:]The size, in bytes, of a QSTD control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em must\_\-be\_\-null}]Parameter reserved for future use\end{description}
\end{Desc}
\hypertarget{QSTD_8h_a7}{
\index{QSTD.h@{QSTD.h}!QSTD_updateAtContribution@{QSTD\_\-updateAtContribution}}
\index{QSTD_updateAtContribution@{QSTD\_\-updateAtContribution}!QSTD.h@{QSTD.h}}
\subsubsection[QSTD\_\-updateAtContribution]{\setlength{\rightskip}{0pt plus 5cm}int QSTD\_\-update\-At\-Contribution (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, const LSF\_\-contribution $\ast$ {\em ctb})}}
\label{QSTD_8h_a7}


Updates the context at datagram time. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em If}]have a statistics sample contribution, the number of records in the contribution. \item[{\em $>$0,if}]have a record contributor \item[{\em =0,if}]have the contribution context \item[{\em -1,if}]unrecognized\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The statistics context to update. \item[{\em ctb}]The statistics contribution\end{description}
\end{Desc}
\hypertarget{QSTD_8h_a6}{
\index{QSTD.h@{QSTD.h}!QSTD_updateAtDatagram@{QSTD\_\-updateAtDatagram}}
\index{QSTD_updateAtDatagram@{QSTD\_\-updateAtDatagram}!QSTD.h@{QSTD.h}}
\subsubsection[QSTD\_\-updateAtDatagram]{\setlength{\rightskip}{0pt plus 5cm}const LSF\_\-contribution$\ast$ QSTD\_\-update\-At\-Datagram (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, const LSF\_\-datagram $\ast$ {\em dgm})}}
\label{QSTD_8h_a6}


Updates the context at datagram time. 

\begin{Desc}
\item[Returns:]The contribution to resume processsing at\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The statistics context to update. \item[{\em dgm}]The statistics datagram\end{description}
\end{Desc}
\hypertarget{QSTD_8h_a8}{
\index{QSTD.h@{QSTD.h}!QSTD_updateAtRecord@{QSTD\_\-updateAtRecord}}
\index{QSTD_updateAtRecord@{QSTD\_\-updateAtRecord}!QSTD.h@{QSTD.h}}
\subsubsection[QSTD\_\-updateAtRecord]{\setlength{\rightskip}{0pt plus 5cm}int QSTD\_\-update\-At\-Record (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, const LSF\_\-record $\ast$ {\em rec})}}
\label{QSTD_8h_a8}


Updates the context at record time. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Non-negative}]values indicate are one of the QSTD\_\-type's \item[{\em Negative}]values indicate an unsuccessful update\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The statistics context to update. \item[{\em rec}]The statistics record\end{description}
\end{Desc}
