\hypertarget{QASC_8h}{
\section{QASC.h File Reference}
\label{QASC_8h}\index{QASC.h@{QASC.h}}
}
Interface to the ACD Software Counters. 



This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=93pt]{QASC_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
QEMP\_\-status \hyperlink{QASC_8h_a0}{QASC\_\-expand} (\hyperlink{struct__QASC}{QASC} $\ast$qasc, const LSF\_\-contribution $\ast$ctb)
\begin{CompactList}\small\item\em Routine to check integrity and swap/uncompress input data into a 2nd buffer. \item\end{CompactList}\item 
const \hyperlink{struct__QASC__tileHistogram}{QASC\_\-tile\-Histogram} $\ast$ \hyperlink{QASC_8h_a1}{QASC\_\-tile\-Histogram\-Locate} (const \hyperlink{struct__QASC}{QASC} $\ast$qasc, unsigned int index)
\begin{CompactList}\small\item\em Returns a pointer to the specified tile histogram. \item\end{CompactList}\item 
const \hyperlink{union__QASC__summary}{QASC\_\-summary} $\ast$ \hyperlink{QASC_8h_a2}{QASC\_\-summary\-Locate} (const \hyperlink{struct__QASC}{QASC} $\ast$qasc)
\begin{CompactList}\small\item\em Get a pointer to the QASC summary structure. \item\end{CompactList}\item 
const \hyperlink{struct__QASC__cnoHistogram}{QASC\_\-cno\-Histogram} $\ast$ \hyperlink{QASC_8h_a3}{QASC\_\-cno\-Histogram\-Locate} (const \hyperlink{struct__QASC}{QASC} $\ast$qasc, unsigned int board\-Pair)
\begin{CompactList}\small\item\em Returns a pointer to the requested CNO histogram. \item\end{CompactList}\item 
const \hyperlink{struct__QASC__stats}{QASC\_\-stats} $\ast$ \hyperlink{QASC_8h_a4}{QASC\_\-stats\-Locate} (const \hyperlink{struct__QASC}{QASC} $\ast$qasc)
\begin{CompactList}\small\item\em Get a pointer to the QASC performance monitoring statistics. \item\end{CompactList}\item 
const \hyperlink{struct__QEMP__hdr}{QEMP\_\-hdr} $\ast$ \hyperlink{QASC_8h_a5}{QASC\_\-qemp\-Hdr\-Locate} (const \hyperlink{struct__QASC}{QASC} $\ast$qasc)
\begin{CompactList}\small\item\em Get pointer to QEMP\_\-hdr structure. \item\end{CompactList}\item 
int \hyperlink{QASC_8h_a6}{QASC\_\-idx\-Gem\-Get} (int list, int channel)
\begin{CompactList}\small\item\em Maps an ACD GEM list and channel into a universal index. \item\end{CompactList}\item 
int \hyperlink{QASC_8h_a7}{QASC\_\-idx\-Aem\-Get} (int board, int channel)
\begin{CompactList}\small\item\em Maps an ACD AEM board number and channel into a universal index. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Interface to the ACD Software Counters. 

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


\footnotesize\begin{verbatim}   CVS $Id: QASC.h,v 1.2 2006/10/21 00:29:59 russell Exp $
\end{verbatim}
\normalsize


\subsection{Function Documentation}
\hypertarget{QASC_8h_a3}{
\index{QASC.h@{QASC.h}!QASC_cnoHistogramLocate@{QASC\_\-cnoHistogramLocate}}
\index{QASC_cnoHistogramLocate@{QASC\_\-cnoHistogramLocate}!QASC.h@{QASC.h}}
\subsubsection[QASC\_\-cnoHistogramLocate]{\setlength{\rightskip}{0pt plus 5cm}const \hyperlink{struct__QASC__cnoHistogram}{QASC\_\-cno\-Histogram} QASC\_\-cno\-Histogram\-Locate (const \hyperlink{struct__QASC}{QASC} $\ast$ {\em qasc}, unsigned int {\em board\_\-pair})}}
\label{QASC_8h_a3}


Returns a pointer to the requested CNO histogram. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Non-NULL,a}]pointer to the requested CNO histogram \item[{\em NULL,the}]{\em board\_\-pair\/} was not within the range 0-5\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qasc}]The access handle \item[{\em board\_\-pair}]board (0-5)\end{description}
\end{Desc}
\hypertarget{QASC_8h_a0}{
\index{QASC.h@{QASC.h}!QASC_expand@{QASC\_\-expand}}
\index{QASC_expand@{QASC\_\-expand}!QASC.h@{QASC.h}}
\subsubsection[QASC\_\-expand]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QEMP_8h_a1}{QEMP\_\-STATUS} QASC\_\-expand (\hyperlink{struct__QASC}{QASC} $\ast$ {\em qasc}, const LSF\_\-contribution $\ast$ {\em ctb})}}
\label{QASC_8h_a0}


