\hypertarget{raw_8h}{
\section{raw.h File Reference}
\label{raw_8h}\index{raw.h@{raw.h}}
}
Declaration of the routines use for raw (uncompressed) data. 

{\tt \#include $<$stdio.h$>$}\par


Include dependency graph for raw.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=83pt]{raw_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=150pt]{raw_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{raw_8h_a0}{
typedef \hyperlink{structLSEC__raw__}{LSEC\_\-raw\_\-} \hyperlink{raw_8h_a0}{LSEC\_\-raw}}
\label{raw_8h_a0}

\begin{CompactList}\small\item\em Private structure holding raw data for a contribution. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$ \hyperlink{raw_8h_a1}{LSEC\_\-new\-Raw} (unsigned wcnt, unsigned cap)
\begin{CompactList}\small\item\em Allocate memory for an LSEC\_\-acd\-Count structure. \item\end{CompactList}\item 
void \hyperlink{raw_8h_a2}{LSEC\_\-delete\-Raw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw)
\begin{CompactList}\small\item\em Free memory associated with the LSEC\_\-raw structure. \item\end{CompactList}\item 
void \hyperlink{raw_8h_a3}{LSEC\_\-clear\-Raw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw)
\begin{CompactList}\small\item\em Clear the LSEC\_\-raw structure. \item\end{CompactList}\item 
void \hyperlink{raw_8h_a4}{LSEC\_\-report\-Raw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw, FILE $\ast$fp)
\begin{CompactList}\small\item\em Produce a formatted ASCII summary of the structure. \item\end{CompactList}\item 
unsigned \hyperlink{raw_8h_a5}{LSEC\_\-check\-Raw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw)
\begin{CompactList}\small\item\em Clear the LSEC\_\-raw structure. \item\end{CompactList}\item 
unsigned char $\ast$ \hyperlink{raw_8h_a6}{LSEC\_\-pack\-Raw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw, unsigned char $\ast$buf)
\begin{CompactList}\small\item\em Copy the raw portion of the current event contribution to the output buffer. \item\end{CompactList}\item 
void \hyperlink{raw_8h_a7}{LSEC\_\-add\-Raw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw, void $\ast$src)
\begin{CompactList}\small\item\em Place the data in the next free slot. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Declaration of the routines use for raw (uncompressed) data. 

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


\subsection{Function Documentation}
\hypertarget{raw_8h_a7}{
\index{raw.h@{raw.h}!LSEC_addRaw@{LSEC\_\-addRaw}}
\index{LSEC_addRaw@{LSEC\_\-addRaw}!raw.h@{raw.h}}
\subsubsection[LSEC\_\-addRaw]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-add\-Raw (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$ {\em raw}, void $\ast$ {\em src})}}
\label{raw_8h_a7}


Place the data in the next free slot. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em raw}]Pointer to an allocated, initialised, LSEC\_\-raw structure \item[{\em src}]Pointer to the data to be added to this structure\end{description}
\end{Desc}
\hypertarget{raw_8h_a5}{
\index{raw.h@{raw.h}!LSEC_checkRaw@{LSEC\_\-checkRaw}}
\index{LSEC_checkRaw@{LSEC\_\-checkRaw}!raw.h@{raw.h}}
\subsubsection[LSEC\_\-checkRaw]{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-check\-Raw (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$ {\em raw})}}
\label{raw_8h_a5}


Clear the LSEC\_\-raw structure. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LSEC\_\-SUCCESS}]If there were no errors filling this structure \item[{\em LSEC\_\-RAWOVER}]If there was an attempt to add more entries than this structure can hold @param raw Pointer to an allocated, initialise, LSEC\_\-raw structure\end{description}
\end{Desc}
\hypertarget{raw_8h_a3}{
\index{raw.h@{raw.h}!LSEC_clearRaw@{LSEC\_\-clearRaw}}
\index{LSEC_clearRaw@{LSEC\_\-clearRaw}!raw.h@{raw.h}}
\subsubsection[LSEC\_\-clearRaw]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-clear\-Raw (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$ {\em raw})}}
\label{raw_8h_a3}


Clear the LSEC\_\-raw structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em raw}]Pointer to an allocated, initialise, LSEC\_\-raw structure\end{description}
\end{Desc}
\hypertarget{raw_8h_a2}{
\index{raw.h@{raw.h}!LSEC_deleteRaw@{LSEC\_\-deleteRaw}}
\index{LSEC_deleteRaw@{LSEC\_\-deleteRaw}!raw.h@{raw.h}}
\subsubsection[LSEC\_\-deleteRaw]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-delete\-Raw (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$ {\em raw})}}
\label{raw_8h_a2}


Free memory associated with the LSEC\_\-raw structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em raw}]Pointer to an allocated, initialise, LSEC\_\-raw structure\end{description}
\end{Desc}
\hypertarget{raw_8h_a1}{
\index{raw.h@{raw.h}!LSEC_newRaw@{LSEC\_\-newRaw}}
\index{LSEC_newRaw@{LSEC\_\-newRaw}!raw.h@{raw.h}}
\subsubsection[LSEC\_\-newRaw]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{structLSEC__raw__}{LSEC\_\-raw}$\ast$ LSEC\_\-new\-Raw (unsigned {\em wcnt}, unsigned {\em cap})}}
\label{raw_8h_a1}


Allocate memory for an LSEC\_\-acd\-Count structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wcnt}]Number of words in the data stored for each event \item[{\em cap}]Capacity of the calibration task, the maximum number of events that can be collected each cycle \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to an allocated, initialise, LSEC\_\-acd\-Count structure\end{Desc}
\hypertarget{raw_8h_a6}{
\index{raw.h@{raw.h}!LSEC_packRaw@{LSEC\_\-packRaw}}
\index{LSEC_packRaw@{LSEC\_\-packRaw}!raw.h@{raw.h}}
\subsubsection[LSEC\_\-packRaw]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ LSEC\_\-pack\-Raw (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$ {\em raw}, unsigned char $\ast$ {\em buf})}}
\label{raw_8h_a6}


Copy the raw portion of the current event contribution to the output buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em raw}]Pointer to an allocated, initialised ACD raw structure \item[{\em buf}]Pointer to the buffer where the context should be placed \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to the next output location to be filled.\end{Desc}
\hypertarget{raw_8h_a4}{
\index{raw.h@{raw.h}!LSEC_reportRaw@{LSEC\_\-reportRaw}}
\index{LSEC_reportRaw@{LSEC\_\-reportRaw}!raw.h@{raw.h}}
\subsubsection[LSEC\_\-reportRaw]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-report\-Raw (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$ {\em raw}, FILE $\ast$ {\em fp})}}
\label{raw_8h_a4}


Produce a formatted ASCII summary of the structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em raw}]Pointer to an allocated, initialise, LSEC\_\-raw structure \item[{\em fp}]Pointer to file to send the report\end{description}
\end{Desc}
