\hypertarget{compact_8h}{
\section{compact.h File Reference}
\label{compact_8h}\index{compact.h@{compact.h}}
}
Definitions for the compaction implementation. 

{\tt \#include \char`\"{}EDS/EBF\_\-dir.h\char`\"{}}\par
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{compact_8h_8c827d57d99e0d33da2cdc2a172b3afd}{
typedef struct \hyperlink{structLSEC__compaction__}{LSEC\_\-compaction\_\-} \hyperlink{compact_8h_8c827d57d99e0d33da2cdc2a172b3afd}{LSEC\_\-compaction}}
\label{compact_8h_8c827d57d99e0d33da2cdc2a172b3afd}

\begin{CompactList}\small\item\em Declaration of the opaque compaction structure. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{compact_8h_bb3b0beb8524195cdbc136bc1aa8116f}{LSEC\_\-calculateCalMeans} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Calculate the mean value for each CAL log end. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8h_ba8e4495cf14f207a12aa8dc5b39de20}{LSEC\_\-checkCompaction} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Check the substructures for errors. \item\end{CompactList}\item 
void \hyperlink{compact_8h_2534dca9853d6f872aedd9bbfb1b8d10}{LSEC\_\-clearCompaction} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Clear away any context from a previous cycle. \item\end{CompactList}\item 
unsigned int $\ast$ \hyperlink{compact_8h_f436152d95707c0a441467eff5c86fc5}{LSEC\_\-consignEvt} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, unsigned int $\ast$buf)
\begin{CompactList}\small\item\em Copy a single encoded event into the datagram. \item\end{CompactList}\item 
unsigned int $\ast$ \hyperlink{compact_8h_3b22e35c1d567be1904e6baeb2e32479}{LSEC\_\-consignUser} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, unsigned int $\ast$buf)
\begin{CompactList}\small\item\em Pack the tables against which the events will be encoded into the buffer. \item\end{CompactList}\item 
void \hyperlink{compact_8h_753b278be9f96d3e9959de513c29a41b}{LSEC\_\-deleteCompaction} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Free memory previously allocated with a call to LSEC\_\-newCompaction. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8h_bfc5ae69372a2b1c3119f21a3ec02251}{LSEC\_\-encode} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Encode the next event from the collection. \item\end{CompactList}\item 
void \hyperlink{compact_8h_d3b90f000c568523a5e496e77e09cbb5}{LSEC\_\-getTimes} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, int clear, long long $\ast$clr\_\-time, long long $\ast$hcm\_\-time, long long $\ast$hst\_\-time, long long $\ast$enc\_\-time, long long $\ast$csu\_\-time, long long $\ast$cns\_\-time)
\begin{CompactList}\small\item\em Get the processing times for the various compaction stages. \item\end{CompactList}\item 
void \hyperlink{compact_8h_3480d9fc98f55b82c5811e513d0d07e4}{LSEC\_\-histogramAcd} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Perform histogramming for ACD calibration. \item\end{CompactList}\item 
void \hyperlink{compact_8h_c48d9b0ec401ef77775a2131f0e7ae33}{LSEC\_\-histogramCal} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Perform histogramming for CAL calibration. \item\end{CompactList}\item 
void \hyperlink{compact_8h_9ad5beb79389833793a1c71e48da12a9}{LSEC\_\-histogramCalMeans} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Obtain the means of the CAL log values. \item\end{CompactList}\item 
void \hyperlink{compact_8h_87f2d63d042229fb89097db0f5736848}{LSEC\_\-histogramTkr} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Perform histogramming for TKR calibration. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8h_629ddd879f33d23518227b215ad58feb}{LSEC\_\-monitorCompaction} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, unsigned mon)
\begin{CompactList}\small\item\em Set the monitoring level for the compaction. \item\end{CompactList}\item 
\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$ \hyperlink{compact_8h_8755503986321b011835c732be8db141}{LSEC\_\-newCompaction} (unsigned cap)
\begin{CompactList}\small\item\em Allocate memory for an LSEC\_\-compaction structure and all the substructures. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8h_2b3459e628842464e741979543fb64e9}{LSEC\_\-processAcd} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Process ACD compaction data. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8h_cd7e5ca5f12bfed824d2a1c277c1862c}{LSEC\_\-processCal} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Process the CAL compression structures. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8h_1777b908b79e7be0d3497c04bab62f33}{LSEC\_\-processTkr} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Process the TKR compression structures. \item\end{CompactList}\item 
void \hyperlink{compact_8h_b5833033daea1d8a41bea28bf9028835}{LSEC\_\-setFourRange} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, unsigned range)
\begin{CompactList}\small\item\em Set the four-range value. \item\end{CompactList}\item 
void \hyperlink{compact_8h_e6fb1b57cc3de2ec1291450bc9519b7d}{LSEC\_\-setMode} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc, unsigned mode)
\begin{CompactList}\small\item\em Set the calibration mode. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8h_5f608fe7a4ffa6c5cb125827607082b8}{LSEC\_\-sizeofUser32} (\hyperlink{structLSEC__compaction__}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Calculate the number of 32-bit words required to hold tables against which the events will be encoded. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Definitions for the compaction implementation. 

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


\subsection{Function Documentation}
\hypertarget{compact_8h_bb3b0beb8524195cdbc136bc1aa8116f}{
\index{compact.h@{compact.h}!LSEC_calculateCalMeans@{LSEC\_\-calculateCalMeans}}
\index{LSEC_calculateCalMeans@{LSEC\_\-calculateCalMeans}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-calculateCalMeans ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8h_bb3b0beb8524195cdbc136bc1aa8116f}


Calculate the mean value for each CAL log end. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to an LSEC\_\-compaction structure \end{description}
\end{Desc}
\hypertarget{compact_8h_ba8e4495cf14f207a12aa8dc5b39de20}{
\index{compact.h@{compact.h}!LSEC_checkCompaction@{LSEC\_\-checkCompaction}}
\index{LSEC_checkCompaction@{LSEC\_\-checkCompaction}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-checkCompaction ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8h_ba8e4495cf14f207a12aa8dc5b39de20}


Check the substructures for errors. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to a compaction object\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The last error from the first substrcture to be found in error or LSEC\_\-SUCCESS if there are no errors. \end{Desc}
\hypertarget{compact_8h_2534dca9853d6f872aedd9bbfb1b8d10}{
\index{compact.h@{compact.h}!LSEC_clearCompaction@{LSEC\_\-clearCompaction}}
\index{LSEC_clearCompaction@{LSEC\_\-clearCompaction}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-clearCompaction ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8h_2534dca9853d6f872aedd9bbfb1b8d10}


Clear away any context from a previous cycle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to a compaction object \end{description}
\end{Desc}
\hypertarget{compact_8h_f436152d95707c0a441467eff5c86fc5}{
\index{compact.h@{compact.h}!LSEC_consignEvt@{LSEC\_\-consignEvt}}
\index{LSEC_consignEvt@{LSEC\_\-consignEvt}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int$\ast$ LSEC\_\-consignEvt ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, unsigned int $\ast$ {\em buf})}}
\label{compact_8h_f436152d95707c0a441467eff5c86fc5}


Copy a single encoded event into the datagram. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to the compaction structure holding the encoded event\item[{\em buf}]Pointer to the location to place the encoded event\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to the next output location \end{Desc}
\hypertarget{compact_8h_3b22e35c1d567be1904e6baeb2e32479}{
\index{compact.h@{compact.h}!LSEC_consignUser@{LSEC\_\-consignUser}}
\index{LSEC_consignUser@{LSEC\_\-consignUser}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int$\ast$ LSEC\_\-consignUser ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, unsigned int $\ast$ {\em buf})}}
\label{compact_8h_3b22e35c1d567be1904e6baeb2e32479}


Pack the tables against which the events will be encoded into the buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]Pointer to the buffer where the context should be placed.\item[{\em cpc}]Pointer to the structure containing the tables (a compaction)\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to the next output location to be filled. \end{Desc}
\hypertarget{compact_8h_753b278be9f96d3e9959de513c29a41b}{
\index{compact.h@{compact.h}!LSEC_deleteCompaction@{LSEC\_\-deleteCompaction}}
\index{LSEC_deleteCompaction@{LSEC\_\-deleteCompaction}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-deleteCompaction ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8h_753b278be9f96d3e9959de513c29a41b}


Free memory previously allocated with a call to LSEC\_\-newCompaction. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to a compaction structure previously created by a call to LSEC\_\-newCompaction \end{description}
\end{Desc}
\hypertarget{compact_8h_bfc5ae69372a2b1c3119f21a3ec02251}{
\index{compact.h@{compact.h}!LSEC_encode@{LSEC\_\-encode}}
\index{LSEC_encode@{LSEC\_\-encode}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-encode ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})}}
\label{compact_8h_bfc5ae69372a2b1c3119f21a3ec02251}