Routine to check integrity and swap/uncompress input data into a 2nd buffer. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em QEMP\_\-STATUS\_\-SUCCESS,if}]successful (0) \item[{\em QEMP\_\-STATUS\_\-CTB\_\-BAD\_\-LEN32,if}]the contributor length is inconsistent with the data. \item[{\em QEMP\_\-STATUS\_\-CTB\_\-UNKNOWN\_\-VER,if}]the encoding/data format version is unknown.\item[{\em QEMP\_\-STATUS\_\-CTB\_\-INFLATE\_\-FAIL,for}]compressed formats, indicates the failure to inflate the data\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qasc}]The data access handle to be filled \item[{\em ctb}]Input buffer\end{description}
\end{Desc}
The check routine does integrity checks on the given LSF contributor packet and then decompress/swaps data into the output buffer. THe size of the output buffer is determined by \hyperlink{QEMP_8h_a12}{QEMP\_\-sizeof()}. The output buffer can then be used as input with the QASC\_\-xxxx\-Locate routines.

This routine assumes the contributor has been byte-swapped.\hypertarget{QASC_8h_a7}{
\index{QASC.h@{QASC.h}!QASC_idxAemGet@{QASC\_\-idxAemGet}}
\index{QASC_idxAemGet@{QASC\_\-idxAemGet}!QASC.h@{QASC.h}}
\subsubsection[QASC\_\-idxAemGet]{\setlength{\rightskip}{0pt plus 5cm}QASC\_\-idx\-Aem\-Get (int {\em board}, int {\em channel})}}
\label{QASC_8h_a7}


Maps an ACD AEM board number and channel into a universal index. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em $>$=0,The}]universal index for the specifed ACD AEM board and channel \item[{\em $<$}]0, Invalid board or channel number\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em board}]This is a value between 0 and 11 corresponding to the the 12 AEM FREE board/cable numbers\begin{itemize}
\item 0 1LA, 1 1RB\item 2 2LA, 3 2LB\item 4 2RA, 5 2RB\item 6 3LA, 7 3RB\item 8 4LA, 9 4LB\item 9 4RA, 10 4RB\end{itemize}
\item[{\em channel}]The channel, 0-18, within each FREE board/cable.\end{description}
\end{Desc}
\hypertarget{QASC_8h_a6}{
\index{QASC.h@{QASC.h}!QASC_idxGemGet@{QASC\_\-idxGemGet}}
\index{QASC_idxGemGet@{QASC\_\-idxGemGet}!QASC.h@{QASC.h}}
\subsubsection[QASC\_\-idxGemGet]{\setlength{\rightskip}{0pt plus 5cm}QASC\_\-idx\-Gem\-Get (int {\em list}, int {\em channel})}}
\label{QASC_8h_a6}


