\section{sls\-Detector Class Reference}
\label{classslsDetector}\index{slsDetector@{slsDetector}}
This is the base class for all SLS detector functionalities.  


{\tt \#include $<$sls\-Detector.h$>$}

Inheritance diagram for sls\-Detector::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classslsDetector}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef \bf{sls\-Detector::shared\-Sls\-Detector} \bf{shared\-Sls\-Detector}
\begin{CompactList}\small\item\em Structure allocated in shared memory to store detector settings and be accessed in parallel by several applications (take care of possible conflicts!). \item\end{CompactList}\item 
\bf{GET\_\-ONLINE\_\-FLAG}
\item 
\bf{OFFLINE\_\-FLAG}
\item 
\bf{ONLINE\_\-FLAG}
\item 
enum \{ \bf{GET\_\-ONLINE\_\-FLAG}, 
\bf{OFFLINE\_\-FLAG}, 
\bf{ONLINE\_\-FLAG}
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\bf{sls\-Detector} (\bf{detector\-Type} type=GENERIC, int id=0)
\item 
\bf{$\sim$sls\-Detector} ()
\item 
int \bf{set\-Online} (int const online)
\item 
int \bf{exists} ()
\item 
virtual int \bf{read\-Configuration\-File} (string const fname)=0
\item 
virtual int \bf{write\-Configuration\-File} (string const fname)=0
\item 
virtual int \bf{dump\-Detector\-Setup} (string const fname)=0
\item 
virtual int \bf{retrieve\-Detector\-Setup} (string const fname)=0
\item 
int \bf{set\-TCPSocket} (string const name=\char`\"{}\char`\"{}, int const control\_\-port=-1, int const stop\_\-port=-1, int const data\_\-port=-1)
\item 
char $\ast$ \bf{get\-Hostname} ()
\item 
int \bf{get\-Control\-Port} ()
\item 
int \bf{get\-Stop\-Port} ()
\item 
int \bf{get\-Data\-Port} ()
\item 
char $\ast$ \bf{get\-Trim\-Dir} ()
\item 
char $\ast$ \bf{set\-Trim\-Dir} (string s)
\item 
int \bf{get\-Trim\-En} (int $\ast$en=NULL)
\item 
virtual \bf{sls\_\-detector\_\-module} $\ast$ \bf{read\-Trim\-File} (string fname, \bf{sls\_\-detector\_\-module} $\ast$my\-Mod=NULL)=0
\item 
virtual int \bf{write\-Trim\-File} (string fname, \bf{sls\_\-detector\_\-module} mod)=0
\item 
virtual int \bf{write\-Trim\-File} (string fname, int imod)=0
\item 
char $\ast$ \bf{set\-File\-Path} (string s)
\item 
char $\ast$ \bf{set\-File\-Name} (string s)
\item 
int \bf{set\-File\-Index} (int i)
\item 
char $\ast$ \bf{get\-File\-Path} ()
\item 
char $\ast$ \bf{get\-File\-Name} ()
\item 
int \bf{get\-File\-Index} ()
\item 
string \bf{create\-File\-Name} ()
\item 
virtual int \bf{write\-Data\-File} (string fname, float $\ast$data, float $\ast$err=NULL, float $\ast$ang=NULL, char dataformat='f', int nch=-1)=0
\item 
virtual int \bf{write\-Data\-File} (string fname, int $\ast$data)=0
\item 
virtual int \bf{read\-Data\-File} (string fname, float $\ast$data, float $\ast$err=NULL, float $\ast$ang=NULL, char dataformat='f', int nch=0)=0
\item 
virtual int \bf{read\-Data\-File} (string fname, int $\ast$data)=0
\item 
char $\ast$ \bf{get\-Cal\-Dir} ()
\item 
char $\ast$ \bf{set\-Cal\-Dir} (string s)
\item 
virtual int \bf{read\-Calibration\-File} (string fname, float \&gain, float \&offset)=0
\item 
virtual int \bf{write\-Calibration\-File} (string fname, float gain, float offset)=0
\item 
virtual int \bf{read\-Angular\-Conversion} (string fname=\char`\"{}\char`\"{})=0
\item 
virtual int \bf{write\-Angular\-Conversion} (string fname=\char`\"{}\char`\"{})=0
\item 
int \bf{exec\-Command} (string cmd, string answer)
\item 
int \bf{set\-Detector\-Type} (\bf{detector\-Type} type=GET\_\-DETECTOR\_\-TYPE)
\item 
int \bf{set\-Detector\-Type} (string type)
\item 
void \bf{get\-Detector\-Type} (char $\ast$type)
\item 
int \bf{set\-Number\-Of\-Modules} (int n, \bf{dimension} d=X)
\item 
int \bf{get\-Max\-Number\-Of\-Modules} (\bf{dimension} d=X)
\item 
\bf{external\-Signal\-Flag} \bf{set\-External\-Signal\-Flags} (\bf{external\-Signal\-Flag} pol=GET\_\-EXTERNAL\_\-SIGNAL\_\-FLAG, int signalindex=0)
\item 
\bf{external\-Communication\-Mode} \bf{set\-External\-Communication\-Mode} (\bf{external\-Communication\-Mode} pol=GET\_\-EXTERNAL\_\-COMMUNICATION\_\-MODE)
\item 
int64\_\-t \bf{get\-Id} (\bf{id\-Mode} mode, int imod=0)
\item 
int \bf{digital\-Test} (\bf{digital\-Test\-Mode} mode, int imod=0)
\item 
int $\ast$ \bf{analog\-Test} (\bf{analog\-Test\-Mode} mode)
\item 
int \bf{enable\-Analog\-Output} (int ichan)
\item 
int \bf{enable\-Analog\-Output} (int imod, int ichip, int ichan)
\item 
int \bf{give\-Calibration\-Pulse} (float vcal, int npulses)
\item 
int \bf{write\-Register} (int addr, int val)
\item 
int \bf{read\-Register} (int addr)
\item 
float \bf{set\-DAC} (float val, \bf{dac\-Index} index, int imod=-1)
\item 
float \bf{get\-ADC} (\bf{dac\-Index} index, int imod=0)
\item 
int \bf{set\-Channel} (int64\_\-t reg, int ichan=-1, int ichip=-1, int imod=-1)
\item 
int \bf{set\-Channel} (\bf{sls\_\-detector\_\-channel} chan)
\item 
\bf{sls\_\-detector\_\-channel} \bf{get\-Channel} (int ichan, int ichip, int imod)
\item 
int \bf{set\-Chip} (int reg, int ichip=-1, int imod=-1)
\item 
int \bf{set\-Chip} (\bf{sls\_\-detector\_\-chip} chip)
\item 
\bf{sls\_\-detector\_\-chip} \bf{get\-Chip} (int ichip, int imod)
\item 
int \bf{set\-Module} (int reg, int imod=-1)
\item 
int \bf{set\-Module} (\bf{sls\_\-detector\_\-module} module)
\item 
\bf{sls\_\-detector\_\-module} $\ast$ \bf{get\-Module} (int imod)
\item 
int \bf{get\-Threshold\-Energy} (int imod=-1)
\item 
int \bf{set\-Threshold\-Energy} (int e\_\-e\-V, int imod=-1, \bf{detector\-Settings} isettings=GET\_\-SETTINGS)
\item 
\bf{detector\-Settings} \bf{get\-Settings} (int imod=-1)
\item 
\bf{detector\-Settings} \bf{set\-Settings} (\bf{detector\-Settings} isettings, int imod=-1)
\item 
int \bf{start\-Acquisition} ()
\item 
int \bf{stop\-Acquisition} ()
\item 
int \bf{start\-Read\-Out} ()
\item 
int \bf{get\-Run\-Status} ()
\item 
int $\ast$ \bf{start\-And\-Read\-All} ()
\item 
int \bf{start\-And\-Read\-All\-No\-Wait} ()
\item 
int $\ast$ \bf{get\-Data\-From\-Detector\-No\-Wait} ()
\item 
int $\ast$ \bf{read\-Frame} ()
\item 
int $\ast$ \bf{read\-All} ()
\item 
int $\ast$ \bf{pop\-Data\-Queue} ()
\item 
\bf{detector\-Data} $\ast$ \bf{pop\-Final\-Data\-Queue} ()
\item 
int64\_\-t \bf{set\-Timer} (\bf{timer\-Index} index, int64\_\-t t=-1)
\item 
int64\_\-t \bf{get\-Time\-Left} (\bf{timer\-Index} index)
\item 
int \bf{set\-Speed} (\bf{speed\-Variable} sp, int value=-1)
\item 
int \bf{set\-Dynamic\-Range} (int n=-1)
\item 
int \bf{set\-ROI} (int nroi=-1, int $\ast$xmin=NULL, int $\ast$xmax=NULL, int $\ast$ymin=NULL, int $\ast$ymax=NULL)
\item 
int \bf{set\-Read\-Out\-Flags} (\bf{read\-Out\-Flags} flag)
\item 
int \bf{execute\-Trimming} (\bf{trim\-Mode} mode, int par1, int par2, int imod=-1)
\item 
int \bf{set\-Flat\-Field\-Correction} (string fname=\char`\"{}\char`\"{})
\item 
int \bf{get\-Flat\-Field\-Correction} (float $\ast$corr=NULL, float $\ast$ecorr=NULL)
\item 
int \bf{set\-Rate\-Correction} (float t=0)
\item 
int \bf{get\-Rate\-Correction} (float \&t)
\item 
int \bf{get\-Rate\-Correction} ()
\item 
int \bf{set\-Bad\-Channel\-Correction} (string fname=\char`\"{}\char`\"{})
\item 
int \bf{get\-Bad\-Channel\-Correction} (int $\ast$bad=NULL)
\item 
char $\ast$ \bf{get\-Bad\-Channel\-Correction\-File} ()
\item 
virtual int \bf{set\-Angular\-Conversion} (string fname=\char`\"{}\char`\"{})=0
\item 
virtual int \bf{get\-Angular\-Conversion} (int \&direction, \bf{angle\-Conversion\-Constant} $\ast$angconv=NULL)=0
\item 
virtual char $\ast$ \bf{get\-Angular\-Conversion} ()=0
\item 
virtual float \bf{set\-Global\-Offset} (float f)=0
\item 
virtual float \bf{set\-Fine\-Offset} (float f)=0
\item 
virtual float \bf{get\-Fine\-Offset} ()=0
\item 
virtual float \bf{get\-Global\-Offset} ()=0
\item 
virtual int \bf{set\-Positions} (int n\-Pos, float $\ast$\bf{pos})=0
\item 
virtual int \bf{get\-Positions} (float $\ast$\bf{pos}=NULL)=0
\item 
virtual float \bf{set\-Bin\-Size} (float bs)=0
\item 
virtual float \bf{get\-Bin\-Size} ()=0
\item 
float $\ast$ \bf{decode\-Data} (int $\ast$datain)
\item 
int \bf{flat\-Field\-Correct} (float datain, float errin, float \&dataout, float \&errout, float ffcoefficient, float fferr)
\item 
int \bf{flat\-Field\-Correct} (float $\ast$datain, float $\ast$errin, float $\ast$dataout, float $\ast$errout)
\item 
int \bf{rate\-Correct} (float datain, float errin, float \&dataout, float \&errout, float tau, float t)
\item 
int \bf{rate\-Correct} (float $\ast$datain, float $\ast$errin, float $\ast$dataout, float $\ast$errout)
\item 
virtual int \bf{reset\-Merging} (float $\ast$mp, float $\ast$mv, float $\ast$me, int $\ast$mm)=0
\item 
virtual int \bf{add\-To\-Merging} (float $\ast$p1, float $\ast$v1, float $\ast$e1, float $\ast$mp, float $\ast$mv, float $\ast$me, int $\ast$mm)=0
\item 
int \bf{finalize\-Merging} (float $\ast$mp, float $\ast$mv, float $\ast$me, int $\ast$mm)
\item 
int \bf{exit\-Server} ()
\item 
virtual void $\ast$ \bf{process\-Data} (int delflag=1)=0
\item 
\bf{sls\_\-detector\_\-module} $\ast$ \bf{create\-Module} ()
\item 
void \bf{delete\-Module} (\bf{sls\_\-detector\_\-module} $\ast$my\-Mod)
\item 
virtual void \bf{acquire} (int delflag=1)=0
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
int $\ast$ \bf{get\-Data\-From\-Detector} ()
\item 
int \bf{init\-Shared\-Memory} (\bf{detector\-Type} type=GENERIC, int id=0)
\item 
int \bf{free\-Shared\-Memory} ()
\item 
int \bf{initialize\-Detector\-Size} (\bf{detector\-Type} type)
\item 
int \bf{initialize\-Detector\-Structure} ()
\item 
int \bf{send\-Channel} (\bf{sls\_\-detector\_\-channel} $\ast$)
\item 
int \bf{send\-Chip} (\bf{sls\_\-detector\_\-chip} $\ast$)
\item 
int \bf{send\-Module} (\bf{sls\_\-detector\_\-module} $\ast$)
\item 
int \bf{receive\-Channel} (\bf{sls\_\-detector\_\-channel} $\ast$)
\item 
int \bf{receive\-Chip} (\bf{sls\_\-detector\_\-chip} $\ast$)
\item 
int \bf{receive\-Module} (\bf{sls\_\-detector\_\-module} $\ast$)
\item 
void \bf{start\-Thread} ()
\item 
int \bf{fill\-Bad\-Channel\-Mask} ()
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
\bf{shared\-Sls\-Detector} $\ast$ \bf{this\-Detector}
\item 
int \bf{online\-Flag}
\item 
int \bf{det\-Id}
\item 
int \bf{shm\-Id}
\item 
\bf{My\-Socket\-TCP} $\ast$ \bf{control\-Socket}
\item 
\bf{My\-Socket\-TCP} $\ast$ \bf{stop\-Socket}
\item 
\bf{My\-Socket\-TCP} $\ast$ \bf{data\-Socket}
\item 
queue$<$ int $\ast$ $>$ \bf{data\-Queue}
\item 
queue$<$ \bf{detector\-Data} $\ast$ $>$ \bf{final\-Data\-Queue}
\item 
float \bf{current\-Position}
\item 
float \bf{current\-Position\-Index}
\item 
float \bf{current\-I0}
\item 
float $\ast$ \bf{merging\-Bins}
\item 
float $\ast$ \bf{merging\-Counts}
\item 
float $\ast$ \bf{merging\-Errors}
\item 
int $\ast$ \bf{merging\-Multiplicity}
\item 
float $\ast$ \bf{ffcoefficients}
\item 
float $\ast$ \bf{fferrors}
\item 
\bf{sls\_\-detector\_\-module} $\ast$ \bf{detector\-Modules}
\item 
float $\ast$ \bf{dacs}
\item 
float $\ast$ \bf{adcs}
\item 
int $\ast$ \bf{chipregs}
\item 
int $\ast$ \bf{chanregs}
\item 
int $\ast$ \bf{bad\-Channel\-Mask}
\end{CompactItemize}
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \bf{shared\-Sls\-Detector}
\begin{CompactList}\small\item\em Structure allocated in shared memory to store detector settings and be accessed in parallel by several applications (take care of possible conflicts!). \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
This is the base class for all SLS detector functionalities. 

The \doxyref{sls\-Detector}{p.}{classslsDetector} class is expected to become the interface class for all SLS Detectors acquisition (and analysis) software.

\begin{Desc}
\item[Author:]Anna Bergamaschi \end{Desc}
\begin{Desc}
\item[Version:]0.1alpha \end{Desc}




\subsection{Member Typedef Documentation}
\index{slsDetector@{sls\-Detector}!sharedSlsDetector@{sharedSlsDetector}}
\index{sharedSlsDetector@{sharedSlsDetector}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef struct \bf{sls\-Detector::shared\-Sls\-Detector}  \bf{sls\-Detector::shared\-Sls\-Detector}}\label{classslsDetector_2dd6bff7d94ab8005c2797152b19264e}


Structure allocated in shared memory to store detector settings and be accessed in parallel by several applications (take care of possible conflicts!). 



\subsection{Member Enumeration Documentation}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}anonymous enum}\label{classslsDetector_ac085f1939dcfed328dc6ff4b11fdb44}


online flags enum\begin{Desc}
\item[See also:]\doxyref{set\-Online}{p.}{classslsDetector_f041f723f702c17de292061d6d609698} \end{Desc}
\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{GET_ONLINE_FLAG@{GET\_\-ONLINE\_\-FLAG}!slsDetector@{slsDetector}}\index{slsDetector@{slsDetector}!GET_ONLINE_FLAG@{GET\_\-ONLINE\_\-FLAG}}\item[{\em 
GET\_\-ONLINE\_\-FLAG\label{classslsDetector_ac085f1939dcfed328dc6ff4b11fdb44617c55ac8cf00235b76c1c1481238abb}
}]returns wether the detector is in online or offline state \index{OFFLINE_FLAG@{OFFLINE\_\-FLAG}!slsDetector@{slsDetector}}\index{slsDetector@{slsDetector}!OFFLINE_FLAG@{OFFLINE\_\-FLAG}}\item[{\em 
OFFLINE\_\-FLAG\label{classslsDetector_ac085f1939dcfed328dc6ff4b11fdb44da0a4f5b33e634292bc99256a9552f2f}
}]detector in offline state (i.e. no communication to the detector - using only local structure - no data acquisition possible!) \index{ONLINE_FLAG@{ONLINE\_\-FLAG}!slsDetector@{slsDetector}}\index{slsDetector@{slsDetector}!ONLINE_FLAG@{ONLINE\_\-FLAG}}\item[{\em 
ONLINE\_\-FLAG\label{classslsDetector_ac085f1939dcfed328dc6ff4b11fdb44d3b612a2eb0d1029bd260b502afcf632}
}]detector in online state (i.e. communication to the detector updating the local structure) \end{description}
\end{Desc}



\subsection{Constructor \& Destructor Documentation}
\index{slsDetector@{sls\-Detector}!slsDetector@{slsDetector}}
\index{slsDetector@{slsDetector}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}sls\-Detector::sls\-Detector (\bf{detector\-Type} {\em type} = {\tt GENERIC}, int {\em id} = {\tt 0})}\label{classslsDetector_eea9fc044ff9d496e4338efaaf176498}


(default) constructor \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]is needed to define the size of the detector shared memory 9defaults to GENERIC i.e. the largest shared memory needed by any \doxyref{sls\-Detector}{p.}{classslsDetector} is allocated \item[{\em id}]is the detector index which is needed to define the shared memory id. Different physical detectors should have different IDs in order to work independently \end{description}
\end{Desc}


sets online\-Flag to OFFLINE\_\-FLAG

Initlializes shared memory \begin{Desc}
\item[See also:]\doxyref{init\-Shared\-Memory}{p.}{classslsDetector_cb94b9bfa7bbea2d9e1b0289a272bca8}\end{Desc}
if it fails the detector id is incremented until it succeeds

Initializes the detector stucture \begin{Desc}
\item[See also:]\doxyref{initialize\-Detector\-Size}{p.}{classslsDetector_19f1c6d120293c98a0d2dc992e5616f8} \end{Desc}
\index{slsDetector@{sls\-Detector}!~slsDetector@{$\sim$slsDetector}}
\index{~slsDetector@{$\sim$slsDetector}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}sls\-Detector::$\sim$sls\-Detector ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_7653e532ff88dbf403e270769bccc509}


destructor 

\subsection{Member Function Documentation}
\index{slsDetector@{sls\-Detector}!acquire@{acquire}}
\index{acquire@{acquire}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void sls\-Detector::acquire (int {\em delflag} = {\tt 1})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_1af6548fd0d81d45909a5c805d4be7a8}


pure virtual function performs the complete acquisition and data processing moves the detector to next position \par
 starts and reads the detector \par
 reads the IC (if required) \par
 reads the encoder (iof required for angualr conversion) \par
 processes the data (flat field, rate, angular conversion and merging process\-Data()) /param delflag if 1 the data are processed, written to file and then deleted. If 0 they are added to the final\-Data\-Queue \begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::acquire()}{p.}{classmythenDetector_f393765b5a3d5f8f05251116f38d52dd} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_f393765b5a3d5f8f05251116f38d52dd}.\index{slsDetector@{sls\-Detector}!addToMerging@{addToMerging}}
