\subsection{FOCUS Data File Writing}
FOCUS writes NeXus files. This file writing is impleneted in the files
fowrite.h and fowrite.c. So these files contain the code for writing
FOCUS NeXus files. But there is more to it: FOCUS has a scheme where
the data file is updated any 20 minutes during the course of an
measurement. This scheme is implemented with the following bits and
pieces:
\begin{itemize}
\item Data file updating is triggered by a special task function,
FoTask, which is installed into the SICS tasker when counting starts. 
\item The module registers callbacks with the histogram memory which
 are invoked when counting starts or ends. These callback functions
 take care of craeting a new file and updating it. 
\item There is a special command which allows to start and update the
 data file manually.  
\end{itemize}
 
As is it not likely that more then one FOCUS writing object is ever
needed, all the data structures are file statics in fowrite.c. The
external interface of this module is just a interpreter initialisation
function and a interpreter interface function for interacting with the
data file writing object.
