\hypertarget{compact_8c}{
\section{compact.c File Reference}
\label{compact_8c}\index{compact.c@{compact.c}}
}
Compaction implementation.  


{\tt \#include $<$compact.h$>$}\par
{\tt \#include $<$compress.ic$>$}\par
{\tt \#include $<$LSEC\_\-p.h$>$}\par
{\tt \#include $<$LSEC/LSEC.h$>$}\par
{\tt \#include $<$LSEC/LSEC\_\-ctx.h$>$}\par
{\tt \#include $<$LSEC/LSEC\_\-msgs.h$>$}\par
{\tt \#include $<$LDT/APE.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-cid.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-cal.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-tem.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-tkr.h$>$}\par
{\tt \#include $<$PBS/MBA.h$>$}\par
{\tt \#include $<$PBS/WCT.h$>$}\par
{\tt \#include $<$MSG/MSG\_\-pubdefs.h$>$}\par
{\tt \#include $<$string.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{compact_8c_2497a6a55b982f532e1f1d62026ee238}{LSEC\_\-accumCalMeans} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc, unsigned int $\ast$evt, EBF\_\-dir $\ast$dir)
\begin{CompactList}\small\item\em Accumulate the means of the CAL log end values. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8c_e760d6eca316833473004067728d0cef}{LSEC\_\-checkCalCompaction} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Check the CAL substructure for errors. \item\end{CompactList}\item 
void \hyperlink{compact_8c_d46ec4af8dbe678e74f381b54100ebf6}{LSEC\_\-clearCalCompaction} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Clear away any CAL context from a previous cycle. \item\end{CompactList}\item 
unsigned int $\ast$ \hyperlink{compact_8c_458aca8f5906914ffc8dc95cec6b388e}{LSEC\_\-copyUser} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc, unsigned int $\ast$buf)
\begin{CompactList}\small\item\em Copy datagram header information into the buffer. \item\end{CompactList}\item 
void \hyperlink{compact_8c_753b278be9f96d3e9959de513c29a41b}{LSEC\_\-deleteCompaction} (\hyperlink{struct__LSEC__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 int \hyperlink{compact_8c_dec1994cc7ebe5bab7505f67d1f042ed}{LSEC\_\-eventSizeCal} (const \hyperlink{struct__LSEC__calEvent}{LSEC\_\-calEvent} $\ast$event)
\begin{CompactList}\small\item\em Get the size of a saved CAL event. \item\end{CompactList}\item 
EBF\_\-ctb $\ast$ \hyperlink{compact_8c_461a5ccab59c449ab800b9c043b6c1df}{LSEC\_\-gemContribCal} (const \hyperlink{struct__LSEC__calEvent}{LSEC\_\-calEvent} $\ast$event)
\begin{CompactList}\small\item\em Get the GEM contribution address from a saved CAL event. \item\end{CompactList}\item 
void \hyperlink{compact_8c_9587749584d245871b12b5f37a7886c8}{LSEC\_\-histoCalMeans} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Calculate and histogram the mean values for the CAL log ends. \item\end{CompactList}\item 
void \hyperlink{compact_8c_392d4d9eab9e75d9e9824d8a0beedfbc}{LSEC\_\-histogramCal} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc, \hyperlink{struct__LSEC__calEvent}{LSEC\_\-calEvent} $\ast$event)
\begin{CompactList}\small\item\em Perform histogramming of the CAL data. \item\end{CompactList}\item 
\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$ \hyperlink{compact_8c_e73dd63c04ff84a21a9eb1a6ae072851}{LSEC\_\-newCompaction} (unsigned cap, long long $\ast$times)
\begin{CompactList}\small\item\em Allocate memory for an LSEC\_\-compaction structure and all the substructures. \item\end{CompactList}\item 
unsigned \hyperlink{compact_8c_cd7e5ca5f12bfed824d2a1c277c1862c}{LSEC\_\-processCal} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Process the CAL compression structures. \item\end{CompactList}\item 
void \hyperlink{compact_8c_ba2b8942702c781aacf51cfbcf9207a3}{LSEC\_\-reportCalCompaction} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc, FILE $\ast$fp)
\begin{CompactList}\small\item\em Write CAL compression table contents to an ASCII file. \item\end{CompactList}\item 
void \hyperlink{compact_8c_197e3828050e14810cf4adddabb57efb}{LSEC\_\-setContext} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc, const \hyperlink{structLSEC__ctx}{LSEC\_\-ctx} $\ast$ctx)
\begin{CompactList}\small\item\em Set the context information pointer. \item\end{CompactList}\item 
void \hyperlink{compact_8c_e6fb1b57cc3de2ec1291450bc9519b7d}{LSEC\_\-setMode} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc, unsigned mode)
\begin{CompactList}\small\item\em Set the calibration mode. \item\end{CompactList}\item 
unsigned int \hyperlink{compact_8c_08c6925b6de5aaabc3b3379fec0b0d61}{LSEC\_\-sizeofUser} (\hyperlink{struct__LSEC__compaction}{LSEC\_\-compaction} $\ast$cpc)
\begin{CompactList}\small\item\em Calculate the number of 32-bit words required to hold the tables against which the contributions will be encoded. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Compaction implementation. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
{\bf \$Id:} \hyperlink{compact_8c}{compact.c},v 1.20 2011/03/27 17:43:40 saxton Exp \$ 

\subsection{Function Documentation}
\hypertarget{compact_8c_2497a6a55b982f532e1f1d62026ee238}{
\index{compact.c@{compact.c}!LSEC\_\-accumCalMeans@{LSEC\_\-accumCalMeans}}
\index{LSEC\_\-accumCalMeans@{LSEC\_\-accumCalMeans}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-accumCalMeans}]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-accumCalMeans ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, \/  unsigned int $\ast$ {\em evt}, \/  EBF\_\-dir $\ast$ {\em dir})}}
\label{compact_8c_2497a6a55b982f532e1f1d62026ee238}


Accumulate the means of the CAL log end values. 

This routine accumulates the CAL ADC values, keeping a separate sum for each log end.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em evt}]Pointer to the event storage area\item[{\em dir}]Pointer to the event to analyse \end{description}
\end{Desc}


References LSEC\_\-calCompaction::accum, \_\-LSEC\_\-compaction::cal, LSEC\_\-calCompaction::count, FR\_\-LENG, LM\_\-LENG, LSEC\_\-CAL\_\-M\_\-END, LSEC\_\-CAL\_\-P\_\-END, LSEC\_\-MAX\_\-EVENT\_\-SIZE, LSEC\_\-N\_\-CAL\_\-COL, LSEC\_\-N\_\-CAL\_\-LAY, LSEC\_\-N\_\-LAYCNT\_\-B, LSEC\_\-N\_\-TWR, LSEC\_\-TIM\_\-ACM, setBit(), setNib(), and \_\-LSEC\_\-compaction::times.

Referenced by LSEC\_\-consEventCal().\hypertarget{compact_8c_e760d6eca316833473004067728d0cef}{
\index{compact.c@{compact.c}!LSEC\_\-checkCalCompaction@{LSEC\_\-checkCalCompaction}}
\index{LSEC\_\-checkCalCompaction@{LSEC\_\-checkCalCompaction}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-checkCalCompaction}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-checkCalCompaction ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8c_e760d6eca316833473004067728d0cef}


Check the CAL substructure 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}


References \_\-LSEC\_\-compaction::cal, LSEC\_\-calCompaction::logs, LSEC\_\-checkCompression(), LSEC\_\-N\_\-CAL\_\-RNG, LSEC\_\-TIM\_\-CLR, LSEC\_\-calCompaction::means, and \_\-LSEC\_\-compaction::times.\hypertarget{compact_8c_d46ec4af8dbe678e74f381b54100ebf6}{
\index{compact.c@{compact.c}!LSEC\_\-clearCalCompaction@{LSEC\_\-clearCalCompaction}}
\index{LSEC\_\-clearCalCompaction@{LSEC\_\-clearCalCompaction}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-clearCalCompaction}]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-clearCalCompaction ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8c_d46ec4af8dbe678e74f381b54100ebf6}