\index{addToMerging@{addToMerging}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::add\-To\-Merging (float $\ast$ {\em p1}, float $\ast$ {\em v1}, float $\ast$ {\em e1}, float $\ast$ {\em mp}, float $\ast$ {\em mv}, float $\ast$ {\em me}, int $\ast$ {\em mm})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_feb8730f24292620e5d451cd2d4bb9cd}


pure virtual function merge dataset \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p1}]angular positions of dataset \item[{\em v1}]data \item[{\em e1}]errors \item[{\em mp}]already merged postions \item[{\em mv}]already merged data \item[{\em me}]already merged errors (squared sum) \item[{\em mm}]multiplicity of merged arrays \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::add\-To\-Merging}{p.}{classmythenDetector_eaaf7d7e3150f473e3bbcf59d91692c2} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_eaaf7d7e3150f473e3bbcf59d91692c2}.\index{slsDetector@{sls\-Detector}!analogTest@{analogTest}}
\index{analogTest@{analogTest}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ sls\-Detector::analog\-Test (\bf{analog\-Test\-Mode} {\em mode})}\label{classslsDetector_18f91f8cf70d2d4eef9b3488b90bac51}


analog test \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em modte}]test mode \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to acquired data\end{Desc}
not yet implemented \index{slsDetector@{sls\-Detector}!createFileName@{createFileName}}
\index{createFileName@{createFileName}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string sls\-Detector::create\-File\-Name ()}\label{classslsDetector_d055c470ae6faa973980f4dbf021132d}


generates file name without extension

always appends to file path and file name the run index.

in case also appends the position index

Filenames will be of the form: filepath/filename(\_\-px)\_\-i where x is the position index and i is the run index \index{slsDetector@{sls\-Detector}!createModule@{createModule}}
\index{createModule@{createModule}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{sls\_\-detector\_\-module} $\ast$ sls\-Detector::create\-Module ()}\label{classslsDetector_b1d4c6c01d1e10fe06bc83329410d4f4}


Allocates the memory for a \doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} structure and initializes it \begin{Desc}
\item[Returns:]my\-Mod the pointer to the allocate dmemory location \end{Desc}
\index{slsDetector@{sls\-Detector}!decodeData@{decodeData}}
\index{decodeData@{decodeData}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float $\ast$ sls\-Detector::decode\-Data (int $\ast$ {\em datain})}\label{classslsDetector_937d257464bade6dc6d3ab42c86843ba}


decode data from the detector converting them to an array of floats, one for each channle \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em datain}]data from the detector \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to a float array with a data per channel \end{Desc}


Reimplemented in \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_3e0573baf38c37818c7769fb351010b3}.\index{slsDetector@{sls\-Detector}!deleteModule@{deleteModule}}
\index{deleteModule@{deleteModule}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void sls\-Detector::delete\-Module (\bf{sls\_\-detector\_\-module} $\ast$ {\em my\-Mod})}\label{classslsDetector_48984c8d058355c5249233165bf0c410}


