\subsection{The FOCUS Averager}
This is a special object for the instrument FOCUS and its Status display
client. In the FOCUS status display the averaged data from a number of
detectors is displayed. Thus there is already a reduced form of data. The
actual raw data would be 150*1024*4 bytes of data and possibly more. Rather
then transporting all this data to the status display client at regular
intervalls it was choosen to implement this averaging process at the server
and only send the reduced form to the status display client. Which is two
arrays of floating point data 1024 items long. This little object implements this
averager. 

As all SICS objects this object has a little data structure:
\begin{verbatim}
  typedef struct __FocusAverager {
                                  pObjectDescriptor pDes;
                                  pHistMem          pHist;
                                 } FocusAverager;
\end{verbatim}  

The two fields are the standard object descriptor and a pointer to the
histogram memory object holding the data. 

The interface is minimal: it consists just of the factory function for
installing this object into SICS and the actual function doing the
averaging in the interpreter.

\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap1}
$\langle$faint {\footnotesize ?}$\rangle\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@    int MakeFA(SConnection *pCon, SicsInterp *pSics, void *pData,@\\
\mbox{}\verb@               int argc, char *argv[]);@\\
\mbox{}\verb@@\\
\mbox{}\verb@    int FocusAverageDo(SConnection *pCon, SicsInterp *pSics, void *pData,@\\
\mbox{}\verb@               int argc, char *argv[]);@\\
\mbox{}\verb@@\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-1ex}
\footnotesize\addtolength{\baselineskip}{-1ex}
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
\item Macro referenced in scrap ?.
\end{list}
\end{minipage}\\[4ex]
\end{flushleft}
\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap2}
\verb@"faverage.h"@ {\footnotesize ? }$\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@/*-----------------------------------------------------------------------@\\
\mbox{}\verb@                F o c u s A v e r a g e@\\
\mbox{}\verb@@\\
\mbox{}\verb@  An averager for FOCUS data.  See faverage.tex for more details.@\\
\mbox{}\verb@@\\
\mbox{}\verb@  Mark Koennecke, October 1998@\\
\mbox{}\verb@@\\
\mbox{}\verb@--------------------------------------------------------------------------*/@\\
\mbox{}\verb@#ifndef FOCUSAVERAGE@\\
\mbox{}\verb@#define FOCUSAVERAGE@\\
\mbox{}\verb@@$\langle$faint {\footnotesize ?}$\rangle$\verb@@\\
\mbox{}\verb@#endif@\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-2ex}
\end{minipage}\\[4ex]
\end{flushleft}
