eigerDetector Class Reference

This is class contains all eiger specific functionalities. More...

#include <eigerDetector.h>

Inheritance diagram for eigerDetector:

slsDetector List of all members.

Public Member Functions

 eigerDetector (int id=0)
 ~eigerDetector ()
sls_detector_modulereadTrimFile (string fname, sls_detector_module *myMod=NULL)
int writeTrimFile (string fname, sls_detector_module mod)
int writeTrimFile (string fname, int imod)
int writeDataFile (string fname, float *data, float *err=NULL, float *ang=NULL, char dataformat='f', int nch=-1)
int writeDataFile (string fname, int *data)
int readDataFile (string fname, float *data, float *err=NULL, float *ang=NULL, char dataformat='f', int nch=0)
int readDataFile (string fname, int *data)
int readCalibrationFile (string fname, float &gain, float &offset)
int writeCalibrationFile (string fname, float gain, float offset)
float * decodeData (int *datain)

Detailed Description

This is class contains all eiger specific functionalities.

The mythenDetector class contains the functions specific to the eiger detector

Author:
Anna Bergamaschi
Version:
0.1alpha (any string)


Constructor & Destructor Documentation

eigerDetector::eigerDetector ( int  id = 0  ) 

(default) constructor

Parameters:
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

eigerDetector::~eigerDetector (  )  [inline]

destructor


Member Function Documentation

float* eigerDetector::decodeData ( int *  datain  ) 

decode data from the detector converting them to an array of floats, one for each channle

Parameters:
datain data from the detector
Returns:
pointer to a float array with a data per channel

Reimplemented from slsDetector.

int eigerDetector::readCalibrationFile ( string  fname,
float &  gain,
float &  offset 
) [virtual]

int readCalibrationFile(string fname, float &gain, float &offset);

Parameters:
fname file to be read
gain reference to the gain variable reference to the offset variable
See also:
sharedSlsDetector

Implements slsDetector.

int eigerDetector::readDataFile ( string  fname,
int *  data 
) [virtual]

reads a data file

Parameters:
name of the file to be read
data array of data values
Returns:
OK or FAIL if it could not read the file or data=NULL

Implements slsDetector.

int eigerDetector::readDataFile ( string  fname,
float *  data,
float *  err = NULL,
float *  ang = NULL,
char  dataformat = 'f',
int  nch = 0 
) [virtual]

reads a data file

Parameters:
name of the file to be read
data array of data values to be filled
err array of arrors on the data. If NULL no errors are expected on the file
ang array of angular values. If NULL data are expected in the form chan-val(-err) otherwise ang-val(-err)
dataformat format of the data: can be 'i' integer or 'f' float (default)
nch number of channels to be written to file. if <=0 defaults to the number of installed channels of the detector
Returns:
OK or FAIL if it could not read the file or data=NULL

Implements slsDetector.

sls_detector_module* eigerDetector::readTrimFile ( string  fname,
sls_detector_module myMod = NULL 
) [virtual]

reads a trim file

Parameters:
fname name of the file to be read
myMod pointer to the module structure which has to be set.
If it is NULL a new module structure will be created
Returns:
the pointer to myMod or NULL if reading the file failed

Implements slsDetector.

int eigerDetector::writeCalibrationFile ( string  fname,
float  gain,
float  offset 
) [virtual]

writes a clibration file

Parameters:
fname file to be written
gain 
offset 
See also:
sharedSlsDetector

Implements slsDetector.

int eigerDetector::writeDataFile ( string  fname,
int *  data 
) [virtual]

writes a data file

Parameters:
name of the file to be written
data array of data values
Returns:
OK or FAIL if it could not write the file or data=NULL

Implements slsDetector.

int eigerDetector::writeDataFile ( string  fname,
float *  data,
float *  err = NULL,
float *  ang = NULL,
char  dataformat = 'f',
int  nch = -1 
) [virtual]

writes a data file

Parameters:
name of the file to be written
data array of data values
err array of arrors on the data. If NULL no errors will be written
ang array of angular values. If NULL data will be in the form chan-val(-err) otherwise ang-val(-err)
dataformat format of the data: can be 'i' integer or 'f' float (default)
nch number of channels to be written to file. if -1 defaults to the number of installed channels of the detector
Returns:
OK or FAIL if it could not write the file or data=NULL

Implements slsDetector.

int eigerDetector::writeTrimFile ( string  fname,
int  imod 
) [virtual]

writes a trim file for module number imod - the values will be read from the current detector structure

Parameters:
fname name of the file to be written
imod module number
Returns:
OK or FAIL if the file could not be written
See also:
sls_detector_module sharedSlsDetector

Implements slsDetector.

int eigerDetector::writeTrimFile ( string  fname,
sls_detector_module  mod 
) [virtual]

writes a trim file

Parameters:
fname name of the file to be written
mod module structure which has to be written to file
Returns:
OK or FAIL if the file could not be written
See also:
sls_detector_module

Implements slsDetector.


The documentation for this class was generated from the following file:
Generated on Tue Dec 1 15:31:44 2009 by  doxygen 1.4.7