frees the memory for a \doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} structure \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em my\-Mod}]the pointer to the memory to be freed \end{description}
\end{Desc}
\index{slsDetector@{sls\-Detector}!digitalTest@{digitalTest}}
\index{digitalTest@{digitalTest}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::digital\-Test (\bf{digital\-Test\-Mode} {\em mode}, int {\em imod} = {\tt 0})}\label{classslsDetector_40906e79010db5b8082d4855a3824aa7}


Digital test of the modules \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mode}]test mode \item[{\em imod}]module number for chip test or module firmware test \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or error mask \end{Desc}
\index{slsDetector@{sls\-Detector}!dumpDetectorSetup@{dumpDetectorSetup}}
\index{dumpDetectorSetup@{dumpDetectorSetup}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::dump\-Detector\-Setup (string const  {\em fname})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_96428855d6e286408a52e675e045cf45}


Purely virtual function Should be implemented in the specific detector class /sa \doxyref{mythen\-Detector::dump\-Detector\-Setup}{p.}{classmythenDetector_a0fe9987e8fa240a312ad353ae539188} 

Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_a0fe9987e8fa240a312ad353ae539188}.\index{slsDetector@{sls\-Detector}!enableAnalogOutput@{enableAnalogOutput}}
\index{enableAnalogOutput@{enableAnalogOutput}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::enable\-Analog\-Output (int {\em imod}, int {\em ichip}, int {\em ichan})}\label{classslsDetector_b20fef344ee47114fccb4d1bc8c6e5bd}


enable analog output of channel ichan, chip ichip, module imod

not yet implemented \index{slsDetector@{sls\-Detector}!enableAnalogOutput@{enableAnalogOutput}}
\index{enableAnalogOutput@{enableAnalogOutput}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::enable\-Analog\-Output (int {\em ichan})}\label{classslsDetector_a83074759c48f194af2e45d1281cc818}


enable analog output of channel ichan

not yet implemented \index{slsDetector@{sls\-Detector}!execCommand@{execCommand}}
\index{execCommand@{execCommand}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::exec\-Command (string {\em cmd}, string {\em answer})}\label{classslsDetector_9fc0c9161e967094a535cc40bc33cc6b}


executes a system command on the server e.g. mount an nfs disk, reboot and returns answer etc. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]is the command to be executed \item[{\em answer}]is the answer from the detector \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIL depending on the command outcome \end{Desc}
\index{slsDetector@{sls\-Detector}!executeTrimming@{executeTrimming}}
\index{executeTrimming@{executeTrimming}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::execute\-Trimming (\bf{trim\-Mode} {\em mode}, int {\em par1}, int {\em par2}, int {\em imod} = {\tt -1})}\label{classslsDetector_a257317d18965a353679c66b15b0987d}


execute trimming \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mode}]trim mode \item[{\em par1}]if noise, beam or fixed setting trimming it is count limit, if improve maximum number of iterations \item[{\em par2}]if noise or beam nsigma, if improve par2!=means vthreshold will be optimized, if fixed settings par2$<$0 trimwith median, par2$>$=0 trim with level \item[{\em imod}]module number (-1 all) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIl (FAIL also if some channel are 0 or 63 \end{Desc}
\index{slsDetector@{sls\-Detector}!exists@{exists}}
\index{exists@{exists}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::exists ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_bf592960cebe5b3f1e2fdc77f770f17a}


sets the online\-Flag \begin{Desc}
\item[Returns:]1 if the detector structure has already be initlialized, 0 otherwise \end{Desc}
\index{slsDetector@{sls\-Detector}!exitServer@{exitServer}}
\index{exitServer@{exitServer}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::exit\-Server ()}\label{classslsDetector_466e9a65aa0b404c771d70c9f01af8b9}


turns off server \index{slsDetector@{sls\-Detector}!fillBadChannelMask@{fillBadChannelMask}}
\index{fillBadChannelMask@{fillBadChannelMask}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::fill\-Bad\-Channel\-Mask ()\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_6a0ebe013e27c065b2f67158a27f64ac}


fill bad channel mask (0 if channel is good, 1 if bad) \index{slsDetector@{sls\-Detector}!finalizeMerging@{finalizeMerging}}
\index{finalizeMerging@{finalizeMerging}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::finalize\-Merging (float $\ast$ {\em mp}, float $\ast$ {\em mv}, float $\ast$ {\em me}, int $\ast$ {\em mm})}\label{classslsDetector_8f73479f68ca2171fd2108c2f157299e}


pure virtual function calculates the \char`\"{}final\char`\"{} positions, data value and errors for the emrged data \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mp}]already merged postions \item[{\em mv}]already merged data \item[{\em me}]already merged errors (squared sum) \item[{\em mm}]multiplicity of merged arrays \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]FAIL or the number of non empty bins (i.e. points belonging to the pattern) \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::finalize\-Merging}{p.}{classmythenDetector_a919a42bd89fe21c4086bae5f1fb2f32} \end{Desc}


Reimplemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_a919a42bd89fe21c4086bae5f1fb2f32}.\index{slsDetector@{sls\-Detector}!flatFieldCorrect@{flatFieldCorrect}}
\index{flatFieldCorrect@{flatFieldCorrect}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::flat\-Field\-Correct (float $\ast$ {\em datain}, float $\ast$ {\em errin}, float $\ast$ {\em dataout}, float $\ast$ {\em errout})}\label{classslsDetector_1e6633db752222079b39a187e4d0e658}


flat field correct data \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em datain}]data array \item[{\em errin}]error array on data (if NULL will default to sqrt(datain) \item[{\em dataout}]array of corrected data \item[{\em errout}]error on corrected data (if not NULL) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 \end{Desc}
\index{slsDetector@{sls\-Detector}!flatFieldCorrect@{flatFieldCorrect}}
\index{flatFieldCorrect@{flatFieldCorrect}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::flat\-Field\-Correct (float {\em datain}, float {\em errin}, float \& {\em dataout}, float \& {\em errout}, float {\em ffcoefficient}, float {\em fferr})}\label{classslsDetector_24c7dd58e00df0bf62221b7572430740}


flat field correct data \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em datain}]data \item[{\em errin}]error on data (if$<$=0 will default to sqrt(datain) \item[{\em dataout}]corrected data \item[{\em errout}]error on corrected data \item[{\em ffcoefficient}]flat field correction coefficient \item[{\em fferr}]erro on ffcoefficient \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 \end{Desc}
\index{slsDetector@{sls\-Detector}!freeSharedMemory@{freeSharedMemory}}
\index{freeSharedMemory@{freeSharedMemory}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::free\-Shared\-Memory ()\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_5de7fb0d82ae2bcc406385373e665c6f}


Frees the shared memory - should not be used \index{slsDetector@{sls\-Detector}!getADC@{getADC}}
\index{getADC@{getADC}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float sls\-Detector::get\-ADC (\bf{dac\-Index} {\em index}, int {\em imod} = {\tt 0})}\label{classslsDetector_fa99bd04043c23b7ab583159dabebf93}


set dacs value \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]ADC index \item[{\em imod}]module number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current ADC value \end{Desc}
\index{slsDetector@{sls\-Detector}!getAngularConversion@{getAngularConversion}}
\index{getAngularConversion@{getAngularConversion}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual char$\ast$ sls\-Detector::get\-Angular\-Conversion ()\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_0c2e502441fd74ec7fc20604c5c08c27}


pure virtual function returns the angular conversion file \begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::get\-Angular\-Conversion}{p.}{classmythenDetector_b2b2f17c36883323ad0abf762c63494f} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_fab45faa264e44178fc52300eaf92cad}.\index{slsDetector@{sls\-Detector}!getAngularConversion@{getAngularConversion}}
\index{getAngularConversion@{getAngularConversion}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::get\-Angular\-Conversion (int \& {\em direction}, \bf{angle\-Conversion\-Constant} $\ast$ {\em angconv} = {\tt NULL})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_a110e9eb82123756cf89fda0a4cb464d}


pure virtual function get angular conversion \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em reference}]to diffractometer direction \item[{\em angconv}]array that will be filled with the angular conversion constants \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if angular conversion disabled, $>$0 otherwise \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::get\-Angular\-Conversion}{p.}{classmythenDetector_b2b2f17c36883323ad0abf762c63494f} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_b2b2f17c36883323ad0abf762c63494f}.\index{slsDetector@{sls\-Detector}!getBadChannelCorrection@{getBadChannelCorrection}}
\index{getBadChannelCorrection@{getBadChannelCorrection}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Bad\-Channel\-Correction (int $\ast$ {\em bad} = {\tt NULL})}\label{classslsDetector_62f84759c85d7f4323bb34bf2a4dc5c5}


get bad channels correction \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em bad}]pointer to array that if bad!=NULL will be filled with the bad channel list \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if bad channel disabled or no bad channels, $>$0 otherwise \end{Desc}
\index{slsDetector@{sls\-Detector}!getBadChannelCorrectionFile@{getBadChannelCorrectionFile}}
\index{getBadChannelCorrectionFile@{getBadChannelCorrectionFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::get\-Bad\-Channel\-Correction\-File ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_0b562f90b64c80e3eb64e9e2153bb234}


returns the bad channel list file \index{slsDetector@{sls\-Detector}!getBinSize@{getBinSize}}
\index{getBinSize@{getBinSize}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual float sls\-Detector::get\-Bin\-Size ()\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_7d83754e3f41042caa9297da9a33b714}


pure virtual function return detector bin size used for merging (approx angular resolution) \begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::get\-Bin\-Size}{p.}{classmythenDetector_9fd4e479d7eb3f9c53d5d56a43bbccaf} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_9fd4e479d7eb3f9c53d5d56a43bbccaf}.\index{slsDetector@{sls\-Detector}!getCalDir@{getCalDir}}
\index{getCalDir@{getCalDir}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::get\-Cal\-Dir ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_102679594e60ed261daff24b4aeac21a}


returns the location of the calibration files \begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getChannel@{getChannel}}
\index{getChannel@{getChannel}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{sls\_\-detector\_\-channel} sls\-Detector::get\-Channel (int {\em ichan}, int {\em ichip}, int {\em imod})}\label{classslsDetector_05f1a170b7416db77bf7cff762e9b58a}


get channel \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ichan}]channel number \item[{\em ichip}]chip number \item[{\em imod}]module number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current channel structure for channel \end{Desc}
\index{slsDetector@{sls\-Detector}!getChip@{getChip}}
\index{getChip@{getChip}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{sls\_\-detector\_\-chip} sls\-Detector::get\-Chip (int {\em ichip}, int {\em imod})}\label{classslsDetector_2eb7f887a72cc80d6b00cadd4731e672}


get chip \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ichip}]chip number \item[{\em imod}]module number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current chip structure for channel\end{Desc}
\begin{Desc}
\item[\bf{Bug}]probably does not return corretly! \end{Desc}
\index{slsDetector@{sls\-Detector}!getControlPort@{getControlPort}}
\index{getControlPort@{getControlPort}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Control\-Port ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_40ffd69f1c40b26575954e826cdf606a}


returns the detector control port\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getDataFromDetector@{getDataFromDetector}}
\index{getDataFromDetector@{getDataFromDetector}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int $\ast$ sls\-Detector::get\-Data\-From\-Detector ()\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_b1982e89f8e8de63c807a707ccba594c}


Receives a data frame from the detector socket \begin{Desc}
\item[Returns:]pointer to the data (or NULL if failed) \end{Desc}
\index{slsDetector@{sls\-Detector}!getDataFromDetectorNoWait@{getDataFromDetectorNoWait}}
\index{getDataFromDetectorNoWait@{getDataFromDetectorNoWait}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int $\ast$ sls\-Detector::get\-Data\-From\-Detector\-No\-Wait ()}\label{classslsDetector_5b678231f1a0fafc518a95b6e58f00a8}


