\hypertarget{ASC_8h}{
\section{ASC.h File Reference}
\label{ASC_8h}\index{ASC.h@{ASC.h}}
}
ACD Software Rate Counters, interface file.  


{\tt \#include $<$EMP/LSD\_\-sdi.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__ASC__handlerConstructCfg}{\_\-ASC\_\-handlerConstructCfg}
\begin{CompactList}\small\item\em Defines the configuration parameters for the Construct routine. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{ASC_8h_a62decf0169c6b927a3f5648731538c1}{
typedef struct \_\-EBF\_\-gem \textbf{EBF\_\-gem}}
\label{ASC_8h_a62decf0169c6b927a3f5648731538c1}

\item 
\hypertarget{ASC_8h_94582f39e47408e2ad84a976f68302e0}{
typedef struct \_\-EDR\_\-acd \textbf{EDR\_\-acd}}
\label{ASC_8h_94582f39e47408e2ad84a976f68302e0}

\item 
\hypertarget{ASC_8h_6bc8322174555127a60fbd57dcf5b936}{
typedef struct \hyperlink{struct__ASC}{\_\-ASC} \textbf{ASC}}
\label{ASC_8h_6bc8322174555127a60fbd57dcf5b936}

\item 
typedef struct \hyperlink{struct__ASC__counters}{\_\-ASC\_\-counters} \hyperlink{ASC_8h_64f0ba69b2dd35099a995d7038bc6127}{ASC\_\-counters}
\begin{CompactList}\small\item\em Typedef for struct {\em ASC\_\-counters\/}. \item\end{CompactList}\item 
\hypertarget{ASC_8h_7ad4ebbef8f3892dc62716fc8d136112}{
typedef struct \hyperlink{struct__ASC__stats}{\_\-ASC\_\-stats} \hyperlink{ASC_8h_7ad4ebbef8f3892dc62716fc8d136112}{ASC\_\-stats}}
\label{ASC_8h_7ad4ebbef8f3892dc62716fc8d136112}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__ASC__stats}{\_\-ASC\_\-stats}. \item\end{CompactList}\item 
\hypertarget{ASC_8h_31b859e9cf8f3dfe882fa86a839b4a6e}{
typedef struct \_\-EDS\_\-DB\_\-HandlerConstructServices \textbf{EDS\_\-DB\_\-HandlerConstructServices}}
\label{ASC_8h_31b859e9cf8f3dfe882fa86a839b4a6e}

\item 
\hypertarget{ASC_8h_ac89b6a642111a44bebee36a30b64e7e}{
typedef struct \hyperlink{struct__ASC__handlerConstructCfg}{\_\-ASC\_\-handlerConstructCfg} \hyperlink{ASC_8h_ac89b6a642111a44bebee36a30b64e7e}{ASC\_\-handlerConstructCfg}}
\label{ASC_8h_ac89b6a642111a44bebee36a30b64e7e}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__ASC__handlerConstructCfg}{\_\-ASC\_\-handlerConstructCfg}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{ASC_8h_00dbf448ad6f0a2d9190b905888a3ee4}{ASC\_\-clear} (\hyperlink{struct__ASC__counters}{ASC\_\-counters} $\ast$counters)
\begin{CompactList}\small\item\em Clears the specified statistics counters. \item\end{CompactList}\item 
\hypertarget{ASC_8h_da3b8fed561a320ef8aea3d56236f923}{
int \textbf{ASC\_\-accumulate} (\hyperlink{struct__ASC__counters}{ASC\_\-counters} $\ast$counters, const unsigned int $\ast$edata, int esize)}
\label{ASC_8h_da3b8fed561a320ef8aea3d56236f923}

\item 
const EDS\_\-DB\_\-HandlerConstructServices $\ast$ \hyperlink{ASC_8h_78ed9e145906e5b2802da44da0695840}{ASC\_\-constructServicesGet} (\hyperlink{struct__ASC__handlerConstructCfg}{ASC\_\-handlerConstructCfg} $\ast$cfg)
\begin{CompactList}\small\item\em Routine called by LPA (via EMP\_\-DB) to get constructionr info for ASC. \item\end{CompactList}\item 
\hypertarget{ASC_8h_735cb8913bc3c638ce4ce66b7eb2caec}{
\hyperlink{struct__ASC__counters}{ASC\_\-counters} $\ast$ \textbf{ASC\_\-locateCounters} (\hyperlink{struct__ASC}{ASC} $\ast$asc)}
\label{ASC_8h_735cb8913bc3c638ce4ce66b7eb2caec}

