Commit 62191c94 authored by Samuel Debionne's avatar Samuel Debionne
Browse files

Merge branch '4-migrate-to-slsdetectorpackage-v3-1-1' into 'master'

Resolve "Migrate to slsDetectorPackage v3.1.1"

Closes #4

See merge request !3
parents 75ada575 7afe8eab
...@@ -23,12 +23,14 @@ ...@@ -23,12 +23,14 @@
############################################################################ ############################################################################
set(NAME slsdetector) set(NAME slsdetector)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=format-security")
set(SLS_DETECTOR_DIR slsDetectorPackage) set(SLS_DETECTOR_DIR slsDetectorPackage)
set(SLS_DETECTOR_SW ${SLS_DETECTOR_DIR}/slsDetectorSoftware) set(SLS_DETECTOR_SW ${SLS_DETECTOR_DIR}/slsDetectorSoftware)
set(SLS_DETECTOR_RECV ${SLS_DETECTOR_DIR}/slsReceiverSoftware) set(SLS_DETECTOR_RECV ${SLS_DETECTOR_DIR}/slsReceiverSoftware)
option (USE_TEXTCLIENT "Text Client" ON)
option (USE_RECEIVER "Receiver" ON)
option (USE_GUI "GUI" ON)
add_subdirectory(${SLS_DETECTOR_DIR}) add_subdirectory(${SLS_DETECTOR_DIR})
set(${NAME}_srcs src/SlsDetectorDefs.cpp set(${NAME}_srcs src/SlsDetectorDefs.cpp
......
...@@ -125,35 +125,6 @@ to different CPU cores: ...@@ -125,35 +125,6 @@ to different CPU cores:
lid10eiger1:~ # apt-get install irqbalance lid10eiger1:~ # apt-get install irqbalance
... ...
*cmake*
~~~~~~~~~~~~
A recent version of *cmake* (> 3.0) is needed to compile Lima. Debian 7 package is
cmake-2.8.9-1, so it must be compiled from the sources. First un-install the Debian package:
::
# as root
lid10eiger1:~ # p=$(dpkg --list cmake\* | grep '^ii' | awk '{print $2}'); \
[ -n "${p}" ] && dpkg --purge ${p}
...
# as opid00
(bliss) lid10eiger1:~ % mkdir -p ~/Downloads/cmake && cd ~/Downloads/cmake
(bliss) lid10eiger1:~/Downloads/cmake % scp lisgeiger1:Downloads/cmake/cmake-3.8.0.tar.gz .
...
(bliss) lid10eiger1:~/Downloads/cmake % tar -xzf cmake-3.8.0.tar.gz
(bliss) lid10eiger1:~/Downloads/cmake % cd cmake-3.8.0
(bliss) lid10eiger1:~/Downloads/cmake/cmake-3.8.0 % ./bootstrap --parallel=12 --qt-gui
...
(bliss) lid10eiger1:~/Downloads/cmake/cmake-3.8.0 % make -j12
...
(bliss) lid10eiger1:~/Downloads/cmake/cmake-3.8.0 % su
Password:
lid10eiger1:Downloads/cmake/cmake-3.8.0 # make install
...
Disk configuration Disk configuration
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
...@@ -419,6 +390,38 @@ variable and force the update *GRUB* configuration file: ...@@ -419,6 +390,38 @@ variable and force the update *GRUB* configuration file:
lid10eiger1:~ # update-grub lid10eiger1:~ # update-grub
... ...
*cmake*
~~~~~~~
A recent version of *cmake* (> 3.0) is needed to compile Lima. Debian 7 package is
cmake-2.8.9-1, so it must be compiled from the sources. First un-install the Debian package:
::
# as root
lid10eiger1:~ # p=$(dpkg --list cmake\* | grep '^ii' | awk '{print $2}'); \
[ -n "${p}" ] && dpkg --purge ${p}
...
and then copy and compile the sources as *opid00* and install as *root*:
::
# as opid00
lid10eiger1:~ % mkdir -p ~/Downloads/cmake && cd ~/Downloads/cmake
lid10eiger1:~/Downloads/cmake % scp lisgeiger1:Downloads/cmake/cmake-3.8.0.tar.gz .
...
lid10eiger1:~/Downloads/cmake % tar -xzf cmake-3.8.0.tar.gz
lid10eiger1:~/Downloads/cmake % cd cmake-3.8.0
lid10eiger1:~/Downloads/cmake/cmake-3.8.0 % ./bootstrap --parallel=12 --qt-gui
...
lid10eiger1:~/Downloads/cmake/cmake-3.8.0 % make -j12
...
lid10eiger1:~/Downloads/cmake/cmake-3.8.0 % su
Password:
lid10eiger1:Downloads/cmake/cmake-3.8.0 # make install
...
Network configuration Network configuration
--------------------- ---------------------
...@@ -772,6 +775,7 @@ Restart the detector, wait for 20 sec and check that the links are OK: ...@@ -772,6 +775,7 @@ Restart the detector, wait for 20 sec and check that the links are OK:
1 packets transmitted, 1 received, 0% packet loss, time 0ms 1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.399/0.399/0.399/0.000 ms rtt min/avg/max/mdev = 0.399/0.399/0.399/0.000 ms
SlsDetectors Software SlsDetectors Software
--------------------- ---------------------
...@@ -873,21 +877,16 @@ Then clone the project: ...@@ -873,21 +877,16 @@ Then clone the project:
:: ::
# as blissadm
lid10eiger1:~ % mkdir -p ~/src/install lid10eiger1:~ % mkdir -p ~/src/install
lid10eiger1:~ % cd ~/src/install lid10eiger1:~ % cd ~/src/install
lid10eiger1:~/src/install % git clone git@blissinstaller.gitlab.esrf.fr:Admin/bliss_python_install.git lid10eiger1:~/src/install % git clone git@blissinstaller.gitlab.esrf.fr:Admin/bliss_python_install.git
lid10eiger1:~/src/install % ssh root@localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is d7:da:38:9c:c4:20:8f:87:66:73:5a:85:62:44:01:f8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
root@localhost's password:
...
And execute the script as *root*: And execute the script as *root*:
:: ::
# as blissadm
lid10eiger1:~/src/install % ssh root@localhost lid10eiger1:~/src/install % ssh root@localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established. The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is d7:da:38:9c:c4:20:8f:87:66:73:5a:85:62:44:01:f8. ECDSA key fingerprint is d7:da:38:9c:c4:20:8f:87:66:73:5a:85:62:44:01:f8.
...@@ -953,15 +952,14 @@ Configure *spyder* to use the BLISS python: ...@@ -953,15 +952,14 @@ Configure *spyder* to use the BLISS python:
:: ::
# as opid00 # as opid00
(bliss) lid10eiger1:~ % spyder lid10eiger1:~ % (. blissrc && spyder)
and go to 'Tools -> Preferences -> Console -> Advanced Settings -> and go to 'Tools -> Preferences -> Console -> Advanced Settings ->
Python executable' and set: Python executable' and set:
+-----------------------------------+-----------------------------------+ +----------------------------------------------+--------------------------------------------------+
| Path to Python interpreter | /users/blissadm/lib/virtualenvs/b | | Path to Python interpreter executable binary | /users/blissadm/lib/virtualenvs/bliss/bin/python |
| executable binary | liss/bin/python | +----------------------------------------------+--------------------------------------------------+
+-----------------------------------+-----------------------------------+
Detector software and development account: *opid00* Detector software and development account: *opid00*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -1045,7 +1043,7 @@ computer directories: ...@@ -1045,7 +1043,7 @@ computer directories:
:: ::
(bliss) lid10eiger1:~ % EIGER_DIR=${EIGER_HOME}/eiger/eiger_v2.3.2 (bliss) lid10eiger1:~ % EIGER_DIR=${EIGER_HOME}/eiger/eiger_v3.1.1
(bliss) lid10eiger1:~ % EIGER_CONFIG=${EIGER_DIR}/config/beb-021-020-direct-FO-10g.config (bliss) lid10eiger1:~ % EIGER_CONFIG=${EIGER_DIR}/config/beb-021-020-direct-FO-10g.config
(bliss) lid10eiger1:~ % mkdir -p $(dirname ${EIGER_CONFIG}) (bliss) lid10eiger1:~ % mkdir -p $(dirname ${EIGER_CONFIG})
(bliss) lid10eiger1:~ % scp lisgeiger1:${EIGER_CONFIG} $(dirname ${EIGER_CONFIG}) (bliss) lid10eiger1:~ % scp lisgeiger1:${EIGER_CONFIG} $(dirname ${EIGER_CONFIG})
...@@ -1063,6 +1061,8 @@ The resulting configuration file: ...@@ -1063,6 +1061,8 @@ The resulting configuration file:
#top+bottom+ #top+bottom+
hostname beb021+beb020+ hostname beb021+beb020+
rx_hostname lid10eiger1
#port 1952 #port 1952
#stopport 1953 #stopport 1953
...@@ -1084,11 +1084,9 @@ The resulting configuration file: ...@@ -1084,11 +1084,9 @@ The resulting configuration file:
1:detectormac 00:50:c2:46:d9:29 1:detectormac 00:50:c2:46:d9:29
1:flippeddatax 1 1:flippeddatax 1
rx_hostname lid10eiger1 settingsdir /users/opid00/eiger/eiger_v3.1.1/settingsdir/eiger
settingsdir /users/opid00/eiger/eiger_v2.3.2/settingsdir/eiger
lock 0 lock 0
#caldir /users/opid00/eiger/eiger_v2.3.2/settingsdir/eiger #caldir /users/opid00/eiger/eiger_v3.1.1/settingsdir/eiger
outdir /nobackup/lid10eiger12/data/eiger outdir /nobackup/lid10eiger12/data/eiger
tengiga 1 tengiga 1
...@@ -1116,7 +1114,7 @@ Add the configuration file to *eiger_setup.sh* and decode the ...@@ -1116,7 +1114,7 @@ Add the configuration file to *eiger_setup.sh* and decode the
(bliss) lid10eiger1:~ % tail -n 8 eiger_setup.sh (bliss) lid10eiger1:~ % tail -n 8 eiger_setup.sh
EIGER_DIR=${EIGER_HOME}/eiger/eiger_v2.3.2 EIGER_DIR=${EIGER_HOME}/eiger/eiger_v3.1.1
EIGER_CONFIG=${EIGER_DIR}/config/beb-021-020-direct-FO-10g.config EIGER_CONFIG=${EIGER_DIR}/config/beb-021-020-direct-FO-10g.config
EIGER_MODULES=$(grep "^hostname" ${EIGER_CONFIG} | cut -d" " -f2 | tr '+' ' ') EIGER_MODULES=$(grep "^hostname" ${EIGER_CONFIG} | cut -d" " -f2 | tr '+' ' ')
export EIGER_DIR EIGER_CONFIG EIGER_MODULES export EIGER_DIR EIGER_CONFIG EIGER_MODULES
...@@ -1241,11 +1239,13 @@ Compile *Lima*, including *slsDetectorPackage* using *CMake*: ...@@ -1241,11 +1239,13 @@ Compile *Lima*, including *slsDetectorPackage* using *CMake*:
:: ::
(bliss) lid10eiger1:~ % cd ${LIMA_DIR} (bliss) lid10eiger1:~ % cd ${LIMA_DIR}
(bliss) lid10eiger1:~/esrf/sls_detectors/Lima % cp scripts/config.txt_default scripts/config.txt
(bliss) lid10eiger1:~/esrf/sls_detectors/Lima % echo "CMAKE_BUILD_TYPE=RelWithDebInfo" >> scripts/config.txt
(bliss) lid10eiger1:~/esrf/sls_detectors/Lima % mkdir -p ${LIMA_DIR}/install/python (bliss) lid10eiger1:~/esrf/sls_detectors/Lima % mkdir -p ${LIMA_DIR}/install/python
(bliss) lid10eiger1:~/esrf/sls_detectors/Lima % ./install.sh \ (bliss) lid10eiger1:~/esrf/sls_detectors/Lima % ./install.sh \
--install-prefix=${LIMA_DIR}/install \ --install-prefix=${LIMA_DIR}/install \
--install-python-prefix=${LIMA_DIR}/install/python \ --install-python-prefix=${LIMA_DIR}/install/python \
slsdetector sps-image gldisplay edfgz python pytango-server slsdetector sps-image gldisplay edfgz python pytango-server tests
... ...
Build the documentation: Build the documentation:
...@@ -1268,6 +1268,16 @@ Add *Lima* to the *PATH*, *LD_LIBRARY_PATH* and *PYTHONPATH* environment variabl ...@@ -1268,6 +1268,16 @@ Add *Lima* to the *PATH*, *LD_LIBRARY_PATH* and *PYTHONPATH* environment variabl
PYTHONPATH=${LIMA_DIR}/install/python:${PYTHONPATH} PYTHONPATH=${LIMA_DIR}/install/python:${PYTHONPATH}
export LIMA_DIR PATH LD_LIBRARY_PATH PYTHONPATH export LIMA_DIR PATH LD_LIBRARY_PATH PYTHONPATH
*eigerDetectorServer* and detector firmwares
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If necessary, the *eigerDetectorServer* corresponding to the installed *slsDetectorPackage* version
must be copied into the modules embedded Linux. Please refer to :doc:`installation_eiger_server_and_fw`
Test the *slsDetectorSoftware* and *Lima*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logout and re-login as *opid00*, so the previous changes can be tested. Logout and re-login as *opid00*, so the previous changes can be tested.
First, test the 'slsDetectorGui': First, test the 'slsDetectorGui':
...@@ -1283,11 +1293,14 @@ to activate the high voltage; answer *No*. In the GUI, disable the *File ...@@ -1283,11 +1293,14 @@ to activate the high voltage; answer *No*. In the GUI, disable the *File
Name* check box and press *Start* for a single acquisition. A frame Name* check box and press *Start* for a single acquisition. A frame
should be taken. should be taken.
Finally, test the *Lima* plugin: Finally, test the *Lima* plugin without and with *CtControl* instantiation:
:: ::
(bliss) lid10eiger1:~ % cd ${LIMA_DIR} (bliss) lid10eiger1:~ % cd ${LIMA_DIR}
(bliss) lid10eiger1:~/esrf/sls_detectors/Lima % rm -f /tmp/eiger.edf && \
build/camera/slsdetector/test/test_slsdetector -c ${EIGER_CONFIG}
...
(bliss) lid10eiger1:~/esrf/sls_detectors/Lima % mkdir -p /nobackup/lid10eiger12/data/eiger/lima (bliss) lid10eiger1:~/esrf/sls_detectors/Lima % mkdir -p /nobackup/lid10eiger12/data/eiger/lima
(bliss) lid10eiger1:~/esrf/sls_detectors/Lima % ln -s /nobackup/lid10eiger12/data/eiger/lima data (bliss) lid10eiger1:~/esrf/sls_detectors/Lima % ln -s /nobackup/lid10eiger12/data/eiger/lima data
(bliss) lid10eiger1:~/esrf/sls_detectors/Lima % rm -f data/img*.edf && \ (bliss) lid10eiger1:~/esrf/sls_detectors/Lima % rm -f data/img*.edf && \
...@@ -1407,7 +1420,7 @@ Add LimaCCDs and SlsDetector class devices. ...@@ -1407,7 +1420,7 @@ Add LimaCCDs and SlsDetector class devices.
+----------------------------------------------------------+-------------------------------------------+ +----------------------------------------------------------+-------------------------------------------+
| LimaCCDs/eiger500k/DEVICE/SlsDetector | id10/slsdetector/eiger500k | | LimaCCDs/eiger500k/DEVICE/SlsDetector | id10/slsdetector/eiger500k |
+----------------------------------------------------------+-------------------------------------------+ +----------------------------------------------------------+-------------------------------------------+
| id10/slsdetector/eiger500k->config_fname | /users/opid00/eiger/eiger_v2.3.2/config/ | | id10/slsdetector/eiger500k->config_fname | /users/opid00/eiger/eiger_v3.1.1/config/ |
| | beb-021-020-direct-FO-10g.config | | | beb-021-020-direct-FO-10g.config |
+----------------------------------------------------------+-------------------------------------------+ +----------------------------------------------------------+-------------------------------------------+
| id10/slsdetector/eiger500k->netdev_groups | | eth0,eth1,eth2,eth4,eth6,eth7,eth8,eth9 | | id10/slsdetector/eiger500k->netdev_groups | | eth0,eth1,eth2,eth4,eth6,eth7,eth8,eth9 |
......
This diff is collapsed.
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "SlsDetectorReceiver.h" #include "SlsDetectorReceiver.h"
#include "SlsDetectorCPUAffinity.h" #include "SlsDetectorCPUAffinity.h"
#include "multiSlsDetector.h" #include "slsDetectorUsers.h"
#include "lima/HwBufferMgr.h" #include "lima/HwBufferMgr.h"
#include "lima/HwMaxImageSizeCallback.h" #include "lima/HwMaxImageSizeCallback.h"
...@@ -50,8 +50,6 @@ public: ...@@ -50,8 +50,6 @@ public:
typedef Defs::Settings Settings; typedef Defs::Settings Settings;
typedef Defs::DACIndex DACIndex; typedef Defs::DACIndex DACIndex;
typedef Defs::ADCIndex ADCIndex; typedef Defs::ADCIndex ADCIndex;
typedef Defs::ClockDiv ClockDiv;
typedef Defs::ReadoutFlags ReadoutFlags;
typedef Defs::DetStatus DetStatus; typedef Defs::DetStatus DetStatus;
typedef Defs::NetworkParameter NetworkParameter; typedef Defs::NetworkParameter NetworkParameter;
...@@ -80,7 +78,7 @@ public: ...@@ -80,7 +78,7 @@ public:
std::pair<int, int> splitPortIndex(int port_idx) std::pair<int, int> splitPortIndex(int port_idx)
{ return std::pair<int, int>(port_idx / m_recv_nb_ports, { return std::pair<int, int>(port_idx / m_recv_nb_ports,
port_idx % m_recv_nb_ports);} port_idx % m_recv_nb_ports); }
void setBufferCbMgr(StdBufferCbMgr *buffer_cb_mgr) void setBufferCbMgr(StdBufferCbMgr *buffer_cb_mgr)
{ m_buffer_cb_mgr = buffer_cb_mgr; } { m_buffer_cb_mgr = buffer_cb_mgr; }
...@@ -132,20 +130,8 @@ public: ...@@ -132,20 +130,8 @@ public:
void getADC(int sub_mod_idx, ADCIndex adc_idx, int& val); void getADC(int sub_mod_idx, ADCIndex adc_idx, int& val);
void getADCList(ADCIndex adc_idx, IntList& val_list); void getADCList(ADCIndex adc_idx, IntList& val_list);
void setAllTrimBits(int sub_mod_idx, int val);
void getAllTrimBits(int sub_mod_idx, int& val);
void getAllTrimBitsList(IntList& val_list);
void setSettings(Settings settings); void setSettings(Settings settings);
void getSettings(Settings& settings); void getSettings(Settings& settings);
void setThresholdEnergy(int thres);
void getThresholdEnergy(int& thres);
void setClockDiv(ClockDiv clock_div);
void getClockDiv(ClockDiv& clock_div);
void setReadoutFlags(ReadoutFlags flags);
void getReadoutFlags(ReadoutFlags& flags);
void getValidReadoutFlags(IntList& flag_list, NameList& flag_name_list);
void setNetworkParameter(NetworkParameter net_param, std::string& val); void setNetworkParameter(NetworkParameter net_param, std::string& val);
void getNetworkParameter(NetworkParameter net_param, std::string& val); void getNetworkParameter(NetworkParameter net_param, std::string& val);
...@@ -261,9 +247,6 @@ private: ...@@ -261,9 +247,6 @@ private:
void getSortedBadFrameList(IntList& bad_frame_list) void getSortedBadFrameList(IntList& bad_frame_list)
{ getSortedBadFrameList(IntList(), IntList(), bad_frame_list); } { getSortedBadFrameList(IntList(), IntList(), bad_frame_list); }
void addValidReadoutFlags(DebObj *deb_ptr, ReadoutFlags flags,
IntList& flag_list, NameList& flag_name_list);
template <class T> template <class T>
void putNbCmd(const std::string& cmd, T val, int idx = -1) void putNbCmd(const std::string& cmd, T val, int idx = -1)
{ {
...@@ -282,10 +265,15 @@ private: ...@@ -282,10 +265,15 @@ private:
return val; return val;
} }
void setReceiverFifoDepth(int fifo_depth);
bool isTenGigabitEthernetEnabled();
void setFlowControl10G(bool enabled);
void resetFramesCaught();
Model *m_model; Model *m_model;
Cond m_cond; Cond m_cond;
AutoPtr<AppInputData> m_input_data; AutoPtr<AppInputData> m_input_data;
AutoPtr<multiSlsDetector> m_det; AutoPtr<slsDetectorUsers> m_det;
FrameMap m_frame_map; FrameMap m_frame_map;
int m_recv_nb_ports; int m_recv_nb_ports;
RecvList m_recv_list; RecvList m_recv_list;
...@@ -300,7 +288,6 @@ private: ...@@ -300,7 +288,6 @@ private:
PixelDepth m_pixel_depth; PixelDepth m_pixel_depth;
ImageType m_image_type; ImageType m_image_type;
bool m_raw_mode; bool m_raw_mode;
AutoPtr<AcqThread> m_acq_thread;
State m_state; State m_state;
double m_new_frame_timeout; double m_new_frame_timeout;
double m_abort_sleep_time; double m_abort_sleep_time;
...@@ -309,6 +296,7 @@ private: ...@@ -309,6 +296,7 @@ private:
TimeRangesChangedCallback *m_time_ranges_cb; TimeRangesChangedCallback *m_time_ranges_cb;
PixelDepthCPUAffinityMap m_cpu_affinity_map; PixelDepthCPUAffinityMap m_cpu_affinity_map;
GlobalCPUAffinityMgr m_global_cpu_affinity_mgr; GlobalCPUAffinityMgr m_global_cpu_affinity_mgr;
AutoPtr<AcqThread> m_acq_thread;
}; };
} // namespace SlsDetector } // namespace SlsDetector
......
...@@ -68,6 +68,9 @@ enum Settings { ...@@ -68,6 +68,9 @@ enum Settings {
Unitialized = slsDetectorDefs::UNINITIALIZED, Unitialized = slsDetectorDefs::UNINITIALIZED,
}; };
#define MultiSlsDetectorErr (-100)
#define SlsDetectorBadIndexErr (-9999)
enum DACIndex { enum DACIndex {
Threshold = slsDetectorDefs::THRESHOLD, Threshold = slsDetectorDefs::THRESHOLD,
CalibPulse = slsDetectorDefs::CALIBRATION_PULSE, CalibPulse = slsDetectorDefs::CALIBRATION_PULSE,
...@@ -125,7 +128,8 @@ enum DACIndex { ...@@ -125,7 +128,8 @@ enum DACIndex {
PowerChip = slsDetectorDefs::V_POWER_CHIP, PowerChip = slsDetectorDefs::V_POWER_CHIP,
}; };
#define MultiSlsDetectorErr (-100) typedef std::map<DACIndex, std::string> DACCmdMapType;
extern DACCmdMapType DACCmdMap;
enum ADCIndex { enum ADCIndex {
TempADC = slsDetectorDefs::TEMPERATURE_ADC, TempADC = slsDetectorDefs::TEMPERATURE_ADC,
...@@ -139,6 +143,9 @@ enum ADCIndex { ...@@ -139,6 +143,9 @@ enum ADCIndex {
TempFPGAFR = slsDetectorDefs::TEMPERATURE_FPGA3, TempFPGAFR = slsDetectorDefs::TEMPERATURE_FPGA3,
}; };
typedef std::map<ADCIndex, std::string> ADCCmdMapType;
extern ADCCmdMapType ADCCmdMap;
enum ClockDiv { enum ClockDiv {
FullSpeed, FullSpeed,
HalfSpeed, HalfSpeed,
...@@ -146,20 +153,6 @@ enum ClockDiv { ...@@ -146,20 +153,6 @@ enum ClockDiv {
SuperSlowSpeed, SuperSlowSpeed,
}; };
enum ReadoutFlags {
Normal = slsDetectorDefs::NORMAL_READOUT,
StoreInRAM = slsDetectorDefs::STORE_IN_RAM,
ReadHits = slsDetectorDefs::READ_HITS,
ZeroCompress = slsDetectorDefs::ZERO_COMPRESSION,
PumpProbe = slsDetectorDefs::PUMP_PROBE_MODE,
BackgndCorr = slsDetectorDefs::BACKGROUND_CORRECTIONS,
TOTMode = slsDetectorDefs::TOT_MODE,
Continous = slsDetectorDefs::CONTINOUS_RO,
Parallel = slsDetectorDefs::PARALLEL,
NonParallel = slsDetectorDefs::NONPARALLEL,
Safe = slsDetectorDefs::SAFE,
};
enum DetStatus { enum DetStatus {
Idle = slsDetectorDefs::IDLE, Idle = slsDetectorDefs::IDLE,
Error = slsDetectorDefs::ERROR, Error = slsDetectorDefs::ERROR,
...@@ -191,7 +184,6 @@ std::ostream& operator <<(std::ostream& os, Settings settings); ...@@ -191,7 +184,6 @@ std::ostream& operator <<(std::ostream& os, Settings settings);
std::ostream& operator <<(std::ostream& os, DACIndex dac_idx); std::ostream& operator <<(std::ostream& os, DACIndex dac_idx);
std::ostream& operator <<(std::ostream& os, ADCIndex adc_idx); std::ostream& operator <<(std::ostream& os, ADCIndex adc_idx);
std::ostream& operator <<(std::ostream& os, ClockDiv clock_div); std::ostream& operator <<(std::ostream& os, ClockDiv clock_div);
std::ostream& operator <<(std::ostream& os, ReadoutFlags flags);
std::ostream& operator <<(std::ostream& os, DetStatus status); std::ostream& operator <<(std::ostream& os, DetStatus status);
std::ostream& operator <<(std::ostream& os, NetworkParameter net_param); std::ostream& operator <<(std::ostream& os, NetworkParameter net_param);
...@@ -624,9 +616,6 @@ typedef RegEx::MatchListType MatchList; ...@@ -624,9 +616,6 @@ typedef RegEx::MatchListType MatchList;
typedef MatchList::const_iterator MatchListIt; typedef MatchList::const_iterator MatchListIt;
pid_t gettid();
} // namespace SlsDetector } // namespace SlsDetector
} // namespace lima } // namespace lima
......
...@@ -45,6 +45,12 @@ class Eiger : public Model ...@@ -45,6 +45,12 @@ class Eiger : public Model
typedef unsigned short Word; typedef unsigned short Word;
typedef unsigned int Long; typedef unsigned int Long;
typedef Defs::ClockDiv ClockDiv;
enum ParallelMode {
NonParallel, Parallel, Safe,
};
class Correction : public LinkTask class Correction : public LinkTask
{ {
DEB_CLASS_NAMESPC(DebModCamera, "Eiger::Correction", DEB_CLASS_NAMESPC(DebModCamera, "Eiger::Correction",
...@@ -76,16 +82,27 @@ class Eiger : public Model ...@@ -76,16 +82,27 @@ class Eiger : public Model
// the returned object must be deleted by the caller // the returned object must be deleted by the caller
Correction *createCorrectionTask(); Correction *createCorrectionTask();
void setParallelMode(ParallelMode mode);
void getParallelMode(ParallelMode& mode);
void setClockDiv(ClockDiv clock_div);
void getClockDiv(ClockDiv& clock_div);
void setAllTrimBits(int sub_mod_idx, int val);
void getAllTrimBits(int sub_mod_idx, int& val);
void getAllTrimBitsList(IntList& val_list);
void setHighVoltage(int hvolt);
void getHighVoltage(int& hvolt);
void setThresholdEnergy(int thres);
void getThresholdEnergy(int& thres);
protected: protected:
virtual void updateImageSize(); virtual void updateImageSize();
virtual bool checkSettings(Settings settings); virtual bool checkSettings(Settings settings);
virtual ReadoutFlags getReadoutFlagsMask();
virtual bool checkReadoutFlags(ReadoutFlags flags,
IntList& flag_list,
bool silent = false);
virtual int getRecvPorts(); virtual int getRecvPorts();
virtual void prepareAcq(); virtual void prepareAcq();
...@@ -309,8 +326,6 @@ class Eiger : public Model ...@@ -309,8 +326,6 @@ class Eiger : public Model
std::vector<BorderFactor> m_f; std::vector<BorderFactor> m_f;
}; };
int countFlags(ReadoutFlags flags);
bool isPixelDepth4() bool isPixelDepth4()
{ {
PixelDepth pixel_depth; PixelDepth pixel_depth;
...@@ -319,7 +334,7 @@ class Eiger : public Model ...@@ -319,7 +334,7 @@ class Eiger : public Model
} }
int getNbEigerModules() int getNbEigerModules()
{ return m_nb_det_modules / 2; } { return getNbDetModules() / 2; }