receives a data frame from the detector socket \begin{Desc}
\item[Returns:]pointer to the data or NULL. If NULL disconnects the socket \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{get\-Data\-From\-Detector}{p.}{classslsDetector_b1982e89f8e8de63c807a707ccba594c} \end{Desc}
\index{slsDetector@{sls\-Detector}!getDataPort@{getDataPort}}
\index{getDataPort@{getDataPort}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Data\-Port ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_35043766eecb3d760fd95d891bed8b16}


returns the detector data port\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getDetectorType@{getDetectorType}}
\index{getDetectorType@{getDetectorType}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void sls\-Detector::get\-Detector\-Type (char $\ast$ {\em type})}\label{classslsDetector_d63d6420e411ff4b962930d9c4fd615d}


gets detector type normally the detector knows what type of detector it is \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]is the string where the detector type will be written (\char`\"{}Mythen\char`\"{}, \char`\"{}Pilatus\char`\"{}, \char`\"{}XFS\char`\"{}, \char`\"{}Gotthard\char`\"{}, Agipd\char`\"{}) \end{description}
\end{Desc}
\index{slsDetector@{sls\-Detector}!getFileIndex@{getFileIndex}}
\index{getFileIndex@{getFileIndex}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-File\-Index ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_68b41fa20ddd8c6c67ac00dfea3c9796}


returns the default output file index \begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getFileName@{getFileName}}
\index{getFileName@{getFileName}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::get\-File\-Name ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_717a3c59681f81ceaf5245a073eeacdb}


returns the default output files root name \begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getFilePath@{getFilePath}}
\index{getFilePath@{getFilePath}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::get\-File\-Path ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_b4158bdacd10fccedeab9eacbd1f4304}


returns the default output files path \begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getFineOffset@{getFineOffset}}
\index{getFineOffset@{getFineOffset}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual float sls\-Detector::get\-Fine\-Offset ()\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_8e39680a1a096ca13ed672504b5b08e6}


pure virtual function get detector fine offset \begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::get\-Fine\-Offset}{p.}{classmythenDetector_00720f1445f3f301fa3316828d978de6} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_00720f1445f3f301fa3316828d978de6}.\index{slsDetector@{sls\-Detector}!getFlatFieldCorrection@{getFlatFieldCorrection}}
\index{getFlatFieldCorrection@{getFlatFieldCorrection}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Flat\-Field\-Correction (float $\ast$ {\em corr} = {\tt NULL}, float $\ast$ {\em ecorr} = {\tt NULL})}\label{classslsDetector_062700a0470f96b20ba842bcd6aa9b63}


get flat field corrections \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em corr}]if !=NULL will be filled with the correction coefficients \item[{\em ecorr}]if !=NULL will be filled with the correction coefficients errors \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if ff correction disabled, $>$0 otherwise \end{Desc}
\index{slsDetector@{sls\-Detector}!getGlobalOffset@{getGlobalOffset}}
\index{getGlobalOffset@{getGlobalOffset}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual float sls\-Detector::get\-Global\-Offset ()\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_8964e3efa73f29b04bd9479578bd1c59}


pure virtual function get detector global offset \begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::get\-Global\-Offset}{p.}{classmythenDetector_b2086f336d7198381453556b520dd556} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_b2086f336d7198381453556b520dd556}.\index{slsDetector@{sls\-Detector}!getHostname@{getHostname}}
\index{getHostname@{getHostname}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::get\-Hostname ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_fad06908ad59bfd8a8577899d6aa1843}


returns the detector hostname\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getId@{getId}}
\index{getId@{getId}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int64\_\-t sls\-Detector::get\-Id (\bf{id\-Mode} {\em mode}, int {\em imod} = {\tt 0})}\label{classslsDetector_92f9261c62652e3643eebfdfa9942099}


get detector ids/versions for module \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mode}]which id/version has to be read \item[{\em imod}]module number for module serial number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]id \end{Desc}
\index{slsDetector@{sls\-Detector}!getMaxNumberOfModules@{getMaxNumberOfModules}}
\index{getMaxNumberOfModules@{getMaxNumberOfModules}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Max\-Number\-Of\-Modules (\bf{dimension} {\em d} = {\tt X})}\label{classslsDetector_d608a77a1c64989ad82175991be0a9b5}


get the maximum size of the detector \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em d}]dimension \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]maximum number of modules that can be installed in direction d \end{Desc}
\index{slsDetector@{sls\-Detector}!getModule@{getModule}}
\index{getModule@{getModule}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{sls\_\-detector\_\-module} $\ast$ sls\-Detector::get\-Module (int {\em imod})}\label{classslsDetector_32557eee02e541840246b4b4a3e76c83}


get module \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em imod}]module number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to module structure (which has bee created and must then be deleted) \end{Desc}
\index{slsDetector@{sls\-Detector}!getPositions@{getPositions}}
\index{getPositions@{getPositions}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::get\-Positions (float $\ast$ {\em pos} = {\tt NULL})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_248794801b9794d20e7d58bceab564ab}


pure virtual function get positions for the acquisition \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pos}]array which will contain the encoder positions \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]number of positions \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::get\-Positions}{p.}{classmythenDetector_0d306720dced0d3576474978b06b4be4} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_0d306720dced0d3576474978b06b4be4}.\index{slsDetector@{sls\-Detector}!getRateCorrection@{getRateCorrection}}
\index{getRateCorrection@{getRateCorrection}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Rate\-Correction ()}\label{classslsDetector_c7a659ab136c9e5ece059fc9356c6a91}


get rate correction \begin{Desc}
\item[Returns:]0 if rate correction disabled, $>$0 otherwise \end{Desc}
\index{slsDetector@{sls\-Detector}!getRateCorrection@{getRateCorrection}}
\index{getRateCorrection@{getRateCorrection}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Rate\-Correction (float \& {\em t})}\label{classslsDetector_b997c9997d91725bec43254e6d05191a}


get rate correction \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]reference for dead time \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if rate correction disabled, $>$0 otherwise \end{Desc}
\index{slsDetector@{sls\-Detector}!getRunStatus@{getRunStatus}}
\index{getRunStatus@{getRunStatus}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Run\-Status ()}\label{classslsDetector_567629b942b153a03cfc66d4d26c5daa}


get run status \begin{Desc}
\item[Returns:]status mask \end{Desc}
\index{slsDetector@{sls\-Detector}!getSettings@{getSettings}}
\index{getSettings@{getSettings}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{detector\-Settings} sls\-Detector::get\-Settings (int {\em imod} = {\tt -1})}\label{classslsDetector_cfccfada625943feb410c6a14607a366}


get detector settings \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em imod}]module number (-1 all) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current settings \end{Desc}
\index{slsDetector@{sls\-Detector}!getStopPort@{getStopPort}}
\index{getStopPort@{getStopPort}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Stop\-Port ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_80ab8f7f4cc6b2e92017a0c77f961b70}


returns the detector stop port\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getThresholdEnergy@{getThresholdEnergy}}
\index{getThresholdEnergy@{getThresholdEnergy}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Threshold\-Energy (int {\em imod} = {\tt -1})}\label{classslsDetector_f2da634bb9551730c12e07e2b772bf06}


get threshold energy \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em imod}]module number (-1 all) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current threshold value for imod in ev (-1 failed) \end{Desc}
\index{slsDetector@{sls\-Detector}!getTimeLeft@{getTimeLeft}}
\index{getTimeLeft@{getTimeLeft}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int64\_\-t sls\-Detector::get\-Time\-Left (\bf{timer\-Index} {\em index})}\label{classslsDetector_61f072fcaf0a359148f52ea34769c846}


get current timer value \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]timer index \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]elapsed time value in ns or number of...(e.g. frames, gates, probes) \end{Desc}
\index{slsDetector@{sls\-Detector}!getTrimDir@{getTrimDir}}
\index{getTrimDir@{getTrimDir}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::get\-Trim\-Dir ()\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_d4a858d9b3a1b31c5d5decdc9d757267}


returns the detector trimbit directory\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!getTrimEn@{getTrimEn}}
\index{getTrimEn@{getTrimEn}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::get\-Trim\-En (int $\ast$ {\em en} = {\tt NULL})\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_8862569a4a2530558914daa2e2251138}


returns the number of trim energies and their value\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em point}]to the array that will contain the trim energies (in ev) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]number of trim energies\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!giveCalibrationPulse@{giveCalibrationPulse}}
\index{giveCalibrationPulse@{giveCalibrationPulse}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::give\-Calibration\-Pulse (float {\em vcal}, int {\em npulses})}\label{classslsDetector_a8fafd5690120579f484e326dc6fd9be}


give a train of calibration pulses \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em vcal}]pulse amplitude \item[{\em npulses}]number of pulses\end{description}
\end{Desc}
not yet implemented \index{slsDetector@{sls\-Detector}!initializeDetectorSize@{initializeDetectorSize}}
\index{initializeDetectorSize@{initializeDetectorSize}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::initialize\-Detector\-Size (\bf{detector\-Type} {\em type})\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_19f1c6d120293c98a0d2dc992e5616f8}


Initializes the this\-Detector structure \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]is needed to define the number of channels, chips, modules etc. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}


if the shared memory has newly be created, initialize the detector variables

set hostname to default

set ports to defaults

set this\-Detector-$>$my\-Detector\-Type to type and according to this set n\-Chans, n\-Chips, n\-Dacs, n\-Adcs, n\-Mod\-Max, dynamic\-Range, n\-Mod

number of modules is initally the maximum number of modules

calculates the expected data size

set trim\-Dsdir, cal\-Dir and file\-Path to default to home directory

set file\-Name to default to run

set file\-Index to default to 0

set number of trim energies to 0

set correction mask to 0

set deat time

sets bad channel list file to none

set number of bad chans to 0

set number of bad flat field chans to 0

set angular direction to 1

set fine offset to 0

set global offset to 0

set number of rois to 0

set readoutflags to none

set current settings to uninitialized

set threshold to -1

set clockdivider to 1

set number of positions to 0

sets angular conversion file to none

set binsize

calculates the memory offsets for flat field coefficients and errors, module structures, dacs, adcs, chips and channels

also in case this\-Detector alread existed initialize the pointer for flat field coefficients and errors, module structures, dacs, adcs, chips and channels

if this\-Detector is new, initialize its structures \begin{Desc}
\item[See also:]\doxyref{initialize\-Detector\-Structure()}{p.}{classslsDetector_1c39e47efe5d8794b68cb32295cddf3c};\end{Desc}
set this\-Detector-$>$already\-Existing=1

fill the Bad\-Channel\-Mask \begin{Desc}
\item[See also:]\doxyref{fill\-Bad\-Channel\-Mask}{p.}{classslsDetector_6a0ebe013e27c065b2f67158a27f64ac} \end{Desc}
\index{slsDetector@{sls\-Detector}!initializeDetectorStructure@{initializeDetectorStructure}}
\index{initializeDetectorStructure@{initializeDetectorStructure}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::initialize\-Detector\-Structure ()\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_1c39e47efe5d8794b68cb32295cddf3c}


Initializes the module structures in this\-Detector if the detector did not exists before 

for each of the detector modules up to the maximum number which can be installed initlialize the \doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} structure \begin{Desc}
\item[See also:]\doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module}\end{Desc}
sets the size of the module to n\-Chans, n\-Chips etc.

initializes the serial number and register to 0

initializes the dacs values to 0

initializes the adc values to 0

initializes the chip registers to 0

initializes the channel registers to 0