Maps an ACD GEM list and channel into a universal index. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em $>$=0,The}]universal index for the specifed ACD list and channel \item[{\em $<$}]0, Invalid list or channel number\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]This is a value between 0 and 3 corresponding to the 4 words in the GEM record -0 XZ plane -1 YZ plane -2 XY plane -3 RU plane \item[{\em channel}]The channel, 0-31, within each list. The bits are numbered from least significant bit to most significant bit\end{description}
\end{Desc}
\hypertarget{QASC_8h_a5}{
\index{QASC.h@{QASC.h}!QASC_qempHdrLocate@{QASC\_\-qempHdrLocate}}
\index{QASC_qempHdrLocate@{QASC\_\-qempHdrLocate}!QASC.h@{QASC.h}}
\subsubsection[QASC\_\-qempHdrLocate]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__QEMP__hdr}{QEMP\_\-hdr} QASC\_\-qemp\-Hdr\-Locate (const \hyperlink{struct__QASC}{QASC} $\ast$ {\em qasc})}}
\label{QASC_8h_a5}


Get pointer to QEMP\_\-hdr structure. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Pointer}]to the QEMP\_\-hdr structure\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qasc}]Access handle\end{description}
\end{Desc}
\hypertarget{QASC_8h_a4}{
\index{QASC.h@{QASC.h}!QASC_statsLocate@{QASC\_\-statsLocate}}
\index{QASC_statsLocate@{QASC\_\-statsLocate}!QASC.h@{QASC.h}}
\subsubsection[QASC\_\-statsLocate]{\setlength{\rightskip}{0pt plus 5cm}const \hyperlink{struct__QASC__stats}{QASC\_\-stats} QASC\_\-stats\-Locate (const \hyperlink{struct__QASC}{QASC} $\ast$ {\em qasc})}}
\label{QASC_8h_a4}


Get a pointer to the QASC performance monitoring statistics. 

\begin{Desc}
\item[Returns:]A pointer to the QASC performance monitoring statistics\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qasc}]The access handle\end{description}
\end{Desc}
\hypertarget{QASC_8h_a2}{
\index{QASC.h@{QASC.h}!QASC_summaryLocate@{QASC\_\-summaryLocate}}
\index{QASC_summaryLocate@{QASC\_\-summaryLocate}!QASC.h@{QASC.h}}
\subsubsection[QASC\_\-summaryLocate]{\setlength{\rightskip}{0pt plus 5cm}const \hyperlink{union__QASC__summary}{QASC\_\-summary} QASC\_\-summary\-Locate (const \hyperlink{struct__QASC}{QASC} $\ast$ {\em qasc})}}
\label{QASC_8h_a2}


Get a pointer to the QASC summary structure. 

\begin{Desc}
\item[Returns:]A pointer to the QASC summary structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qasc}]The access handle\end{description}
\end{Desc}
\hypertarget{QASC_8h_a1}{
\index{QASC.h@{QASC.h}!QASC_tileHistogramLocate@{QASC\_\-tileHistogramLocate}}
\index{QASC_tileHistogramLocate@{QASC\_\-tileHistogramLocate}!QASC.h@{QASC.h}}
\subsubsection[QASC\_\-tileHistogramLocate]{\setlength{\rightskip}{0pt plus 5cm}const \hyperlink{struct__QASC__tileHistogram}{QASC\_\-tile\-Histogram} QASC\_\-tile\-Histogram\-Locate (const \hyperlink{struct__QASC}{QASC} $\ast$ {\em qasc}, unsigned int {\em idx})}}
\label{QASC_8h_a1}


Returns a pointer to the specified tile histogram. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Non-NULL,a}]pointer to the specified histogram \item[{\em NULL,an}]invalid index, {\em geo\_\-idx\/}, was specified. This must be in the range 0-128\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qasc}]The access handle \item[{\em idx}]The index, set QASC\_\-tile\-Histogram\-Geo\-Idx;\end{description}
\end{Desc}