\item 
\hypertarget{ASC_8h_60ec3f508edda1e54139e40e11537969}{
\hyperlink{struct__ASC__stats}{ASC\_\-stats} $\ast$ \textbf{ASC\_\-locateStats} (\hyperlink{struct__ASC}{ASC} $\ast$asc)}
\label{ASC_8h_60ec3f508edda1e54139e40e11537969}

\item 
\hypertarget{ASC_8h_1cc0973b34988c94acc05e1797577cef}{
void \textbf{ASC\_\-getStats} (\hyperlink{struct__ASC}{ASC} $\ast$asc, \hyperlink{struct__ASC__stats}{ASC\_\-stats} $\ast$stats)}
\label{ASC_8h_1cc0973b34988c94acc05e1797577cef}

\item 
\hypertarget{ASC_8h_a2c35f53743648a4bbbc2c95dff3c5c3}{
void \textbf{ASC\_\-clearStats} (\hyperlink{struct__ASC}{ASC} $\ast$asc)}
\label{ASC_8h_a2c35f53743648a4bbbc2c95dff3c5c3}

\item 
\hypertarget{ASC_8h_af2acff42aef891c9823b3e0e37c2455}{
void \textbf{ASC\_\-showStats} (\hyperlink{struct__ASC}{ASC} $\ast$asc)}
\label{ASC_8h_af2acff42aef891c9823b3e0e37c2455}

\item 
\hypertarget{ASC_8h_f3d6b795bb8ae9f007f77822b6ebf66d}{
unsigned int \textbf{ASC\_\-statsSizeof} (void)}
\label{ASC_8h_f3d6b795bb8ae9f007f77822b6ebf66d}

\item 
\hypertarget{ASC_8h_d4c8583de3cc5504a348c9a574dbfc2a}{
void \textbf{ASC\_\-statsSub} (\hyperlink{struct__ASC__stats}{ASC\_\-stats} $\ast$result, const \hyperlink{struct__ASC__stats}{ASC\_\-stats} $\ast$stats, const \hyperlink{struct__ASC__stats}{ASC\_\-stats} $\ast$base)}
\label{ASC_8h_d4c8583de3cc5504a348c9a574dbfc2a}

\item 
void \hyperlink{ASC_8h_61a2eab1d48b6abd8432106966652eed}{ASC\_\-accumulateU} (\hyperlink{struct__ASC__counters}{ASC\_\-counters} $\ast$counters, const EBF\_\-gem $\ast$gem, const EDR\_\-acd $\ast$acd)
\begin{CompactList}\small\item\em Accumulates the proper pattern words for each ACD hit. \item\end{CompactList}\item 
const unsigned int $\ast$ \hyperlink{ASC_8h_39631834b0f6f81d6ab27c9f92902f46}{ASC\_\-aem\_\-locate} (const unsigned int $\ast$edata, int esize)
\begin{CompactList}\small\item\em Locates AEM contribution in an event. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
ACD Software Rate Counters, interface file. 

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


\footnotesize\begin{verbatim}

    CVS $Id: ASC.h,v 1.7 2011/03/26 20:07:42 russell Exp $
\end{verbatim}
\normalsize


\begin{Desc}
\item[SYNOPSIS]Defines the the interface for controlling the ACD software rate counters \end{Desc}


\subsection{Typedef Documentation}
\hypertarget{ASC_8h_64f0ba69b2dd35099a995d7038bc6127}{
\index{ASC.h@{ASC.h}!ASC\_\-counters@{ASC\_\-counters}}
\index{ASC\_\-counters@{ASC\_\-counters}!ASC.h@{ASC.h}}
\subsubsection[{ASC\_\-counters}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ASC\_\-counters}}}
\label{ASC_8h_64f0ba69b2dd35099a995d7038bc6127}


Typedef for struct {\em ASC\_\-counters\/}. 

\begin{Desc}
\item[Note:]See the documentation of the enum \_\-ASC\_\-SUMMARY for an explanation of the summary statistics block. \end{Desc}


\subsection{Function Documentation}
\hypertarget{ASC_8h_61a2eab1d48b6abd8432106966652eed}{
\index{ASC.h@{ASC.h}!ASC\_\-accumulateU@{ASC\_\-accumulateU}}
\index{ASC\_\-accumulateU@{ASC\_\-accumulateU}!ASC.h@{ASC.h}}
\subsubsection[{ASC\_\-accumulateU}]{\setlength{\rightskip}{0pt plus 5cm}void ASC\_\-accumulateU ({\bf ASC\_\-counters} $\ast$ {\em counters}, \/  const EBF\_\-gem $\ast$ {\em gem}, \/  const EDR\_\-acd $\ast$ {\em acd})}}
\label{ASC_8h_61a2eab1d48b6abd8432106966652eed}