initialize gain and offset to -1 \index{slsDetector@{sls\-Detector}!initSharedMemory@{initSharedMemory}}
\index{initSharedMemory@{initSharedMemory}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::init\-Shared\-Memory (\bf{detector\-Type} {\em type} = {\tt GENERIC}, int {\em id} = {\tt 0})\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_cb94b9bfa7bbea2d9e1b0289a272bca8}


Initializes the shared memory \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]is needed to define the size of the shared memory \item[{\em id}]is the detector id needed to define the shared memory id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]shm\_\-id shared memory id \end{Desc}


the shared memory key is set to DEFAULT\_\-SHM\_\-KEY+id

The size of the shared memory is: size of shared structure + ffcoefficents +fferrors + modules+ dacs+adcs+chips+chans

this\-Detector pointer is set to the memory address of the shared memory

shm\_\-id returns -1 is shared memory initialization fails \index{slsDetector@{sls\-Detector}!popDataQueue@{popDataQueue}}
\index{popDataQueue@{popDataQueue}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int $\ast$ sls\-Detector::pop\-Data\-Queue ()}\label{classslsDetector_ee85bddb6aa7b37c99f1397112e6c8b6}


pops the data from the data queue \begin{Desc}
\item[Returns:]pointer to the popped data or NULL if the queue is empty. \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{data\-Queue}{p.}{classslsDetector_52e9fe9baf37db001cdf58f982ab5dd6} \end{Desc}
\index{slsDetector@{sls\-Detector}!popFinalDataQueue@{popFinalDataQueue}}
\index{popFinalDataQueue@{popFinalDataQueue}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{detector\-Data} $\ast$ sls\-Detector::pop\-Final\-Data\-Queue ()}\label{classslsDetector_1f8b5d695dbf8865665261a02ced3238}


pops the data from thepostprocessed data queue \begin{Desc}
\item[Returns:]pointer to the popped data or NULL if the queue is empty. \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{final\-Data\-Queue}{p.}{classslsDetector_4ac6f49427b58349fe54fbaa4e16fa9c} \end{Desc}
\index{slsDetector@{sls\-Detector}!processData@{processData}}
\index{processData@{processData}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void$\ast$ sls\-Detector::process\-Data (int {\em delflag} = {\tt 1})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_3e93c7da79e5f72e3a3c881aefdea5d3}


pure virtual function function for processing data /param delflag if 1 the data are processed, written to file and then deleted. If 0 they are added to the final\-Data\-Queue \begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::process\-Data}{p.}{classmythenDetector_2555fc046cd8d5ba7116003ad4027112} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_2555fc046cd8d5ba7116003ad4027112}.\index{slsDetector@{sls\-Detector}!rateCorrect@{rateCorrect}}
\index{rateCorrect@{rateCorrect}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::rate\-Correct (float $\ast$ {\em datain}, float $\ast$ {\em errin}, float $\ast$ {\em dataout}, float $\ast$ {\em errout})}\label{classslsDetector_518feacfa3a1d6156779f8eaacdf86d3}


rate correct data \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em datain}]data array \item[{\em errin}]error array on data (if NULL will default to sqrt(datain) \item[{\em dataout}]array of corrected data \item[{\em errout}]error on corrected data (if not NULL) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 \end{Desc}
\index{slsDetector@{sls\-Detector}!rateCorrect@{rateCorrect}}
\index{rateCorrect@{rateCorrect}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::rate\-Correct (float {\em datain}, float {\em errin}, float \& {\em dataout}, float \& {\em errout}, float {\em tau}, float {\em t})}\label{classslsDetector_e8c2d03ab2c870d2f1ff7a861cfeb6d1}


rate correct data \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em datain}]data \item[{\em errin}]error on data (if$<$=0 will default to sqrt(datain) \item[{\em dataout}]corrected data \item[{\em errout}]error on corrected data \item[{\em tau}]dead time 9in ns) \item[{\em t}]acquisition time (in ns) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 \end{Desc}
\index{slsDetector@{sls\-Detector}!readAll@{readAll}}
\index{readAll@{readAll}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int $\ast$ sls\-Detector::read\-All ()}\label{classslsDetector_87acdd8cd43d30dc3dd88763b6e23d08}


asks and receives all data from the detector and puts them in a data queue \begin{Desc}
\item[Returns:]pointer to the front of the queue or NULL. \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{get\-Data\-From\-Detector}{p.}{classslsDetector_b1982e89f8e8de63c807a707ccba594c} \doxyref{data\-Queue}{p.}{classslsDetector_52e9fe9baf37db001cdf58f982ab5dd6} \end{Desc}
\index{slsDetector@{sls\-Detector}!readAngularConversion@{readAngularConversion}}
\index{readAngularConversion@{readAngularConversion}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::read\-Angular\-Conversion (string {\em fname} = {\tt \char`\"{}\char`\"{}})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_cd9d6358db471600f2e1a143a53c61c1}


Pure virtual function reads an angular conversion file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]file to be read \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{angle\-Conversion\-Constant}{p.}{structangleConversionConstant} \doxyref{mythen\-Detector::read\-Angular\-Conversion}{p.}{classmythenDetector_33bf1b939eb877bbd4aa42f400d7ca36} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_33bf1b939eb877bbd4aa42f400d7ca36}.\index{slsDetector@{sls\-Detector}!readCalibrationFile@{readCalibrationFile}}
\index{readCalibrationFile@{readCalibrationFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::read\-Calibration\-File (string {\em fname}, float \& {\em gain}, float \& {\em offset})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_6c7f837f0820b08f41649c30151cb7ac}


Pure virtual function reads a calibration file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]file to be read \item[{\em gain}]reference to the gain variable  reference to the offset variable \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \doxyref{mythen\-Detector::read\-Calibration\-File}{p.}{classmythenDetector_f8f1b7b42012420fc557aacd714140f8} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_f8f1b7b42012420fc557aacd714140f8}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_6b1b4b5328a5d8c423e9a7a8a950028f}.\index{slsDetector@{sls\-Detector}!readConfigurationFile@{readConfigurationFile}}
\index{readConfigurationFile@{readConfigurationFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::read\-Configuration\-File (string const  {\em fname})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_80266f80cfe49c2ccec7118de341d983}


Purely virtual function Should be implemented in the specific detector class /sa \doxyref{mythen\-Detector::read\-Configuration\-File}{p.}{classmythenDetector_92a32bcc57919fcf9eea844905640e90} 

Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_92a32bcc57919fcf9eea844905640e90}.\index{slsDetector@{sls\-Detector}!readDataFile@{readDataFile}}
\index{readDataFile@{readDataFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::read\-Data\-File (string {\em fname}, int $\ast$ {\em data})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_4239e7a357df82640464c0f2d0a18d69}


Pure virtual function reads a data file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]of the file to be read \item[{\em data}]array of data values \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIL if it could not read the file or data=NULL \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::read\-Data\-File}{p.}{classmythenDetector_1937a5355eed0dc553cb05d2098f7c47} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_d83819d61ea01148cf18cd3c46f2a9f7}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_a6afa206101506d7f95d1ec835fbf843}.\index{slsDetector@{sls\-Detector}!readDataFile@{readDataFile}}
\index{readDataFile@{readDataFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::read\-Data\-File (string {\em fname}, float $\ast$ {\em data}, float $\ast$ {\em err} = {\tt NULL}, float $\ast$ {\em ang} = {\tt NULL}, char {\em dataformat} = {\tt 'f'}, int {\em nch} = {\tt 0})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_86df95809e0e7979eafc04b2b868843d}


Pure virtual function reads a data file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]of the file to be read \item[{\em data}]array of data values to be filled \item[{\em err}]array of arrors on the data. If NULL no errors are expected on the file\item[{\em ang}]array of angular values. If NULL data are expected in the form chan-val(-err) otherwise ang-val(-err) \item[{\em dataformat}]format of the data: can be 'i' integer or 'f' float (default) \item[{\em nch}]number of channels to be written to file. if $<$=0 defaults to the number of installed channels of the detector \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIL if it could not read the file or data=NULL\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::read\-Data\-File}{p.}{classmythenDetector_1937a5355eed0dc553cb05d2098f7c47} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_1937a5355eed0dc553cb05d2098f7c47}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_4d0b7da609b9a0457656bfc8cf0a7997}.\index{slsDetector@{sls\-Detector}!readFrame@{readFrame}}
\index{readFrame@{readFrame}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int $\ast$ sls\-Detector::read\-Frame ()}\label{classslsDetector_b352d85c5a4f415d1ec930d17bae87fa}


asks and receives a data frame from the detector \begin{Desc}
\item[Returns:]pointer to the data or NULL. If NULL disconnects the socket \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{get\-Data\-From\-Detector}{p.}{classslsDetector_b1982e89f8e8de63c807a707ccba594c} \end{Desc}
\index{slsDetector@{sls\-Detector}!readRegister@{readRegister}}
\index{readRegister@{readRegister}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::read\-Register (int {\em addr})}\label{classslsDetector_89ba6d2d8e79a60270e7e1c217df2d79}


read register \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current register value \end{Desc}
\index{slsDetector@{sls\-Detector}!readTrimFile@{readTrimFile}}
\index{readTrimFile@{readTrimFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual \bf{sls\_\-detector\_\-module}$\ast$ sls\-Detector::read\-Trim\-File (string {\em fname}, \bf{sls\_\-detector\_\-module} $\ast$ {\em my\-Mod} = {\tt NULL})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_612b52469e27c6675969499d3680abe6}


Pure virtual function reads a trim file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]name of the file to be read \item[{\em my\-Mod}]pointer to the module structure which has to be set. \par
 If it is NULL a new module structure will be created \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the pointer to my\-Mod or NULL if reading the file failed \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::read\-Trim\-File}{p.}{classmythenDetector_2120f9105997fd8f8bf9165dbffc55e7} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_2120f9105997fd8f8bf9165dbffc55e7}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_f24af0459e8eb45c1bc9c68a870e5094}.\index{slsDetector@{sls\-Detector}!receiveChannel@{receiveChannel}}
\index{receiveChannel@{receiveChannel}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::receive\-Channel (\bf{sls\_\-detector\_\-channel} $\ast$)\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_39f8959a55e92c7b0817529270be7667}


receive a \doxyref{sls\_\-detector\_\-channel}{p.}{structsls__detector__channel} structure over socket \index{slsDetector@{sls\-Detector}!receiveChip@{receiveChip}}
\index{receiveChip@{receiveChip}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::receive\-Chip (\bf{sls\_\-detector\_\-chip} $\ast$)\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_21d070352bfbf4745543c572bd6ae8f7}


receive a \doxyref{sls\_\-detector\_\-chip}{p.}{structsls__detector__chip} structure over socket \index{slsDetector@{sls\-Detector}!receiveModule@{receiveModule}}
\index{receiveModule@{receiveModule}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::receive\-Module (\bf{sls\_\-detector\_\-module} $\ast$)\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_1356b4fabe6b1aaa9c67939ff9331f98}


receive a \doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} structure over socket \index{slsDetector@{sls\-Detector}!resetMerging@{resetMerging}}
\index{resetMerging@{resetMerging}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::reset\-Merging (float $\ast$ {\em mp}, float $\ast$ {\em mv}, float $\ast$ {\em me}, int $\ast$ {\em mm})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_20156c620f868445e454bc4115871822}


pure virtual function sets the arrays of the merged data to 0. NB The array should be created with size $>$= 360./get\-Bin\-Size(); \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mp}]already merged postions \item[{\em mv}]already merged data \item[{\em me}]already merged errors (squared sum) \item[{\em mm}]multiplicity of merged arrays \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIL \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::reset\-Merging}{p.}{classmythenDetector_7d38c9af0d94bc15571c3c15b38f39a8} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_7d38c9af0d94bc15571c3c15b38f39a8}.\index{slsDetector@{sls\-Detector}!retrieveDetectorSetup@{retrieveDetectorSetup}}
\index{retrieveDetectorSetup@{retrieveDetectorSetup}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::retrieve\-Detector\-Setup (string const  {\em fname})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_0ec6aa8998db1bee1b00aeecbe870d5f}


