\subsection{Four Circle Single Counter Measurement Object}
This object implements a basic single counter reflection measurement routine
for four circle diffractometers. This object is able to read a reflection
listing, drive to each reflection in the list, do a scan on it, integrate
the scan results and write the results to ASCII files. Nothing sophisticated
such as optimised measurement procedures and special background measurement
programs. Three files will be created as output: one file with the ending
.rfl which contains the reflection profiles for each reflection, a file .asc
which contains a summary in form of HKL, I, sigma(I) for each reflection
and a file ending .err which contains all the error messages obtained during
the run.


The interface to this object consists of these functions:

\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap1}
$\langle$mesureint {\footnotesize ?}$\rangle\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@ typedef struct __Mesure *pMesure;@\\
\mbox{}\verb@/*--------------------- live & death --------------------------------------*/@\\
\mbox{}\verb@  pMesure CreateMesure(pHKL pCryst, pScanData pScanner, @\\
\mbox{}\verb@                       pMotor pOmega, char *pom, char *po2t,@\\
\mbox{}\verb@                       char *pFileRoot,pDataNumber pDanu);@\\
\mbox{}\verb@  void    DeleteMesure(void *pData);@\\
\mbox{}\verb@@\\
\mbox{}\verb@  int MesureFactory(SConnection *pCon, SicsInterp *pSics, void *pData,@\\
\mbox{}\verb@                    int argc, char *argv[]);@\\
\mbox{}\verb@/*------------------- object functions -----------------------------------*/@\\
\mbox{}\verb@  int MesureReflection(pMesure self, float fHKL[3], SConnection *pCon);@\\
\mbox{}\verb@  int MesureGenReflection(pMesure self, float fHKL[3],float fSet[4], SConnection *pCon);@\\
\mbox{}\verb@  int MesureStart(pMesure self, SConnection *pCon);@\\
\mbox{}\verb@  int MesureReopen(pMesure self, char *filename, SConnection *pCon);@\\
\mbox{}\verb@  int MesureClose(pMesure self);@\\
\mbox{}\verb@  int MesureFile(pMesure self, char *pFile, int iSkip, SConnection *pCon);@\\
\mbox{}\verb@  int MesureGenFile(pMesure self, char *pFile, int iSkip, SConnection *pCon);@\\
\mbox{}\verb@  int MesureSetPar(pMesure self, char *name, float fVal);@\\
\mbox{}\verb@  int MesureGetPar(pMesure self, char *name, float *fVal);@\\
\mbox{}\verb@@\\
\mbox{}\verb@  int MesureAction(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}
All functions return 1 on success, 0 on failure.
\begin{description}
\item[CreateMesure] creates a new pMesure object. Parameters are the HKL
object to use for cystallographic conversions and the scan object to use for
doing the scans. This is followd by the motor for running omega, its name
and the name of the motor for driving omega 2 theta. Finnaly the path to the
data directory and the data number object for automatic filename creation is
specified.
\item[DeleteMesure] wipes the mesure object pData from memory.
\item[MesureFactory] is the factory function for mesure which will be used
by the interpreter to  install mesure into the system.
\item[MesureReflection] measures the single reflection fHKL. It drives
there, calculates scan borders and performs the scan.
\item[MesureGenReflection] measures the single reflection fHKL. It drives
there, calculates scan borders and performs the scan. This version uses
supplied values for the instrument settings.
\item[MesureStart] sets everything up for a new measurement with new file
names.
\item[MesureReopen] reopens the files belonging to the file name given as
base for appending. This is a recovery feature.
\item[MesureFile] opens the file specified as second parameter and reads
each line. Expected is a reflection to measure. Each reflection is then
measured and output written. The last parameter iSkip allows to skip iSkip
lines of the reflection file. This facility exists in order to restart work
on an reflection file which had been interrupted for some reason.
\item[MesureGenFile] opens the file specified as second parameter and reads
each line. Expected is a reflection to measure. Each reflection is then
measured and output written. The last parameter iSkip allows to skip iSkip
lines of the reflection file. This facility exists in order to restart work
on an reflection file which had been interrupted for some reason. This
version acts upon files created by the program HKLGEN.
\item[MesureSetPar] sets the parameter name of Mesure to fVal. A listing of
possible parameters is given below.
\item[MesureGetPar] returns the value of the parameter name in fVal.
\item[MesureAction] implements the interpreter interface to the mesure
object. 
\end{description}
Mesure supports the following parameters:
\begin{description}
\item[np] the number of points per scan.
\item[preset] The preset value for counting.
\item[countmode] the counting mode, can be 0 for timer or 1 for monitor
mode. 
\item[mode] can be 0 for omega 2theta scans or 1 for omega scans.
\item[step] the scan step widths. This is allways in omega, in omega 2theta
mode 2theta is always the double of this.
\end{description}

\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap2}
\verb@"mesure.h"@ {\footnotesize ? }$\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@/*----------------------------------------------------------------------------@\\
\mbox{}\verb@                         M E S U R E@\\
\mbox{}\verb@@\\
\mbox{}\verb@ A SICS object for doing simple four circle measurements with a single@\\
\mbox{}\verb@ counter. @\\
\mbox{}\verb@@\\
\mbox{}\verb@ copyright: see copyright.h@\\
\mbox{}\verb@@\\
\mbox{}\verb@ Mark Koenencke, April 1998@\\
\mbox{}\verb@---------------------------------------------------------------------------*/@\\
\mbox{}\verb@#ifndef SICSMESURE@\\
\mbox{}\verb@#define SICSMESURE@\\
\mbox{}\verb@@$\langle$mesureint {\footnotesize ?}$\rangle$\verb@@\\
\mbox{}\verb@#endif@\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-2ex}
\end{minipage}\\[4ex]
\end{flushleft}