Clear away any CAL context from a previous cycle. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to a compaction object \end{description}
\end{Desc}


References LSEC\_\-calCompaction::accum, \_\-LSEC\_\-compaction::cal, LSEC\_\-calCompaction::count, LSEC\_\-calCompaction::cSize, LSEC\_\-calCompaction::etx, LSEC\_\-calCompaction::logs, LSEC\_\-clearCompression(), LSEC\_\-N\_\-CAL\_\-RNG, LSEC\_\-TIM\_\-CLR, LSEC\_\-calCompaction::means, and \_\-LSEC\_\-compaction::times.

Referenced by LSEC\_\-consPrepare().\hypertarget{compact_8c_458aca8f5906914ffc8dc95cec6b388e}{
\index{compact.c@{compact.c}!LSEC\_\-copyUser@{LSEC\_\-copyUser}}
\index{LSEC\_\-copyUser@{LSEC\_\-copyUser}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-copyUser}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int$\ast$ LSEC\_\-copyUser ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, \/  unsigned int $\ast$ {\em buf})}}
\label{compact_8c_458aca8f5906914ffc8dc95cec6b388e}


Copy datagram header information 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}


References \_\-LSEC\_\-compaction::copyUser.\hypertarget{compact_8c_753b278be9f96d3e9959de513c29a41b}{
\index{compact.c@{compact.c}!LSEC\_\-deleteCompaction@{LSEC\_\-deleteCompaction}}
\index{LSEC\_\-deleteCompaction@{LSEC\_\-deleteCompaction}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-deleteCompaction}]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-deleteCompaction ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8c_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}