Purely virtual function Should be implemented in the specific detector class /sa \doxyref{mythen\-Detector::retrieve\-Detector\-Setup}{p.}{classmythenDetector_8eedcd0b6739dd878559de5b675fae83} 

Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_8eedcd0b6739dd878559de5b675fae83}.\index{slsDetector@{sls\-Detector}!sendChannel@{sendChannel}}
\index{sendChannel@{sendChannel}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::send\-Channel (\bf{sls\_\-detector\_\-channel} $\ast$)\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_5cd249f9a287b25af9a3a7e7e675c559}


send a \doxyref{sls\_\-detector\_\-channel}{p.}{structsls__detector__channel} structure over socket \index{slsDetector@{sls\-Detector}!sendChip@{sendChip}}
\index{sendChip@{sendChip}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::send\-Chip (\bf{sls\_\-detector\_\-chip} $\ast$)\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_1e92a814b83501cdef5771c1e5c477aa}


send a \doxyref{sls\_\-detector\_\-chip}{p.}{structsls__detector__chip} structure over socket \index{slsDetector@{sls\-Detector}!sendModule@{sendModule}}
\index{sendModule@{sendModule}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::send\-Module (\bf{sls\_\-detector\_\-module} $\ast$)\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_cc29561aa2b22ee49038c7bdf2be5ad7}


send a \doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} structure over socket \index{slsDetector@{sls\-Detector}!setAngularConversion@{setAngularConversion}}
\index{setAngularConversion@{setAngularConversion}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::set\-Angular\-Conversion (string {\em fname} = {\tt \char`\"{}\char`\"{}})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_0a17abc301de750f7dafd43b7ad8b0c9}


pure virtual function set angular conversion \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]file with angular conversion constants (\char`\"{}\char`\"{} disable) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if angular conversion disabled, $>$0 otherwise \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::set\-Angular\-Conversion}{p.}{classmythenDetector_78efe554a277de7fb8759307992fc61b} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_78efe554a277de7fb8759307992fc61b}.\index{slsDetector@{sls\-Detector}!setBadChannelCorrection@{setBadChannelCorrection}}
\index{setBadChannelCorrection@{setBadChannelCorrection}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Bad\-Channel\-Correction (string {\em fname} = {\tt \char`\"{}\char`\"{}})}\label{classslsDetector_45833eb571b8cb20225f4046e2a17e5a}


set bad channels correction \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]file with bad channel list (\char`\"{}\char`\"{} disable) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if bad channel disabled, $>$0 otherwise \end{Desc}
\index{slsDetector@{sls\-Detector}!setBinSize@{setBinSize}}
\index{setBinSize@{setBinSize}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual float sls\-Detector::set\-Bin\-Size (float {\em bs})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_1a2ebbe67dae42059723071f437eb721}


pure virtual function set detector bin size used for merging (approx angular resolution) \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em bs}]bin size in degrees \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current bin size \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::set\-Bin\-Size}{p.}{classmythenDetector_8f466447f886379204a59eb6785f1ed0} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_8f466447f886379204a59eb6785f1ed0}.\index{slsDetector@{sls\-Detector}!setCalDir@{setCalDir}}
\index{setCalDir@{setCalDir}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::set\-Cal\-Dir (string {\em s})\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_9c4d2c796c176852537ff3cff4f5974b}


sets the location of the calibration files \begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!setChannel@{setChannel}}
\index{setChannel@{setChannel}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Channel (\bf{sls\_\-detector\_\-channel} {\em chan})}\label{classslsDetector_71bf1ef7be9f51c44cf6bc4a0dfea1e2}


configure channel \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em chan}]channel to be set - must contain correct channel, module and chip number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current register value \end{Desc}
\index{slsDetector@{sls\-Detector}!setChannel@{setChannel}}
\index{setChannel@{setChannel}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Channel (int64\_\-t {\em reg}, int {\em ichan} = {\tt -1}, int {\em ichip} = {\tt -1}, int {\em imod} = {\tt -1})}\label{classslsDetector_bed71bb89a69cbf24de31de9f5f478bc}


configure channel \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em reg}]channel register \item[{\em ichan}]channel number (-1 all) \item[{\em ichip}]chip number (-1 all) \item[{\em imod}]module number (-1 all) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current register value \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{sls\_\-detector\_\-channel}{p.}{structsls__detector__channel} \end{Desc}
\index{slsDetector@{sls\-Detector}!setChip@{setChip}}
\index{setChip@{setChip}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Chip (\bf{sls\_\-detector\_\-chip} {\em chip})}\label{classslsDetector_3a327b952866525e1b5c8fe541834c68}


configure chip \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em chip}]chip to be set - must contain correct module and chip number and also channel registers \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current register value \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{sls\_\-detector\_\-chip}{p.}{structsls__detector__chip} \end{Desc}
\index{slsDetector@{sls\-Detector}!setChip@{setChip}}
\index{setChip@{setChip}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Chip (int {\em reg}, int {\em ichip} = {\tt -1}, int {\em imod} = {\tt -1})}\label{classslsDetector_18cf730c59f5981fb5e22ebf460b9abc}


configure chip \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em reg}]chip register \item[{\em ichip}]chip number (-1 all) \item[{\em imod}]module number (-1 all) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current register value \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{sls\_\-detector\_\-chip}{p.}{structsls__detector__chip} \end{Desc}
\index{slsDetector@{sls\-Detector}!setDAC@{setDAC}}
\index{setDAC@{setDAC}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float sls\-Detector::set\-DAC (float {\em val}, \bf{dac\-Index} {\em index}, int {\em imod} = {\tt -1})}\label{classslsDetector_cfcce08c547e24dc09968a74e35daf40}


set dacs value \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]value (in V) \item[{\em index}]DAC index \item[{\em imod}]module number (if -1 alla modules) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current DAC value \end{Desc}
\index{slsDetector@{sls\-Detector}!setDetectorType@{setDetectorType}}
\index{setDetectorType@{setDetectorType}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Detector\-Type (string {\em type})}\label{classslsDetector_4bebb4f131fe345fa561428e070a933d}


sets/gets detector type normally the detector knows what type of detector it is \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]is the detector type (\char`\"{}Mythen\char`\"{}, \char`\"{}Pilatus\char`\"{}, \char`\"{}XFS\char`\"{}, \char`\"{}Gotthard\char`\"{}, Agipd\char`\"{}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]returns detector type index (1 GENERIC, 2 MYTHEN, 3 PILATUS, 4 XFS, 5 GOTTHARD, 6 AGIPD, -1 command failed) \end{Desc}
\index{slsDetector@{sls\-Detector}!setDetectorType@{setDetectorType}}
\index{setDetectorType@{setDetectorType}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Detector\-Type (\bf{detector\-Type} {\em type} = {\tt GET\_\-DETECTOR\_\-TYPE})}\label{classslsDetector_e76a665a8d7a6b37d85aff129d3afdef}


sets/gets detector type normally the detector knows what type of detector it is \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]is the detector type (defaults to GET\_\-DETECTOR\_\-TYPE) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]returns detector type index (1 GENERIC, 2 MYTHEN, 3 PILATUS, 4 XFS, 5 GOTTHARD, 6 AGIPD, -1 command failed) \end{Desc}
\index{slsDetector@{sls\-Detector}!setDynamicRange@{setDynamicRange}}
\index{setDynamicRange@{setDynamicRange}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Dynamic\-Range (int {\em n} = {\tt -1})}\label{classslsDetector_57d00f77b9c12d9a01407d5a74bacddb}


set/get dynamic range \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n}]dynamic range (-1 get) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current dynamic range updates the size of the data expected from the detector \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!setExternalCommunicationMode@{setExternalCommunicationMode}}
\index{setExternalCommunicationMode@{setExternalCommunicationMode}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{external\-Communication\-Mode} sls\-Detector::set\-External\-Communication\-Mode (\bf{external\-Communication\-Mode} {\em pol} = {\tt GET\_\-EXTERNAL\_\-COMMUNICATION\_\-MODE})}\label{classslsDetector_2f7bac599bf5bb103debcd9342b65edd}


set/get the external communication mode

obsolete\begin{Desc}
\item[See also:]\doxyref{set\-External\-Signal\-Flags}{p.}{classslsDetector_5878c33a1353f1d32c383be4169531e7} \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pol}]value to be set\end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{external\-Communication\-Mode}{p.}{sls__detector__defs_8h_51d6eb28d9d010319da9ce5da86ed32f} \end{Desc}
\begin{Desc}
\item[Returns:]current external communication mode \end{Desc}
\index{slsDetector@{sls\-Detector}!setExternalSignalFlags@{setExternalSignalFlags}}
\index{setExternalSignalFlags@{setExternalSignalFlags}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{external\-Signal\-Flag} sls\-Detector::set\-External\-Signal\-Flags (\bf{external\-Signal\-Flag} {\em pol} = {\tt GET\_\-EXTERNAL\_\-SIGNAL\_\-FLAG}, int {\em signalindex} = {\tt 0})}\label{classslsDetector_5878c33a1353f1d32c383be4169531e7}


set/get the use of an external signal \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pol}]meaning of the signal\end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{external\-Signal\-Flag}{p.}{sls__detector__defs_8h_a436b9d7264c77b77021fe6adc33f6ed} \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em signal\-Index}]index of the signal \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current meaning of signal signal\-Index \end{Desc}
\index{slsDetector@{sls\-Detector}!setFileIndex@{setFileIndex}}
\index{setFileIndex@{setFileIndex}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-File\-Index (int {\em i})\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_22326d5e85503bfd16e4bdb279babb43}


sets the default output file index \begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!setFileName@{setFileName}}
\index{setFileName@{setFileName}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::set\-File\-Name (string {\em s})\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_ec565bab03357d783cccae55232b03ba}


sets the default output files root name \begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!setFilePath@{setFilePath}}
\index{setFilePath@{setFilePath}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::set\-File\-Path (string {\em s})\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_57c4587267e50a21ba13ead83294bdb4}


sets the default output files path \begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!setFineOffset@{setFineOffset}}
\index{setFineOffset@{setFineOffset}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual float sls\-Detector::set\-Fine\-Offset (float {\em f})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_7b3b6b3ac5b3b1ee0677f7deeec5c9e3}


pure virtual function set detector fine offset \begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::set\-Fine\-Offset}{p.}{classmythenDetector_fe142e36f1a5fa8b2ab5fc45e9f8c781} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_fe142e36f1a5fa8b2ab5fc45e9f8c781}.\index{slsDetector@{sls\-Detector}!setFlatFieldCorrection@{setFlatFieldCorrection}}
\index{setFlatFieldCorrection@{setFlatFieldCorrection}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Flat\-Field\-Correction (string {\em fname} = {\tt \char`\"{}\char`\"{}})}\label{classslsDetector_b4e2c11303714d5e62b4fcc22f829d8f}


set flat field corrections \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]name of the flat field file (or \char`\"{}\char`\"{} if disable) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if disable (or file could not be read), $>$0 otherwise \end{Desc}
\index{slsDetector@{sls\-Detector}!setGlobalOffset@{setGlobalOffset}}
\index{setGlobalOffset@{setGlobalOffset}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual float sls\-Detector::set\-Global\-Offset (float {\em f})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_2a03a8aec6dbf74a606e6960e178fceb}


pure virtual function set detector global offset \begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::set\-Global\-Offset}{p.}{classmythenDetector_e24dd88c4eb965687bd656a12bae8ad7} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_e24dd88c4eb965687bd656a12bae8ad7}.\index{slsDetector@{sls\-Detector}!setModule@{setModule}}
\index{setModule@{setModule}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Module (\bf{sls\_\-detector\_\-module} {\em module})}\label{classslsDetector_d659b9a8ae9a29cea616e6333e2e7be4}


configure chip \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em module}]module to be set - must contain correct module number and also channel and chip registers \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current register value \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} \end{Desc}
\index{slsDetector@{sls\-Detector}!setModule@{setModule}}
\index{setModule@{setModule}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Module (int {\em reg}, int {\em imod} = {\tt -1})}\label{classslsDetector_1be9e16689befa0d654345bc30ccd68e}