Accumulates the proper pattern words for each ACD hit. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em counters}]The statistics counters \item[{\em gem}]Pointer to the GEM record \item[{\em acd}]Pointer to an unpacked ACD record\end{description}
\end{Desc}
This function is called on the assumption that the GEM record has been located and the ACD data has been both located and successfully unpacked. 

References accumulate(), accumulate\_\-cno(), ASC\_\-SUMMARY\_\-AEM\_\-ERR\_\-\_\-GEM\_\-MISS, ASC\_\-SUMMARY\_\-AEM\_\-ERR\_\-\_\-GEM\_\-OKAY, ASC\_\-SUMMARY\_\-AEM\_\-MISS\_\-GEM\_\-MISS, ASC\_\-SUMMARY\_\-AEM\_\-MISS\_\-GEM\_\-OKAY, ASC\_\-SUMMARY\_\-AEM\_\-OKAY\_\-GEM\_\-MISS, ASC\_\-SUMMARY\_\-AEM\_\-OKAY\_\-GEM\_\-OKAY, \_\-ASC\_\-counters::cno, \_\-ASC\_\-counters::gec, \_\-ASC\_\-cnts::lists, and \_\-ASC\_\-counters::summary.

Referenced by AscEdsProcess().\hypertarget{ASC_8h_39631834b0f6f81d6ab27c9f92902f46}{
\index{ASC.h@{ASC.h}!ASC\_\-aem\_\-locate@{ASC\_\-aem\_\-locate}}
\index{ASC\_\-aem\_\-locate@{ASC\_\-aem\_\-locate}!ASC.h@{ASC.h}}
\subsubsection[{ASC\_\-aem\_\-locate}]{\setlength{\rightskip}{0pt plus 5cm}const unsigned int $\ast$ ASC\_\-aem\_\-locate (const unsigned int $\ast$ {\em edata}, \/  int {\em esize})}}
\label{ASC_8h_39631834b0f6f81d6ab27c9f92902f46}


Locates AEM contribution in an event. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em A}]pointer to the AEM contribution. \item[{\em NULL}]is return if the AEM contribution cannnot be found\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em edata}]Pointer to the event data structure \item[{\em esize}]Size, in bytes, of the event \end{description}
\end{Desc}


References locate\_\-aem().

Referenced by set\_\-aem().\hypertarget{ASC_8h_00dbf448ad6f0a2d9190b905888a3ee4}{
\index{ASC.h@{ASC.h}!ASC\_\-clear@{ASC\_\-clear}}
\index{ASC\_\-clear@{ASC\_\-clear}!ASC.h@{ASC.h}}
\subsubsection[{ASC\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}ASC\_\-clear ({\bf ASC\_\-counters} $\ast$ {\em counters})}}
\label{ASC_8h_00dbf448ad6f0a2d9190b905888a3ee4}


Clears the specified statistics counters. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em counters}]The statistics counters to be cleared\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]Currently this is a NON-interlocked operation. \end{Desc}


References clear().

Referenced by initMsg(), and output().\hypertarget{ASC_8h_78ed9e145906e5b2802da44da0695840}{
\index{ASC.h@{ASC.h}!ASC\_\-constructServicesGet@{ASC\_\-constructServicesGet}}
\index{ASC\_\-constructServicesGet@{ASC\_\-constructServicesGet}!ASC.h@{ASC.h}}
\subsubsection[{ASC\_\-constructServicesGet}]{\setlength{\rightskip}{0pt plus 5cm}const EDS\_\-DB\_\-HandlerConstructServices$\ast$ ASC\_\-constructServicesGet ({\bf ASC\_\-handlerConstructCfg} $\ast$ {\em cfg})}}
\label{ASC_8h_78ed9e145906e5b2802da44da0695840}


Routine called by LPA (via EMP\_\-DB) to get constructionr info for ASC. 

\begin{Desc}
\item[Returns:]Pointer to EDS\_\-DB\_\-HandlerConstructServices structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cfg}]The handler construction configuration \end{description}
\end{Desc}


References AscEdsConstruct(), and AscEdsSizeof().