References \_\-LSEC\_\-compaction::cal, LSEC\_\-calCompaction::cData, LSEC\_\-calCompaction::logs, LSEC\_\-deleteCompression(), LSEC\_\-N\_\-CAL\_\-RNG, and LSEC\_\-calCompaction::means.

Referenced by LSEC\_\-newCompaction(), and LSEC\_\-terminate().\hypertarget{compact_8c_dec1994cc7ebe5bab7505f67d1f042ed}{
\index{compact.c@{compact.c}!LSEC\_\-eventSizeCal@{LSEC\_\-eventSizeCal}}
\index{LSEC\_\-eventSizeCal@{LSEC\_\-eventSizeCal}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-eventSizeCal}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LSEC\_\-eventSizeCal (const {\bf LSEC\_\-calEvent} $\ast$ {\em event})}}
\label{compact_8c_dec1994cc7ebe5bab7505f67d1f042ed}


Get the size of a saved CAL event. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em event}]Pointer to a CAL event data structure.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The size, in words, of the saved event. A non-zero value means that the event is in raw format. A zero value means that the event has been expanded and its final size is not known. \end{Desc}
\hypertarget{compact_8c_461a5ccab59c449ab800b9c043b6c1df}{
\index{compact.c@{compact.c}!LSEC\_\-gemContribCal@{LSEC\_\-gemContribCal}}
\index{LSEC\_\-gemContribCal@{LSEC\_\-gemContribCal}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-gemContribCal}]{\setlength{\rightskip}{0pt plus 5cm}EBF\_\-ctb$\ast$ LSEC\_\-gemContribCal (const {\bf LSEC\_\-calEvent} $\ast$ {\em event})}}
\label{compact_8c_461a5ccab59c449ab800b9c043b6c1df}