configure module \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em imod}]module number (-1 all) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current register value \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} \end{Desc}
\index{slsDetector@{sls\-Detector}!setNumberOfModules@{setNumberOfModules}}
\index{setNumberOfModules@{setNumberOfModules}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Number\-Of\-Modules (int {\em n}, \bf{dimension} {\em d} = {\tt X})}\label{classslsDetector_9e4117c0234d51b22922a2d638e118ab}


set/get the size of the detector \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n}]number of modules \item[{\em d}]dimension \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current number of modules in direction d \end{Desc}
\index{slsDetector@{sls\-Detector}!setOnline@{setOnline}}
\index{setOnline@{setOnline}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Online (int const  {\em online})}\label{classslsDetector_f041f723f702c17de292061d6d609698}


sets the online\-Flag \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em off}]can be: \par
 GET\_\-ONLINE\_\-FLAG, returns wether the detector is in online or offline state;\par
 OFFLINE\_\-FLAG, detector in offline state (i.e. no communication to the detector - using only local structure - no data acquisition possible!);\par
 ONLINE\_\-FLAG detector in online state (i.e. communication to the detector updating the local structure) \end{description}
\end{Desc}
\index{slsDetector@{sls\-Detector}!setPositions@{setPositions}}
\index{setPositions@{setPositions}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::set\-Positions (int {\em n\-Pos}, float $\ast$ {\em pos})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_961e3976e3077803e2fc245873f81d81}


pure virtual function set positions for the acquisition \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n\-Pos}]number of positions \item[{\em pos}]array with the encoder positions \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]number of positions \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::set\-Positions}{p.}{classmythenDetector_1ffb0963f724e6d6d497685e6de62fd6} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_1ffb0963f724e6d6d497685e6de62fd6}.\index{slsDetector@{sls\-Detector}!setRateCorrection@{setRateCorrection}}
\index{setRateCorrection@{setRateCorrection}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Rate\-Correction (float {\em t} = {\tt 0})}\label{classslsDetector_c89f7fc9f9255e573e34f8d3dadf38af}


set rate correction \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]dead time in ns - if 0 disable correction, if $>$0 set dead time to t, if $<$0 set deadtime to default dead time for current settings \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if rate correction disabled, $>$0 otherwise \end{Desc}
\index{slsDetector@{sls\-Detector}!setReadOutFlags@{setReadOutFlags}}
\index{setReadOutFlags@{setReadOutFlags}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Read\-Out\-Flags (\bf{read\-Out\-Flags} {\em flag})}\label{classslsDetector_e86bd9ff0d87efe9327118b5349321c4}


set/get readout flags \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em flag}]readout flag to be set \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current flag \end{Desc}
\index{slsDetector@{sls\-Detector}!setROI@{setROI}}
\index{setROI@{setROI}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-ROI (int {\em nroi} = {\tt -1}, int $\ast$ {\em xmin} = {\tt NULL}, int $\ast$ {\em xmax} = {\tt NULL}, int $\ast$ {\em ymin} = {\tt NULL}, int $\ast$ {\em ymax} = {\tt NULL})}\label{classslsDetector_e2a0716ddc050b79a45c552236ff2284}


set roi

not yet implemented \index{slsDetector@{sls\-Detector}!setSettings@{setSettings}}
\index{setSettings@{setSettings}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{detector\-Settings} sls\-Detector::set\-Settings (\bf{detector\-Settings} {\em isettings}, int {\em imod} = {\tt -1})}\label{classslsDetector_765072d5c8aaff56ca79734072607188}


set detector settings \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em isettings}]settings \item[{\em imod}]module number (-1 all) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current settings\end{Desc}
in this function trimbits and calibration files are searched in the trim\-Dir and cal\-Dir directories and the detector is initialized \index{slsDetector@{sls\-Detector}!setSpeed@{setSpeed}}
\index{setSpeed@{setSpeed}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Speed (\bf{speed\-Variable} {\em sp}, int {\em value} = {\tt -1})}\label{classslsDetector_8e35d9440a03e127ef5fe7a909702675}


sets/gets the value of important readout speed parameters \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sp}]is the parameter to be set/get \item[{\em value}]is the value to be set, if -1 get value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current value for the specified parameter \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{speed\-Variable}{p.}{sls__detector__defs_8h_8c326f6a87754392b72098d3d0dec49d} \end{Desc}
\index{slsDetector@{sls\-Detector}!setTCPSocket@{setTCPSocket}}
\index{setTCPSocket@{setTCPSocket}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-TCPSocket (string const  {\em name} = {\tt \char`\"{}\char`\"{}}, int const  {\em control\_\-port} = {\tt -1}, int const  {\em stop\_\-port} = {\tt -1}, int const  {\em data\_\-port} = {\tt -1})}\label{classslsDetector_019a01c4465c5ee572293cb6c00d9904}


configure the socket communication and initializes the socket instances

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]hostname - if \char`\"{}\char`\"{} the current hostname is used \item[{\em control\_\-port}]port for control commands - if -1 the current is used \item[{\em stop\_\-port}]port for stop command - if -1 the current is used \item[{\em data\_\-port}]port for receiving data - if -1 the current is used\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK is connection succeded, FAIL otherwise \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!setThresholdEnergy@{setThresholdEnergy}}
\index{setThresholdEnergy@{setThresholdEnergy}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::set\-Threshold\-Energy (int {\em e\_\-e\-V}, int {\em imod} = {\tt -1}, \bf{detector\-Settings} {\em isettings} = {\tt GET\_\-SETTINGS})}\label{classslsDetector_ab00a8eeca28831751121054e35d4c6b}


set threshold energy \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em e\_\-e\-V}]threshold in e\-V \item[{\em imod}]module number (-1 all) \item[{\em isettings}]ev. change settings \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current threshold value for imod in ev (-1 failed) \end{Desc}
\index{slsDetector@{sls\-Detector}!setTimer@{setTimer}}
\index{setTimer@{setTimer}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int64\_\-t sls\-Detector::set\-Timer (\bf{timer\-Index} {\em index}, int64\_\-t {\em t} = {\tt -1})}\label{classslsDetector_b78e1d801e92a9f5a06008d9e9731549}


set/get timer value \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]timer index \item[{\em t}]time in ns or number of...(e.g. frames, gates, probes) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]timer set value in ns or number of...(e.g. frames, gates, probes) \end{Desc}
\index{slsDetector@{sls\-Detector}!setTrimDir@{setTrimDir}}
\index{setTrimDir@{setTrimDir}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sls\-Detector::set\-Trim\-Dir (string {\em s})\hspace{0.3cm}{\tt  [inline]}}\label{classslsDetector_646f389e75c23c2c8627c62fb1df2890}


sets the detector trimbit directory\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \end{Desc}
\index{slsDetector@{sls\-Detector}!startAcquisition@{startAcquisition}}
\index{startAcquisition@{startAcquisition}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::start\-Acquisition ()}\label{classslsDetector_49f44b9f27ce82d384ddfa0d229a0dee}


start detector acquisition \begin{Desc}
\item[Returns:]OK/FAIL \end{Desc}
\index{slsDetector@{sls\-Detector}!startAndReadAll@{startAndReadAll}}
\index{startAndReadAll@{startAndReadAll}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int $\ast$ sls\-Detector::start\-And\-Read\-All ()}\label{classslsDetector_fb4bb3d4e734c98684b60d283f34f128}


start detector acquisition and read all data putting them a data queue \begin{Desc}
\item[Returns:]pointer to the fron tof the data queue \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{start\-And\-Read\-All\-No\-Wait}{p.}{classslsDetector_2e0a975f982971744ada81d346d84489} \doxyref{get\-Data\-From\-Detector}{p.}{classslsDetector_b1982e89f8e8de63c807a707ccba594c} \doxyref{data\-Queue}{p.}{classslsDetector_52e9fe9baf37db001cdf58f982ab5dd6} \end{Desc}
\index{slsDetector@{sls\-Detector}!startAndReadAllNoWait@{startAndReadAllNoWait}}
\index{startAndReadAllNoWait@{startAndReadAllNoWait}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::start\-And\-Read\-All\-No\-Wait ()}\label{classslsDetector_2e0a975f982971744ada81d346d84489}


start detector acquisition and read out, but does not read data from socket \index{slsDetector@{sls\-Detector}!startReadOut@{startReadOut}}
\index{startReadOut@{startReadOut}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::start\-Read\-Out ()}\label{classslsDetector_8314acd65ffb54f355967a5c6827448e}


start readout (without exposure or interrupting exposure) \begin{Desc}
\item[Returns:]OK/FAIL \end{Desc}
\index{slsDetector@{sls\-Detector}!startThread@{startThread}}
\index{startThread@{startThread}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void sls\-Detector::start\-Thread ()\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_58199d3393aa7eaa606cbb7cbf83469d}


start data processing threas \index{slsDetector@{sls\-Detector}!stopAcquisition@{stopAcquisition}}
\index{stopAcquisition@{stopAcquisition}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::stop\-Acquisition ()}\label{classslsDetector_07a3d8c3c0e03ec8f286a87673911c28}


