diff --git a/slsDetectorSoftware/Makefile b/slsDetectorSoftware/Makefile
index 7a31e0f86..e2a073dee 100644
--- a/slsDetectorSoftware/Makefile
+++ b/slsDetectorSoftware/Makefile
@@ -1,7 +1,7 @@
CFLAGS= -DC_ONLY -fPIC
#FLAGS+= #-DVERBOSE -DVERYVERBOSE
-DFLAGS= -DDACS_INT -DTHIS_PATH='"$(shell pwd)"'
+DFLAGS= -DDACS_INT -DTHIS_PATH='"$(shell pwd)"' -DSLS_RECEIVER_FUNCTION_LIST
#ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUsers.h b/slsDetectorSoftware/slsDetector/slsDetectorUsers.h
index 66bf1b8a3..cf18b50bc 100644
--- a/slsDetectorSoftware/slsDetector/slsDetectorUsers.h
+++ b/slsDetectorSoftware/slsDetector/slsDetectorUsers.h
@@ -33,7 +33,7 @@ using namespace std;
*/
/**
\mainpage
-
+
API for SLS detectors data acquisition
@@ -49,23 +49,31 @@ using namespace std;
\li a Root library for data postprocessing and detector calibration (energy, angle).
-The slsDetectorUsers class is a minimal purely virtual interface class which should be instantiated by the users in their acquisition software (EPICS, spec etc.). More advanced configuration functions are not implemented and can be written in a configuration file tha can be read/written.
+slsDetectorUsers is a class to control the detector which should be instantiated by the users in their acquisition software (EPICS, spec etc.). A callback for dislaying the data can be registered.
+More advanced configuration functions are not implemented and can be written in a configuration file tha can be read/written.
+slsReceiverUsers is a class to receive the data for detectors with external data receiver (e.g. GOTTHARD). Callbacks can be registered to process the data or save them in specific formats.
+detectorData is a structure containing the data and additional information which is used to return the data e.g. to the GUi for displaying them.
+
+
\authors Anna Bergamaschi, Dhanya Maliakal
@version 0.2
Currently supported detectors
\li MYTHEN
\li GOTTHARD controls
-Coming soon
\li GOTTHARD data receiver
+Coming soon
\li EIGER
-@libdoc The slsDetectorUsers class is a minimal purely virtual interface class which should be instantiated by the users in their acquisition software (EPICS, spec etc.). More advanced configuration functions are not implemented and can be written in a configuration or parameters file that can be read/written.
*/
/**
- @short This is the base class for detector functionalities of interest for the users. Can be emebedded in the users custom interface e.g. EPICS, Lima etc.
+
+@libdoc The slsDetectorUsers class is a minimal interface class which should be instantiated by the users in their acquisition software (EPICS, spec etc.). More advanced configuration functions are not implemented and can be written in a configuration or parameters file that can be read/written.
+*/
+/**
+ @short Class for detector functionalitiesto embed the detector controls in the users custom interface e.g. EPICS, Lima etc.
*/
@@ -387,10 +395,10 @@ class slsDetectorUsers
/**
@short register calbback for accessing detector final data
- \param userCallback function for plotting/analyzing the data
+ \param userCallback function for plotting/analyzing the data. Its arguments are the data structure d and the frame number f.
*/
- void registerDataCallback(int( *userCallback)(detectorData*, int, void*), void *pArg);
+ void registerDataCallback(int( *userCallback)(detectorData* d, int f, void*), void *pArg);
/**
@short register callback for accessing raw data - if the rawDataCallback is registered, no filewriting/postprocessing will be carried on automatically by the software - the raw data are deleted by the software
diff --git a/slsDetectorSoftware/slsDetectorAnalysis/detectorData.h b/slsDetectorSoftware/slsDetectorAnalysis/detectorData.h
index cdfc6c4cf..79c37d93b 100644
--- a/slsDetectorSoftware/slsDetectorAnalysis/detectorData.h
+++ b/slsDetectorSoftware/slsDetectorAnalysis/detectorData.h
@@ -4,9 +4,7 @@
#ifndef DETECTOR_DATA_H
#define DETECTOR_DATA_H
/**
- @short data structure to hold the detector data after postprocessing
-
- (e.g. to plot, store in a root tree etc.)
+ @short data structure to hold the detector data after postprocessing (e.g. to plot, store in a root tree etc.)
*/
class detectorData {
public:
diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h
index f932c8541..29301dcb6 100644
--- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h
+++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h
@@ -1,4 +1,5 @@
-#ifdef SLS_RECEIVER_FUNCTION_LIST
+//#ifdef SLS_RECEIVER_FUNCTION_LIST
+
#ifndef SLS_RECEIVER_FUNCTION_LIST_H
#define SLS_RECEIVER_FUNCTION_LIST_H
/********************************************//**
@@ -391,4 +392,4 @@ public:
#endif
-#endif
+//#endif
diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverUsers.cpp b/slsDetectorSoftware/slsReceiver/slsReceiverUsers.cpp
index 2bfa1da12..e58202c7c 100644
--- a/slsDetectorSoftware/slsReceiver/slsReceiverUsers.cpp
+++ b/slsDetectorSoftware/slsReceiver/slsReceiverUsers.cpp
@@ -32,6 +32,6 @@ int slsReceiverUsers::registerCallBackAcquisitionFinished(void (*func)(int, void
int slsReceiverUsers::registerCallBackRawDataReady(void (*func)(int, char*, FILE*, char*, void*),void *arg){
receiver->registerCallBackRawDataReady(func,arg);
-};
+}
diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverUsers.h b/slsDetectorSoftware/slsReceiver/slsReceiverUsers.h
index 08481ceed..932173ff4 100644
--- a/slsDetectorSoftware/slsReceiver/slsReceiverUsers.h
+++ b/slsDetectorSoftware/slsReceiver/slsReceiverUsers.h
@@ -1,8 +1,4 @@
- /********************************************//**
- * @file slsReceiverUsers.h
- * @short API for implementing the SLS data receiver in the users application. Callbacks can be defined for processing and/or saving data
- *
- ***********************************************/
+
#ifndef SLS_RECEIVER_USERS_H
#define SLS_RECEIVER_USERS_H
@@ -10,8 +6,17 @@
class slsReceiverFuncs;
+ /**
+@short Class for implementing the SLS data receiver in the users application. Callbacks can be defined for processing and/or saving data
+ */
+/**
+ @libdoc slsReceiverUsers is a class that can be instantiated in the users software to receive the data from the detectors. Callbacks can be defined for processing and/or saving data
+
+
+ ***********************************************/
+
class slsReceiverUsers {
public:
@@ -35,42 +40,35 @@ public:
void start();
/**
- callback arguments are
- filepath
- filename
- fileindex
- data size
+
+ @sort register calbback for starting the acquisition
+ \param func callback to be called when starting the acquisition. Its arguments are filepath filename fileindex data size
- return value is
- 0 callback takes care of open,close,wrie file
- 1 callback writes file, we have to open, close it
- 2 we open, close, write file, callback does not do anything
+ \returns 0 callback takes care of open,close,write file; 1 callback writes file, we have to open, close it; 2 we open, close, write file, callback does not do anything
*/
- void registerCallBackStartAcquisition(int (*func)(char*, char*,int, int, void*),void *arg);
+ void registerCallBackStartAcquisition(int (*func)(char* filepath, char* filename,int fileindex, int datasize, void*),void *arg);
- /**
- callback argument is
- total frames caught
-
+ /**
+ @sort register callback for end of acquisition
+ \param func end of acquisition callback. Argument nf is total frames caught
+ \returns nothing
*/
- int registerCallBackAcquisitionFinished(void (*func)(int, void*),void *arg);
+ int registerCallBackAcquisitionFinished(void (*func)(int nf, void*),void *arg);
/**
- args to raw data ready callback are
- framenum
- datapointer
- file descriptor
- guidatapointer (NULL, no data required)
+ @sort register callback to be called when data are available (to process and/or save the data).
+ \param func raw data ready callback. arguments are framenum datapointer file descriptor guidatapointer (NULL, no data required)
+ \returns nothing
*/
- int registerCallBackRawDataReady(void (*func)(int, char*, FILE*, char*, void*),void *arg);
+ int registerCallBackRawDataReady(void (*func)(int framenumber, char* datapointer, FILE* filedescriptor, char* guidatapointer, void*),void *arg);
private:
diff --git a/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.h b/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.h
index d50388db8..7240e8a31 100644
--- a/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.h
+++ b/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.h
@@ -10,7 +10,6 @@
#include "MySocketTCP.h"
#include "slsReceiverFunctionList.h"
-class slsReceiverFunctionList;
/**