Get the GEM contribution address from a saved CAL event. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em event}]Pointer to a CAL event data structure.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The address of the saved GEM contribution. \end{Desc}
\hypertarget{compact_8c_9587749584d245871b12b5f37a7886c8}{
\index{compact.c@{compact.c}!LSEC\_\-histoCalMeans@{LSEC\_\-histoCalMeans}}
\index{LSEC\_\-histoCalMeans@{LSEC\_\-histoCalMeans}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-histoCalMeans}]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-histoCalMeans ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8c_9587749584d245871b12b5f37a7886c8}


Calculate and histogram the mean values for the CAL log ends. 

The mean ADC values for each CAL log end are calculated and histogrammed, one histogram per range, ready for being encoded.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to an LSEC\_\-compaction structure \end{description}
\end{Desc}


References LSEC\_\-calCompaction::accum, \_\-LSEC\_\-compaction::cal, LSEC\_\-calCompaction::count, LSEC\_\-histogram(), LSEC\_\-N\_\-CAL\_\-COL, LSEC\_\-N\_\-CAL\_\-END, LSEC\_\-N\_\-CAL\_\-LAY, LSEC\_\-N\_\-CAL\_\-RNG, LSEC\_\-N\_\-TWR, LSEC\_\-TIM\_\-HST, LSEC\_\-calCompaction::means, and \_\-LSEC\_\-compaction::times.\hypertarget{compact_8c_392d4d9eab9e75d9e9824d8a0beedfbc}{
\index{compact.c@{compact.c}!LSEC\_\-histogramCal@{LSEC\_\-histogramCal}}
\index{LSEC\_\-histogramCal@{LSEC\_\-histogramCal}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-histogramCal}]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-histogramCal ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, \/  {\bf LSEC\_\-calEvent} $\ast$ {\em event})}}
\label{compact_8c_392d4d9eab9e75d9e9824d8a0beedfbc}


Perform histogramming of the CAL data. 

Several quantities associated with the CAL are histogrammed in preparation for being encoded. These include: the tower map; the mean-subtracted ADC values, offset to be positive, and grouped by range; the diagnostic tower map; and the diagnostic data.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Compaction structure\item[{\em event}]Pointer to the stored event \end{description}
\end{Desc}


References LSEC\_\-calCompaction::accum, \_\-LSEC\_\-compaction::cal, FR\_\-LENG, getBit(), getNib(), LM\_\-LENG, LSEC\_\-calCompaction::logs, LSEC\_\-CAL\_\-M\_\-END, LSEC\_\-CAL\_\-P\_\-END, LSEC\_\-histogramH(), LSEC\_\-N\_\-CAL\_\-COL, LSEC\_\-N\_\-CAL\_\-LAY, LSEC\_\-N\_\-TWR, LSEC\_\-TIM\_\-HST, \_\-LSEC\_\-calEvent::size, \_\-LSEC\_\-compaction::times, and \_\-LSEC\_\-calEvent::twrMap.\hypertarget{compact_8c_e73dd63c04ff84a21a9eb1a6ae072851}{
\index{compact.c@{compact.c}!LSEC\_\-newCompaction@{LSEC\_\-newCompaction}}
\index{LSEC\_\-newCompaction@{LSEC\_\-newCompaction}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-newCompaction}]{\setlength{\rightskip}{0pt plus 5cm}{\bf LSEC\_\-compaction}$\ast$ LSEC\_\-newCompaction (unsigned {\em cap}, \/  long long $\ast$ {\em times})}}
\label{compact_8c_e73dd63c04ff84a21a9eb1a6ae072851}


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\item[{\em times}]Pointer to the array of processing times.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to an allocated, initialise, LSEC\_\-compaction structure \end{Desc}


References \_\-LSEC\_\-compaction::cal, LSEC\_\-calCompaction::cData, LSEC\_\-calCompaction::cMax, LSEC\_\-calCompaction::logs, LSEC\_\-deleteCompaction(), LSEC\_\-MAX\_\-EVENT\_\-SIZE, LSEC\_\-N\_\-CAL\_\-RNG, LSEC\_\-N\_\-LOG\_\-BITS, LSEC\_\-newCompression(), LSEC\_\-newCompressionH(), LSEC\_\-calCompaction::means, and \_\-LSEC\_\-compaction::times.