Encode the next event from the collection. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to an LSEC\_\-compaction structure\item[{\em dir}]Pointer to the event to encode\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Size of the compressed event, or 0 if there is an error \end{Desc}
\hypertarget{compact_8h_d3b90f000c568523a5e496e77e09cbb5}{
\index{compact.h@{compact.h}!LSEC_getTimes@{LSEC\_\-getTimes}}
\index{LSEC_getTimes@{LSEC\_\-getTimes}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-getTimes ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, int {\em clear}, long long $\ast$ {\em clr\_\-time}, long long $\ast$ {\em hcm\_\-time}, long long $\ast$ {\em hst\_\-time}, long long $\ast$ {\em enc\_\-time}, long long $\ast$ {\em csu\_\-time}, long long $\ast$ {\em cns\_\-time})}}
\label{compact_8h_d3b90f000c568523a5e496e77e09cbb5}


Get the processing times for the various compaction stages. 

This routine returns eight different processing times associated with the compaction of the event data. If any of these times is not needed, its receiving address may be specified as NULL.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to an initialised compaction\item[{\em clear}]TRUE if the times are to be cleared after being copied.\item[{\em clr\_\-time}]The address of a variable to receive the accumulated time taken to clear compaction data.\item[{\em hcm\_\-time}]The address of a variable to receive the accumulated time taken to process CAL means histograms.\item[{\em hst\_\-time}]The address of a variable to receive the accumulated time taken to process data histograms.\item[{\em enc\_\-time}]The address of a variable to receive the accumulated time taken to encode the data.\item[{\em csu\_\-time}]The address of a variable to receive the accumulated time taken to consign the user context data.\item[{\em cns\_\-time}]The address of a variable to receive the accumulated time taken to consign the event data.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The previous monitoring level. \end{Desc}
\hypertarget{compact_8h_3480d9fc98f55b82c5811e513d0d07e4}{
\index{compact.h@{compact.h}!LSEC_histogramAcd@{LSEC\_\-histogramAcd}}
\index{LSEC_histogramAcd@{LSEC\_\-histogramAcd}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-histogramAcd ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})}}
\label{compact_8h_3480d9fc98f55b82c5811e513d0d07e4}