stop detector acquisition \begin{Desc}
\item[Returns:]OK/FAIL \end{Desc}
\index{slsDetector@{sls\-Detector}!writeAngularConversion@{writeAngularConversion}}
\index{writeAngularConversion@{writeAngularConversion}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::write\-Angular\-Conversion (string {\em fname} = {\tt \char`\"{}\char`\"{}})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_cace8f0d8706a175915289d86c1fd8d6}


Pure virtual function writes an angular conversion file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]file to be written \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{angle\-Conversion\-Constant}{p.}{structangleConversionConstant} \doxyref{mythen\-Detector::write\-Angular\-Conversion}{p.}{classmythenDetector_3c5f27709351c49dd715212adc5ba7d2} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_3c5f27709351c49dd715212adc5ba7d2}.\index{slsDetector@{sls\-Detector}!writeCalibrationFile@{writeCalibrationFile}}
\index{writeCalibrationFile@{writeCalibrationFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::write\-Calibration\-File (string {\em fname}, float {\em gain}, float {\em offset})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_d12edef440bf2b2f930e83f0ccceb01e}


Pure virtual function writes a calibration file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]file to be written \item[{\em gain}]\item[{\em offset}]\end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \doxyref{mythen\-Detector::write\-Calibration\-File}{p.}{classmythenDetector_10e7213bb0e7138c07231687e9a6899a} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_10e7213bb0e7138c07231687e9a6899a}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_d5fbecfcc46cb151160c6011aa8e33b2}.\index{slsDetector@{sls\-Detector}!writeConfigurationFile@{writeConfigurationFile}}
\index{writeConfigurationFile@{writeConfigurationFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::write\-Configuration\-File (string const  {\em fname})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_7801c6d43c72ce5ccaa72743a6f307d2}


Purely virtual function Should be implemented in the specific detector class /sa \doxyref{mythen\-Detector::write\-Configuration\-File}{p.}{classmythenDetector_6ad688e0c1a59001ecc61117c67e5434} 

Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_6ad688e0c1a59001ecc61117c67e5434}.\index{slsDetector@{sls\-Detector}!writeDataFile@{writeDataFile}}
\index{writeDataFile@{writeDataFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::write\-Data\-File (string {\em fname}, int $\ast$ {\em data})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_efa98ca652306e2a026c9a5b2fbfe2dc}


Pure virtual function writes a data file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]of the file to be written \item[{\em data}]array of data values \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIL if it could not write the file or data=NULL \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::write\-Data\-File}{p.}{classmythenDetector_42c1d320f594ebd87e2465cc986ee848} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_9a49c84d7ad664f7891b00fba0ce829a}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_68a740d5e43fcdb00c57f401666c0856}.\index{slsDetector@{sls\-Detector}!writeDataFile@{writeDataFile}}
\index{writeDataFile@{writeDataFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::write\-Data\-File (string {\em fname}, float $\ast$ {\em data}, float $\ast$ {\em err} = {\tt NULL}, float $\ast$ {\em ang} = {\tt NULL}, char {\em dataformat} = {\tt 'f'}, int {\em nch} = {\tt -1})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_08823d7078b5e6dd1a4cb7d8b3cfe0af}


Pure virtual function writes a data file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]of the file to be written \item[{\em data}]array of data values \item[{\em err}]array of arrors on the data. If NULL no errors will be written\item[{\em ang}]array of angular values. If NULL data will be in the form chan-val(-err) otherwise ang-val(-err) \item[{\em dataformat}]format of the data: can be 'i' integer or 'f' float (default) \item[{\em nch}]number of channels to be written to file. if -1 defaults to the number of installed channels of the detector \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIL if it could not write the file or data=NULL \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{mythen\-Detector::write\-Data\-File}{p.}{classmythenDetector_42c1d320f594ebd87e2465cc986ee848} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_42c1d320f594ebd87e2465cc986ee848}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_5ad2bf5b10d17e8c4ad7ae6e81e647e0}.\index{slsDetector@{sls\-Detector}!writeRegister@{writeRegister}}
\index{writeRegister@{writeRegister}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int sls\-Detector::write\-Register (int {\em addr}, int {\em val})}\label{classslsDetector_742c8c6b4e7f3cad4f7e60c8c7c0c18b}


write register \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]address  value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]current register value \end{Desc}
\index{slsDetector@{sls\-Detector}!writeTrimFile@{writeTrimFile}}
\index{writeTrimFile@{writeTrimFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::write\-Trim\-File (string {\em fname}, int {\em imod})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_cb27a987551e66093eb201523ac8d8b0}


Pure virtual function writes a trim file for module number imod - the values will be read from the current detector structure \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]name of the file to be written \item[{\em imod}]module number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIL if the file could not be written \end{Desc}
\begin{Desc}
\item[See also:]\doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} \doxyref{shared\-Sls\-Detector}{p.}{structslsDetector_1_1sharedSlsDetector} \doxyref{mythen\-Detector::write\-Trim\-File(string, int)}{p.}{classmythenDetector_94179431a737bbceb20f27ca1fd30349} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_94179431a737bbceb20f27ca1fd30349}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_df3a0dff0fc3111e10af0363bdd15a6a}.\index{slsDetector@{sls\-Detector}!writeTrimFile@{writeTrimFile}}
\index{writeTrimFile@{writeTrimFile}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int sls\-Detector::write\-Trim\-File (string {\em fname}, \bf{sls\_\-detector\_\-module} {\em mod})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classslsDetector_5b97351cfaffe067016dbcebbd0778a7}


Pure virtual function writes a trim file \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]name of the file to be written \item[{\em mod}]module structure which has to be written to file \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]OK or FAIL if the file could not be written\end{Desc}
\begin{Desc}
\item[See also:]\doxyref{sls\_\-detector\_\-module}{p.}{structsls__detector__module} \doxyref{mythen\-Detector::write\-Trim\-File(string, sls\_\-detector\_\-module)}{p.}{classmythenDetector_0b137abd78bd3d03653cd21436eb6c4d} \end{Desc}


Implemented in \bf{mythen\-Detector} \doxyref{p.}{classmythenDetector_0b137abd78bd3d03653cd21436eb6c4d}, and \bf{eiger\-Detector} \doxyref{p.}{classeigerDetector_8380366bf7112021c49be8e6f29f18d8}.

\subsection{Member Data Documentation}
\index{slsDetector@{sls\-Detector}!adcs@{adcs}}
\index{adcs@{adcs}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float$\ast$ \bf{sls\-Detector::adcs}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_f370b8466441491d8496bb8130b8c5e7}


pointer to adc valuse \index{slsDetector@{sls\-Detector}!badChannelMask@{badChannelMask}}
\index{badChannelMask@{badChannelMask}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ \bf{sls\-Detector::bad\-Channel\-Mask}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_614c98f77a8a3ec6cff57aa59e671123}


pointer to bad channel mask 0 is channel is good 1 if it is bad\begin{Desc}
\item[See also:]\doxyref{fill\-Bad\-Channel\-Mask()}{p.}{classslsDetector_6a0ebe013e27c065b2f67158a27f64ac} \end{Desc}
\index{slsDetector@{sls\-Detector}!chanregs@{chanregs}}
\index{chanregs@{chanregs}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ \bf{sls\-Detector::chanregs}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_44335474559f7321f0309fbda304caf8}


pointer to channal registers \index{slsDetector@{sls\-Detector}!chipregs@{chipregs}}
\index{chipregs@{chipregs}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ \bf{sls\-Detector::chipregs}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_0eb24981d044632eccba507bd15871a6}


pointer to chip registers \index{slsDetector@{sls\-Detector}!controlSocket@{controlSocket}}
\index{controlSocket@{controlSocket}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{My\-Socket\-TCP}$\ast$ \bf{sls\-Detector::control\-Socket}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_07f3943ab8a65f061bbe1c1e1d22b700}


socket for control commands \index{slsDetector@{sls\-Detector}!currentI0@{currentI0}}
\index{currentI0@{currentI0}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float \bf{sls\-Detector::current\-I0}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_4bba77b0de9f911c87d48d12c15a632b}


I0 measured \index{slsDetector@{sls\-Detector}!currentPosition@{currentPosition}}
\index{currentPosition@{currentPosition}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float \bf{sls\-Detector::current\-Position}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_9f64e866250e916299048c9816c9ef28}


current position of the detector \index{slsDetector@{sls\-Detector}!currentPositionIndex@{currentPositionIndex}}
\index{currentPositionIndex@{currentPositionIndex}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float \bf{sls\-Detector::current\-Position\-Index}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_9a6cd8787f618c147faacc1f3602bcf5}


current position index of the detector \index{slsDetector@{sls\-Detector}!dacs@{dacs}}
\index{dacs@{dacs}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float$\ast$ \bf{sls\-Detector::dacs}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_dc1b3f867b97136fca83f86c83b7ae14}


pointer to dac valuse \index{slsDetector@{sls\-Detector}!dataQueue@{dataQueue}}
\index{dataQueue@{dataQueue}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}queue$<$int$\ast$$>$ \bf{sls\-Detector::data\-Queue}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_52e9fe9baf37db001cdf58f982ab5dd6}


data queue \index{slsDetector@{sls\-Detector}!dataSocket@{dataSocket}}
\index{dataSocket@{dataSocket}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{My\-Socket\-TCP}$\ast$ \bf{sls\-Detector::data\-Socket}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_1629e3c46678ae201f6797e4d827cb32}


socket for data acquisition \index{slsDetector@{sls\-Detector}!detectorModules@{detectorModules}}
\index{detectorModules@{detectorModules}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{sls\_\-detector\_\-module}$\ast$ \bf{sls\-Detector::detector\-Modules}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_b78d6f2abc185b2bde2c550b31e0ff72}


pointer to detector module structures \index{slsDetector@{sls\-Detector}!detId@{detId}}
\index{detId@{detId}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int \bf{sls\-Detector::det\-Id}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_37f4af284283e7a18a28cec3f4e4532f}


detector ID \index{slsDetector@{sls\-Detector}!ffcoefficients@{ffcoefficients}}
\index{ffcoefficients@{ffcoefficients}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float$\ast$ \bf{sls\-Detector::ffcoefficients}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_a3c6e93198a2f8b072b7b84ba9af7c4b}


pointer to flat field coefficients \index{slsDetector@{sls\-Detector}!fferrors@{fferrors}}
\index{fferrors@{fferrors}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float$\ast$ \bf{sls\-Detector::fferrors}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_636168b92509e96418c9134d6d82ad4c}


pointer to flat field coefficient errors \index{slsDetector@{sls\-Detector}!finalDataQueue@{finalDataQueue}}
\index{finalDataQueue@{finalDataQueue}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}queue$<$\bf{detector\-Data}$\ast$$>$ \bf{sls\-Detector::final\-Data\-Queue}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_4ac6f49427b58349fe54fbaa4e16fa9c}


queue containing the postprocessed data \index{slsDetector@{sls\-Detector}!mergingBins@{mergingBins}}
\index{mergingBins@{mergingBins}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float$\ast$ \bf{sls\-Detector::merging\-Bins}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_81751fd6e87f9659a8b6afe13efec2cf}


merging bins \index{slsDetector@{sls\-Detector}!mergingCounts@{mergingCounts}}
\index{mergingCounts@{mergingCounts}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float$\ast$ \bf{sls\-Detector::merging\-Counts}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_fc173dcaeda2bbd7bbd6a874b5b5726c}


merging counts \index{slsDetector@{sls\-Detector}!mergingErrors@{mergingErrors}}
\index{mergingErrors@{mergingErrors}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float$\ast$ \bf{sls\-Detector::merging\-Errors}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_f357d3b5961ead7ec263a47aa51c4c11}


merging errors \index{slsDetector@{sls\-Detector}!mergingMultiplicity@{mergingMultiplicity}}
\index{mergingMultiplicity@{mergingMultiplicity}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ \bf{sls\-Detector::merging\-Multiplicity}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_91c5e22042997d86c2c4d16ef1be9150}


merging multiplicity \index{slsDetector@{sls\-Detector}!onlineFlag@{onlineFlag}}
\index{onlineFlag@{onlineFlag}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int \bf{sls\-Detector::online\-Flag}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_7572bba8e53f900d4126657827bec3cf}


\begin{Desc}
\item[See also:]\doxyref{set\-Online}{p.}{classslsDetector_f041f723f702c17de292061d6d609698} \end{Desc}
\index{slsDetector@{sls\-Detector}!shmId@{shmId}}
\index{shmId@{shmId}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int \bf{sls\-Detector::shm\-Id}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_53a78c7fe99f93b9bba8d0c2cb32a181}


shared memeory ID \index{slsDetector@{sls\-Detector}!stopSocket@{stopSocket}}
\index{stopSocket@{stopSocket}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{My\-Socket\-TCP}$\ast$ \bf{sls\-Detector::stop\-Socket}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_efee578cdd732339788a38707e5ce531}


socket for emergency stop \index{slsDetector@{sls\-Detector}!thisDetector@{thisDetector}}
\index{thisDetector@{thisDetector}!slsDetector@{sls\-Detector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{shared\-Sls\-Detector}$\ast$ \bf{sls\-Detector::this\-Detector}\hspace{0.3cm}{\tt  [protected]}}\label{classslsDetector_fe0da5c1491ebf18f187f0a26c5ded11}


address of the detector structure in shared memory 

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
sls\-Detector/\bf{sls\-Detector.h}\item 
sls\-Detector/\bf{sls\-Detector.cpp}\end{CompactItemize}