Referenced by LSEC\_\-initialize().\hypertarget{compact_8c_cd7e5ca5f12bfed824d2a1c277c1862c}{
\index{compact.c@{compact.c}!LSEC\_\-processCal@{LSEC\_\-processCal}}
\index{LSEC\_\-processCal@{LSEC\_\-processCal}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-processCal}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LSEC\_\-processCal ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8c_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}


References \_\-LSEC\_\-compaction::cal, LSEC\_\-calCompaction::logs, LSEC\_\-process(), LSEC\_\-TIM\_\-HST, LSEC\_\-calCompaction::means, and \_\-LSEC\_\-compaction::times.\hypertarget{compact_8c_ba2b8942702c781aacf51cfbcf9207a3}{
\index{compact.c@{compact.c}!LSEC\_\-reportCalCompaction@{LSEC\_\-reportCalCompaction}}
\index{LSEC\_\-reportCalCompaction@{LSEC\_\-reportCalCompaction}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-reportCalCompaction}]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-reportCalCompaction ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, \/  FILE $\ast$ {\em fp})}}
\label{compact_8c_ba2b8942702c781aacf51cfbcf9207a3}


Write CAL compression table contents to an ASCII file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to a compaction object\item[{\em fp}]Pointer to the destination file \end{description}
\end{Desc}


References \_\-LSEC\_\-compaction::cal, LSEC\_\-calCompaction::logs, LSEC\_\-N\_\-CAL\_\-RNG, LSEC\_\-reportCompression(), and LSEC\_\-calCompaction::means.\hypertarget{compact_8c_197e3828050e14810cf4adddabb57efb}{
\index{compact.c@{compact.c}!LSEC\_\-setContext@{LSEC\_\-setContext}}
\index{LSEC\_\-setContext@{LSEC\_\-setContext}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-setContext}]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-setContext ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, \/  const {\bf LSEC\_\-ctx} $\ast$ {\em ctx})}}
\label{compact_8c_197e3828050e14810cf4adddabb57efb}


Set the context information pointer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpc}]Pointer to a compaction structure\item[{\em ctx}]Pointer to the context block \end{description}
\end{Desc}


References \_\-LSEC\_\-compaction::ctx.

Referenced by LSEC\_\-initialize().\hypertarget{compact_8c_e6fb1b57cc3de2ec1291450bc9519b7d}{
\index{compact.c@{compact.c}!LSEC\_\-setMode@{LSEC\_\-setMode}}
\index{LSEC\_\-setMode@{LSEC\_\-setMode}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-setMode}]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-setMode ({\bf LSEC\_\-compaction} $\ast$ {\em cpc}, \/  unsigned {\em mode})}}
\label{compact_8c_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}


References \_\-LSEC\_\-compaction::copyUser, and \_\-LSEC\_\-compaction::sizeUser.

Referenced by LSEC\_\-initRun().\hypertarget{compact_8c_08c6925b6de5aaabc3b3379fec0b0d61}{
\index{compact.c@{compact.c}!LSEC\_\-sizeofUser@{LSEC\_\-sizeofUser}}
\index{LSEC\_\-sizeofUser@{LSEC\_\-sizeofUser}!compact.c@{compact.c}}
\subsubsection[{LSEC\_\-sizeofUser}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LSEC\_\-sizeofUser ({\bf LSEC\_\-compaction} $\ast$ {\em cpc})}}
\label{compact_8c_08c6925b6de5aaabc3b3379fec0b0d61}


Calculate the number of 32-bit words required to hold the tables against which the contributions 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 packed tables used to encode the contribution \end{Desc}


References \_\-LSEC\_\-compaction::sizeUser.