Perform histogramming for ACD calibration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em dir}]Pointer to a directory of the event \end{description}
\end{Desc}
\hypertarget{compact_8h_c48d9b0ec401ef77775a2131f0e7ae33}{
\index{compact.h@{compact.h}!LSEC_histogramCal@{LSEC\_\-histogramCal}}
\index{LSEC_histogramCal@{LSEC\_\-histogramCal}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-histogramCal ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})}}
\label{compact_8h_c48d9b0ec401ef77775a2131f0e7ae33}


Perform histogramming for CAL calibration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em dir}]Pointer to a directory of the event \end{description}
\end{Desc}
\hypertarget{compact_8h_9ad5beb79389833793a1c71e48da12a9}{
\index{compact.h@{compact.h}!LSEC_histogramCalMeans@{LSEC\_\-histogramCalMeans}}
\index{LSEC_histogramCalMeans@{LSEC\_\-histogramCalMeans}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-histogramCalMeans ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})}}
\label{compact_8h_9ad5beb79389833793a1c71e48da12a9}


Obtain the means of the CAL log values. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em dir}]Pointer to the event to analyse \end{description}
\end{Desc}
\hypertarget{compact_8h_87f2d63d042229fb89097db0f5736848}{
\index{compact.h@{compact.h}!LSEC_histogramTkr@{LSEC\_\-histogramTkr}}
\index{LSEC_histogramTkr@{LSEC\_\-histogramTkr}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-histogramTkr ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, EBF\_\-dir $\ast$ {\em dir})}}
\label{compact_8h_87f2d63d042229fb89097db0f5736848}


