\hypertarget{raw_8h}{
\section{raw.h File Reference}
\label{raw_8h}\index{raw.h@{raw.h}}
}
Definitions for the raw routines. 

{\tt \#include $<$stdio.h$>$}\par
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{raw_8h_7b4a500482493e1faf54040f62340629}{
typedef struct \hyperlink{structLSEC__raw__}{LSEC\_\-raw\_\-} \hyperlink{raw_8h_7b4a500482493e1faf54040f62340629}{LSEC\_\-raw}}
\label{raw_8h_7b4a500482493e1faf54040f62340629}

\begin{CompactList}\small\item\em Private structure holding raw data for a contribution. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{raw_8h_9f1ece4a56819e2413e12780b1798d25}{LSEC\_\-addRaw} (\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}\item 
unsigned \hyperlink{raw_8h_68a49a32c81c2406983a1c8f2d45b1cb}{LSEC\_\-checkRaw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw)
\begin{CompactList}\small\item\em Check the LSEC\_\-raw structure. \item\end{CompactList}\item 
void \hyperlink{raw_8h_ff71b2ce97385d723a8d46390bb5e923}{LSEC\_\-clearRaw} (\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_df6462c215be53110fa4c0cbbb66e717}{LSEC\_\-deleteRaw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw)
\begin{CompactList}\small\item\em Free memory associated with the LSEC\_\-raw structure. \item\end{CompactList}\item 
\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$ \hyperlink{raw_8h_8acac66659172f7ba451736fcd030612}{LSEC\_\-newRaw} (unsigned wcnt, unsigned cap)
\begin{CompactList}\small\item\em Allocate memory for an LSEC\_\-raw structure. \item\end{CompactList}\item 
unsigned char $\ast$ \hyperlink{raw_8h_26475dda19ede022a11d0ccbf450eabc}{LSEC\_\-packRaw} (\hyperlink{structLSEC__raw__}{LSEC\_\-raw} $\ast$raw, unsigned char $\ast$buf)
\begin{CompactList}\small\item\em Copy the raw data to the output buffer. \item\end{CompactList}\item 
void \hyperlink{raw_8h_ce8b1cff8f8467b80e44d6fa9f651c9b}{LSEC\_\-reportRaw} (\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}\end{CompactItemize}


\subsection{Detailed Description}
Definitions for the raw routines. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\end{Desc}


\subsection{Function Documentation}
\hypertarget{raw_8h_9f1ece4a56819e2413e12780b1798d25}{
\index{raw.h@{raw.h}!LSEC_addRaw@{LSEC\_\-addRaw}}
\index{LSEC_addRaw@{LSEC\_\-addRaw}!raw.h@{raw.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-addRaw ({\bf LSEC\_\-raw} $\ast$ {\em raw}, void $\ast$ {\em src})}}
\label{raw_8h_9f1ece4a56819e2413e12780b1798d25}


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_68a49a32c81c2406983a1c8f2d45b1cb}{
\index{raw.h@{raw.h}!LSEC_checkRaw@{LSEC\_\-checkRaw}}
\index{LSEC_checkRaw@{LSEC\_\-checkRaw}!raw.h@{raw.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-checkRaw ({\bf LSEC\_\-raw} $\ast$ {\em raw})}}
\label{raw_8h_68a49a32c81c2406983a1c8f2d45b1cb}


Check 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}
\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 \end{description}
\end{Desc}
\hypertarget{raw_8h_ff71b2ce97385d723a8d46390bb5e923}{
\index{raw.h@{raw.h}!LSEC_clearRaw@{LSEC\_\-clearRaw}}
\index{LSEC_clearRaw@{LSEC\_\-clearRaw}!raw.h@{raw.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-clearRaw ({\bf LSEC\_\-raw} $\ast$ {\em raw})}}
\label{raw_8h_ff71b2ce97385d723a8d46390bb5e923}


Clear the LSEC\_\-raw structure. 

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


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

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


Allocate memory for an LSEC\_\-raw 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, initialised, LSEC\_\-raw structure \end{Desc}
\hypertarget{raw_8h_26475dda19ede022a11d0ccbf450eabc}{
\index{raw.h@{raw.h}!LSEC_packRaw@{LSEC\_\-packRaw}}
\index{LSEC_packRaw@{LSEC\_\-packRaw}!raw.h@{raw.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ LSEC\_\-packRaw ({\bf LSEC\_\-raw} $\ast$ {\em raw}, unsigned char $\ast$ {\em buf})}}
\label{raw_8h_26475dda19ede022a11d0ccbf450eabc}


Copy the raw data to the output buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em raw}]Pointer to an allocated, initialised LSEC\_\-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_ce8b1cff8f8467b80e44d6fa9f651c9b}{
\index{raw.h@{raw.h}!LSEC_reportRaw@{LSEC\_\-reportRaw}}
\index{LSEC_reportRaw@{LSEC\_\-reportRaw}!raw.h@{raw.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-reportRaw ({\bf LSEC\_\-raw} $\ast$ {\em raw}, FILE $\ast$ {\em fp})}}
\label{raw_8h_ce8b1cff8f8467b80e44d6fa9f651c9b}


Produce a formatted ASCII summary of the structure. 

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