\section{Readout with longADC mode}

The programm needed is provided by Jochen and will be integrated into libTRD.
At the moment you have to copy \filepath{/home/trd/dietel/longadc/libtrd\_0.4.3.92\_arm.ipk} to
\filepath{/tmp} on the target DCS board by hand and install the package via \inputcmd{ikpg install /tmp/libtrd\_0.4.3.2.92\_arm.ipk}

In longADC mode you can read out max. 4 channels per MCM (max. 2 per CPU).
Furthermore you need a config file on DCS board (\filepath{/tmp/cfg} for example). Each line of the config file must contain the following information:
\begin{verbatim}
    <ROB> <MCM> <ADC-Channel>
    Lines beginning with # are ignored.
\end{verbatim}

To run the longADC mode you have to configure the chamber first with configuration 399.
After this execute 
\begin{itemize}
  \item \inputcmd{cfgadcmode /path/to/config/file}
\end{itemize}

   
To start data taking you have to send one trigger (on DCS board):
\begin{itemize}
  \item \inputcmd{ttcrx\_regs s}
  \item \inputcmd{pretrigger 1}
\end{itemize}

and then read out the values (from TRD01)
\begin{itemize}
  \item \inputcmd{ssh l1s4 longadc $>$ name.data}
\end{itemize}

Afterwards you have to split the file with \inputcmd{split -l 24576 name.dat}.
This creates files named \filepath{xaa}, \filepath{xab}, \filepath{xac} \ldots -- one per ADC channel this was read out.

Goto \filepath{/home/trd/dietel/longadc} and execute \inputcmd{. rootver-5.18.00}. This sets root
to a version with included FFT library. To create the plot call \verb+root 'plot.C("xaa")'+. 

This will give you two plots: The upper one shows the ADC signal as fuction of time without pedestal filter and the
lower one the fourier spectrum of the sigal.