Perform histogramming for TKR calibration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em dir}]Pointer to a directory of the event \end{description}
\end{Desc}
\hypertarget{compact_8h_629ddd879f33d23518227b215ad58feb}{
\index{compact.h@{compact.h}!LSEC_monitorCompaction@{LSEC\_\-monitorCompaction}}
\index{LSEC_monitorCompaction@{LSEC\_\-monitorCompaction}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-monitorCompaction ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, unsigned {\em mon})}}
\label{compact_8h_629ddd879f33d23518227b215ad58feb}


Set the monitoring level for the compaction. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to an initialised compaction\item[{\em mon}]Monitoring level to set\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The previous monitoring level. \end{Desc}
\hypertarget{compact_8h_8755503986321b011835c732be8db141}{
\index{compact.h@{compact.h}!LSEC_newCompaction@{LSEC\_\-newCompaction}}
\index{LSEC_newCompaction@{LSEC\_\-newCompaction}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf LSEC\_\-compaction}$\ast$ LSEC\_\-newCompaction (unsigned {\em cap})}}
\label{compact_8h_8755503986321b011835c732be8db141}


Allocate memory for an LSEC\_\-compaction structure and all the substructures. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\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\_\-compaction structure \end{Desc}
\hypertarget{compact_8h_2b3459e628842464e741979543fb64e9}{
\index{compact.h@{compact.h}!LSEC_processAcd@{LSEC\_\-processAcd}}
\index{LSEC_processAcd@{LSEC\_\-processAcd}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-processAcd ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8h_2b3459e628842464e741979543fb64e9}


Process ACD compaction data. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to an LSEC\_\-compaction structure \end{description}
\end{Desc}
\hypertarget{compact_8h_cd7e5ca5f12bfed824d2a1c277c1862c}{
\index{compact.h@{compact.h}!LSEC_processCal@{LSEC\_\-processCal}}
\index{LSEC_processCal@{LSEC\_\-processCal}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-processCal ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8h_cd7e5ca5f12bfed824d2a1c277c1862c}


Process the CAL compression structures. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to an LSEC\_\-compaction structure \end{description}
\end{Desc}
\hypertarget{compact_8h_1777b908b79e7be0d3497c04bab62f33}{
\index{compact.h@{compact.h}!LSEC_processTkr@{LSEC\_\-processTkr}}
\index{LSEC_processTkr@{LSEC\_\-processTkr}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-processTkr ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8h_1777b908b79e7be0d3497c04bab62f33}


Process the TKR compression structures. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to an LSEC\_\-compaction structure \end{description}
\end{Desc}
\hypertarget{compact_8h_b5833033daea1d8a41bea28bf9028835}{
\index{compact.h@{compact.h}!LSEC_setFourRange@{LSEC\_\-setFourRange}}
\index{LSEC_setFourRange@{LSEC\_\-setFourRange}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-setFourRange ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, unsigned {\em range})}}
\label{compact_8h_b5833033daea1d8a41bea28bf9028835}


Set the four-range value. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to a compaction structure\item[{\em range}]Flag indicating 4-range or auto-range \end{description}
\end{Desc}
\hypertarget{compact_8h_e6fb1b57cc3de2ec1291450bc9519b7d}{
\index{compact.h@{compact.h}!LSEC_setMode@{LSEC\_\-setMode}}
\index{LSEC_setMode@{LSEC\_\-setMode}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-setMode ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, unsigned {\em mode})}}
\label{compact_8h_e6fb1b57cc3de2ec1291450bc9519b7d}


Set the calibration mode. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to a compaction structure\item[{\em mode}]The calibration mode \end{description}
\end{Desc}
\hypertarget{compact_8h_5f608fe7a4ffa6c5cb125827607082b8}{
\index{compact.h@{compact.h}!LSEC_sizeofUser32@{LSEC\_\-sizeofUser32}}
\index{LSEC_sizeofUser32@{LSEC\_\-sizeofUser32}!compact.h@{compact.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-sizeofUser32 ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8h_5f608fe7a4ffa6c5cb125827607082b8}


Calculate the number of 32-bit words required to hold tables against which the events will be encoded. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to the compaction structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of 32-bit words required to hold the context information \end{Desc}
