mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +02:00
Resolve merge conflict in jungfrauExecutables
This commit is contained in:
commit
1bdf83e101
@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(slsDetectorPackage)
|
||||
set(PROJECT_VERSION 6.1.1)
|
||||
set(PROJECT_VERSION 7.0.0)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||
|
||||
|
287
README.md
287
README.md
@ -1,102 +1,233 @@
|
||||
### Note
|
||||
## Dependencies
|
||||
Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip.
|
||||
|
||||
Please do not update to any xxxx.xx.xx.dev0 tags. They are not releases, but tags for internal usage.
|
||||
Use only releases with tags such as x.x.x or x.x.x-rcx.
|
||||
## Documentaion
|
||||
Detailed documentation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
|
||||
|
||||
### Documentation
|
||||
##### 5.0.0 - Latest Release
|
||||
Detailed documentation on the latest release can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
|
||||
## Installation
|
||||
|
||||
##### Older Releases
|
||||
Documentation is found in the package.
|
||||
### 1. Install binaries using conda
|
||||
Conda is not only useful to manage python environments but can also
|
||||
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
||||
are from the developer branch. Please use released tags for stability.
|
||||
|
||||
We have three different packages available:
|
||||
* **slsdetlib** shared libraries and command line utilities
|
||||
* **slsdetgui** GUI
|
||||
* **slsdet** Python bindings
|
||||
|
||||
### Binaries
|
||||
Binaries for the slsDetectorPackage are available through conda.
|
||||
```
|
||||
#Add conda channels
|
||||
#Add channels for dependencies and our library
|
||||
conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
conda install slsdetlib #only shared lib and command line
|
||||
conda install slsdet #python bindings (includes slsdetlib)
|
||||
conda install slsdetgui #gui (includes qt4)
|
||||
|
||||
#Install specific version
|
||||
conda install slsdet=2020.03.02.dev0 #developer version from 3 March 2020
|
||||
#create and activate an environment with our library
|
||||
#replace 6.1.1 with the required tag
|
||||
conda create -n myenv slsdetlib=6.1.1
|
||||
conda activate myenv
|
||||
|
||||
#ready to use
|
||||
sls_detector_get exptime
|
||||
etc ...
|
||||
```
|
||||
|
||||
### Source code
|
||||
One can also obtain the source code from this repository and compile.
|
||||
```
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
|
||||
```
|
||||
#### Dependencies
|
||||
|
||||
Refer [this page](https://slsdetectorgroup.github.io/devdoc/dependencies.html) for dependencies.
|
||||
|
||||
|
||||
#### Compilation
|
||||
|
||||
Compiling can be done in two ways. Either with the convenience script
|
||||
cmk.sh or directly with cmake for more control.
|
||||
|
||||
**1. Compile using script cmk.sh**<br>
|
||||
|
||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
||||
```
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
Usage: ./cmk.sh [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
|
||||
-[no option]: only make
|
||||
-c: Clean
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
-p: Builds/Rebuilds Python API
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-d: HDF5 Custom Directory
|
||||
-k: CMake command
|
||||
-l: Install directory
|
||||
-t: Build/Rebuilds only text client
|
||||
-r: Build/Rebuilds only receiver
|
||||
-g: Build/Rebuilds only gui
|
||||
-s: Simulator
|
||||
-u: Chip Test Gui
|
||||
-j: Number of threads to compile through
|
||||
-e: Debug mode
|
||||
-i: Builds tests
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-z: Moench zmq processor
|
||||
|
||||
|
||||
# get all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
# List available versions
|
||||
# lib and binaries
|
||||
conda search slsdetlib
|
||||
# python
|
||||
conda search slsdet
|
||||
# gui
|
||||
conda search slsdetgui
|
||||
```
|
||||
|
||||
**2. Compile without script**<br>
|
||||
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory. This would create a debug build with address sanitizers.
|
||||
### 2. Build from source
|
||||
|
||||
##### 2.1 Download Source Code from github
|
||||
```
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
|
||||
$ make -j12 #or whatever number of threads wanted
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
||||
```
|
||||
|
||||
To install binaries using CMake
|
||||
**Pybind for Python**<br>
|
||||
* **v7.0.0+**:
|
||||
pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
||||
|
||||
* **Older versions**:
|
||||
pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands.
|
||||
|
||||
```
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||
make -j12 #or whatever number of cores you are using to build
|
||||
make install
|
||||
# clone using recursive to get pybind11 submodule
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
|
||||
# update submodule when switching between releases
|
||||
cd slsDetectorPackage
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
##### 2.2 Build from source
|
||||
|
||||
|
||||
###### Build using CMake
|
||||
|
||||
```
|
||||
# outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
|
||||
# configure & generate Makefiles using cmake
|
||||
# by listing all your options (alternately use ccmake described below)
|
||||
# cmake3 for some systems
|
||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||
|
||||
# compiled to the build/bin directory
|
||||
make -j12 #or whatever number of cores you are using to build
|
||||
|
||||
# install headers and libs in /your/install/path directory
|
||||
make install
|
||||
```
|
||||
|
||||
Instead of the cmake command, one can use ccmake to get a list of options to configure and generate Makefiles at ease.
|
||||
|
||||
|
||||
```
|
||||
# ccmake3 for some systems
|
||||
ccmake ..
|
||||
|
||||
# choose the options
|
||||
# first press [c] - configure
|
||||
# then press [g] - generate
|
||||
```
|
||||
|
||||
|Example cmake options|Comment|
|
||||
|---|---|
|
||||
| -DSLS_USE_PYTHON=ON | Python |
|
||||
| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda environment |
|
||||
| -DZeroMQ_HINT=/usr/lib64 | Use system zmq instead |
|
||||
| -DSLS_USE_GUI=ON | GUI |
|
||||
|
||||
|
||||
###### Build using in-built cmk.sh script
|
||||
|
||||
```
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of threads>]
|
||||
[-k <CMake command>] [-l <Install directory>] [m] [n] [-p] [-q <Zmq hint directory>]
|
||||
[r] [s] [t] [u] [z]
|
||||
-[no option]: only make
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
-c: Clean
|
||||
-d: HDF5 Custom Directory
|
||||
-e: Debug mode
|
||||
-g: Build/Rebuilds gui
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-i: Builds tests
|
||||
-j: Number of threads to compile through
|
||||
-k: CMake command
|
||||
-l: Install directory
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-p: Builds/Rebuilds Python API
|
||||
-q: Zmq hint directory
|
||||
-r: Build/Rebuilds only receiver
|
||||
-s: Simulator
|
||||
-t: Build/Rebuilds only text client
|
||||
-u: Chip Test Gui
|
||||
-z: Moench zmq processor
|
||||
|
||||
|
||||
# display all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel (recommended basic option):
|
||||
./cmk.sh -cbj5
|
||||
|
||||
# new build, python and compile in parallel:
|
||||
./cmk.sh -cbpj5
|
||||
|
||||
#To use the system zmq (/usr/lib64) instead
|
||||
./cmk.sh -cbj5 -q /usr/lib64
|
||||
```
|
||||
|
||||
###### Build on old distributions
|
||||
|
||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||
using this compiler
|
||||
|
||||
```
|
||||
#Create an environment with the dependencies
|
||||
conda create -n myenv gxx_linux-64 cmake zmq
|
||||
conda activate myenv
|
||||
|
||||
# outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
|
||||
make -j12
|
||||
```
|
||||
|
||||
###### Build slsDetectorGui (Qt5)
|
||||
|
||||
1. Using pre-built binary on conda
|
||||
```
|
||||
conda create -n myenv slsdetgui=7.0.0
|
||||
conda activate myenv
|
||||
```
|
||||
|
||||
2. Using system installation on RHEL7
|
||||
```
|
||||
yum install qt5-qtbase-devel.x86_64
|
||||
yum install qt5-qtsvg-devel.x86_64
|
||||
```
|
||||
|
||||
3. Using conda
|
||||
```
|
||||
#Add channels for dependencies and our library
|
||||
conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
# create environment to compile
|
||||
# on rhel7
|
||||
conda create -n slsgui zeromq gxx_linux-64 gxx_linux-64 mesa-libgl-devel-cos6-x86_64 qt
|
||||
# on fedora or newer systems
|
||||
conda create -n slsgui zeromq qt
|
||||
|
||||
# when using conda compilers, would also need libgl, but no need for it on fedora unless maybe using it with ROOT
|
||||
|
||||
# activate environment
|
||||
conda activate slsgui
|
||||
|
||||
# compile with cmake outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DSLS_USE_GUI=ON
|
||||
make -j12
|
||||
|
||||
# or compile with cmk.sh
|
||||
cd slsDetectorPackage
|
||||
./cmk.sh -cbgj9
|
||||
```
|
||||
|
||||
###### Build documentation from package
|
||||
The documentation for the slsDetectorPackage is build using a combination
|
||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||
is to use conda
|
||||
|
||||
```
|
||||
conda create -n myenv python sphinx_rtd_theme breathe
|
||||
```
|
||||
|
||||
```
|
||||
# using cmake or ccmake to enable DSLS_BUILD_DOCS
|
||||
# outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DSLS_BUILD_DOCS=ON
|
||||
|
||||
make docs # generate API docs and build Sphinx RST
|
||||
make rst # rst only, saves time in case the API did not change
|
||||
```
|
||||
|
||||
|
||||
### Support
|
||||
## Support
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
257
RELEASE.txt
257
RELEASE.txt
@ -1,177 +1,94 @@
|
||||
SLS Detector Package Minor Release 7.0.0 released on 25.11.2021
|
||||
SLS Detector Package Major Release 7.x.x released on xx.xx.2023
|
||||
===============================================================
|
||||
|
||||
This document describes the differences between v7.0.0 and v6.x.x
|
||||
This document describes the differences between v7.x.x and v7.0.0
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1. New or Changed Features
|
||||
2. Resolved Issues
|
||||
3. Firmware Requirements
|
||||
4. Kernel Requirements
|
||||
5. Download, Documentation & Support
|
||||
1 New, Changed or Resolved Features
|
||||
1.1 Compilation
|
||||
1.2 Callback
|
||||
1.3 Python
|
||||
1.4 Client
|
||||
1.5 Detector Server
|
||||
1.6 Simulator
|
||||
1.7 Receiver
|
||||
1.8 Gui
|
||||
2 On-board Detector Server Compatibility
|
||||
3 Firmware Requirements
|
||||
4 Kernel Requirements
|
||||
5 Download, Documentation & Support
|
||||
|
||||
|
||||
|
||||
|
||||
1. New or Changed Features
|
||||
==========================
|
||||
|
||||
- Fixed minor warnings (will fix commandline print of excess packets for missing packets)
|
||||
- ctb slow adcs and any other adcs (other than temp) goes to the control Server
|
||||
- number of udp interfaces is 2 for Eiger (CHANGE IN API??)
|
||||
- added module id for virtual servers into the udp header
|
||||
- refactoring (rxr)
|
||||
- fixed patsetbit and patsetmask for moench
|
||||
- changed default vref of adc9257 to 2V for moench (from 1.33V)
|
||||
- moench and ctb - can set the starting frame number of next acquisition
|
||||
- mythen server kernel check incompatible (cet timezone)
|
||||
- rx_arping
|
||||
- rx_threadsids max is now 9 (breaking api)
|
||||
- fixed datastream disabling for eiger. Its only available in 10g mode.
|
||||
- m3 server crash (vthrehsold dac names were not provided)
|
||||
- allow vtrim to be interpolated for Eiger settings
|
||||
- m3 setThresholdEnergy and setAllThresholdEnergy was overwriting gaincaps with settings enum
|
||||
- can set localhost with virtual server with minimum configuration: (hostname localhost, rx_hostname localhost, udp_dstip auto)
|
||||
- increases the progress according to listened index. (not processed index)
|
||||
- current frame index points to listened frame index (not processed index)
|
||||
- when in discard partial frames or empty mode, the frame number doesnt increase by 1, it increases to that number (so its faster)
|
||||
- file write disabled by default
|
||||
- eiger 12 bit mode
|
||||
- start non blocking acquisition at modular level
|
||||
- connect master commands to api (allow set master for eiger)
|
||||
--ignore-config command line
|
||||
- command line argument 'master' mainly for virtual servers (also master/top for real eiger), only one virtual server for eiger, use command lines for master/top
|
||||
- stop servers also check for errors at startup( in case it was running with an older version)
|
||||
- hostname cmd failed when connecting to servers in update mode (ctb, moench, jungfrau, eiger)
|
||||
- missingpackets signed (negative => extra packets)
|
||||
- framescaught and frameindex now returns a vector for each port
|
||||
- progress looks at activated or enabled ports, so progress does not stagnate
|
||||
- (eiger) disable datastreaming also for virtual servers only for 10g
|
||||
- missing packets also takes care of disabled ports
|
||||
- added geometry to metadata
|
||||
- 10g eiger nextframenumber get fixed.
|
||||
- stop, able to set nextframenumber to a consistent (max + 1) for all modules if different (eiger/ctb/jungfrau/moench)
|
||||
- ctb: can set names for all the dacs
|
||||
- fpga/kernel programming, checks if drive is a special file and not a normal file
|
||||
- gotthard 25 um image reconstructed in gui and virtual hdf5 (firmware updated for slave to reverse channels)
|
||||
- master binary file in json format now
|
||||
- fixed bug introduced in 6.0.0: hdf5 files created 1 file per frame after the initial file which had maxframesperfile
|
||||
- rx_roi
|
||||
- m3 polarity, interpolation (enables all counters when enabled), pump probe, analog pulsing, digital pulsing
|
||||
- updatedetectorserver - removes old server current binary pointing to for blackfin
|
||||
- removing copydetectorserver using tftp
|
||||
- registerCallBackRawDataReady and registerCallBackRawDataModifyReady now gives a sls_receiver_header* instead of a char*, and uint32_t to size_t
|
||||
- registerCallBackStartAcquisition gave incorrect imagesize (+120 bytes). corrected.
|
||||
- registerCallBackStartAcquisition parameter is a const string reference
|
||||
- m3 (runnig config second time with tengiga 0, dr !=32, counters !=0x7) calculated incorrect image size expected
|
||||
- fixed row column indexing (mainly for multi module Jungfrau 2 interfaces )
|
||||
- eiger gui row indices not flipped anymore (fix in config)
|
||||
- m3 (settings dac check disabled temporarily?)
|
||||
- m3 virtual server sends the right pacets now
|
||||
- gap pixels in gui enabled by default
|
||||
- rxr src files and classes (detectordata, ZmqSocket, helpDacs) added to sls namespace, and macros (namely from logger (logINFO etc)), slsDetectorGui (make_unique in implemtnation requires sls nemspace (points to std otherwise) but not deectorImpl.cpp)
|
||||
- blackfin programing made seamless (nCE fixed which helps)
|
||||
-save settings file for m3 and eiger
|
||||
- m3 threshold changes
|
||||
- g2 and m3 clkdiv 2 (system clock) change should affect time settings (g2: exptime, period, delayaftertrigger, burstperiod, m3: exptime, gatedelay, gateperiod, period, delayaftertrigger)
|
||||
- g2 system frequency is the same irrespective of timing source
|
||||
- (apparently) rxr doesnt get stuck anymore from 6.1.1
|
||||
- rxr mem size changed (fifo header size from 8 to 16) due to sls rxr header = 112.. 112+ 16=128 (reduces packet losss especially for g2)
|
||||
-udp_srcip and udp_Srcip2: can set to auto (for virtual or 1g data networks)
|
||||
- set dataset name for all hdf5 files to "data" only
|
||||
- number of storage cells is not updated in teh receiver. done. and also allowing it to be modified in running status
|
||||
- refactored memory structure in receiver and listener code (maybe resolves stuck issue, need to check)
|
||||
- callback modified to have rx header and not rx header pointer
|
||||
- adapted for g2 hdi v2.0. able to set master from server command line, server config file, and client.
|
||||
- rx udp socket refactored (maybe resolves getting stuck?)remove check for eiger header and isntead checks for malformed packets for every detector
|
||||
- jungfrau sw trigger , blocking trigger
|
||||
-help should not create a new object
|
||||
- jungfrau master
|
||||
- g2 parallel command
|
||||
- jungfrau sync
|
||||
- m3 bad channels (badchannel file also for g2 extended to include commas and colons, remove duplicates)
|
||||
- m3 fix for gain caps to invert where needed when loading from trimbit file (fix for feature might have been added only in developer branch)
|
||||
- pat loop and wait address default
|
||||
- ctb and moench Fw fixed (to work with pattern commdand) )addreess length
|
||||
- setting rx_hostname (or udp_dstip with rx_hostname not none) will always set udp_dstmac. solves problem of chaing udp_dstip and udp_dstmac stays the same
|
||||
- jungfrau reset core and usleep removed (fix for 6.1.1 is now fixed in firmware)
|
||||
- m3 clock update, m3 clk 4 and 5 cannot be set
|
||||
- g2 change clkdivs 2 3 4 to defaults for burst and cw mode.
|
||||
- ctb and moench: allowing 1g non blocking acquire to send data
|
||||
- m3 and g2 rr
|
||||
- m3 and g2 temp
|
||||
- gain plot zooming fixed (disabled, acc. to main plot)
|
||||
- ctb, moench, jungfrau (pll reset at start fixed, before no defines)
|
||||
- pybind built into package, no need to update submodule when previous release had different pybind version
|
||||
- adcvpp moved from dac.. and api added (ctb, moench)
|
||||
- qt4->qt5
|
||||
- in built qt5 6.1.5 because rhel7 is not upto date with qt5, removed findqwt.cmake
|
||||
- made a fix in qwt lib (qwt_plot_layout.h) to work with 5.15 and lower versions
|
||||
- qt5 forms fixed, qt4 many hard coding forms switched to forms including qtabwidget, scrolls etc, fonts moved to forms
|
||||
- docking option enabled by default, removed option to disable docking feature from "Mode"
|
||||
- added qVersionResolve utility functions to handle compatibility before and after qt5.12
|
||||
- qtplots (ian's code) takes in gain mode enable to set some settings within the class, with proper gain plot ticks
|
||||
- ensure gain plots have no zooming of z axis in 2d and y axis in 1d
|
||||
- fixed some error messages in server side that were empty for fail in funcs (mostly minor as if this error, major issues)
|
||||
- eiger (removed feb reset in stop acquisition as it caused processing bit to randomly not go high (leads to infinite loop waiting for it to go high). This is anyway done at prepare acquisition and set trimbits.
|
||||
- left AND right registers monitored for processing bit done
|
||||
- febProcessinginprogress returns STATUS_IDLE and not IDLE
|
||||
- In feb stop acquisition, if processing bit is running forever, checks for 1 s, then if acq done bit is high, returns ok, else throws
|
||||
- feb stop acquisition returns 1 if success and fucntion in list calling it compares properly instead of STATUS_IDLE (no effect, but incorrect logic)
|
||||
- chipsignals to trimquad should only monitor right fpga (not both as it will throw)
|
||||
- fixed error messages of readregister inconsistent values
|
||||
- setmodule and read frame was returning fail without setting error messages (leading to broken tcp connection due to no error message) )
|
||||
- gui nios temperature added
|
||||
- detector header change (bunchid, reserved, debug, roundRnumber) ->detSpec1 - 4
|
||||
-ctb and moench (allowing all clkdivs (totaldiv was a float instead of int))
|
||||
- txndelay_ ->txdelay_ (also for python), txdelay = delay for all with step
|
||||
- hardwareversion
|
||||
- jungfrau connected moduleid to detid_jungfrau.txt on board
|
||||
1 New, Changed or Resolved Features
|
||||
=====================================
|
||||
|
||||
|
||||
2. Resolved Issues
|
||||
==================
|
||||
- Reading back sub-microsecond exposure times from the Python API.
|
||||
- moench being made compatible with jungfrau 2.0 boards (jungfrau structure, away from ctb)
|
||||
- eiger febl and febr in versions, ensure its the same as beb fw version
|
||||
- eiger hardware version fx30 and fx70 (versions command)
|
||||
- fixed rx_arping error
|
||||
- fix hdf5 compilation (detspec fields)
|
||||
|
||||
3. Firmware Requirements
|
||||
|
||||
|
||||
2 On-board Detector Server Compatibility
|
||||
==========================================
|
||||
|
||||
|
||||
Eiger 7.0.0
|
||||
Jungfrau 7.0.0
|
||||
Mythen3 7.0.0
|
||||
Gotthard2 7.0.0
|
||||
Gotthard 7.0.0
|
||||
Moench 7.0.0
|
||||
Ctb 7.0.0
|
||||
|
||||
|
||||
On-board Detector Server Upgrade
|
||||
--------------------------------
|
||||
|
||||
From v6.1.0 (without tftp):
|
||||
Using command 'updatedetectorserver'
|
||||
From 5.0.0 (with tftp):
|
||||
Using command 'copydetectorserver'
|
||||
|
||||
Instructions available at
|
||||
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||
|
||||
|
||||
|
||||
|
||||
3 Firmware Requirements
|
||||
========================
|
||||
|
||||
Eiger
|
||||
=====
|
||||
Compatible version : 08.10.2021 (v29)
|
||||
|
||||
Jungfrau
|
||||
========
|
||||
Compatible version : 31.08.2021 (v1.2, PCB v1.0)
|
||||
: 08.10.2021 (v2.2, PCB v2.0)
|
||||
Eiger 20.02.2023 (v31)
|
||||
|
||||
Gotthard
|
||||
========
|
||||
Compatible version : 08.02.2018 (50um and 25um Master)
|
||||
: 09.02.2018 (25 um Slave)
|
||||
Jungfrau 04.11.2022 (v1.4, HW v1.0)
|
||||
03.11.2022 (v2.4, HW v2.0)
|
||||
|
||||
Mythen3
|
||||
=======
|
||||
Compatible version : 10.09.2021 (v1.1)
|
||||
Mythen3 24.01.2023 (v1.4)
|
||||
|
||||
Gotthard2
|
||||
=========
|
||||
Compatible version : 27.05.2021 (v0.1)
|
||||
Gotthard2 23.11.2022 (v0.3)
|
||||
|
||||
Moench
|
||||
======
|
||||
Compatible version : 05.10.2020 (v1.0)
|
||||
Gotthard 08.02.2018 (50um and 25um Master)
|
||||
09.02.2018 (25 um Slave)
|
||||
|
||||
Moench 05.12.2022 (v0.3)
|
||||
|
||||
Ctb 05.12.2022 (v1.1)
|
||||
|
||||
Ctb
|
||||
===
|
||||
Compatible version : 05.10.2020 (v1.0)
|
||||
|
||||
Detector Upgrade
|
||||
================
|
||||
----------------
|
||||
|
||||
The following can be upgraded remotely:
|
||||
|
||||
Eiger via bit files
|
||||
Jungfrau via command <.pof>
|
||||
Mythen3 via command <.rbf>
|
||||
@ -179,32 +96,38 @@ This document describes the differences between v7.0.0 and v6.x.x
|
||||
Moench via command <.pof>
|
||||
Ctb via command <.pof>
|
||||
|
||||
The following cannot be upgraded remotely:
|
||||
Gotthard
|
||||
Gotthard cannot be upgraded remotely
|
||||
|
||||
Except Eiger,
|
||||
upgrade
|
||||
Using command 'programfpga' or
|
||||
|
||||
udpate both server and firmware simultaneously
|
||||
Using command 'update'
|
||||
|
||||
|
||||
Instructions available at
|
||||
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
||||
and
|
||||
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||
|
||||
|
||||
|
||||
4. Kernel Requirements
|
||||
|
||||
4 Kernel Requirements
|
||||
======================
|
||||
|
||||
Blackfin
|
||||
========
|
||||
--------
|
||||
Latest version: Fri Oct 29 00:00:00 2021
|
||||
|
||||
Older ones will work, but might have issues with programming firmware via
|
||||
the package.
|
||||
|
||||
Nios
|
||||
====
|
||||
-----
|
||||
Compatible version: Mon May 10 18:00:21 CEST 2021
|
||||
|
||||
Kernel Upgrade
|
||||
==============
|
||||
---------------
|
||||
Eiger via bit files
|
||||
Others via command
|
||||
|
||||
@ -216,7 +139,8 @@ This document describes the differences between v7.0.0 and v6.x.x
|
||||
|
||||
|
||||
|
||||
5. Download, Documentation & Support
|
||||
|
||||
5 Download, Documentation & Support
|
||||
====================================
|
||||
|
||||
Download
|
||||
@ -229,7 +153,10 @@ This document describes the differences between v7.0.0 and v6.x.x
|
||||
-------------
|
||||
|
||||
Installation:
|
||||
https://slsdetectorgroup.github.io/devdoc/installation.html#
|
||||
https://slsdetectorgroup.github.io/devdoc/installation.html
|
||||
|
||||
Quick Start Guide:
|
||||
https://slsdetectorgroup.github.io/devdoc/quick_start_guide.html
|
||||
|
||||
Firmware Upgrade:
|
||||
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
||||
@ -249,9 +176,6 @@ This document describes the differences between v7.0.0 and v6.x.x
|
||||
Command Line Documentation:
|
||||
https://slsdetectorgroup.github.io/devdoc/commandline.html
|
||||
|
||||
Quick Start Guide:
|
||||
https://slsdetectorgroup.github.io/devdoc/quick_start_guide.html
|
||||
|
||||
C++ API Documentation:
|
||||
https://slsdetectorgroup.github.io/devdoc/detector.html
|
||||
|
||||
@ -268,8 +192,16 @@ This document describes the differences between v7.0.0 and v6.x.x
|
||||
https://slsdetectorgroup.github.io/devdoc/receivers.html
|
||||
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html
|
||||
|
||||
Detector UDP Header:
|
||||
https://slsdetectorgroup.github.io/devdoc/udpheader.html
|
||||
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
|
||||
|
||||
slsReceiver Zmq Format:
|
||||
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html#zmq-json-header-format
|
||||
|
||||
TroubleShooting:
|
||||
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
|
||||
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html#receiver-pc-tuning-options
|
||||
|
||||
Further Documentation:
|
||||
https://www.psi.ch/en/detectors/documentation
|
||||
@ -283,4 +215,3 @@ This document describes the differences between v7.0.0 and v6.x.x
|
||||
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
||||
|
||||
|
2
cmk.sh
2
cmk.sh
@ -33,7 +33,7 @@ Usage: $0 [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of thread
|
||||
-c: Clean
|
||||
-d: HDF5 Custom Directory
|
||||
-e: Debug mode
|
||||
-g: Build/Rebuilds only gui
|
||||
-g: Build/Rebuilds gui
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-i: Builds tests
|
||||
-j: Number of threads to compile through
|
||||
|
@ -21,4 +21,4 @@ echo "Building using: ${NCORES} cores"
|
||||
cmake --build . -- -j${NCORES}
|
||||
cmake --build . --target install
|
||||
|
||||
CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2
|
||||
CTEST_OUTPUT_ON_FAILURE=1 ctest -j 1
|
||||
|
@ -1,9 +1,8 @@
|
||||
python:
|
||||
- 3.6
|
||||
- 3.7
|
||||
- 3.8
|
||||
- 3.9
|
||||
- 3.10
|
||||
- 3.11
|
||||
|
||||
numpy:
|
||||
- 1.17
|
||||
|
@ -17,8 +17,7 @@ requirements:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- cmake
|
||||
- qwt 6.*
|
||||
- qt 4.8.*
|
||||
- qt 5.*
|
||||
- zeromq
|
||||
- xorg-libx11
|
||||
- xorg-libice
|
||||
@ -111,12 +110,10 @@ outputs:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- qwt 6.*
|
||||
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- qwt 6.*
|
||||
- qt 4.8.*
|
||||
- qt 5.*
|
||||
- expat
|
||||
|
||||
- name: moenchzmq
|
||||
|
@ -21,10 +21,8 @@ the shared libraries these are needed:
|
||||
GUI
|
||||
-----------------------
|
||||
|
||||
The GUI is currently using Qt4 but watch out for an upgrade to 5.
|
||||
|
||||
* Qt 4.8
|
||||
* Qwt 6.1
|
||||
* Qt 5.9
|
||||
* Qwt 6.1.5 (packaged in libs/)
|
||||
|
||||
-----------------------
|
||||
Python bindings
|
||||
|
@ -92,25 +92,40 @@ Download
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
.. note ::
|
||||
.. warning ::
|
||||
|
||||
In case you have had issues in the past with programming via software:
|
||||
|
||||
* 6.1.2 server has a fix for seamless fpga programming
|
||||
|
||||
* We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'.
|
||||
|
||||
* Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release.
|
||||
|
||||
These instructions are for upgrades from v5.0.0. For earlier versions, contact us.
|
||||
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
|
||||
# These instructions are for upgrades from v5.0.0. For earlier versions, please contact us.
|
||||
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server, links new server to jungfrauDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update jungfrauDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update jungfrauDetectorServervxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
@ -155,10 +170,6 @@ Upgrade
|
||||
Mythen III
|
||||
-----------
|
||||
|
||||
.. note ::
|
||||
|
||||
As it is still in development, the rbf files must be picked up from us.
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
@ -170,16 +181,21 @@ Download
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server, links new server to mythen3DetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update mythen3DetectorServervxxx pcxxx xxx.rbf
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update mythen3DetectorServervxxx xxx.rbf
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.rbf
|
||||
|
||||
@ -199,16 +215,21 @@ Download
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server, links new server to gotthard2DetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update gotthard2DetectorServervxxx pcxxx xxx.rbf
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update gotthard2DetectorServervxxx xxx.rbf
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.rbf
|
||||
|
||||
@ -230,19 +251,36 @@ Download
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
.. warning ::
|
||||
|
||||
In case you have had issues in the past with programming via software:
|
||||
|
||||
* 6.1.2 server has a fix for seamless fpga programming
|
||||
|
||||
* We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'.
|
||||
|
||||
* Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release.
|
||||
|
||||
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server, links new server to moenchDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update moenchDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update moenchDetectorServervxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
@ -262,17 +300,22 @@ Upgrade
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
|
||||
# Always ensure that the client and server software are of the same release.
|
||||
|
||||
# copies server, links new server to ctbDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
# programs fpga, reboots
|
||||
|
||||
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
|
||||
sls_detector_put update ctbDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# v6.1.1 - present (copies server from the full path provided)
|
||||
sls_detector_put update ctbDetectorServervxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
|
@ -1,14 +1,3 @@
|
||||
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
The default branch of our git repository is developer. It contains the
|
||||
latest development version. It is expected to compile and work but
|
||||
features might be added or tweaked. In some cases the API might also change
|
||||
without being communicated. If absolute stability of the API is needed please
|
||||
use one of the release versions.
|
||||
|
||||
.. warning ::
|
||||
|
||||
Before building from source make sure that you have the
|
||||
@ -55,7 +44,13 @@ We have three different packages available:
|
||||
.. code-block:: bash
|
||||
|
||||
#List available versions
|
||||
# lib and binaries
|
||||
conda search slsdetlib
|
||||
# python
|
||||
conda search slsdet
|
||||
# gui
|
||||
conda search slsdetgui
|
||||
|
||||
|
||||
|
||||
|
||||
@ -71,12 +66,12 @@ Build from source
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 6.1.1
|
||||
|
||||
|
||||
| **Pybind**
|
||||
| **Pybind for Python**
|
||||
| v7.0.0+:
|
||||
| pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
||||
|
|
||||
| Older versions:
|
||||
| pybind11 is a submodule> Must be cloned using "recursive" and updated when switching between versions using the following commands.
|
||||
| pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -133,14 +128,14 @@ Example cmake options Comment
|
||||
=============================== ===========================================
|
||||
-DSLS_USE_PYTHON=ON Python
|
||||
-DPython_FIND_VIRTUALENV=ONLY Python from only the conda environment
|
||||
-DZeroMQ_HINT=/usr/lib64 System zmq instead of conda
|
||||
-DZeroMQ_HINT=/usr/lib64 Use system zmq instead
|
||||
-DSLS_USE_GUI=ON GUI
|
||||
=============================== ===========================================
|
||||
|
||||
|
||||
|
||||
Build using in-build cmk.sh script
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Build using in-built cmk.sh script
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
@ -155,7 +150,7 @@ Build using in-build cmk.sh script
|
||||
-c: Clean
|
||||
-d: HDF5 Custom Directory
|
||||
-e: Debug mode
|
||||
-g: Build/Rebuilds only gui
|
||||
-g: Build/Rebuilds gui
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-i: Builds tests
|
||||
-j: Number of threads to compile through
|
||||
@ -172,17 +167,18 @@ Build using in-build cmk.sh script
|
||||
-z: Moench zmq processor
|
||||
|
||||
|
||||
# get all options
|
||||
# display all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
# new build and compile in parallel (recommended basic option):
|
||||
./cmk.sh -cbj5
|
||||
|
||||
# new build, python and compile in parallel:
|
||||
./cmk.sh -bpj5
|
||||
./cmk.sh -cbpj5
|
||||
|
||||
#To use the system zmq (/usr/lib64) instead
|
||||
./cmk.sh -cbj5 -q /usr/lib64
|
||||
|
||||
#To use the system zmq (/usr/lib64) instead of conda
|
||||
./cmk.sh -bj5 -q /usr/lib64
|
||||
|
||||
|
||||
Build on old distributions
|
||||
@ -204,8 +200,57 @@ using this compiler
|
||||
make -j12
|
||||
|
||||
|
||||
|
||||
Build slsDetectorGui (Qt5)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1. Using pre-built binary on conda
|
||||
.. code-block:: bash
|
||||
|
||||
conda create -n myenv slsdetgui=7.0.0
|
||||
conda activate myenv
|
||||
|
||||
|
||||
2. Using system installation on RHEL7
|
||||
.. code-block:: bash
|
||||
|
||||
yum install qt5-qtbase-devel.x86_64
|
||||
yum install qt5-qtsvg-devel.x86_64
|
||||
|
||||
|
||||
3. Using conda
|
||||
.. code-block:: bash
|
||||
|
||||
#Add channels for dependencies and our library
|
||||
conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
# create environment to compile
|
||||
# on rhel7
|
||||
conda create -n slsgui zeromq gxx_linux-64 gxx_linux-64 mesa-libgl-devel-cos6-x86_64 qt
|
||||
# on fedora or newer systems
|
||||
conda create -n slsgui zeromq qt
|
||||
|
||||
# when using conda compilers, would also need libgl, but no need for it on fedora unless maybe using it with ROOT
|
||||
|
||||
# activate environment
|
||||
conda activate slsgui
|
||||
|
||||
# compile with cmake outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DSLS_USE_GUI=ON
|
||||
make -j12
|
||||
|
||||
# or compile with cmk.sh
|
||||
cd slsDetectorPackage
|
||||
./cmk.sh -cbgj9
|
||||
|
||||
|
||||
|
||||
|
||||
Build this documentation
|
||||
-------------------------------
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The documentation for the slsDetectorPackage is build using a combination
|
||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||
@ -213,11 +258,15 @@ is to use conda
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda create -n myenv python sphinx sphinx_rtd_theme
|
||||
conda create -n myenv python sphinx_rtd_theme breathe
|
||||
|
||||
Then enable the option SLS_BUILD_DOCS to create the targets
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# using cmake or ccmake to enable DSLS_BUILD_DOCS
|
||||
# outside slsDetecorPackage folder
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DSLS_BUILD_DOCS=ON
|
||||
|
||||
make docs # generate API docs and build Sphinx RST
|
||||
make rst # rst only, saves time in case the API did not change
|
||||
|
@ -10,27 +10,46 @@ open an issue in our our `github repo
|
||||
Setting exposure time
|
||||
------------------------------------
|
||||
|
||||
Setting and reading back exposure time can be done either using a Python datetime.timedelta
|
||||
or by setting the time in seconds.
|
||||
Setting and reading back exposure time can be done either using a Python
|
||||
datetime.timedelta, DurationWrapper or by setting the time in seconds.
|
||||
|
||||
::
|
||||
|
||||
# Set exposure time to 1.2 seconds
|
||||
>>> d.exptime = 1.2
|
||||
>>> d.exptime = 5e-07
|
||||
|
||||
# Setting exposure time using timedelta
|
||||
# Setting exposure time using timedelta (upto microseconds precision)
|
||||
import datetime as dt
|
||||
>>> d.exptime = dt.timedelta(seconds = 1.2)
|
||||
>>> d.exptime = dt.timedelta(seconds = 1, microseconds = 3)
|
||||
|
||||
# With timedelta any arbitrary combination of units can be used
|
||||
>>> t = dt.timedelta(microseconds = 100, seconds = 5.3, minutes = .3)
|
||||
|
||||
# using DurationWrapper to set in seconds
|
||||
>>> from slsdet import DurationWrapper
|
||||
>>> d.exptime = DurationWrapper(1.2)
|
||||
|
||||
# using DurationWrapper to set in ns
|
||||
>>> t = DurationWrapper()
|
||||
>>> t.set_count(500)
|
||||
>>> d.exptime = t
|
||||
|
||||
# To set exposure time for individual detector one have to resort
|
||||
# to the C++ style API.
|
||||
# Sets exposure time to 1.2 seconds for module 0, 6 and 12
|
||||
>>> d.setExptime(1.2, [0, 6, 12])
|
||||
>>> d.setExptime(dt.timedelta(seconds = 1.2), [0, 6, 12])
|
||||
|
||||
# to get in seconds
|
||||
>>> d.period
|
||||
181.23
|
||||
|
||||
# to get in DurationWrapper
|
||||
>>> d.getExptime()
|
||||
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||
|
||||
|
||||
|
||||
------------------------------------
|
||||
@ -220,8 +239,7 @@ Setting and getting times
|
||||
# This sets the exposure time for all modules
|
||||
d.exptime = 0.5
|
||||
|
||||
# exptime also accepts a python datetime.timedelta
|
||||
# which can be used to set the time in almost any unit
|
||||
# exptime also accepts a python datetime.timedelta (upto microseconds resolution)
|
||||
t = dt.timedelta(milliseconds = 2.3)
|
||||
d.exptime = t
|
||||
|
||||
@ -229,16 +247,25 @@ Setting and getting times
|
||||
t = dt.timedelta(minutes = 3, seconds = 1.23)
|
||||
d.exptime = t
|
||||
|
||||
# using DurationWrapper to set in seconds
|
||||
>>> from slsdet import DurationWrapper
|
||||
>>> d.exptime = DurationWrapper(1.2)
|
||||
|
||||
# using DurationWrapper to set in ns
|
||||
>>> t = DurationWrapper()
|
||||
>>> t.set_count(500)
|
||||
>>> d.exptime = t
|
||||
|
||||
# exptime however always returns the time in seconds
|
||||
>>> d.exptime
|
||||
181.23
|
||||
|
||||
# To get back the exposure time for each module
|
||||
# it's possible to use getExptime, this also returns
|
||||
# the values as datetime.timedelta
|
||||
# the values as DurationWrapper
|
||||
|
||||
>>> d.getExptime()
|
||||
[datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)]
|
||||
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||
|
||||
# In case the values are the same it's possible to use the
|
||||
# element_if_equal function to reduce the values to a single
|
||||
@ -246,7 +273,8 @@ Setting and getting times
|
||||
|
||||
>>> t = d.getExptime()
|
||||
>>> element_if_equal(t)
|
||||
datetime.timedelta(seconds=1)
|
||||
sls::DurationWrapper(total_seconds: 1.2 count: 1200000000)
|
||||
|
||||
|
||||
--------------
|
||||
Reading dacs
|
||||
|
@ -6,7 +6,7 @@ Getting Started
|
||||
Which Python?
|
||||
--------------------
|
||||
|
||||
We require at lest Python 3.6 and strongly recommended that you don't use the system
|
||||
We require at least Python 3.6 and strongly recommended that you don't use the system
|
||||
Python installation. The examples in this documentation uses `conda
|
||||
<https://docs.conda.io/en/latest/miniconda.html>`_ since it provides good support
|
||||
also for non Python packages but there are also other alternatives like, pyenv.
|
||||
@ -14,29 +14,35 @@ also for non Python packages but there are also other alternatives like, pyenv.
|
||||
Using something like conda also allows you to quickly switch beteen different Python
|
||||
environments.
|
||||
|
||||
---------------------
|
||||
Building from Source
|
||||
---------------------
|
||||
|
||||
If you are not installing slsdet binaries from conda, but instead building from
|
||||
source, please refer to :ref:`the installation section<Installation>` for details.
|
||||
|
||||
Don't forget to compile with the option SLS_USE_PYTHON=ON to enable the Python
|
||||
bindings or if you use the cmk.sh script -p.
|
||||
|
||||
.. note ::
|
||||
|
||||
Ensure that the python lib compiled is for the expected python version.
|
||||
Ensure that the sls det python lib compiled is for the expected python version.
|
||||
For example, build/bin/_slsdet.cpython-39-x86_64-linux-gnu.so for Python v3.9.x
|
||||
|
||||
|
||||
---------------------
|
||||
PYTHONPATH
|
||||
---------------------
|
||||
|
||||
If you install slsdet using conda everything is set up and you can
|
||||
If you install slsdet binaries using conda everything is set up and you can
|
||||
directly start using the Python bindings. However, if you build
|
||||
from source you need to tell Python where to find slsdet. This
|
||||
is be done by adding your build/bin directory to PYTHONPATH.
|
||||
from source you need to tell Python where to find slsdet to use it. This
|
||||
can be done by adding your build/bin directory to PYTHONPATH.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export PYTHONPATH = /path/to/your/build/bin:$PYTHONPATH
|
||||
|
||||
.. note ::
|
||||
|
||||
Don't forget to compile with the option SLS_USE_PYTHON=ON to enable
|
||||
the Python bindings or if you use the cmk.sh script -p.
|
||||
|
||||
--------------------------------------
|
||||
Which detector class should I use?
|
||||
--------------------------------------
|
||||
@ -147,9 +153,11 @@ their name.
|
||||
::
|
||||
|
||||
>>> [item for item in dir(d) if 'time' in item]
|
||||
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
||||
'getSubExptime', 'patwaittime0', 'patwaittime1', 'patwaittime2',
|
||||
'setExptime', 'setSubExptime', 'subdeadtime', 'subexptime']
|
||||
['compdisabletime', 'exptime', 'exptimel', 'frametime', 'getExptime',
|
||||
'getExptimeForAllGates', 'getExptimeLeft', 'getSubExptime', 'patwaittime',
|
||||
'patwaittime0', 'patwaittime1', 'patwaittime2', 'runtime', 'setExptime',
|
||||
'setSubExptime', 'subdeadtime', 'subexptime']
|
||||
|
||||
|
||||
The above method works on any Python object but for convenience we also
|
||||
included two functions to find names. View prints the names one per line
|
||||
@ -161,6 +169,7 @@ while find returns a list of names.
|
||||
|
||||
>>> view('exptime')
|
||||
exptime
|
||||
exptimel
|
||||
getExptime
|
||||
getExptimeForAllGates
|
||||
getExptimeLeft
|
||||
@ -169,6 +178,7 @@ while find returns a list of names.
|
||||
setSubExptime
|
||||
subexptime
|
||||
|
||||
|
||||
>>> find('exptime')
|
||||
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
||||
'getSubExptime', 'setExptime', 'setSubExptime', 'subexptime']
|
||||
@ -189,16 +199,36 @@ To access the documentation of a function directly from the Python prompt use he
|
||||
|
||||
Note
|
||||
-----
|
||||
:getter: always returns in seconds. To get in datetime.delta, use getPeriod
|
||||
:getter: always returns in seconds. To get in DurationWrapper, use getPeriod
|
||||
|
||||
Examples
|
||||
Example
|
||||
-----------
|
||||
>>> # setting directly in seconds
|
||||
>>> d.period = 1.05
|
||||
>>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23)
|
||||
>>>
|
||||
>>> # setting directly in seconds
|
||||
>>> d.period = 5e-07
|
||||
>>>
|
||||
>>> # using timedelta (up to microseconds precision)
|
||||
>>> from datatime import timedelta
|
||||
>>> d.period = timedelta(seconds = 1, microseconds = 3)
|
||||
>>>
|
||||
>>> # using DurationWrapper to set in seconds
|
||||
>>> from slsdet import DurationWrapper
|
||||
>>> d.period = DurationWrapper(1.2)
|
||||
>>>
|
||||
>>> # using DurationWrapper to set in ns
|
||||
>>> t = DurationWrapper()
|
||||
>>> t.set_count(500)
|
||||
>>> d.period = t
|
||||
>>>
|
||||
>>> # to get in seconds
|
||||
>>> d.period
|
||||
181.23
|
||||
>>> d.getPeriod()
|
||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
||||
>>>
|
||||
>>> d.getExptime()
|
||||
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||
|
||||
|
||||
|
||||
----------------------
|
||||
@ -218,11 +248,12 @@ The enums can be found in slsdet.enums
|
||||
|
||||
import slsdet
|
||||
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
|
||||
['burstMode', 'clockIndex', 'dacIndex',
|
||||
'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag',
|
||||
'fileFormat', 'frameDiscardPolicy',
|
||||
'readoutMode', 'runStatus', 'speedLevel', 'timingMode',
|
||||
'timingSourceType']
|
||||
['M3_GainCaps', 'burstMode', 'clockIndex', 'cls', 'dacIndex', 'detectorSettings',
|
||||
'detectorType', 'dimension', 'externalSignalFlag', 'fileFormat',
|
||||
'frameDiscardPolicy', 'gainMode', 'name', 'polarity', 'portPosition',
|
||||
'readoutMode', 'runStatus', 'speedLevel', 'streamingInterface', 'timingMode',
|
||||
'timingSourceType', 'vetoAlgorithm']
|
||||
|
||||
|
||||
# Even though importing using * is not recommended one could
|
||||
# get all the enums like this:
|
||||
|
@ -66,11 +66,15 @@ For a Single Module
|
||||
# sets destination udp ports (not needed, default is 50001)
|
||||
udp_dstport 50012
|
||||
|
||||
# 1g data out
|
||||
# source udp ips must be same subnet at destintaion udp ips
|
||||
udp_srcip 192.168.1.112
|
||||
|
||||
# udp_srcip 192.168.1.112
|
||||
# destination udp ip picked up from rx_hostname (if auto)
|
||||
udp_dstip auto
|
||||
# udp_dstip auto
|
||||
|
||||
# 10g data out
|
||||
udp_srcip 10.30.20.200
|
||||
udp_dstip 10.30.20.6
|
||||
|
||||
# set file path
|
||||
fpath /tmp
|
||||
|
@ -23,15 +23,19 @@ Arguments
|
||||
.. code-block:: bash
|
||||
|
||||
Possible arguments are:
|
||||
-v, --version : Software version
|
||||
-p, --port <port> : TCP communication port with client.
|
||||
-g, --nomodule : [Mythen3][Gotthard2] Generic or No Module mode.
|
||||
Skips detector type checks.
|
||||
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
||||
-d, --devel : Developer mode. Skips firmware checks.
|
||||
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
||||
-s, --stopserver : Stop server. Do not use as it is created by control server
|
||||
|
||||
-v, --version : Software version
|
||||
-p, --port <port> : TCP communication port with client.
|
||||
-g, --nomodule : [Mythen3][Gotthard2]
|
||||
Generic or No Module mode. Skips detector type checks.
|
||||
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
||||
-d, --devel : Developer mode. Skips firmware checks.
|
||||
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
||||
-i, --ignore-config : [Eiger][Jungfrau][Gotthard][Gotthard2][Moench]
|
||||
Ignore config file.
|
||||
-m, --master <master> : [Eiger][Mythen3][Gotthard][Gotthard2]
|
||||
Set Master to 0 or 1. Precedence over config file. Only for virtual servers except Eiger.
|
||||
-t, --top <top> : [Eiger] Set Top to 0 or 1. Precedence over config file.
|
||||
-s, --stopserver : Stop server. Do not use as it is created by control server
|
||||
|
||||
|
||||
.. _Automatic start servers:
|
||||
@ -88,6 +92,8 @@ One can start the on-board detector server automatically upon powering on the bo
|
||||
.. code-block:: bash
|
||||
|
||||
sync
|
||||
|
||||
# physically reboot for Gotthard II or Mythen III
|
||||
reboot
|
||||
|
||||
# verify
|
||||
|
@ -86,16 +86,199 @@ Client Commands
|
||||
sls_detector_get -h rx_framescaught
|
||||
|
||||
|
||||
ZMQ: Json Header Format
|
||||
------------------------
|
||||
|
||||
|
||||
**Change in field names from slsDetectorPackage v6.x.x to v7.0.0**
|
||||
|
||||
* detSpec1 <- bunchId
|
||||
* detSpec2 <- reserved
|
||||
* detSpec3 <- debug
|
||||
* detSpec4 <- roundRNumber
|
||||
|
||||
|
||||
**Format**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
{
|
||||
"jsonversion": unsigned int,
|
||||
"bitmode": unsigned int,
|
||||
"fileIndex": unsigned long int,
|
||||
"detshape": [
|
||||
unsigned int,
|
||||
unsigned int
|
||||
],
|
||||
"shape": [
|
||||
unsigned int,
|
||||
unsigned int
|
||||
],
|
||||
"size": unsigned int,
|
||||
"acqIndex": unsigned long int,
|
||||
"frameIndex": unsigned long int,
|
||||
"progress": double,
|
||||
"fname": string,
|
||||
"data": unsigned int,
|
||||
"completeImage": unsigned int,
|
||||
|
||||
"frameNumber": unsigned long long int,
|
||||
"expLength": unsigned int,
|
||||
"packetNumber": unsigned int,
|
||||
"detSpec1": unsigned long int,
|
||||
"timestamp": unsigned long int,
|
||||
"modId": unsigned int,
|
||||
"row": unsigned int,
|
||||
"column": unsigned int,
|
||||
"detSpec2": unsigned int,
|
||||
"detSpec3": unsigned int,
|
||||
"detSpec4": unsigned int,
|
||||
"detType": unsigned int,
|
||||
"version": unsigned int,
|
||||
|
||||
"flipRows": unsigned int,
|
||||
"quad": unsigned int,
|
||||
"addJsonHeader": {
|
||||
string : string
|
||||
}
|
||||
}
|
||||
|
||||
+--------------+----------------------------------------------+
|
||||
| Field | Description |
|
||||
+--------------+----------------------------------------------+
|
||||
| jsonversion | Version of the json header. |
|
||||
| | Value at 4 for v6.x.x and v7.x.x |
|
||||
+--------------+----------------------------------------------+
|
||||
| bitmode | Bits per pixel [4|8|16|32] |
|
||||
+--------------+----------------------------------------------+
|
||||
| fileIndex | Current file acquisition index |
|
||||
+--------------+----------------------------------------------+
|
||||
| detshape | Geometry of the entire detector |
|
||||
+--------------+----------------------------------------------+
|
||||
| shape | Geometry of the current port streamed out |
|
||||
+--------------+----------------------------------------------+
|
||||
| size | Size of image of current port in bytesout |
|
||||
+--------------+----------------------------------------------+
|
||||
| acqIndex | Frame number from the detector (redundant) |
|
||||
+--------------+----------------------------------------------+
|
||||
| frameIndex | Frame number of current acquisition |
|
||||
| | (Starting at 0) |
|
||||
+--------------+----------------------------------------------+
|
||||
| progress | Progress of current acquisition in % |
|
||||
+--------------+----------------------------------------------+
|
||||
| fname | Current file name |
|
||||
+--------------+----------------------------------------------+
|
||||
| data | 1 if there is data following |
|
||||
| | 0 if dummy header |
|
||||
+--------------+----------------------------------------------+
|
||||
| completeImage| 1 if no missing packets for this frame |
|
||||
| | in this port, else 0 |
|
||||
+--------------+----------------------------------------------+
|
||||
| frameNumber | Frame number |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| expLength | subframe number (32 bit eiger) |
|
||||
| | or real time exposure time in 100ns (others) |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| packetNumber | Number of packets caught for that frame |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec1 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| timestamp | Timestamp with 10 MHz clock |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| modId | Module Id |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| row | Row number in detector |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| column | Column number in detector |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec2 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec3 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec4 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detType | Detector type enum |
|
||||
| detSpec3 | See :ref:`Detector enum<Detector Enum>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| version | Detector header version. At 2 |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| flipRows | 1 if rows should be flipped. |
|
||||
| | Usually for Eiger bottom. |
|
||||
+--------------+----------------------------------------------+
|
||||
| quad | 1 if its an Eiger quad. |
|
||||
+--------------+----------------------------------------------+
|
||||
| addJsonHeader| Optional custom parameters that is required |
|
||||
| | for processing code. |
|
||||
+--------------+----------------------------------------------+
|
||||
|
||||
|
||||
SLS Receiver Header Format
|
||||
--------------------------
|
||||
|
||||
It is 112 bytes and consists of:
|
||||
* 48 bytes of the SLS Detector Header (described in :ref:`the current detector header <detector udp header>`)
|
||||
* 64 bytes of packet mask
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
typedef struct {
|
||||
uint64_t frameNumber;
|
||||
uint32_t expLength;
|
||||
uint32_t packetNumber;
|
||||
uint64_t detSpec1;
|
||||
uint64_t timestamp;
|
||||
uint16_t modId;
|
||||
uint16_t row;
|
||||
uint16_t column;
|
||||
uint16_t detSpec2;
|
||||
uint32_t detSpec3;
|
||||
uint16_t detSpec4;
|
||||
uint8_t detType;
|
||||
uint8_t version;
|
||||
} sls_detector_header;
|
||||
|
||||
struct sls_receiver_header {
|
||||
sls_detector_header detHeader; /**< is the detector header */
|
||||
sls_bitset packetsMask; /**< is the packets caught bit mask */
|
||||
};
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
| The packetNumber in the SLS Receiver Header will be modified to number of packets caught by receiver for that frame. For eg. Jungfrau will have 128 packets per frame. If it is less, then this is a partial frame due to missing packets.
|
||||
|
||||
| Furthermore, the bit mask will specify which packets have been received.
|
||||
|
||||
|
||||
|
||||
|
||||
File format
|
||||
--------------
|
||||
|
||||
* The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default.
|
||||
Master file is in json format.
|
||||
|
||||
* Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command.
|
||||
The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default.
|
||||
|
||||
* Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type.
|
||||
|
||||
* Some file name examples:
|
||||
Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command.
|
||||
|
||||
|
||||
Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type.
|
||||
|
||||
|
||||
Some file name examples:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -108,17 +291,19 @@ File format
|
||||
# second acquisition, first file
|
||||
path-to-file/run_d0_f0_1.raw
|
||||
|
||||
* Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
|
||||
|
||||
* SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received.
|
||||
Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
|
||||
|
||||
|
||||
**Binary file format**
|
||||
|
||||
* This is the default file format.
|
||||
This is the default file format.
|
||||
|
||||
* Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame.
|
||||
|
||||
* Master file is of ASCII format and will also include the format of the slsReceiver Header.
|
||||
Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame.
|
||||
|
||||
|
||||
Master file is of ASCII format and will also include the format of the slsReceiver Header.
|
||||
|
||||
|
||||
**HDF5 file formats**
|
||||
|
@ -8,21 +8,24 @@ open an issue at our `github repo issues
|
||||
Common
|
||||
------
|
||||
|
||||
Missing Packets
|
||||
^^^^^^^^^^^^^^^
|
||||
Possible causes could be the following:
|
||||
|
||||
#. Receiver PC is not tuned for socket buffer size and input packet queue.
|
||||
* Refer to :ref:`Increase rmem_default, rmem_max and max_backlog<Receiver PC Tuning>`
|
||||
1. Total Failure of Packet Delivery
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. Wiring
|
||||
* Faulty wiring or connecting cable to incorrect interface.
|
||||
#. Data cable plugged into the wrong interface on board (Jungfrau)
|
||||
* Please ensure that the data cable is plugged into the rightmost interface (default for single interface). The inner one is disabled for PCB v1.0 and must be selected via command for PCB v2.0.
|
||||
|
||||
#. Link up and speed
|
||||
* Check to see if there is a blue LED on board to signal that the link is up. Check ethtool and find if Link Deteced:Yes and Speed is acceptable (>10k).
|
||||
* Check ethtool and find if Link Deteced:Yes and Speed is acceptable (>10k).
|
||||
* Check to see if the 10G link is up (blue or red LED on board, close to SFP+). If not:
|
||||
|
||||
* Check transeiver and fibers are compatible (all MMF 850nm or all SMF 1030nm)
|
||||
* Check fiber
|
||||
* Check fiber polarity (if short range, unplug the link anywhere, and look at the light/dark pattern: dark has to mate with light)
|
||||
|
||||
#. Detector is not acquiring (Not Eiger)
|
||||
* Take an acquisition with many images and using the following steps instead of acquire:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put status start
|
||||
@ -30,37 +33,63 @@ Possible causes could be the following:
|
||||
# which means the detector is acquiring.
|
||||
sls_detector_get framesl
|
||||
|
||||
.. note ::
|
||||
# If you are using multiple modules, the previous command can return -1 because each module will return different values. Then, check for a single module instead: sls_detector_get 0:framesl
|
||||
|
||||
If you are using multiple modules, the previous command can return -1 because each module will return different values. Then, check for a single module instead: sls_detector_get 0:framesl
|
||||
|
||||
#. Data cable plugged into the wrong interface on board (Jungfrau)
|
||||
* Please ensure that the data cable is plugged into the rightmost interface. The middle one is disabled for PCB v1.0 and must be selected via command for PCB v2.0.
|
||||
#. Detector is not sending data (Except Eiger)
|
||||
* Check the board to see if the green LED close to SFP is blinking (detector is sending data). If not, detector is not operated properly (period too short/long, no trigger in trigger mode) or misconfigured and needs reboot.
|
||||
|
||||
#. Detector is not sending data
|
||||
* Check the board to see if the green LED is blinking next to the data cable, which means that the detector is sending data.
|
||||
|
||||
#. Firewall or security feature
|
||||
* A firewall or some security feature could be blocking the reception of data.
|
||||
|
||||
#. Ethernet interface not configured properly
|
||||
* Ensure that the interfaces used are configured properly with the right mask and ip. Eg. use ifconfig and route commands to verify.
|
||||
#. Power supply
|
||||
* Check if power supply has enough current.
|
||||
* For Jungfrau, refer to :ref:`Jungfrau Power Supply Troubleshooting<Jungfrau Troubleshooting Power Supply>`.
|
||||
|
||||
#. Ethernet interface not configured for Jumbo frames (10Gb)
|
||||
* Ensure that the interfaces used in receiver pc have MTU 9000 (jumbo frames) enabled.
|
||||
* Ensure that the interfaces (on NIC and the switch) used in receiver pc have MTU 9000 (jumbo frames) enabled.
|
||||
|
||||
#. Detector IP (Not Eiger)
|
||||
* Ensure it is valid and does not end if 0 or 255. Also ensure that the detector ip is in the same subnet as rx_udpip and the masking in the interface configuration ensures this rule.
|
||||
|
||||
#. Tcpdump or wireshark
|
||||
#. Check if 'rx_frames' counter in 'ifconfig' do not increment for interface.
|
||||
* If no, check switch configuration if present. Port counters of switch can also help to identify problem.
|
||||
* If yes, but receiver software does not see it:
|
||||
|
||||
* Check no firewall (eg. firewalld) is present or add rules
|
||||
* Check that selinux is disabled ( or add rules)
|
||||
|
||||
#. Source UDP IP in config file (Not Eiger)
|
||||
* Ensure it is valid and does not end if 0 or 255. Also ensure that the source ip 'udp_srcip' is in the same subnet as destination ip 'udp_dstip' and the masking in the interface configuration ensures this rule.
|
||||
* Eg. If interface IP is 102.10.10.110 and mask is 255.255.255.0, udp_srcip has to be 102.10.10.xxx (same subnet)
|
||||
* Use ifconfig and route commands to verify etheret interface configuration
|
||||
|
||||
|
||||
#. Netstat and netcat
|
||||
* Try with netstat to see if its really listening to the right interface. Or netcat to see if you get packets.
|
||||
|
||||
#. Wireshark or Tcpdump
|
||||
* Use one of these to confirm that you receive packets (with the right filtering ie. source and destination ports, ip).
|
||||
|
||||
#. Check SFP modules
|
||||
* Check if the SFP modules on both sides of the fiber are of same type.
|
||||
|
||||
|
||||
2. Partial or Random Packet Loss (Performance)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note ::
|
||||
|
||||
The following suggestions are for convenience. Please do not follow blindly, research each parameter and adapt it to your system.
|
||||
|
||||
#. Receiver PC is not tuned for socket buffer size and input packet queue or other parameters.
|
||||
* Refer to :ref:`Receiver PC Tuning<Receiver PC Tuning>`
|
||||
|
||||
#. Wiring
|
||||
* Faulty wiring or connecting cable to incorrect interface.
|
||||
|
||||
|
||||
#. Pinging the subnet (receiving only a few number of packets each time)
|
||||
* If a switch is used between a receiver pc and detector instead of plugging the cables directly, one might have to ping any ip in the subnet of the Ethernet interface constantly so that it does not forget the ip during operation.
|
||||
* Eg. if rx_udpip is 10.2.3.100, then ping constantly 10.2.3.xxx, where xxx is any ip other than 100.
|
||||
* Using slsReceiver, you can use a command that does this for you:
|
||||
.. code-block:: bash
|
||||
|
||||
# arping the interface in a separate thread every minute
|
||||
sls_detector_put rx_arping 1
|
||||
|
||||
|
||||
|
||||
@ -68,6 +97,12 @@ Possible causes could be the following:
|
||||
|
||||
Receiver PC Tuning Options
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note ::
|
||||
|
||||
| xth1 is example interface name in the following examples.
|
||||
| These settings are lost at pc reboot.
|
||||
|
||||
#. Increase maximum receive socket buffer size and socket input packet queue.
|
||||
* Temporarily (until shut down)
|
||||
.. code-block:: bash
|
||||
@ -111,6 +146,7 @@ Receiver PC Tuning Options
|
||||
# check how many GB memory you can allocate, to avoid swapping otherwise
|
||||
|
||||
|
||||
|
||||
#. Modify ethtool settings.
|
||||
* rx ring parameters
|
||||
.. code-block:: bash
|
||||
@ -127,6 +163,9 @@ Receiver PC Tuning Options
|
||||
# check
|
||||
ethtool -c xth1
|
||||
|
||||
# enable adaptive xoalescence parameters
|
||||
ethtool -C xth1 adaptive-rx on
|
||||
|
||||
# set to max value in your pc settings
|
||||
ethtool -C xth1 rx-usecs 100
|
||||
|
||||
@ -139,12 +178,17 @@ Receiver PC Tuning Options
|
||||
# set to max value in your pc settings
|
||||
ethtool -A xth1 rx on
|
||||
|
||||
.. note ::
|
||||
* generic receiver offload (might not always work)
|
||||
.. code-block:: bash
|
||||
|
||||
| xth1 is example interface name.
|
||||
| These settings are lost at pc reboot.
|
||||
# check
|
||||
ethtool -k xth1
|
||||
|
||||
#. Disable CPU frequency scaling and set system to performance
|
||||
# enable generic receiver offload
|
||||
ethtool -K xth1 gro
|
||||
|
||||
|
||||
#. Disable power saving in CPU frequency scaling and set system to performance
|
||||
* Check current policy (default might be powersave or schedutil)
|
||||
.. code-block:: bash
|
||||
|
||||
@ -159,6 +203,9 @@ Receiver PC Tuning Options
|
||||
# set to performance
|
||||
sudo cpupower frequency-set -g performance
|
||||
|
||||
# or
|
||||
cpufreq-info
|
||||
for i in ‘seq 0 7‘; do cpufreq-set -c $i -g performance; done
|
||||
|
||||
* Permanently
|
||||
.. code-block:: bash
|
||||
@ -179,18 +226,29 @@ Receiver PC Tuning Options
|
||||
|
||||
This is also set if slsReceiver is run as root user.
|
||||
|
||||
#. Some more advanced options:
|
||||
.. warning ::
|
||||
|
||||
#. Disable power saving in CPU frequency
|
||||
.. code-block:: bash
|
||||
Please do not try if you do not understand
|
||||
|
||||
# or similar command depending on your distribution
|
||||
cpupower frequency-info
|
||||
cpupower frequency-set -g performance
|
||||
#. reduce the number of queue per NIC to the number of expected streams: ethtool -L xth0 combined 2
|
||||
#. assign each queue to its stream: ethtool -U xth0 flow-type tcp4 dst-port 50004 action 1
|
||||
#. assign to each queue (IRQ) one CPU on the right socket: echo "3"> /proc/irq/47/smp_affinity_list #change the numbers looking at /proc/interrupts
|
||||
#. disable irqbalance service
|
||||
#. Be sure that the switch knows the receiver mac address. Most switches reset the mac lists every few minutes, and since the receiver only receives, there is not a periodic refresh of the mac list. In this case, one can set a fixed mac list in the switch, or setup some kind of script arping or pinging out from that interface (will be available in 7.0.0).
|
||||
#. assign the receiver numa node (also with -m) to the socket where the NIC is attached. To know it, cat /sys/class/net/ethxxx/device/numa_node
|
||||
#. ensure file system performance can handle sustained high data rate:
|
||||
|
||||
# or
|
||||
cpufreq-info
|
||||
for i in ‘seq 0 7‘; do cpufreq-set -c $i -g performance; done
|
||||
* One can use dd:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
dd if=/dev/zero of=/testpath/testfile bs=1M count=100000
|
||||
* Or better fio (which needs to be installed)
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
fio --name=global –directory=/testpath/ --rw=write --ioengine=libaio --direct=0 --size=200G -- numjobs=2 --iodepth=1 --bs=1M –name=job
|
||||
|
||||
slsReceiver Tuning
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
@ -198,18 +256,25 @@ slsReceiver Tuning
|
||||
#. Starting receiver as root to have scheduling privileges.
|
||||
|
||||
#. For 10g, enable flow control
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put flowcontrol10g 1
|
||||
|
||||
#. Increase slsReceiver fifo depth between listening and processing threads.
|
||||
#. Increase slsReceiver ring buffer depth
|
||||
This can be tuned depending on the number of receivers (modules) and memory available.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_get rx_fifodepth
|
||||
# sets number of frames in fifo to 5000
|
||||
sls_detector_put rx_fifodepth 5000
|
||||
# sugggested not to use more than half memory of CPU socket in case of NUMA systems) for this
|
||||
|
||||
sls_detector_get rx_fifodepth
|
||||
# sets number of frames in fifo to 1024 ~1GB per receiver. Default is 2500
|
||||
sls_detector_put rx_fifodepth 1024
|
||||
|
||||
#. Increase number of frames per file
|
||||
This can reduce time taken to open and close files.
|
||||
|
||||
#. Increase number of frames per file to reduce time taken to open and close files.
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_get rx_framesperfile
|
||||
@ -217,10 +282,31 @@ slsReceiver Tuning
|
||||
# writes all frames into a single file
|
||||
sls_detector_put rx_framesperfile 0
|
||||
|
||||
#. Disable file write
|
||||
This can ensure it is not the file system performance hampering high date rate.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put fwrite 0
|
||||
|
||||
|
||||
Shared memory error
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
| For errors due to access or size, delete shared memory files nd try again.
|
||||
For errors due to access or size, use any of the following suggestions.
|
||||
#. Delete shared memory files and try again
|
||||
#. Use environment variable to use a different shared memory ending in jfxx
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# shared memory ending in jfxx
|
||||
export SLSDETNAME=jfxx
|
||||
|
||||
#. USe a different multi shared memory ID
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put 2-config xxxx.config
|
||||
# or
|
||||
sls_detector_put 2-hostname bchipxxx
|
||||
|
||||
To list all shared memory files of sls detector package.
|
||||
.. code-block:: bash
|
||||
@ -331,6 +417,7 @@ Cannot get multi module data
|
||||
|
||||
#. Check :ref:`Common Multi Module Troubleshooting<common troubleshooting multi module data>`
|
||||
#. Power Supply
|
||||
* Jungfrau needs a ~4A per module for a short time at startup. If not, it reboots misconfigured.
|
||||
* Comment out this line in the config file: powerchip 1
|
||||
* Powering on the chip increases the power consumption by a considerable amount. If commenting out this line aids in getting data (strange data due to powered off chip), then it could be the power supply current limit. Fix it (possibly to 8A current limit) and uncomment the powerchip line back in config file.
|
||||
|
||||
|
@ -6,6 +6,10 @@ Config file
|
||||
|
||||
Commands to configure the UDP in the config file:
|
||||
|
||||
.. note ::
|
||||
|
||||
These command are recommended to be placed before "rx_hostname" if it is used.
|
||||
|
||||
Source Port
|
||||
-----------
|
||||
Hardcoded in detector server, starting at 32410.
|
||||
|
@ -49,13 +49,13 @@ Jungfrau
|
||||
+----------+--------------------+-----+----------------------------------------+
|
||||
| 0 | High gain | 1 | High Gain enabled |
|
||||
| | +-----+----------------------------------------+
|
||||
| | | 0 | High Gain disabled |
|
||||
| | | 0 | High Gain disabled |
|
||||
+----------+--------------------+-----+----------------------------------------+
|
||||
| 1 | Fix gain stage 1 | 1 | Gain stage 1 fixed. The switch that |
|
||||
| | | | selects the gains stage 1 is active all|
|
||||
| | | | the time. |
|
||||
| | +-----+----------------------------------------+
|
||||
| | | 0 | Gain stage 1 unset. The switch that |
|
||||
| | | 0 | Gain stage 1 unset. The switch that |
|
||||
| | | | selects the gains stage 1 is inactive |
|
||||
| | | | all the time. |
|
||||
+----------+--------------------+-----+----------------------------------------+
|
||||
@ -63,7 +63,7 @@ Jungfrau
|
||||
| | | | selects the gains stage 2 is active all|
|
||||
| | | | the time. |
|
||||
| | +-----+----------------------------------------+
|
||||
| | | 0 | Gain stage 2 unset. The switch that |
|
||||
| | | 0 | Gain stage 2 unset. The switch that |
|
||||
| | | | selects the gains stage 2 is inactive |
|
||||
| | | | all the time. |
|
||||
+----------+--------------------+-----+----------------------------------------+
|
||||
@ -71,7 +71,7 @@ Jungfrau
|
||||
| | | | Dynamic-gain switching is therefore |
|
||||
| | | | disabled. |
|
||||
| | +-----+----------------------------------------+
|
||||
| | | 0 | On-chip comparator active. |
|
||||
| | | 0 | On-chip comparator active. |
|
||||
+----------+--------------------+-----+-----+-----+----------------------------+
|
||||
| 7-5 | Jungfrau chip |Bit 7|Bit 6|Bit 5| Description |
|
||||
| | version +-----+-----+-----+----------------------------+
|
||||
@ -90,7 +90,7 @@ Jungfrau
|
||||
| 12 | Force switching | 1 | Forced switching to gain stage 1 at the|
|
||||
| | to gain stage 1 | | start of the exposure period. |
|
||||
| | +-----+----------------------------------------+
|
||||
| | | 0 | Disabled forced gain switching to gain |
|
||||
| | | 0 | Disabled forced gain switching to gain |
|
||||
| | | | stage 1. Dynamic gain switching |
|
||||
| | | | conditions apply. |
|
||||
+----------+--------------------+-----+----------------------------------------+
|
||||
@ -109,8 +109,8 @@ Jungfrau
|
||||
| 31 | External input flag| 1 | External input flag detected in the |
|
||||
| | | | last exposure. |
|
||||
| | +-----+----------------------------------------+
|
||||
| | | 0 | External input flag not detected in the|
|
||||
| | | | last exposure. |
|
||||
| | | 0 | External input flag not detected in the|
|
||||
| | | | last exposure. |
|
||||
+----------+--------------------+-----+----------------------------------------+
|
||||
|
||||
|
||||
@ -131,6 +131,22 @@ Gotthard2
|
||||
+----------+------------------------------+
|
||||
|
||||
|
||||
Mythen3
|
||||
----------
|
||||
|
||||
.. table:: Detector Specific Field
|
||||
|
||||
+----------+------------------------------+
|
||||
| detSpec1 | 0 |
|
||||
+----------+------------------------------+
|
||||
| detSpec2 | 0 |
|
||||
+----------+------------------------------+
|
||||
| detSpec3 | 0 |
|
||||
+----------+------------------------------+
|
||||
| detSpec4 | 0 |
|
||||
+----------+------------------------------+
|
||||
|
||||
|
||||
.. [#] **Bunch Id**: bunch identification number received by the detector at the moment of frame acquisition.
|
||||
.. [#] **Train Id**: train identification number received by the detector at the moment of frame acquisition.
|
||||
.. [#] **Bunch Id**: bunch identification number to identify every single exposure during a burst acquisition.
|
||||
|
@ -9,9 +9,9 @@ The UDP data format for the packets consist of a common header for all detectors
|
||||
Current Version
|
||||
---------------------------
|
||||
|
||||
**v3.0 (slsDetectorPackage v7.0.0+)**
|
||||
**v2.0 (slsDetectorPackage v7.0.0+)**
|
||||
|
||||
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
||||
.. table:: <---------------------------------------------------- 8 bytes per row --------------------------------------------->
|
||||
:align: center
|
||||
:widths: 30,30,30,15,15
|
||||
|
||||
@ -30,6 +30,18 @@ Current Version
|
||||
+-------------------------------+---------------+-------+-------+
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
Since there is no difference in the format of the UDP header from the detector
|
||||
from the previous version (v2.0), the version number stays the same.
|
||||
|
||||
Only the struture member names have changed in sls_detector_defs.h
|
||||
|
||||
|
||||
|
||||
Description
|
||||
------------
|
||||
|
||||
* **Detector specific field** descriptions are found :ref:`here<detector specific fields>`.
|
||||
|
||||
* **frameNumber**: framenumber to which the current packet belongs to.
|
||||
@ -48,6 +60,12 @@ Current Version
|
||||
|
||||
* **detType**: detector type from enum of detectorType in the package.
|
||||
|
||||
* **version**: current version of the detector header (0x2).
|
||||
|
||||
|
||||
Detector Enum
|
||||
--------------
|
||||
|
||||
================ ========
|
||||
Detector Type Value
|
||||
================ ========
|
||||
@ -61,7 +79,6 @@ Current Version
|
||||
GOTTHARD2 7
|
||||
================ ========
|
||||
|
||||
* **version**: current version of the detector header. It is at 0x3.
|
||||
|
||||
|
||||
Previous Versions
|
||||
|
@ -13,16 +13,14 @@ Compilation
|
||||
* Using cmk.sh script,
|
||||
.. code-block:: bash
|
||||
|
||||
./cmk.sh -bsj9 #option s is for simulator
|
||||
./cmk.sh -bsj9 # option -s is for simulator
|
||||
|
||||
|
||||
Binaries
|
||||
^^^^^^^^
|
||||
.. code-block:: bash
|
||||
|
||||
eigerDetectorServerMaster_virtual
|
||||
eigerDetectorServerSlaveTop_virtual
|
||||
eigerDetectorServerSlaveBottom_virtual
|
||||
eigerDetectorServer_virtual
|
||||
jungfrauDetectorServer_virtual
|
||||
gotthardDetectorServer_virtual
|
||||
gotthard2DetectorServer_virtual
|
||||
@ -67,7 +65,15 @@ Sample Config file
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
There are sample config files for each detector in slsDetectorPackage/examples folder.
|
||||
|
||||
For a Single Module
|
||||
For a Single Module (Basic)
|
||||
.. code-block:: bash
|
||||
|
||||
hostname localhost
|
||||
rx_hostname localhost
|
||||
udp_dstip auto
|
||||
|
||||
|
||||
For a Single Module (With Options)
|
||||
.. code-block:: bash
|
||||
|
||||
# connects to control port 1912
|
||||
@ -140,7 +146,7 @@ Gui
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
#. Data coming out of virtual server is fake. Value at each pixel/ channel is incremented by 1.
|
||||
#. Data coming out of virtual server is fake.
|
||||
|
||||
#. A stop will stop the virtual acquisition only at the start of every new frame.
|
||||
|
||||
|
6
examples/badchannel.txt
Normal file
6
examples/badchannel.txt
Normal file
@ -0,0 +1,6 @@
|
||||
0
|
||||
10, 30
|
||||
40:45 50:52
|
||||
1279
|
||||
# all bad channels are applied for all counters in deector
|
||||
|
@ -5,7 +5,7 @@ detsize 1024 1024
|
||||
hostname bchip048+bchip052+
|
||||
|
||||
# 1Gb receiver pc hostname (default tcpport: 1954)
|
||||
rx_hostname pcmoench01+pcmoench01:1955
|
||||
rx_hostname pcmoench01:1954+pcmoench01:1955+
|
||||
|
||||
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
# detector hostname
|
||||
hostname localhost:1910
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2010
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50010
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 192.168.1.100
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2010
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
@ -27,418 +27,7 @@ dbitclk 40
|
||||
|
||||
|
||||
# patterns
|
||||
patword 0x0000 0x0000000000000000
|
||||
patword 0x0001 0x0000000000000000
|
||||
patword 0x0002 0x0008000900080000
|
||||
patword 0x0003 0x0008000900080000
|
||||
patword 0x0004 0x0008000900080000
|
||||
patword 0x0005 0x0008000900080000
|
||||
patword 0x0006 0x0008000900080000
|
||||
patword 0x0007 0x0008000900080000
|
||||
patword 0x0008 0x0008000900080000
|
||||
patword 0x0009 0x0008000900080000
|
||||
patword 0x000a 0x0008000900080000
|
||||
patword 0x000b 0x0008000900080000
|
||||
patword 0x000c 0x0008000900080000
|
||||
patword 0x000d 0x0008000900080000
|
||||
patword 0x000e 0x0008000900080000
|
||||
patword 0x000f 0x0008000900080000
|
||||
patword 0x0010 0x0008000900080000
|
||||
patword 0x0011 0x0008000900080000
|
||||
patword 0x0012 0x0008000900080000
|
||||
patword 0x0013 0x0008000900080000
|
||||
patword 0x0014 0x0008000900080000
|
||||
patword 0x0015 0x0008000900080000
|
||||
patword 0x0016 0x0008400900080020
|
||||
patword 0x0017 0x0008400900080020
|
||||
patword 0x0018 0x0008599f0418503a
|
||||
patword 0x0019 0x0008599f0418503a
|
||||
patword 0x001a 0x0108599f0418503a
|
||||
patword 0x001b 0x0108599f0418503a
|
||||
patword 0x001c 0x0108599f0418503a
|
||||
patword 0x001d 0x0108599f0418503a
|
||||
patword 0x001e 0x0108599f0418503a
|
||||
patword 0x001f 0x0108599f0418503a
|
||||
patword 0x0020 0x0108599f0418503a
|
||||
patword 0x0021 0x0108599f0418503a
|
||||
patword 0x0022 0x0108599f0418503a
|
||||
patword 0x0023 0x0108599f0418503a
|
||||
patword 0x0024 0x0108599f0418503a
|
||||
patword 0x0025 0x0108599f0418503a
|
||||
patword 0x0026 0x0108599f0418503a
|
||||
patword 0x0027 0x0108599f0418503a
|
||||
patword 0x0028 0x0108599f0418503a
|
||||
patword 0x0029 0x0108599f0418503a
|
||||
patword 0x002a 0x0108599f0418503a
|
||||
patword 0x002b 0x0108599f0418503a
|
||||
patword 0x002c 0x0108599f0418503a
|
||||
patword 0x002d 0x0108599f0418503a
|
||||
patword 0x002e 0x0108599f0418503a
|
||||
patword 0x002f 0x0108599f0418503a
|
||||
patword 0x0030 0x0108599f0418503a
|
||||
patword 0x0031 0x0108599f0418503a
|
||||
patword 0x0032 0x0108599f0418503a
|
||||
patword 0x0033 0x0108599f0418503a
|
||||
patword 0x0034 0x0108599f0418503a
|
||||
patword 0x0035 0x0108599f0418503a
|
||||
patword 0x0036 0x0108599f0418503a
|
||||
patword 0x0037 0x0108599f0418503a
|
||||
patword 0x0038 0x0108599f0418503a
|
||||
patword 0x0039 0x0108599f0418503a
|
||||
patword 0x003a 0x0108599f0418503a
|
||||
patword 0x003b 0x0108599f0418503a
|
||||
patword 0x003c 0x0108599f0418503a
|
||||
patword 0x003d 0x0108599f0418503a
|
||||
patword 0x003e 0x0108599f0418503a
|
||||
patword 0x003f 0x0108599f0418503a
|
||||
patword 0x0040 0x0108599f0418503a
|
||||
patword 0x0041 0x0108599f0418503a
|
||||
patword 0x0042 0x0108599f0418503a
|
||||
patword 0x0043 0x0108599f0418503a
|
||||
patword 0x0044 0x0108599f0418503a
|
||||
patword 0x0045 0x0108599f0418503a
|
||||
patword 0x0046 0x0108599f0418503a
|
||||
patword 0x0047 0x0108599f0418503a
|
||||
patword 0x0048 0x0108599f0418503a
|
||||
patword 0x0049 0x0108599f0418503a
|
||||
patword 0x004a 0x0108599f0418503a
|
||||
patword 0x004b 0x0108599f0418503a
|
||||
patword 0x004c 0x0108599f0418503a
|
||||
patword 0x004d 0x0108599f0418503a
|
||||
patword 0x004e 0x0108599f0418503a
|
||||
patword 0x004f 0x0108599f0418503a
|
||||
patword 0x0050 0x0108599f0418503a
|
||||
patword 0x0051 0x0108599f0418503a
|
||||
patword 0x0052 0x0108599f0418503a
|
||||
patword 0x0053 0x0108599f0418503a
|
||||
patword 0x0054 0x0108599f0418503a
|
||||
patword 0x0055 0x0108599f0418503a
|
||||
patword 0x0056 0x0108599f0418503a
|
||||
patword 0x0057 0x0108599f0418503a
|
||||
patword 0x0058 0x0108599f0418503a
|
||||
patword 0x0059 0x0108599f0418503a
|
||||
patword 0x005a 0x0108599f0418503a
|
||||
patword 0x005b 0x0108599f0418503a
|
||||
patword 0x005c 0x0108599f0418503a
|
||||
patword 0x005d 0x0108599f0418503a
|
||||
patword 0x005e 0x0108599f0418503a
|
||||
patword 0x005f 0x0108599f0418503a
|
||||
patword 0x0060 0x0108599f0418503a
|
||||
patword 0x0061 0x0108599f0418503a
|
||||
patword 0x0062 0x0108599f0418503a
|
||||
patword 0x0063 0x0108599f0418503a
|
||||
patword 0x0064 0x0108599f0418503a
|
||||
patword 0x0065 0x0108599f0418503a
|
||||
patword 0x0066 0x0108599f0418503a
|
||||
patword 0x0067 0x0108599f0418503a
|
||||
patword 0x0068 0x0108599f0418503a
|
||||
patword 0x0069 0x0108599f0418503a
|
||||
patword 0x006a 0x0108599f0418503a
|
||||
patword 0x006b 0x0108599f0418503a
|
||||
patword 0x006c 0x0108599f0418503a
|
||||
patword 0x006d 0x0108599f0418503a
|
||||
patword 0x006e 0x0108599f0418503a
|
||||
patword 0x006f 0x0108599f0418503a
|
||||
patword 0x0070 0x0108599f0418503a
|
||||
patword 0x0071 0x0108599f0418503a
|
||||
patword 0x0072 0x0108599f0418503a
|
||||
patword 0x0073 0x0108599f0418503a
|
||||
patword 0x0074 0x0108599f0418503a
|
||||
patword 0x0075 0x0108599f0418503a
|
||||
patword 0x0076 0x0108599f0418503a
|
||||
patword 0x0077 0x0108599f0418503a
|
||||
patword 0x0078 0x0108599f0418503a
|
||||
patword 0x0079 0x0108599f0418503a
|
||||
patword 0x007a 0x0108599f0418503a
|
||||
patword 0x007b 0x0108599f0418503a
|
||||
patword 0x007c 0x0108599f0418503a
|
||||
patword 0x007d 0x0108599f0418503a
|
||||
patword 0x007e 0x010859960418503a
|
||||
patword 0x007f 0x010859960418503a
|
||||
patword 0x0080 0x010859960418503a
|
||||
patword 0x0081 0x010859960418503a
|
||||
patword 0x0082 0x010859960418503a
|
||||
patword 0x0083 0x010859960418503a
|
||||
patword 0x0084 0x010859960418503a
|
||||
patword 0x0085 0x010859960418503a
|
||||
patword 0x0086 0x010859960418503a
|
||||
patword 0x0087 0x010859960418503a
|
||||
patword 0x0088 0x010859960418503a
|
||||
patword 0x0089 0x010859960418503a
|
||||
patword 0x008a 0x010859960418503a
|
||||
patword 0x008b 0x010859960418503a
|
||||
patword 0x008c 0x010859960418503a
|
||||
patword 0x008d 0x010859960418503a
|
||||
patword 0x008e 0x010859960418503a
|
||||
patword 0x008f 0x010859960418503a
|
||||
patword 0x0090 0x010859960418503a
|
||||
patword 0x0091 0x010859960418503a
|
||||
patword 0x0092 0x010819960418501a
|
||||
patword 0x0093 0x010819960418501a
|
||||
patword 0x0094 0x010819960418501a
|
||||
patword 0x0095 0x010819960418501a
|
||||
patword 0x0096 0x030819960418501a
|
||||
patword 0x0097 0x030819960418501a
|
||||
patword 0x0098 0x030819960418501a
|
||||
patword 0x0099 0x030819960418501a
|
||||
patword 0x009a 0x030819960418501a
|
||||
patword 0x009b 0x030819960418501a
|
||||
patword 0x009c 0x030819960418501a
|
||||
patword 0x009d 0x030819960418501a
|
||||
patword 0x009e 0x030819960418501a
|
||||
patword 0x009f 0x030819960418501a
|
||||
patword 0x00a0 0x030819960418501a
|
||||
patword 0x00a1 0x030819960418501a
|
||||
patword 0x00a2 0x030819960418501a
|
||||
patword 0x00a3 0x030819960418501a
|
||||
patword 0x00a4 0x030819960418501a
|
||||
patword 0x00a5 0x030819960418501a
|
||||
patword 0x00a6 0x030819960418501a
|
||||
patword 0x00a7 0x030819960418501a
|
||||
patword 0x00a8 0x030819960418501a
|
||||
patword 0x00a9 0x030819960418501a
|
||||
patword 0x00aa 0x030819960418501a
|
||||
patword 0x00ab 0x030819960418501a
|
||||
patword 0x00ac 0x030819960008501a
|
||||
patword 0x00ad 0x030819960008501a
|
||||
patword 0x00ae 0x030819960008501a
|
||||
patword 0x00af 0x030819960008501a
|
||||
patword 0x00b0 0x030819960008501a
|
||||
patword 0x00b1 0x030819960008501a
|
||||
patword 0x00b2 0x030819960008501a
|
||||
patword 0x00b3 0x030819960008501a
|
||||
patword 0x00b4 0x030819960008501a
|
||||
patword 0x00b5 0x030819960008501a
|
||||
patword 0x00b6 0x030819960008501a
|
||||
patword 0x00b7 0x030819960008501a
|
||||
patword 0x00b8 0x030819960008501a
|
||||
patword 0x00b9 0x030819960008501a
|
||||
patword 0x00ba 0x030819960008501a
|
||||
patword 0x00bb 0x030819960008501a
|
||||
patword 0x00bc 0x030819960008501a
|
||||
patword 0x00bd 0x030819960008501a
|
||||
patword 0x00be 0x030819960008501a
|
||||
patword 0x00bf 0x030819960008501a
|
||||
patword 0x00c0 0x0308199f0008501a
|
||||
patword 0x00c1 0x0308199f0008501a
|
||||
patword 0x00c2 0x0308199f0008501a
|
||||
patword 0x00c3 0x0308199f0008501a
|
||||
patword 0x00c4 0x0308199f0008501a
|
||||
patword 0x00c5 0x0308199f0008501a
|
||||
patword 0x00c6 0x0308199f0008501a
|
||||
patword 0x00c7 0x0308199f0008501a
|
||||
patword 0x00c8 0x0308199f0008501a
|
||||
patword 0x00c9 0x0308199f0008501a
|
||||
patword 0x00ca 0x0308199f0008501a
|
||||
patword 0x00cb 0x0308199f0008501a
|
||||
patword 0x00cc 0x0308199f0008501a
|
||||
patword 0x00cd 0x0308199f0008501a
|
||||
patword 0x00ce 0x0308199f0008501a
|
||||
patword 0x00cf 0x0308199f0008501a
|
||||
patword 0x00d0 0x0308199f0008501a
|
||||
patword 0x00d1 0x0308199f0008501a
|
||||
patword 0x00d2 0x0308199f0008501a
|
||||
patword 0x00d3 0x0308199f0008501a
|
||||
patword 0x00d4 0x0308599f0008503a
|
||||
patword 0x00d5 0x0308599f0008503a
|
||||
patword 0x00d6 0x030c599f000850ba
|
||||
patword 0x00d7 0x030c599f000850ba
|
||||
patword 0x00d8 0x030c599f000850ba
|
||||
patword 0x00d9 0x030c599f000850ba
|
||||
patword 0x00da 0x030c599f000850ba
|
||||
patword 0x00db 0x030c599f000850ba
|
||||
patword 0x00dc 0x030c599f000850ba
|
||||
patword 0x00dd 0x030c599f000850ba
|
||||
patword 0x00de 0x030c599f000850ba
|
||||
patword 0x00df 0x030c599f000850ba
|
||||
patword 0x00e0 0x030c599f000850ba
|
||||
patword 0x00e1 0x030c599f000850ba
|
||||
patword 0x00e2 0x030c599f000850ba
|
||||
patword 0x00e3 0x030c599f000850ba
|
||||
patword 0x00e4 0x030c599f000850ba
|
||||
patword 0x00e5 0x030c599f000850ba
|
||||
patword 0x00e6 0x030c599f000850ba
|
||||
patword 0x00e7 0x030c599f000850ba
|
||||
patword 0x00e8 0x030c599f000850ba
|
||||
patword 0x00e9 0x030c599f000850ba
|
||||
patword 0x00ea 0x030c799f010858ba
|
||||
patword 0x00eb 0x030c799f010858ba
|
||||
patword 0x00ec 0x030c599f000850ba
|
||||
patword 0x00ed 0x030c599f000850ba
|
||||
patword 0x00ee 0x030c599f000850ba
|
||||
patword 0x00ef 0x030c599f000850ba
|
||||
patword 0x00f0 0x030c599f000850ba
|
||||
patword 0x00f1 0x030c599f000850ba
|
||||
patword 0x00f2 0x030c599f000850ba
|
||||
patword 0x00f3 0x030c599f000850ba
|
||||
patword 0x00f4 0x030c599f000850ba
|
||||
patword 0x00f5 0x030c599f000850ba
|
||||
patword 0x00f6 0x030c599f000850ba
|
||||
patword 0x00f7 0x030c599f000850ba
|
||||
patword 0x00f8 0x030c599f000850ba
|
||||
patword 0x00f9 0x030c599f000850ba
|
||||
patword 0x00fa 0x030c599f000850ba
|
||||
patword 0x00fb 0x030c599f000850ba
|
||||
patword 0x00fc 0x030c599f000850ba
|
||||
patword 0x00fd 0x030c599f000850ba
|
||||
patword 0x00fe 0x030c599f000850ba
|
||||
patword 0x00ff 0x030c599f000850ba
|
||||
patword 0x0100 0x030c599f000850ba
|
||||
patword 0x0101 0x030c599f000850ba
|
||||
patword 0x0102 0x030c599f400850ba
|
||||
patword 0x0103 0x030c599f400850ba
|
||||
patword 0x0104 0x030c599f600850ba
|
||||
patword 0x0105 0x030c599f400850ba
|
||||
patword 0x0106 0x030c599f400850ba
|
||||
patword 0x0107 0x030c599f400850ba
|
||||
patword 0x0108 0x870c599f682e50ba
|
||||
patword 0x0109 0x870c599f482850ba
|
||||
patword 0x010a 0x870c599f000e50ba
|
||||
patword 0x010b 0x870c599f000850ba
|
||||
patword 0x010c 0x870c599f000e50ba
|
||||
patword 0x010d 0x870c599f000850ba
|
||||
patword 0x010e 0x870c599f000e50ba
|
||||
patword 0x010f 0x870c599f000850ba
|
||||
patword 0x0110 0x870c599f000e50ba
|
||||
patword 0x0111 0x870c599f000850ba
|
||||
patword 0x0112 0x870c599f000e50ba
|
||||
patword 0x0113 0x870c599f000850ba
|
||||
patword 0x0114 0x870c599f000e50ba
|
||||
patword 0x0115 0x870c599f000850ba
|
||||
patword 0x0116 0x870c599f000e50ba
|
||||
patword 0x0117 0x870c599f000850ba
|
||||
patword 0x0118 0x870c599f000e50ba
|
||||
patword 0x0119 0x870c599f000850ba
|
||||
patword 0x011a 0x870c599f000e50ba
|
||||
patword 0x011b 0x870c599f000850ba
|
||||
patword 0x011c 0x870c599f000e50ba
|
||||
patword 0x011d 0x870c599f000850ba
|
||||
patword 0x011e 0x870c599f000e50ba
|
||||
patword 0x011f 0x870c599f000850ba
|
||||
patword 0x0120 0x870c599f000e50ba
|
||||
patword 0x0121 0x870c599f000850ba
|
||||
patword 0x0122 0x870c599f200e50ba
|
||||
patword 0x0123 0x870c599f000850ba
|
||||
patword 0x0124 0x870c599f000e50ba
|
||||
patword 0x0125 0x870c599f000850ba
|
||||
patword 0x0126 0x870c599f000e50ba
|
||||
patword 0x0127 0x870c599f000850ba
|
||||
patword 0x0128 0x870c599f000e50ba
|
||||
patword 0x0129 0x870c599f000850ba
|
||||
patword 0x012a 0x870c599f000e50ba
|
||||
patword 0x012b 0x870c599f000850ba
|
||||
patword 0x012c 0x870c599f000e50ba
|
||||
patword 0x012d 0x870c599f000850ba
|
||||
patword 0x012e 0x870c599f000e50ba
|
||||
patword 0x012f 0x870c599f000850ba
|
||||
patword 0x0130 0x870c599f000e50ba
|
||||
patword 0x0131 0x870c599f000850ba
|
||||
patword 0x0132 0x870c599f000e50ba
|
||||
patword 0x0133 0x870c599f000850ba
|
||||
patword 0x0134 0x870c599f000e50ba
|
||||
patword 0x0135 0x870c599f000850ba
|
||||
patword 0x0136 0x870c599f000e50ba
|
||||
patword 0x0137 0x870c599f000850ba
|
||||
patword 0x0138 0x870c599f000e50ba
|
||||
patword 0x0139 0x870c599f000850ba
|
||||
patword 0x013a 0x870c599f282e50ba
|
||||
patword 0x013b 0x870c599f082850ba
|
||||
patword 0x013c 0x870c599f000e50ba
|
||||
patword 0x013d 0x870c599f000850ba
|
||||
patword 0x013e 0x870c599f000e50ba
|
||||
patword 0x013f 0x870c599f000850ba
|
||||
patword 0x0140 0x870c599f000e50ba
|
||||
patword 0x0141 0x870c599f000850ba
|
||||
patword 0x0142 0x870c599f000e50ba
|
||||
patword 0x0143 0x870c599f000850ba
|
||||
patword 0x0144 0x870c599f000e50ba
|
||||
patword 0x0145 0x870c599f000850ba
|
||||
patword 0x0146 0x870c599f000e50ba
|
||||
patword 0x0147 0x870c599f000850ba
|
||||
patword 0x0148 0x870c599f000e50ba
|
||||
patword 0x0149 0x870c599f000850ba
|
||||
patword 0x014a 0x870c599f000e50ba
|
||||
patword 0x014b 0x870c599f000850ba
|
||||
patword 0x014c 0x870c599f000e50ba
|
||||
patword 0x014d 0x870c599f000850ba
|
||||
patword 0x014e 0x870c599f000e50ba
|
||||
patword 0x014f 0x870c599f000850ba
|
||||
patword 0x0150 0x870c599f000e50ba
|
||||
patword 0x0151 0x870c599f000850ba
|
||||
patword 0x0152 0x870c599f000e50ba
|
||||
patword 0x0153 0x870c599f000850ba
|
||||
patword 0x0154 0x870c599f200e50ba
|
||||
patword 0x0155 0x870c599f000850ba
|
||||
patword 0x0156 0x870c599f000e50ba
|
||||
patword 0x0157 0x870c599f000850ba
|
||||
patword 0x0158 0x870c599f000e50ba
|
||||
patword 0x0159 0x870c599f000850ba
|
||||
patword 0x015a 0x870c599f000e50ba
|
||||
patword 0x015b 0x870c599f000850ba
|
||||
patword 0x015c 0x870c599f000e50ba
|
||||
patword 0x015d 0x870c599f000850ba
|
||||
patword 0x015e 0x870c599f000e50ba
|
||||
patword 0x015f 0x870c599f000850ba
|
||||
patword 0x0160 0x870c599f000e50ba
|
||||
patword 0x0161 0x870c599f000850ba
|
||||
patword 0x0162 0x870c599f000e50ba
|
||||
patword 0x0163 0x870c599f000850ba
|
||||
patword 0x0164 0x870c599f000e50ba
|
||||
patword 0x0165 0x870c599f000850ba
|
||||
patword 0x0166 0x870c599f000e50ba
|
||||
patword 0x0167 0x870c599f000850ba
|
||||
patword 0x0168 0x870c599f000e50ba
|
||||
patword 0x0169 0x870c599f000850ba
|
||||
patword 0x016a 0x870c599f000e50ba
|
||||
patword 0x016b 0x870c599f000850ba
|
||||
patword 0x016c 0x070c599f000850ba
|
||||
patword 0x016d 0x070c599f000850ba
|
||||
patword 0x016e 0x000c599f000850ba
|
||||
patword 0x016f 0x000c599f000850ba
|
||||
patword 0x0170 0x0008599f200e503a
|
||||
patword 0x0171 0x0008599f0008503a
|
||||
patword 0x0172 0x0008599f200e503a
|
||||
patword 0x0173 0x0008599f0008503a
|
||||
patword 0x0174 0x0008599f0008503a
|
||||
patword 0x0175 0x0008599f0008503a
|
||||
patword 0x0176 0x0008599f0008503a
|
||||
patword 0x0177 0x0008599f0008503a
|
||||
patword 0x0178 0x0008599f0008503a
|
||||
patword 0x0179 0x0008599f0008503a
|
||||
patword 0x017a 0x0008599f0008503a
|
||||
patword 0x017b 0x0008599f0008503a
|
||||
patword 0x017c 0x0008599f0008503a
|
||||
patword 0x017d 0x0008599f0008503a
|
||||
patword 0x017e 0x0008599f0008503a
|
||||
patword 0x017f 0x0008599f0008503a
|
||||
patword 0x0180 0x0008599f0008503a
|
||||
patword 0x0181 0x0008599f0008503a
|
||||
patword 0x0182 0x0008599f0008503a
|
||||
patword 0x0183 0x0008599f0008503a
|
||||
patword 0x0184 0x0008599f0008503a
|
||||
patword 0x0185 0x0008599f0008503a
|
||||
patword 0x0186 0x0008599f0008503a
|
||||
patword 0x0187 0x0008599f0008503a
|
||||
patword 0x0188 0x0008599f0008503a
|
||||
patword 0x0189 0x0008599f0008503a
|
||||
patword 0x018a 0x0008599f0008503a
|
||||
patword 0x018b 0x0008599f0008503a
|
||||
patword 0x018c 0x0008599f0008503a
|
||||
patword 0x018d 0x0008599f0008503a
|
||||
patioctrl 0x8f0effff6dbffdbf
|
||||
patlimits 0x0000 0x018c
|
||||
patloop 0 0x013a 0x016b
|
||||
patnloop 0 0x199
|
||||
patloop 1 0x0400 0x0400
|
||||
patnloop 1 0
|
||||
patloop 2 0x0400 0x0400
|
||||
patnloop 2 0
|
||||
patwait 0 0x00aa
|
||||
patwaittime 0 10000
|
||||
patwait 1 0x0400
|
||||
patwaittime 1 0
|
||||
patwait 2 0x0400
|
||||
patwaittime 2 0
|
||||
pattern /tmp/pattern.pat
|
||||
|
||||
# dacs
|
||||
dac 6 800
|
||||
|
@ -1,13 +1,13 @@
|
||||
# detector hostname
|
||||
hostname localhost:1900
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50000
|
||||
udp_dstport2 50001
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
# detector hostname
|
||||
hostname localhost:1900+localhost:1902+
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000+mpc1922:2001+
|
||||
|
||||
# udp destination ports
|
||||
0:udp_dstport 50000
|
||||
0:udp_dstport2 50001
|
||||
1:udp_dstport 50002
|
||||
1:udp_dstport2 50003
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000+mpc1922:2001+
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
# detector hostname
|
||||
hostname localhost:1904
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2004
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50004
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 192.168.1.100
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2004
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
|
@ -1,24 +1,12 @@
|
||||
# detector hostname
|
||||
hostname localhost:1914
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2014
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50014
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 192.168.1.100
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
||||
|
||||
# enable 2nd interface for veto debugging
|
||||
# udp destination port for veto
|
||||
udp_dstport2 50015
|
||||
@ -27,6 +15,18 @@ udp_dstip2 auto
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip2 192.168.1.100
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2014
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
||||
|
||||
# to enable 2nd interface for veto debugging
|
||||
numinterfaces 2
|
||||
|
||||
|
@ -1,21 +1,21 @@
|
||||
# detector hostname
|
||||
hostname localhost:1906
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2006
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50006
|
||||
udp_dstport2 50007
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
udp_dstip2 auto
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 192.168.1.100
|
||||
udp_srcip2 192.168.1.100
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2006
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
udp_dstip2 auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
|
@ -4,13 +4,6 @@ detsize 2048 1024
|
||||
# detector hostname
|
||||
virtual 4 1952
|
||||
|
||||
# receiver hostname and tcpports
|
||||
0:rx_tcpport 1970
|
||||
1:rx_tcpport 1971
|
||||
2:rx_tcpport 1972
|
||||
3:rx_tcpport 1973
|
||||
rx_hostname mpc1922
|
||||
|
||||
# udp destination ports
|
||||
0:udp_dstport2 50001
|
||||
0:udp_dstport2 50002
|
||||
@ -21,14 +14,21 @@ rx_hostname mpc1922
|
||||
3:udp_dstport 50007
|
||||
3:udp_dstport2 50008
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
udp_dstip2 auto
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 192.168.1.100
|
||||
udp_srcip2 192.168.1.100
|
||||
|
||||
# receiver hostname and tcpports
|
||||
0:rx_tcpport 1970
|
||||
1:rx_tcpport 1971
|
||||
2:rx_tcpport 1972
|
||||
3:rx_tcpport 1973
|
||||
rx_hostname mpc1922
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
udp_dstip2 auto
|
||||
|
||||
# transmission delay frame
|
||||
0:txndelay_frame 0
|
||||
1:txndelay_frame 1
|
||||
|
@ -1,18 +1,18 @@
|
||||
# detector hostname
|
||||
hostname localhost:1908
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2008
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50008
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 192.168.1.100
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2008
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
# detector hostname
|
||||
hostname localhost:1912
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2012
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50012
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 192.168.1.100
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2012
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 334 KiB After Width: | Height: | Size: 299 KiB |
@ -31,7 +31,7 @@ alpha_wait = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
||||
alpha_wait_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
||||
|
||||
# Loop colors and line styles (6 needed from 0 to 5)
|
||||
colors_loop = ['tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:ping', 'tab:grey']
|
||||
colors_loop = ['tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:grey']
|
||||
linestyles_loop = ['-.', '-.', '-.', '-.', '-.', '-.']
|
||||
alpha_loop = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
||||
alpha_loop_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
||||
@ -527,7 +527,7 @@ for idx, i in enumerate(range(nbiteff)):
|
||||
linestyle=linestyles_loop[2], color=colors_loop[2], alpha=alpha_loop[2],
|
||||
label="loop 2: " + str(nloop2) + " times" if idx == 0 else "", linewidth=2.0)
|
||||
axs2[idx].plot([loop2_end, loop2_end], [-10, 10],
|
||||
linestyle=linestyles_loop[0], color=colors_loop[0], alpha=alpha_loop[2], linewidth=2.0)
|
||||
linestyle=linestyles_loop[2], color=colors_loop[2], alpha=alpha_loop[2], linewidth=2.0)
|
||||
|
||||
# Loop 3
|
||||
if nloop3 is not None:
|
||||
|
@ -34,6 +34,7 @@ set( PYTHON_FILES
|
||||
slsdet/eiger.py
|
||||
slsdet/enums.py
|
||||
slsdet/errors.py
|
||||
slsdet/gaincaps.py
|
||||
slsdet/gotthard.py
|
||||
slsdet/pattern.py
|
||||
slsdet/gotthard2.py
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
import subprocess
|
||||
import locale
|
||||
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
|
||||
out = subprocess.run(['sls_detector_get', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
|
||||
cmd = out.stdout.splitlines()
|
||||
cmd.pop(0)
|
||||
|
||||
@ -99,7 +99,6 @@ intentionally_missing = [
|
||||
'temp_slowadc',
|
||||
'temp_sodl',
|
||||
'temp_sodr',
|
||||
'trigger', #use sendSoftwareTrigger
|
||||
'update', #use updateServerAndFirmare
|
||||
'udp_validate', #use validateUdpConfiguration
|
||||
'udp_reconfigure', #use reconfigureUdpDestination
|
||||
|
@ -7,7 +7,7 @@ Build upon the pybind11 example found here: https://github.com/pybind/python_exa
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.append('../libs/pybind11')
|
||||
sys.path.append('../libs/pybind')
|
||||
from setuptools import setup, find_packages
|
||||
from pybind11.setup_helpers import Pybind11Extension, build_ext
|
||||
|
||||
@ -22,19 +22,25 @@ def get_conda_path():
|
||||
return os.environ['CONDA_PREFIX']
|
||||
|
||||
|
||||
#TODO migrate to CMake build?
|
||||
#TODO migrate to CMake build or fetch files from cmake?
|
||||
ext_modules = [
|
||||
Pybind11Extension(
|
||||
'_slsdet',
|
||||
['src/main.cpp',
|
||||
'src/current.cpp',
|
||||
'src/enums.cpp',
|
||||
'src/current.cpp',
|
||||
'src/detector.cpp',
|
||||
'src/network.cpp',
|
||||
'src/pattern.cpp',
|
||||
'src/scan.cpp',],
|
||||
'src/scan.cpp',
|
||||
'src/duration.cpp',
|
||||
'src/DurationWrapper.cpp',
|
||||
]
|
||||
|
||||
|
||||
,
|
||||
include_dirs=[
|
||||
os.path.join('../libs/pybind11/include'),
|
||||
os.path.join('../libs/pybind/include'),
|
||||
os.path.join(get_conda_path(), 'include'),
|
||||
|
||||
],
|
||||
|
@ -11,7 +11,7 @@ from .gotthard2 import Gotthard2
|
||||
from .gotthard import Gotthard
|
||||
from .moench import Moench
|
||||
from .pattern import Pattern, patternParameters
|
||||
|
||||
from .gaincaps import Mythen3GainCapsWrapper
|
||||
|
||||
import _slsdet
|
||||
xy = _slsdet.xy
|
||||
|
@ -26,6 +26,7 @@ SHORT_STR_LENGTH=20
|
||||
MAX_PATTERN_LENGTH=0x2000
|
||||
MAX_PATTERN_LEVELS=6
|
||||
M3_MAX_PATTERN_LEVELS=3
|
||||
MAX_NUM_COUNTERS=3
|
||||
DEFAULT_STREAMING_TIMER_IN_MS=500
|
||||
NUM_RX_THREAD_IDS=9
|
||||
MAX_NUM_PACKETS=512
|
||||
|
File diff suppressed because it is too large
Load Diff
42
python/slsdet/gaincaps.py
Normal file
42
python/slsdet/gaincaps.py
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
|
||||
import _slsdet
|
||||
gc = _slsdet.slsDetectorDefs.M3_GainCaps
|
||||
|
||||
|
||||
class Mythen3GainCapsWrapper:
|
||||
"""Holds M3_GainCaps enums and facilitates printing"""
|
||||
# 'M3_C10pre', 'M3_C15pre', 'M3_C15sh', 'M3_C225ACsh', 'M3_C30sh', 'M3_C50sh'
|
||||
all_bits = gc.M3_C10pre | gc.M3_C15pre | gc.M3_C15sh | gc.M3_C225ACsh | gc.M3_C30sh | gc.M3_C50sh
|
||||
all_caps = (gc.M3_C10pre, gc.M3_C15pre, gc.M3_C15sh, gc.M3_C225ACsh, gc.M3_C30sh, gc.M3_C50sh)
|
||||
def __init__(self, value = 0):
|
||||
self._validate(value)
|
||||
self.value = value
|
||||
|
||||
|
||||
def __eq__(self, other) -> bool:
|
||||
if isinstance(other, Mythen3GainCapsWrapper):
|
||||
return self.value == other.value
|
||||
else:
|
||||
return self.value == other
|
||||
|
||||
|
||||
def __ne__(self, other) -> bool:
|
||||
return not self.__eq__(other)
|
||||
|
||||
def __str__(self) -> str:
|
||||
s = ', '.join(str(c).rsplit('_', 1)[1] for c in self.all_caps if self.value & c)
|
||||
return s
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return self.__str__()
|
||||
|
||||
def _validate(self, value):
|
||||
"""Check that only bits representing real capacitors are set"""
|
||||
if isinstance(value, gc):
|
||||
return True
|
||||
elif isinstance(value, int):
|
||||
if value & (~self.all_bits):
|
||||
raise ValueError(f"The value: {value} is not allowed for Mythen3GainCapsWrapper")
|
||||
else:
|
||||
raise ValueError("GainCaps can only be initialized from int or M3_GainCaps enum")
|
@ -13,6 +13,7 @@ from .detector import Detector, freeze
|
||||
from .dacs import DetectorDacs
|
||||
import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
gc_enums = _slsdet.slsDetectorDefs.M3_GainCaps
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
|
||||
@ -63,3 +64,5 @@ class Mythen3(Detector):
|
||||
@property
|
||||
def dacs(self):
|
||||
return self._dacs
|
||||
|
||||
|
||||
|
@ -4,6 +4,7 @@ from .utils import element_if_equal
|
||||
from .enums import dacIndex
|
||||
from .defines import M3_MAX_PATTERN_LEVELS, MAX_PATTERN_LEVELS
|
||||
from _slsdet import slsDetectorDefs
|
||||
detectorType = slsDetectorDefs.detectorType
|
||||
|
||||
|
||||
def set_proxy_using_dict(func, key, value, unpack = False):
|
||||
@ -87,7 +88,10 @@ class ClkDivProxy:
|
||||
|
||||
def __repr__(self):
|
||||
rstr = ''
|
||||
for i in range(6):
|
||||
num_clocks = 6
|
||||
if self.det.type == detectorType.MYTHEN3:
|
||||
num_clocks = 5
|
||||
for i in range(num_clocks):
|
||||
r = element_if_equal(self.__getitem__(i))
|
||||
if isinstance(r, list):
|
||||
rstr += ' '.join(f'{item}' for item in r)
|
||||
@ -96,10 +100,35 @@ class ClkDivProxy:
|
||||
|
||||
return rstr.strip('\n')
|
||||
|
||||
class ClkPhaseProxy:
|
||||
"""
|
||||
Proxy class to allow for more intuitive reading clock phase
|
||||
"""
|
||||
def __init__(self, det):
|
||||
self.det = det
|
||||
|
||||
def __getitem__(self, key):
|
||||
return element_if_equal(self.det.getClockPhase(key))
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
set_proxy_using_dict(self.det.setClockPhase, key, value)
|
||||
|
||||
def __repr__(self):
|
||||
rstr = ''
|
||||
if self.det.type == detectorType.MYTHEN3:
|
||||
num_clocks = 5
|
||||
for i in range(num_clocks):
|
||||
r = element_if_equal(self.__getitem__(i))
|
||||
if isinstance(r, list):
|
||||
rstr += ' '.join(f'{item}' for item in r)
|
||||
else:
|
||||
rstr += f'{i}: {r}\n'
|
||||
|
||||
return rstr.strip('\n')
|
||||
|
||||
class MaxPhaseProxy:
|
||||
"""
|
||||
Proxy class to allow for more intuitive reading clockdivider
|
||||
Proxy class to allow for more intuitive reading max clock phase shift
|
||||
"""
|
||||
def __init__(self, det):
|
||||
self.det = det
|
||||
@ -109,7 +138,9 @@ class MaxPhaseProxy:
|
||||
|
||||
def __repr__(self):
|
||||
rstr = ''
|
||||
for i in range(5):
|
||||
if self.det.type == detectorType.MYTHEN3:
|
||||
num_clocks = 5
|
||||
for i in range(num_clocks):
|
||||
r = element_if_equal(self.__getitem__(i))
|
||||
if isinstance(r, list):
|
||||
rstr += ' '.join(f'{item}' for item in r)
|
||||
@ -120,7 +151,7 @@ class MaxPhaseProxy:
|
||||
|
||||
class ClkFreqProxy:
|
||||
"""
|
||||
Proxy class to allow for more intuitive reading clockdivider
|
||||
Proxy class to allow for more intuitive reading clock frequency
|
||||
"""
|
||||
def __init__(self, det):
|
||||
self.det = det
|
||||
@ -130,7 +161,9 @@ class ClkFreqProxy:
|
||||
|
||||
def __repr__(self):
|
||||
rstr = ''
|
||||
for i in range(5):
|
||||
if self.det.type == detectorType.MYTHEN3:
|
||||
num_clocks = 5
|
||||
for i in range(num_clocks):
|
||||
r = element_if_equal(self.__getitem__(i))
|
||||
if isinstance(r, list):
|
||||
rstr += ' '.join(f'{item}' for item in r)
|
||||
|
@ -261,3 +261,20 @@ def merge_args(*args):
|
||||
|
||||
else:
|
||||
raise ValueError("Multiple dictionaries passes cannot merge args")
|
||||
|
||||
|
||||
def hostname_list(args):
|
||||
"""
|
||||
Generates a list from a hostname string
|
||||
* Lists are passed through
|
||||
* as are tuples (conversion in pybind11 to vector)
|
||||
* if + is found it splits the string
|
||||
"""
|
||||
if isinstance(args, (list, tuple)):
|
||||
return args
|
||||
elif(isinstance(args, str)):
|
||||
hosts = args.split('+')
|
||||
hosts = [it for it in hosts if len(it)]
|
||||
return hosts
|
||||
else:
|
||||
raise ValueError("hostname needs to be string or list of strings")
|
||||
|
@ -61,6 +61,11 @@ void init_det(py::module &m) {
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getFirmwareVersion,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def("getFrontEndFirmwareVersion",
|
||||
(Result<int64_t>(Detector::*)(const defs::fpgaPosition,
|
||||
sls::Positions) const) &
|
||||
Detector::getFrontEndFirmwareVersion,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getDetectorServerVersion",
|
||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||
@ -219,6 +224,21 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||
Detector::setBadChannels,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getBadChannels",
|
||||
(Result<std::vector<int>>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getBadChannels,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"setBadChannels",
|
||||
(void (Detector::*)(const std::vector<int>, sls::Positions)) &
|
||||
Detector::setBadChannels,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"setBadChannels",
|
||||
(void (Detector::*)(const std::vector<std::vector<int>>)) &
|
||||
Detector::setBadChannels,
|
||||
py::arg());
|
||||
CppDetectorApi.def("isVirtualDetectorServer",
|
||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||
Detector::isVirtualDetectorServer,
|
||||
|
@ -12,6 +12,7 @@ void init_duration(py::module &m) {
|
||||
.def("total_seconds", &DurationWrapper::total_seconds)
|
||||
.def("count", &DurationWrapper::count)
|
||||
.def("set_count", &DurationWrapper::set_count)
|
||||
.def("__eq__", &DurationWrapper::operator==)
|
||||
.def("__repr__", [](const DurationWrapper &self) {
|
||||
std::stringstream ss;
|
||||
ss << "sls::DurationWrapper(total_seconds: " << self.total_seconds()
|
||||
|
@ -286,6 +286,11 @@ void init_enums(py::module &m) {
|
||||
.value("BOTTOM", slsDetectorDefs::portPosition::BOTTOM)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::fpgaPosition>(Defs, "fpgaPosition")
|
||||
.value("FRONT_LEFT", slsDetectorDefs::fpgaPosition::FRONT_LEFT)
|
||||
.value("FRONT_RIGHT", slsDetectorDefs::fpgaPosition::FRONT_RIGHT)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::streamingInterface>(Defs, "streamingInterface",
|
||||
py::arithmetic())
|
||||
.value("NONE", slsDetectorDefs::streamingInterface::NONE)
|
||||
|
24
python/tests/test_m3gaincaps.py
Normal file
24
python/tests/test_m3gaincaps.py
Normal file
@ -0,0 +1,24 @@
|
||||
import pytest
|
||||
|
||||
from slsdet import Mythen3GainCapsWrapper
|
||||
from slsdet.enums import M3_GainCaps #this is the c++ enum
|
||||
|
||||
|
||||
def test_comapre_with_int():
|
||||
c = Mythen3GainCapsWrapper(128) #C10pre
|
||||
assert c == 128
|
||||
assert c != 5
|
||||
assert c != 1280
|
||||
|
||||
def test_compare_with_other():
|
||||
a = Mythen3GainCapsWrapper(128)
|
||||
b = Mythen3GainCapsWrapper(1<<10)
|
||||
c = Mythen3GainCapsWrapper(128)
|
||||
assert a!=b
|
||||
assert (a==b) == False
|
||||
assert a==c
|
||||
|
||||
def test_can_be_default_constructed():
|
||||
c = Mythen3GainCapsWrapper()
|
||||
assert c == 0
|
||||
|
@ -8,7 +8,7 @@ Testing functions from utils.py
|
||||
|
||||
import pytest
|
||||
from slsdet.utils import *
|
||||
from slsdet import IpAddr, MacAddr
|
||||
from slsdet import IpAddr, MacAddr, DurationWrapper
|
||||
import datetime as dt
|
||||
import pathlib
|
||||
from pathlib import Path
|
||||
@ -22,7 +22,11 @@ def test_iterable():
|
||||
|
||||
|
||||
def test_reduce_time_to_single_value_from_list():
|
||||
t = 3 * [dt.timedelta(seconds=1)]
|
||||
t = [dt.timedelta(seconds=1) for i in range(3)]
|
||||
assert reduce_time(t) == 1
|
||||
|
||||
def test_reduce_time_to_single_value_from_list_DurationWrapper():
|
||||
t = [DurationWrapper(1) for i in range(3)]
|
||||
assert reduce_time(t) == 1
|
||||
|
||||
|
||||
@ -83,6 +87,12 @@ def test_all_equal_str_fails():
|
||||
assert all_equal('aaab') == False
|
||||
|
||||
|
||||
def test_all_equal_DurationWrapper():
|
||||
assert all_equal([DurationWrapper(1), DurationWrapper(1)])
|
||||
|
||||
def test_all_equal_DurationWrapper_fail():
|
||||
assert not all_equal([DurationWrapper(1), DurationWrapper(2)])
|
||||
|
||||
def test_element_if_equal_int():
|
||||
assert element_if_equal([5, 5]) == 5
|
||||
|
||||
@ -342,3 +352,32 @@ def test_merge_args_tuple():
|
||||
|
||||
def test_merge_args_dict_with_tuple():
|
||||
assert merge_args({0: (1,2)}, 3) == ({0: (1,2,3)},)
|
||||
|
||||
|
||||
def test_hostname_to_list():
|
||||
s = "localhost"
|
||||
r = hostname_list(s)
|
||||
assert r == [s]
|
||||
|
||||
def test_hostname_to_list_passthrough():
|
||||
args = ["localhost"]
|
||||
ret = hostname_list(args)
|
||||
assert ret == args
|
||||
|
||||
args = ("localhost",)
|
||||
ret = hostname_list(args)
|
||||
assert ret == args
|
||||
|
||||
def test_splitting_hostname():
|
||||
args = 'apple+banana+pear+'
|
||||
ret = hostname_list(args)
|
||||
assert ret == ['apple', 'banana', 'pear']
|
||||
|
||||
#not sensitive to trailing +
|
||||
args = 'apple+banana+pear'
|
||||
ret = hostname_list(args)
|
||||
assert ret == ['apple', 'banana', 'pear']
|
||||
|
||||
def test_hostame_throws_on_wrong_args():
|
||||
with pytest.raises(Exception) as e:
|
||||
hostname_list(5)
|
||||
|
1
serverBin/ctbDetectorServer_developer
Symbolic link
1
serverBin/ctbDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv6.1.0
|
1
serverBin/ctbDetectorServerv7.0.0
Symbolic link
1
serverBin/ctbDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0
|
1
serverBin/eigerDetectorServer_developer
Symbolic link
1
serverBin/eigerDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv6.1.0
|
1
serverBin/eigerDetectorServerv7.0.0
Symbolic link
1
serverBin/eigerDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0
|
1
serverBin/gotthard2DetectorServer_developer
Symbolic link
1
serverBin/gotthard2DetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv6.1.0
|
1
serverBin/gotthard2DetectorServerv7.0.0
Symbolic link
1
serverBin/gotthard2DetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0
|
1
serverBin/gotthardDetectorServer_developer
Symbolic link
1
serverBin/gotthardDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv6.1.0
|
1
serverBin/gotthardDetectorServerv7.0.0
Symbolic link
1
serverBin/gotthardDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0
|
1
serverBin/jungfrauDetectorServer_developer
Symbolic link
1
serverBin/jungfrauDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv6.1.0
|
1
serverBin/jungfrauDetectorServerv7.0.0
Symbolic link
1
serverBin/jungfrauDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0
|
1
serverBin/moenchDetectorServer_developer
Symbolic link
1
serverBin/moenchDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv6.1.0
|
1
serverBin/moenchDetectorServerv7.0.0
Symbolic link
1
serverBin/moenchDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0
|
1
serverBin/mythen3DetectorServer_developer
Symbolic link
1
serverBin/mythen3DetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv6.1.0
|
1
serverBin/mythen3DetectorServerv7.0.0
Symbolic link
1
serverBin/mythen3DetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0
|
@ -40,20 +40,31 @@ class jungfrauModuleData : public slsDetectorData<uint16_t> {
|
||||
out by a module i.e. using the slsReceiver (160x160 pixels, 40 packets
|
||||
1286 large etc.) \param c crosstalk parameter for the output buffer
|
||||
|
||||
*/
|
||||
*/
|
||||
#ifndef ZMQ
|
||||
#define off sizeof(jf_header)
|
||||
#endif
|
||||
#ifdef ZMQ
|
||||
#define off 0
|
||||
#endif
|
||||
|
||||
|
||||
jungfrauModuleData()
|
||||
: slsDetectorData<uint16_t>(1024, 512,
|
||||
1024* 512 * 2 + sizeof(jf_header)) {
|
||||
1024* 512 * 2 + off) {
|
||||
|
||||
for (int ix = 0; ix < 1024; ix++) {
|
||||
for (int iy = 0; iy < 512; iy++) {
|
||||
dataMap[iy][ix] = sizeof(jf_header) + (1024 * iy + ix) * 2;
|
||||
dataMap[iy][ix] = off + (1024 * iy + ix) * 2;
|
||||
#ifdef HIGHZ
|
||||
dataMask[iy][ix] = 0x3fff;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
iframe = 0;
|
||||
// cout << "data struct created" << endl;
|
||||
};
|
||||
|
@ -1,25 +1,19 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
INCDIR= -I. -I../dataStructures ../tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/
|
||||
INCDIR= -I. -I../dataStructures ../tiffio/src/tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/ -I../tiffio/include
|
||||
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3 -std=c++11 -Wall -L../../build/bin/ -lSlsSupport
|
||||
#-L../../bin -lhdf5 -L.
|
||||
|
||||
#DESTDIR?=../bin
|
||||
|
||||
all: moenchZmqProcess moenchZmq04Process
|
||||
#moenchZmqProcessCtbGui
|
||||
all: jungfrauZmqProcess
|
||||
#jungfrauZmqProcessCtbGui
|
||||
|
||||
moenchZmqProcess: moenchZmqProcess.cpp clean
|
||||
g++ -o moenchZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP
|
||||
|
||||
moenchZmq04Process: moenchZmqProcess.cpp clean
|
||||
g++ -o moench04ZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DMOENCH04
|
||||
|
||||
#moenchZmqProcessCtbGui: moenchZmqProcess.cpp clean
|
||||
# g++ -o moenchZmqProcessCtbGui moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DCTBGUI
|
||||
jungfrauZmqProcess: jungfrauZmqProcess.cpp clean
|
||||
g++ -o jungfrauZmqProcess jungfrauZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP
|
||||
|
||||
clean:
|
||||
rm -f moenchZmqProcess
|
||||
rm -f jungfrauZmqProcess
|
||||
|
||||
|
||||
|
@ -0,0 +1,26 @@
|
||||
ROOTSYS=/opt/cern/v6/root
|
||||
#/afs/psi.ch/project/sls_det_sof/roottware/root_v5.34.23_sl6_64bit
|
||||
|
||||
|
||||
|
||||
LIBZMQDIR = $(PWD)
|
||||
LIBZMQ = -L$(LIBZMQDIR) -lzmq
|
||||
SHLIB_PATH=/opt/cern/v6/root/lib
|
||||
CMAKE_PREFIX_PATH=/opt/cern/v6/root
|
||||
DYLD_LIBRARY_PATH=/opt/cern/v6/root/lib
|
||||
|
||||
|
||||
INCDIR= -I. -I../dataStructures ../tiffio/src/tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/ -I../tiffio/include
|
||||
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3 -std=c++11 -Wall -L../../build/bin/ -lSlsSupport
|
||||
#-L../../bin -lhdf5 -L.
|
||||
|
||||
|
||||
|
||||
default: onlinedisp_zmq
|
||||
|
||||
onlinedisp_zmq: onlinedisp_zmq.cpp onlinedisp_zmq.h
|
||||
# flags from root-config --cflags --glibs
|
||||
g++ -o onlinedisp_zmq onlinedisp_zmq.cpp -I. -I$(ROOTSYS)/include -Wall -g -lm -L. -lzmq -pthread -lrt -L$(ROOTSYS)/lib -lGui -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -m64 $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
|
||||
|
||||
#-lCint
|
||||
|
10
slsDetectorCalibration/jungfrauExecutables/examples.txt
Normal file
10
slsDetectorCalibration/jungfrauExecutables/examples.txt
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
sls_detector_put rx_jsonpara detectorMode counting
|
||||
sls_detector_put rx_jsonpara frameMode newPedestal
|
||||
sls_detector_put rx_jsonpara frameMode frame
|
||||
sls_detector_put rx_jsonpara detectorMode analog
|
||||
sls_detector_put rx_jsonpara threshold 150
|
||||
sls_detector_put rx_jsonpara threshold 0
|
||||
sls_detector_put rx_jsonpara threshold 300
|
||||
sls_detector_put rx_zmqhwm 50
|
@ -222,6 +222,7 @@ int main(int argc, char *argv[]) {
|
||||
multiThreadedCountingDetector *mt =
|
||||
new multiThreadedCountingDetector(filter, nthreads, fifosize);
|
||||
mt->setClusterSize(csize,csize);
|
||||
|
||||
#ifndef ANALOG
|
||||
mt->setDetectorMode(ePhotonCounting);
|
||||
cout << "Counting!" << endl;
|
||||
|
File diff suppressed because it is too large
Load Diff
679
slsDetectorCalibration/jungfrauExecutables/onlinedisp_zmq.cpp
Normal file
679
slsDetectorCalibration/jungfrauExecutables/onlinedisp_zmq.cpp
Normal file
@ -0,0 +1,679 @@
|
||||
#include "onlinedisp_zmq.h"
|
||||
bool hasallpede;
|
||||
TH1F * his102;TH1F * his101;
|
||||
int processedf;
|
||||
sls::zmqHeader zHeader;
|
||||
#define PEDEFNAME "current_pede.dat"
|
||||
#define NPRO 50
|
||||
#define NPRI 50
|
||||
|
||||
//#define JFSTRX
|
||||
#ifdef JFSTRX
|
||||
#include "jungfrauLGADStrixelsData.h"
|
||||
#else
|
||||
#include "jungfrauModuleData.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
goout=1;
|
||||
hasallpede=false;
|
||||
dophotonmap=true; if ((argc<3)) {printf("USAGE: command photon_energy_(peakinADC) [rx_ip] [port] \n"); return -1 ;}
|
||||
else {
|
||||
phene=atoi(argv[1]);
|
||||
if (phene<0) dophotonmap=false;
|
||||
threshold=float (phene/2);
|
||||
printf( " \n");
|
||||
printf( "phene %d \n",phene);
|
||||
}
|
||||
|
||||
if (argc>=3) {
|
||||
strcpy(serverip,argv[2]);
|
||||
printf("ip is %s ",serverip);
|
||||
}
|
||||
|
||||
portnum=30001;
|
||||
if (argc>=4 ){ portnum= atoi(argv[3]);
|
||||
}
|
||||
printf(", port number is %d ",portnum); printf(". \n");
|
||||
|
||||
|
||||
#ifdef JFSTRX
|
||||
cout << "JFSTRX" << endl;
|
||||
jungfrauLGADStrixelsData *decoder = new jungfrauLGADStrixelsData();
|
||||
nx = 1024/5; ny= 512*5;
|
||||
#else
|
||||
nx = 1024; ny= 512;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
gain_flag=false;
|
||||
pede_flag=false;
|
||||
bw_flag=false;
|
||||
|
||||
HDraw_every=20;
|
||||
fixranges=false;
|
||||
|
||||
|
||||
hchptr = (short*) malloc(NCH*sizeof(short));
|
||||
|
||||
startsocket(); //create and connect ZMQ
|
||||
|
||||
for (ipx=0;ipx<NCH;ipx++) hchptr[(ipx)]=0;
|
||||
|
||||
|
||||
// cout<< decoder->getValue((char*)(hchptr),279,130)<<endl;
|
||||
|
||||
|
||||
nonblock(NB_ENABLE);
|
||||
|
||||
cout <<"opening the rootapp" <<endl;
|
||||
|
||||
rootapp = new TApplication("Online JF display",&argc, argv);
|
||||
|
||||
LoadPaletteFalse();
|
||||
|
||||
char hname[100];
|
||||
|
||||
|
||||
|
||||
his1000= new TH2F("his1000","2d , ev. pede corrected",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
|
||||
his1000->SetOption("colz");
|
||||
his2000= new TH2F("his2000","2d gain ",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
|
||||
his2000->GetZaxis()->SetRangeUser(0,4);
|
||||
|
||||
if (dophotonmap) {
|
||||
his3000= new TH2F("his3000"," photon map ",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
|
||||
}
|
||||
else {
|
||||
his3000= new TH2F("his3000"," raw adc ",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
|
||||
}
|
||||
|
||||
his4500= new TH2F("his45000","L vs R",101,-50,500,101,-50,500);
|
||||
hchip=new TH1I*[8];
|
||||
for (i=0;i<8;i++) {
|
||||
sprintf(hname,"hchip%d",i);
|
||||
hchip[i] = new TH1I(hname,hname,NBIN,MIN_POS,MAX_POS);
|
||||
}
|
||||
|
||||
cout <<"end of histo booking" <<endl;
|
||||
if (A2==NULL) A2 = new TCanvas("A2","Plotting Canvas gain",150,10,500,250);
|
||||
if (A3==NULL) A3 = new TCanvas("A3","Plotting Canvas ADC",150,360,1200,550);
|
||||
if (A4==NULL) A4 = new TCanvas("A4","Plotting Canvas PHs",750,300,1000,800);
|
||||
A4->Clear();
|
||||
A4->Divide(4,2,0.005,0.005);
|
||||
if (A5==NULL) A5 = new TCanvas("A5","Plotting Canvas Photon Map",750,300,1000,600);
|
||||
if (A6==NULL) A6 = new TCanvas("A6","Plotting Canvas LvsR",650,250,650,660);
|
||||
|
||||
gSystem->ProcessEvents();
|
||||
int running=0;
|
||||
char runc[15]="*\\-/|";
|
||||
printhelp();
|
||||
|
||||
|
||||
|
||||
while (1==1) { // loop on streamed frames
|
||||
|
||||
if(!zmqSocket->ReceiveHeader(0,zHeader, SLS_DETECTOR_JSON_HEADER_VERSION)){
|
||||
cout<< "Receiver stopped, waiting for new stream" << endl;
|
||||
zmqSocket->Disconnect();
|
||||
zmqSocket->Connect();
|
||||
}
|
||||
else {
|
||||
|
||||
// if (((icount++)%10)==0) cout <<"recived frameindex "<<zHeader.frameIndex <<endl;
|
||||
//cout <<"there" <<endl;
|
||||
zmqSocket->ReceiveData(0, (char *)(&image_data), NCH*2);
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
framesinstream++;
|
||||
running++;
|
||||
|
||||
fill1Ds=true; //alway fill 1d and LR plots
|
||||
//if (((framesinstream%(int(HDraw_every)))==(int (HDraw_every)-1))) {fill1Ds=true;}else{fill1Ds=false;}
|
||||
if (((framesinstream%(HDraw_every))==(HDraw_every)-1)) {show2Ds=true;}else{show2Ds=false;}
|
||||
if (((framesinstream%NPRI)==NPRI-1)) { cout<<"\r "<<"frame (from start): "<<framesinstream<<" " << runc[((running/NPRI)%5)]<< " discarded frames %=" << (1-float(processedf)/float(zHeader.frameIndex-frameIndex_old))*100 << " current framenumber= " <<zHeader.frameIndex << " "<<std::flush; processedf=0;frameIndex_old=zHeader.frameIndex;}
|
||||
|
||||
|
||||
npacket=0;
|
||||
if (show2Ds) {
|
||||
his1000->Reset();
|
||||
his2000->Reset();
|
||||
if (!dophotonmap) his3000->Reset(); //FOR RAW ADC DISPLAY
|
||||
}
|
||||
|
||||
|
||||
if ((fill1Ds)or(show2Ds)or(dophotonmap)) { // do something, otherwise skip to the next
|
||||
processedf++;
|
||||
|
||||
for (i=0 ;i<NCH;i++) {
|
||||
|
||||
adcvalue= (image_data[i]) & 0x3fff;
|
||||
|
||||
if ((image_data[i] & 0xc000)!=0){ gain = (image_data[i]>>14) & 0x3;} else {gain=0;}
|
||||
if (pede_flag){
|
||||
|
||||
if (gain_flag)
|
||||
{
|
||||
if ((gain==0)||(!hasallpede)) adcpedecorr=(adcvalue&0x3fff)*fgaind[i]-fpeded[i]*fgaind[i];
|
||||
|
||||
if ((gain==1)&&hasallpede) adcpedecorr=(fpedeG1d[i]*fgaind[i]+G1Poffset-adcvalue*fgaind[i])*30.0;
|
||||
if ((gain==3)&&hasallpede) adcpedecorr=(fpedeG2d[i]*fgaind[i]+G2Poffset-adcvalue*fgaind[i])*340.0;
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
|
||||
if ((gain==0)||(!hasallpede)) adcpedecorr=(adcvalue&0x3fff)-fpeded[i];
|
||||
if ((gain==1)&&hasallpede) adcpedecorr=(fpedeG1d[i]+G1Poffset-adcvalue)*30.0;
|
||||
if ((gain==3)&&hasallpede) adcpedecorr=(fpedeG2d[i]+G2Poffset-adcvalue)*340.0;
|
||||
}
|
||||
|
||||
|
||||
} else {adcpedecorr=float (adcvalue);} //end of if pede
|
||||
|
||||
|
||||
|
||||
|
||||
if ((adcpedecorr>threshold)&&(pede_flag)) hchptr[(i)]= hchptr[(i)]+(int)((adcpedecorr+threshold)/phene);
|
||||
|
||||
|
||||
if (fill1Ds) {
|
||||
if (((i%1024)<1004)&&((i%1024)>20)&&((i/1024)>20)) { //skip the pix near guardring for PH plots
|
||||
ichip= i/(256*256*4)*4+((i/256)%4) ;
|
||||
|
||||
hchip[ichip]->Fill(adcpedecorr,1);
|
||||
|
||||
if (((i%256)<253)&&((i%256)>2)) his4500->Fill(adcpedecorrold,adcpedecorr,1);
|
||||
adcpedecorrold=adcpedecorr;
|
||||
|
||||
|
||||
}
|
||||
}//if (fill1Ds)
|
||||
|
||||
|
||||
|
||||
|
||||
if ((show2Ds)) {
|
||||
factor=2.0;
|
||||
value=adcpedecorr;
|
||||
if ((i%256==0)||(i%256==255)) value=int(value/factor);
|
||||
if ((i/1024==255)||(i/1024==256)||(i/1024==767)||(i/1024==768)) value=int(value/factor);
|
||||
|
||||
his1000->Fill(float(i%1024),float(int (i/1024)),value);
|
||||
|
||||
if (!dophotonmap) his3000->Fill(float(i%1024),float(int (i/1024)) ,adcvalue);
|
||||
|
||||
his2000->Fill(float(i%1024),float(int (i/1024)) ,gain);
|
||||
|
||||
value=(int)(hchptr[i]);
|
||||
|
||||
if ((i%256==0)||(i%256==255)) value=int(value/factor);
|
||||
if ((i/1024==255)||(i/1024==256)||(i/1024==767)||(i/1024==768)) value=int(value/factor);
|
||||
if (dophotonmap) his3000->Fill(float(i%1024),float(int (i/1024)),float(value));
|
||||
|
||||
}
|
||||
}// for (i=0 ;i<NCH-0;i++)
|
||||
}// /end of do something
|
||||
|
||||
|
||||
|
||||
if ((show2Ds)) {
|
||||
|
||||
for (ipx=0;ipx<NCH;ipx++) hchptr[(ipx)]=0;
|
||||
|
||||
|
||||
|
||||
Plot2DHistos(); Plot1DHistos();
|
||||
}
|
||||
|
||||
|
||||
ifp=kbhit();
|
||||
processifp(ifp);
|
||||
|
||||
if (((framesinstream%NPRO))==NPRO-1) gSystem->ProcessEvents();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}// end of infinite loop
|
||||
|
||||
rootapp->Run();
|
||||
nonblock(NB_DISABLE);
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
void processifp(int ifp){
|
||||
|
||||
if (ifp!=0){
|
||||
c=fgetc(stdin);
|
||||
if (c=='s') {if (goout==0){goout=1;}else {myloop();}}
|
||||
if (c=='S') SetRanges();
|
||||
if (c=='+') { HDraw_every=HDraw_every*0.8;cout<< endl <<"Drawing every "<< HDraw_every<<" frames "<<endl; }
|
||||
if (c=='-') { HDraw_every=HDraw_every*1.25;cout<< endl <<"Drawing every "<< HDraw_every<<" frames "<<endl;}
|
||||
if (c=='G') {gain_flag=not gain_flag ;if (gain_flag) {cout<<"gain corr enab."<< endl;}else {cout<<"gain corr disab."<< endl;}}
|
||||
if (c=='[') { G1Poffset=G1Poffset-10;cout<< endl <<"G1Poffset "<<G1Poffset<<endl; }
|
||||
if (c==']') { G1Poffset=G1Poffset+10;cout<< endl <<"G1Poffset "<<G1Poffset<<endl; }
|
||||
if (c=='{') { G2Poffset=G2Poffset-10;cout<< endl <<"G2Poffset "<<G2Poffset<<endl; }
|
||||
if (c=='}') { G2Poffset=G2Poffset+10;cout<< endl <<"G2Poffset "<<G2Poffset<<endl; }
|
||||
if (c=='p') { //stopsocket();
|
||||
loadpede();//startsocket();
|
||||
}
|
||||
if (c=='b') {LoadPaletteBW(1.1111);bw_flag=true; }
|
||||
if (c=='B') {LoadPaletteBW(0.9);bw_flag=true; }
|
||||
if (c=='O') savepede();
|
||||
if (c=='o') readpede();
|
||||
if (c=='P') loadallpede();
|
||||
if (c=='u') his1000->SetOption("surf2z");
|
||||
if (c=='C') his1000->SetOption("colz");
|
||||
|
||||
if (c=='q') exit(0);
|
||||
if (c=='r') historeset();
|
||||
if (c=='R') axisreset();
|
||||
}
|
||||
|
||||
}
|
||||
void loadallpede(){
|
||||
cout <<"not implemented "<< endl;
|
||||
// hasallpede=true;
|
||||
|
||||
// system("./sls_detector_put setbit 0x5d 12 "); //setting to FSG1 ;
|
||||
|
||||
// loadpede();
|
||||
// loadpede();
|
||||
// for (i=0;i<NCH;i++) {fpedeG1d[i]=fpeded[i];}
|
||||
|
||||
// system("./sls_detector_put setbit 0x5d 13 "); //setting to FSG0 ;
|
||||
// sleep(1);
|
||||
// loadpede();
|
||||
// loadpede();
|
||||
// for (i=0;i<NCH;i++) {fpedeG2d[i]=fpeded[i];}
|
||||
// system("./sls_detector_put clearbit 0x5d 12 "); //setting to G0;
|
||||
// system("./sls_detector_put clearbit 0x5d 13 "); //setting to G0;
|
||||
// sleep(2);
|
||||
|
||||
// loadpede();
|
||||
// loadpede();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
void loadpede(void){
|
||||
//startsocket();
|
||||
framesinstream=0;
|
||||
pede_flag=true;
|
||||
nframes=0;
|
||||
|
||||
|
||||
|
||||
for (ipx=0;ipx<NCH;ipx++) fpeded[ipx]=0;
|
||||
|
||||
|
||||
|
||||
while (framesinstream<50) { // loop on files
|
||||
|
||||
|
||||
if (!zmqSocket->ReceiveHeader(0,zHeader, SLS_DETECTOR_JSON_HEADER_VERSION)){
|
||||
return;
|
||||
}
|
||||
|
||||
cout <<"received frameindex "<<zHeader.frameIndex << endl;
|
||||
|
||||
zmqSocket->ReceiveData(0, (char *)(&image_data), NCH*2);
|
||||
framesinstream++;nframes++;
|
||||
for (ipx=0;ipx<NCH;ipx++) fpeded[ipx]=(fpeded[ipx]*(nframes-1)+(float)(image_data[ipx]&0x3fff))/(float)(nframes);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
for (ipx=0;ipx<NCH;ipx++) { ipeded[ipx]=(short)(fpeded[ipx]);
|
||||
if (ipx%60033==0) printf("i=%d pede= %d %f .\n",ipx, ipeded[ipx],fpeded[ipx]);
|
||||
}
|
||||
printf("total frames for pede: %d \n",nframes);
|
||||
//stopsocket();
|
||||
|
||||
printhelp();
|
||||
}
|
||||
|
||||
int kbhit()
|
||||
{
|
||||
struct timeval tv;
|
||||
fd_set fds;
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 0;
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(STDIN_FILENO, &fds); //STDIN_FILENO is 0
|
||||
select(STDIN_FILENO+1, &fds, NULL, NULL, &tv);
|
||||
return FD_ISSET(STDIN_FILENO, &fds);
|
||||
}
|
||||
void myloop(void){ //wait doing nothing.
|
||||
goout=0;
|
||||
int ifp;
|
||||
|
||||
|
||||
while (goout==0){
|
||||
|
||||
ifp=kbhit();
|
||||
processifp(ifp);
|
||||
|
||||
|
||||
gSystem->ProcessEvents();
|
||||
usleep(5000);
|
||||
|
||||
}
|
||||
}
|
||||
void printhelp(){
|
||||
cout<< endl << "s=start/pause| p/n=getnewpede/raw | o/O=read/save pede | n=nopede(raw) | r/R=rst His/Axis | +/- = faster/slower ref. |q=exit | U/C sUrf2/Colz " <<endl;
|
||||
}
|
||||
|
||||
void historeset(){
|
||||
|
||||
his4500->Reset();
|
||||
his3000->Reset();
|
||||
for (i=0;i<8;i++) {
|
||||
hchip[i]->Reset();
|
||||
|
||||
}
|
||||
Plot2DHistos();
|
||||
Plot1DHistos();
|
||||
|
||||
}
|
||||
|
||||
void SetRanges() {
|
||||
string str;
|
||||
std::cin.clear();
|
||||
//cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
|
||||
|
||||
cout<< endl;
|
||||
cout<< " adc min " <<endl;
|
||||
//getline(cin, str);
|
||||
// adcmin= stoi(str);
|
||||
std::cin >> adcmin;
|
||||
cout<< " adc max " <<endl;
|
||||
std::cin >> adcmax;
|
||||
cout<< " p.map min " <<endl;
|
||||
std::cin >> pmmin;
|
||||
cout<< " p.map max " <<endl;
|
||||
std::cin >> pmmax;
|
||||
|
||||
fixranges=true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void axisreset(){
|
||||
fixranges=false;
|
||||
his1000->GetXaxis()->UnZoom();
|
||||
|
||||
his1000->GetYaxis()->UnZoom();
|
||||
his1000->GetZaxis()->UnZoom();
|
||||
his2000->GetXaxis()->UnZoom();
|
||||
his2000->GetYaxis()->UnZoom();
|
||||
|
||||
his3000->GetZaxis()->UnZoom();
|
||||
|
||||
for (i=0;i<8;i++) {
|
||||
hchip[i]->GetXaxis()->UnZoom();
|
||||
hchip[i]->GetYaxis()->UnZoom();
|
||||
}
|
||||
|
||||
his4500->GetXaxis()->UnZoom();
|
||||
his4500->GetYaxis()->UnZoom();
|
||||
his4500->GetZaxis()->UnZoom();
|
||||
|
||||
Plot2DHistos();
|
||||
Plot1DHistos();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void nonblock(int state)
|
||||
{
|
||||
struct termios ttystate;
|
||||
//get the terminal state
|
||||
tcgetattr(STDIN_FILENO, &ttystate);
|
||||
if (state==NB_ENABLE)
|
||||
{
|
||||
//turn off canonical mode
|
||||
ttystate.c_lflag &= ~ICANON;
|
||||
//minimum of number input read.
|
||||
ttystate.c_cc[VMIN] = 1;
|
||||
}
|
||||
else if (state==NB_DISABLE)
|
||||
{ //turn on canonical mode
|
||||
ttystate.c_lflag |= ICANON;
|
||||
}
|
||||
//set the terminal attributes.
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &ttystate);
|
||||
}
|
||||
|
||||
|
||||
void LoadPaletteFalse(){
|
||||
const Int_t NRGBs = 5;
|
||||
const Int_t NCont = 90;
|
||||
|
||||
Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
|
||||
Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
|
||||
Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
|
||||
Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
|
||||
TColor::CreateGradientColorTable(NRGBs, stops, red,green, blue, NCont);
|
||||
gStyle->SetNumberContours(NCont);
|
||||
TColor::CreateGradientColorTable(NRGBs, stops, red,green ,blue, NCont);
|
||||
gStyle->SetNumberContours(NCont);
|
||||
|
||||
}
|
||||
void LoadPaletteBW(float gammatune){
|
||||
|
||||
vgamma=vgamma*gammatune;
|
||||
cout<< "gamma is "<<vgamma<<endl;
|
||||
const Int_t NRGBs = 99;
|
||||
const Int_t NCont = 990;
|
||||
Double_t stops[NRGBs] ;
|
||||
Double_t red[NRGBs] ;
|
||||
Double_t green[NRGBs];
|
||||
Double_t blue[NRGBs] ;
|
||||
|
||||
for (int iRGB=0;iRGB<NRGBs;iRGB++){
|
||||
|
||||
|
||||
stops[iRGB] =(1/float(NRGBs)*float(iRGB));
|
||||
red[iRGB] = pow(stops[iRGB],vgamma);
|
||||
green[iRGB] = red[iRGB];
|
||||
blue[iRGB] =red[iRGB];
|
||||
// cout << iRGB<<" "<< stops[iRGB] <<" " << red[iRGB]<<endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
|
||||
gStyle->SetNumberContours(NCont);
|
||||
|
||||
|
||||
|
||||
// TColor::SetPalette(52,0,1);
|
||||
|
||||
}
|
||||
|
||||
void Plot1DHistos(void){
|
||||
|
||||
if (hchip[0]->GetXaxis()->GetLast()!=oldh0xlast){
|
||||
oldh0xlast=hchip[0]->GetXaxis()->GetLast();
|
||||
oldh0xfirst=hchip[0]->GetXaxis()->GetFirst();
|
||||
for (int ipad=1; ipad<8;ipad++) {
|
||||
hchip[ipad]->GetXaxis()->SetRange(oldh0xfirst,oldh0xlast);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (int ipad=0; ipad<8;ipad++) {
|
||||
A4->cd(ipad+1);
|
||||
gStyle->SetOptStat(1); gPad->SetLogy();
|
||||
hchip[ipad%4+(1-int(ipad/4))*4]->Draw();
|
||||
|
||||
}
|
||||
A4->cd();
|
||||
A4->Update();
|
||||
}
|
||||
|
||||
|
||||
void Plot2DHistos(void){
|
||||
gStyle->SetOptStat(0);
|
||||
A3->cd();
|
||||
|
||||
// if (bw_flag) LoadPaletteBW(1.0);
|
||||
|
||||
if (fixranges) {
|
||||
|
||||
his1000->GetZaxis()->SetRangeUser(float(adcmin),float(adcmax));
|
||||
his3000->GetZaxis()->SetRangeUser(float(pmmin),float(pmmax));
|
||||
|
||||
|
||||
}
|
||||
|
||||
his1000->SetMinimum(-200);
|
||||
his1000->Draw();
|
||||
|
||||
A3->Update();
|
||||
A2->cd();
|
||||
// if (bw_flag) LoadPaletteFalse();
|
||||
his2000->GetXaxis()->SetRange(his1000->GetXaxis()->GetFirst(),his1000->GetXaxis()->GetLast());
|
||||
his2000->GetYaxis()->SetRange(his1000->GetYaxis()->GetFirst(),his1000->GetYaxis()->GetLast());
|
||||
|
||||
his2000->Draw("colz");
|
||||
A2->Update();
|
||||
A5->cd();
|
||||
|
||||
his3000->GetXaxis()->SetRange(his1000->GetXaxis()->GetFirst(),his1000->GetXaxis()->GetLast());
|
||||
his3000->GetYaxis()->SetRange(his1000->GetYaxis()->GetFirst(),his1000->GetYaxis()->GetLast());
|
||||
his3000->Draw("colz");
|
||||
A5->Update();
|
||||
|
||||
A6->cd();
|
||||
his4500->Draw("colz");
|
||||
A6->Update();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void startsocket(void) {
|
||||
|
||||
|
||||
|
||||
|
||||
try {
|
||||
zmqSocket = new sls::ZmqSocket(serverip, portnum);
|
||||
|
||||
} catch (...) {
|
||||
cprintf(RED,
|
||||
"Error: Could not create Zmq socket on port %d with ip %s\n",
|
||||
portnum, serverip);
|
||||
delete zmqSocket;
|
||||
return;
|
||||
}
|
||||
zmqSocket->SetReceiveHighWaterMark(3);
|
||||
zmqSocket->SetReceiveBuffer(1024*1024);
|
||||
zmqSocket->Connect();
|
||||
|
||||
|
||||
cout<<"Zmq Client[] "<< zmqSocket->GetZmqServerAddress()<<endl;
|
||||
|
||||
|
||||
haveconnection=true;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void tryconnect(void)
|
||||
|
||||
{
|
||||
int itry=0;
|
||||
cout<< endl;
|
||||
|
||||
|
||||
|
||||
while (haveconnection==false) {
|
||||
sleep(1);
|
||||
cout<<"\r trying to (re)connect " <<itry++ << " " << endl ;
|
||||
startsocket();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void stopsocket(void) {
|
||||
// cout<<" cfd " << cfd << endl;;
|
||||
|
||||
|
||||
|
||||
delete zmqSocket;
|
||||
zmqSocket=0;
|
||||
//zmqSocket->~ZmqSocket ();
|
||||
|
||||
|
||||
|
||||
haveconnection=false;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
void savepede(void) {
|
||||
|
||||
int pfd;
|
||||
|
||||
pfd=open(PEDEFNAME,O_CREAT|O_WRONLY, 0666);
|
||||
if (pfd==-1) perror("open pede file");
|
||||
|
||||
write(pfd,fpeded,2*NCH*sizeof(float));
|
||||
write(pfd,fpedeG1d,2*NCH*sizeof(float));
|
||||
write(pfd,fpedeG2d,2*NCH*sizeof(float));
|
||||
close(pfd);
|
||||
|
||||
}
|
||||
|
||||
void readpede(void) {
|
||||
|
||||
int pfd;
|
||||
|
||||
pfd=open(PEDEFNAME,O_RDONLY);
|
||||
if (pfd==-1) perror("open pede file");
|
||||
|
||||
read(pfd,fpeded,NCH*2*sizeof(float));
|
||||
read(pfd,fpedeG1d,NCH*2*sizeof(float));
|
||||
read(pfd,fpedeG2d,NCH*2*sizeof(float));
|
||||
|
||||
close(pfd);
|
||||
pede_flag=true;
|
||||
hasallpede=true;
|
||||
|
||||
}
|
||||
|
204
slsDetectorCalibration/jungfrauExecutables/onlinedisp_zmq.h
Normal file
204
slsDetectorCalibration/jungfrauExecutables/onlinedisp_zmq.h
Normal file
@ -0,0 +1,204 @@
|
||||
|
||||
/**************************************************************************/
|
||||
/* Header files section needs cleanup */
|
||||
/**************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include "sls/ZmqSocket.h"
|
||||
|
||||
#include "sls/tiffIO.h"
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdlib.h> /* exit() */
|
||||
#include <string.h> /* memset(), memcpy() */
|
||||
#include <sys/utsname.h> /* uname() */
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h> /* socket(), bind(),
|
||||
listen(), accept() */
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h> /* fork(), write(), close() */
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <cmath>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <rapidjson/document.h> //json header in zmq stream
|
||||
#include <omp.h>
|
||||
#define NTHREADS 2
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <ctime> // time_t
|
||||
|
||||
using namespace std;
|
||||
using namespace std::chrono;
|
||||
using namespace sls;
|
||||
|
||||
#include "TCanvas.h"
|
||||
#include "TH1F.h"
|
||||
#include "TF1.h"
|
||||
#include "TH2F.h"
|
||||
#include "TMath.h"
|
||||
#include "TFile.h"
|
||||
#include "TStyle.h"
|
||||
#include "TSystem.h"
|
||||
#include "TTimer.h"
|
||||
#include "TProfile.h"
|
||||
#include "TColor.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <termios.h>
|
||||
#include <TApplication.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include "sls/ansi.h"
|
||||
#define SLS_DETECTOR_JSON_HEADER_VERSION 0x4
|
||||
|
||||
#define PI 3.14159265
|
||||
|
||||
#define FALSE 0
|
||||
#define OFFSET 0
|
||||
#define NBIN 500
|
||||
#define MIN_POS -500.5 // 400.5
|
||||
#define MAX_POS 3499.5 //-100.5
|
||||
|
||||
|
||||
#define NCH 524288
|
||||
// #define NCH 262144 in case of half_frames
|
||||
|
||||
char serverip[256];
|
||||
int portnum;
|
||||
FILE * sfilefd;
|
||||
|
||||
short* hchptr; // photon counted map "histogram"
|
||||
int value;
|
||||
float factor=1.84;
|
||||
int npacket=0;
|
||||
int totalnpacket=0;
|
||||
float vgamma;
|
||||
|
||||
struct sockaddr_in serveraddr;
|
||||
struct sockaddr_in clientaddr;
|
||||
struct in_addr inadr;
|
||||
struct hostent *server;
|
||||
|
||||
int i=0;
|
||||
int ipx=0;
|
||||
bool haveconnection;
|
||||
|
||||
|
||||
TStyle *gStyle;
|
||||
TApplication* rootapp;
|
||||
TCanvas *A2;
|
||||
TCanvas *A3;
|
||||
TCanvas *A4;
|
||||
TCanvas *A5;
|
||||
TCanvas *A6;
|
||||
|
||||
TH1I **hchip;
|
||||
TH2F **h4500chip;
|
||||
short image_data[NCH*2];
|
||||
short imaged[NCH*2];
|
||||
float fpeded[NCH*2];
|
||||
float fpedeG2d[NCH*2];
|
||||
float fpedeG1d[NCH*2];
|
||||
short ipeded[NCH*2];
|
||||
short pcimaged[NCH*2];
|
||||
|
||||
float fgaind[NCH*2];
|
||||
|
||||
|
||||
float adcpedecorr,adcpedecorrold;
|
||||
|
||||
bool gain_flag;
|
||||
bool bw_flag;
|
||||
bool fill2Ds;
|
||||
bool show2Ds;
|
||||
bool fill1Ds;
|
||||
bool pede_flag;
|
||||
bool dophotonmap;
|
||||
|
||||
int nx, ny;
|
||||
int nframes;
|
||||
int goout;
|
||||
int framesinstream;
|
||||
int ifp;
|
||||
float threshold;
|
||||
int phene;
|
||||
int adcvalue;
|
||||
int gain;
|
||||
int ichip;
|
||||
int frameIndex_old;
|
||||
|
||||
char pedefilename[128];
|
||||
int framenum,bunchid;
|
||||
|
||||
TH2F* his1000;
|
||||
TH2F* his2000;
|
||||
TH2F* his3000;
|
||||
TH2F* his4500;
|
||||
TH1I* hproj;
|
||||
TH1I* hchcum;
|
||||
|
||||
|
||||
using namespace std;
|
||||
void printhelp(void);
|
||||
void processifp(int ifp);
|
||||
void historeset(void);
|
||||
void SetRanges(void);
|
||||
void startsocket(void);
|
||||
void stopsocket(void);
|
||||
void axisreset(void);
|
||||
int kbhit(void);
|
||||
void myloop(void);
|
||||
void loadpede(void);
|
||||
void loadallpede(void);
|
||||
void loadgain(void);
|
||||
void nonblock(int state);
|
||||
void LoadPaletteFalse(void);
|
||||
void LoadPaletteBW(float);
|
||||
void Plot1DHistos(void);
|
||||
void Plot2DHistos(void);
|
||||
void savepede(void);
|
||||
void readpede(void);
|
||||
int findinterpoindex(int startindex);
|
||||
int findclumax(int startindex);
|
||||
void tryconnect(void) ;
|
||||
|
||||
#define NB_ENABLE 1
|
||||
#define NB_DISABLE 0
|
||||
char c;
|
||||
int HDraw_every;
|
||||
|
||||
|
||||
float oldh0xfirst,oldh0xlast;
|
||||
int idx;
|
||||
int GXPoffset,G1Poffset,G2Poffset;
|
||||
int ix,iy;
|
||||
int adcmin,adcmax;
|
||||
int pmmin,pmmax; //min/mnx for the photon map
|
||||
bool fixranges;
|
||||
|
||||
|
||||
sls::ZmqSocket *zmqSocket= NULL;
|
File diff suppressed because it is too large
Load Diff
@ -59,6 +59,7 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
|
||||
void ClonePlot();
|
||||
void SavePlot();
|
||||
void SetGapPixels(bool enable);
|
||||
void UpdatePlot();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
@ -67,7 +68,6 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
|
||||
void Zoom1DGainPlot(const QRectF &rect);
|
||||
void Zoom2DGainPlot(const QRectF &rect);
|
||||
void SetSaveFileName(QString val);
|
||||
void UpdatePlot();
|
||||
|
||||
signals:
|
||||
void AcquireFinishedSignal();
|
||||
|
@ -32,7 +32,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void SetNumFrames(int val);
|
||||
void SetNumTriggers(int val);
|
||||
void SetNumBursts(int val);
|
||||
void SetNumSamples(int val);
|
||||
void SetNumGates(int val);
|
||||
void SetExposureTime();
|
||||
void SetAcquisitionPeriod();
|
||||
@ -64,7 +63,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void GetNumFrames();
|
||||
void GetNumTriggers();
|
||||
void GetNumBursts();
|
||||
void GetNumSamples();
|
||||
void GetNumGates();
|
||||
void GetExposureTime();
|
||||
void GetAcquisitionPeriod();
|
||||
@ -96,7 +94,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
QString errPeriodTip;
|
||||
QPalette red;
|
||||
bool delayImplemented;
|
||||
bool sampleImplemented;
|
||||
bool gateImplemented;
|
||||
bool startingFnumImplemented;
|
||||
bool isAcquisitionStopped{false};
|
||||
|
@ -47,6 +47,7 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
||||
private:
|
||||
void SetupWidgetWindow();
|
||||
void Initialization();
|
||||
bool VerifyGapPixelsAllowed();
|
||||
void Select1DPlot(bool enable);
|
||||
void GetGapPixels();
|
||||
void GetStreamingFrequency();
|
||||
@ -60,7 +61,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
||||
|
||||
Detector *det;
|
||||
qDrawPlot *plot;
|
||||
bool is1d;
|
||||
bool is1d{false};
|
||||
bool isGapPixelsAllowed{false};
|
||||
|
||||
/** default plot and axis titles */
|
||||
static QString defaultPlotTitle;
|
||||
|
@ -52,6 +52,7 @@ void qDrawPlot::SetupWidgetWindow() {
|
||||
detType = det->getDetectorType().squash();
|
||||
switch (detType) {
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
pixelMask = ((1 << 14) - 1);
|
||||
gainMask = (3 << 14);
|
||||
gainOffset = 14;
|
||||
@ -1142,7 +1143,8 @@ void qDrawPlot::toDoublePixelData(double *dest, char *source, int size,
|
||||
break;
|
||||
|
||||
case 16:
|
||||
if (detType == slsDetectorDefs::JUNGFRAU ||
|
||||
if (detType == slsDetectorDefs::MOENCH ||
|
||||
detType == slsDetectorDefs::JUNGFRAU ||
|
||||
detType == slsDetectorDefs::GOTTHARD2) {
|
||||
|
||||
// show gain plot
|
||||
|
@ -48,6 +48,10 @@ void qTabAdvanced::SetupWidgetWindow() {
|
||||
lblDiscardBits->setEnabled(true);
|
||||
spinDiscardBits->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
lblNumStoragecells->setEnabled(true);
|
||||
spinNumStoragecells->setEnabled(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -40,13 +40,11 @@ void qTabDataOutput::SetupWidgetWindow() {
|
||||
comboClkDivider->setEnabled(true);
|
||||
chkParallel->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::MOENCH:
|
||||
chkTenGiga->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
chkParallel->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
lblClkDivider->setEnabled(true);
|
||||
comboClkDivider->setEnabled(true);
|
||||
break;
|
||||
@ -182,8 +180,10 @@ void qTabDataOutput::BrowseOutputDir() {
|
||||
LOG(logDEBUG) << "Browsing output directory";
|
||||
QString directory = QFileDialog::getExistingDirectory(
|
||||
this, tr("Choose Output Directory "), dispOutputDir->text());
|
||||
if (!directory.isEmpty())
|
||||
if (!directory.isEmpty()) {
|
||||
dispOutputDir->setText(directory);
|
||||
ForceSetOutputDir();
|
||||
}
|
||||
}
|
||||
|
||||
void qTabDataOutput::SetOutputDir(bool force) {
|
||||
|
@ -111,6 +111,7 @@ void qTabDeveloper::SetupWidgetWindow() {
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"v vb comp: ", getSLSIndex(detType, tempid++)));
|
||||
@ -139,72 +140,6 @@ void qTabDeveloper::SetupWidgetWindow() {
|
||||
"Temperature ADC: ", getSLSIndex(detType, tempid++)));
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MOENCH:
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vbp_colbuf: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vipre: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vin_cm: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vb_sda: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vcasc_sfp: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vout_cm: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vipre_cds: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"ibias_sfp: ", getSLSIndex(detType, tempid++)));
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vcassh: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vth2: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vrshaper: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vrshaper_n: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vipre_out: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vth3: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vth1: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vicin: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vcas: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vrpreamp: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vcal_p: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vipre: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vishaper: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vcal_n: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vtrim: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vdcsh: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vthreshold: ", getSLSIndex(detType, tempid++)));
|
||||
adcWidgets.push_back(new qDacWidget(
|
||||
this, det, false,
|
||||
"Temperature FPGA: ", getSLSIndex(detType, tempid++)));
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
@ -386,6 +321,7 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
switch (index) {
|
||||
case 0:
|
||||
return slsDetectorDefs::VB_COMP;
|
||||
@ -411,30 +347,6 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
|
||||
}
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MOENCH:
|
||||
switch (index) {
|
||||
case 0:
|
||||
return slsDetectorDefs::VBP_COLBUF;
|
||||
case 1:
|
||||
return slsDetectorDefs::VIPRE;
|
||||
case 2:
|
||||
return slsDetectorDefs::VIN_CM;
|
||||
case 3:
|
||||
return slsDetectorDefs::VB_SDA;
|
||||
case 4:
|
||||
return slsDetectorDefs::VCASC_SFP;
|
||||
case 5:
|
||||
return slsDetectorDefs::VOUT_CM;
|
||||
case 6:
|
||||
return slsDetectorDefs::VIPRE_CDS;
|
||||
case 7:
|
||||
return slsDetectorDefs::IBIAS_SFP;
|
||||
default:
|
||||
throw RuntimeError(std::string("Unknown dac/adc index") +
|
||||
std::to_string(index));
|
||||
}
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
switch (index) {
|
||||
case 0:
|
||||
|
@ -35,7 +35,6 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
// timer to update the progress bar
|
||||
progressTimer = new QTimer(this);
|
||||
|
||||
sampleImplemented = false;
|
||||
gateImplemented = false;
|
||||
delayImplemented = true;
|
||||
startingFnumImplemented = false;
|
||||
@ -47,18 +46,11 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
// default is triggers and delay (not #bursts and burst period for gotthard2
|
||||
// in auto mode)
|
||||
ShowTriggerDelay();
|
||||
// default is to show samples, mythen3, show gates
|
||||
ShowGates();
|
||||
|
||||
// enabling according to det type
|
||||
lblBurstMode->hide();
|
||||
comboBurstMode->hide();
|
||||
switch (det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::MOENCH:
|
||||
lblNumSamples->setEnabled(true);
|
||||
spinNumSamples->setEnabled(true);
|
||||
sampleImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
delayImplemented = false;
|
||||
lblNextFrameNumber->setEnabled(true);
|
||||
@ -66,6 +58,7 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
startingFnumImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
lblNextFrameNumber->setEnabled(true);
|
||||
spinNextFrameNumber->setEnabled(true);
|
||||
startingFnumImplemented = true;
|
||||
@ -112,10 +105,6 @@ void qTabMeasurement::Initialization() {
|
||||
connect(spinNumBursts, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumBursts(int)));
|
||||
}
|
||||
if (spinNumSamples->isEnabled()) {
|
||||
connect(spinNumSamples, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumSamples(int)));
|
||||
}
|
||||
if (gateImplemented) {
|
||||
connect(spinNumGates, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumGates(int)));
|
||||
@ -198,16 +187,6 @@ void qTabMeasurement::ShowTriggerDelay() {
|
||||
}
|
||||
}
|
||||
|
||||
void qTabMeasurement::ShowGates() {
|
||||
if (det->getDetectorType().squash() == slsDetectorDefs::MYTHEN3) {
|
||||
stackedLblSamplesGates->setCurrentWidget(pageLblGates);
|
||||
stackedSpinSamplesGates->setCurrentWidget(pageSpinGates);
|
||||
} else {
|
||||
stackedLblSamplesGates->setCurrentWidget(pageLblSamples);
|
||||
stackedSpinSamplesGates->setCurrentWidget(pageSpinSamples);
|
||||
}
|
||||
}
|
||||
|
||||
void qTabMeasurement::SetupTimingMode() {
|
||||
QStandardItemModel *model =
|
||||
qobject_cast<QStandardItemModel *>(comboTimingMode->model());
|
||||
@ -510,31 +489,6 @@ void qTabMeasurement::SetNumBursts(int val) {
|
||||
&qTabMeasurement::GetNumBursts)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetNumSamples() {
|
||||
LOG(logDEBUG) << "Getting number of samples";
|
||||
disconnect(spinNumSamples, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumSamples(int)));
|
||||
try {
|
||||
auto retval = det->getNumberOfAnalogSamples().tsquash(
|
||||
"Inconsistent number of analog samples for all detectors.");
|
||||
spinNumSamples->setValue(retval);
|
||||
}
|
||||
CATCH_DISPLAY("Could not get number of samples.",
|
||||
"qTabMeasurement::GetNumSamples")
|
||||
connect(spinNumSamples, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumSamples(int)));
|
||||
}
|
||||
|
||||
void qTabMeasurement::SetNumSamples(int val) {
|
||||
LOG(logINFO) << "Setting number of samples to " << val;
|
||||
try {
|
||||
det->setNumberOfAnalogSamples(val);
|
||||
}
|
||||
CATCH_HANDLE("Could not set number of samples.",
|
||||
"qTabMeasurement::SetNumSamples", this,
|
||||
&qTabMeasurement::GetNumSamples)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetNumGates() {
|
||||
LOG(logDEBUG) << "Getting number of gates";
|
||||
disconnect(spinNumGates, SIGNAL(valueChanged(int)), this,
|
||||
@ -1003,9 +957,6 @@ void qTabMeasurement::Refresh() {
|
||||
if (spinBurstPeriod->isEnabled()) {
|
||||
GetBurstPeriod();
|
||||
}
|
||||
if (sampleImplemented) {
|
||||
GetNumSamples();
|
||||
}
|
||||
if (gateImplemented) {
|
||||
GetNumGates();
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ QString qTabPlot::defaultImageYAxisTitle("Pixel");
|
||||
QString qTabPlot::defaultImageZAxisTitle("Intensity");
|
||||
|
||||
qTabPlot::qTabPlot(QWidget *parent, Detector *detector, qDrawPlot *p)
|
||||
: QWidget(parent), det(detector), plot(p), is1d(false) {
|
||||
: QWidget(parent), det(detector), plot(p) {
|
||||
setupUi(this);
|
||||
SetupWidgetWindow();
|
||||
LOG(logDEBUG) << "Plot ready";
|
||||
@ -57,11 +57,12 @@ void qTabPlot::SetupWidgetWindow() {
|
||||
chkGainPlot1D->setChecked(true);
|
||||
plot->EnableGainPlot(true);
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
chkGapPixels->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
chkGapPixels->setEnabled(true);
|
||||
chkGainPlot->setEnabled(true);
|
||||
chkGainPlot->setChecked(true);
|
||||
plot->EnableGainPlot(true);
|
||||
break;
|
||||
case slsDetectorDefs::MOENCH:
|
||||
chkGainPlot->setEnabled(true);
|
||||
chkGainPlot->setChecked(true);
|
||||
plot->EnableGainPlot(true);
|
||||
@ -69,6 +70,8 @@ void qTabPlot::SetupWidgetWindow() {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
isGapPixelsAllowed = VerifyGapPixelsAllowed();
|
||||
chkGapPixels->setEnabled(isGapPixelsAllowed);
|
||||
|
||||
Select1DPlot(is1d);
|
||||
Initialization();
|
||||
@ -195,6 +198,29 @@ void qTabPlot::Initialization() {
|
||||
connect(dispZMax, SIGNAL(editingFinished()), this, SLOT(isZMaxModified()));
|
||||
}
|
||||
|
||||
bool qTabPlot::VerifyGapPixelsAllowed() {
|
||||
try {
|
||||
switch (det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
return true;
|
||||
case slsDetectorDefs::EIGER:
|
||||
if (det->getQuad().squash(false)) {
|
||||
return true;
|
||||
}
|
||||
// full modules
|
||||
if (det->getModuleGeometry().y % 2 == 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
CATCH_DISPLAY("Could not verify if gap pixels allowed.",
|
||||
"qTabPlot::VerifyGapPixelsAllowed")
|
||||
return false;
|
||||
}
|
||||
|
||||
void qTabPlot::Select1DPlot(bool enable) {
|
||||
LOG(logDEBUG) << "Selecting " << (enable ? "1" : "2") << "D Plot";
|
||||
is1d = enable;
|
||||
@ -487,6 +513,7 @@ void qTabPlot::SetXYRange() {
|
||||
}
|
||||
|
||||
plot->SetXYRangeChanged(disablezoom, xyRange, isRange);
|
||||
plot->UpdatePlot();
|
||||
emit DisableZoomSignal(disablezoom);
|
||||
}
|
||||
|
||||
@ -624,6 +651,7 @@ void qTabPlot::SetZRange() {
|
||||
zRange[1] = val;
|
||||
}
|
||||
plot->SetZRange(zRange, isZRange);
|
||||
plot->UpdatePlot();
|
||||
}
|
||||
|
||||
void qTabPlot::GetStreamingFrequency() {
|
||||
@ -770,23 +798,26 @@ void qTabPlot::Refresh() {
|
||||
boxFrequency->setEnabled(true);
|
||||
GetStreamingFrequency();
|
||||
GetHwm();
|
||||
// gain plot, gap pixels enable
|
||||
// gain plot
|
||||
switch (det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::EIGER:
|
||||
chkGapPixels->setEnabled(true);
|
||||
GetGapPixels();
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
chkGainPlot->setEnabled(true);
|
||||
chkGapPixels->setEnabled(true);
|
||||
GetGapPixels();
|
||||
break;
|
||||
case slsDetectorDefs::MOENCH:
|
||||
chkGainPlot->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
chkGainPlot1D->setEnabled(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// gap pixels
|
||||
if (isGapPixelsAllowed) {
|
||||
chkGapPixels->setEnabled(true);
|
||||
GetGapPixels();
|
||||
}
|
||||
} else {
|
||||
boxFrequency->setEnabled(false);
|
||||
chkGainPlot->setEnabled(false);
|
||||
|
@ -92,7 +92,8 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
comboDynamicRange->setEnabled(true);
|
||||
lblThreshold->setEnabled(true);
|
||||
spinThreshold->setEnabled(true);
|
||||
} else if (detType == slsDetectorDefs::JUNGFRAU) {
|
||||
} else if (detType == slsDetectorDefs::JUNGFRAU ||
|
||||
detType == slsDetectorDefs::MOENCH) {
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
lblGainMode->setEnabled(true);
|
||||
@ -100,9 +101,6 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
} else if (detType == slsDetectorDefs::GOTTHARD) {
|
||||
comboHV->show();
|
||||
lblComboHV->show();
|
||||
} else if (detType == slsDetectorDefs::MOENCH) {
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
} else if (detType == slsDetectorDefs::GOTTHARD2) {
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
# empty branch = developer branch in updateAPIVersion.sh
|
||||
branch=""
|
||||
det_list=("ctbDetectorServer"
|
||||
"gotthardDetectorServer"
|
||||
"gotthard2DetectorServer"
|
||||
"jungfrauDetectorServer"
|
||||
"mythen3DetectorServer"
|
||||
"moenchDetectorServer"
|
||||
det_list=("ctbDetectorServer
|
||||
gotthardDetectorServer
|
||||
gotthard2DetectorServer
|
||||
jungfrauDetectorServer
|
||||
mythen3DetectorServer
|
||||
moenchDetectorServer"
|
||||
)
|
||||
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
|
||||
|
||||
@ -25,9 +25,11 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
||||
else
|
||||
# only one server
|
||||
# arg not in list
|
||||
if [[ $det_list != *$1* ]]; then
|
||||
echo $det_list | grep -w -q $1
|
||||
#if [[ $det_list != *$1* ]]; then
|
||||
if ! [[ $? ]] ; then
|
||||
echo -e "Invalid argument 1: $1. $usage"
|
||||
return -1
|
||||
return 1
|
||||
fi
|
||||
declare -a det=("${1}")
|
||||
#echo "Compiling only $1"
|
||||
@ -37,14 +39,14 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
||||
# arg in list
|
||||
if [[ $det_list == *$2* ]]; then
|
||||
echo -e "Invalid argument 2: $2. $usage"
|
||||
return -1
|
||||
return 1
|
||||
fi
|
||||
branch+=$2
|
||||
#echo "with branch $branch"
|
||||
fi
|
||||
else
|
||||
echo -e "Too many arguments.$usage"
|
||||
return -1
|
||||
return 1
|
||||
fi
|
||||
|
||||
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")
|
||||
|
Binary file not shown.
@ -99,7 +99,7 @@ void basictests() {
|
||||
#endif
|
||||
if (mapCSP0() == FAIL) {
|
||||
strcpy(initErrorMessage,
|
||||
"Could not map to memory. Dangerous to continue.\n");
|
||||
"Could not map to memory. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -109,8 +109,10 @@ void basictests() {
|
||||
if ((!debugflag) && (!updateFlag) &&
|
||||
((checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
|
||||
"Dangerous to continue.\n");
|
||||
sprintf(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
|
||||
"Check Firmware. (Firmware version:0x%llx) \n",
|
||||
getFirmwareVersion());
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
@ -446,7 +448,7 @@ void initStopServer() {
|
||||
if (mapCSP0() == FAIL) {
|
||||
initError = FAIL;
|
||||
strcpy(initErrorMessage,
|
||||
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
|
||||
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#define MIN_REQRD_VRSN_T_RD_API 0x181130
|
||||
#define REQRD_FRMWR_VRSN 0x220825
|
||||
#define REQRD_FRMWR_VRSN 0x221205
|
||||
|
||||
#define NUM_HARDWARE_VERSIONS (1)
|
||||
#define HARDWARE_VERSION_NUMBERS \
|
||||
|
@ -1106,7 +1106,9 @@ int Beb_SetDetectorPosition(int pos[]) {
|
||||
int posRight[2] = {Beb_top ? pos[X] + 1 : pos[X], pos[Y]};
|
||||
|
||||
if (Beb_quadEnable) {
|
||||
posRight[Y] = 1; // right is next row
|
||||
posLeft[Y] = 1; // left is next row
|
||||
posLeft[X] = 0; // left same first row
|
||||
posRight[Y] = 0; // right same first row
|
||||
posRight[X] = 0; // right same first column
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ target_include_directories(eigerDetectorServer_virtual
|
||||
)
|
||||
|
||||
target_compile_definitions(eigerDetectorServer_virtual
|
||||
PUBLIC EIGERD PCCOMPILE STOP_SERVER
|
||||
PUBLIC EIGERD PCCOMPILE STOP_SERVER #TEST_MOD_GEOMETRY
|
||||
PUBLIC VIRTUAL #VIRTUAL_9M
|
||||
)
|
||||
|
||||
|
@ -1240,19 +1240,16 @@ int Feb_Control_GetDynamicRange(int *retval) {
|
||||
|
||||
int Feb_Control_Disable16bitConversion(int disable) {
|
||||
LOG(logINFO, ("%s 16 bit expansion\n", disable ? "Disabling" : "Enabling"));
|
||||
|
||||
uint32_t bitmask = DAQ_REG_HRDWRE_DSBL_16BIT_MSK;
|
||||
unsigned int regval = 0;
|
||||
if (!Feb_Control_ReadRegister(DAQ_REG_HRDWRE, ®val)) {
|
||||
LOG(logERROR, ("Could not %s 16 bit expansion (bit mode)\n",
|
||||
(disable ? "disable" : "enable")));
|
||||
return 0;
|
||||
}
|
||||
if (disable) {
|
||||
regval |= DAQ_REG_HRDWRE_DSBL_16BIT_MSK;
|
||||
regval |= bitmask;
|
||||
} else {
|
||||
regval &= ~DAQ_REG_HRDWRE_DSBL_16BIT_MSK;
|
||||
regval &= ~bitmask;
|
||||
}
|
||||
|
||||
if (!Feb_Control_WriteRegister(DAQ_REG_HRDWRE, regval)) {
|
||||
if (!Feb_Control_WriteRegister_BitMask(DAQ_REG_HRDWRE, regval, bitmask)) {
|
||||
LOG(logERROR, ("Could not %s 16 bit expansion (bit mode)\n",
|
||||
(disable ? "disable" : "enable")));
|
||||
return 0;
|
||||
@ -1262,11 +1259,12 @@ int Feb_Control_Disable16bitConversion(int disable) {
|
||||
|
||||
int Feb_Control_Get16bitConversionDisabled(int *ret) {
|
||||
unsigned int regval = 0;
|
||||
if (!Feb_Control_ReadRegister(DAQ_REG_HRDWRE, ®val)) {
|
||||
if (!Feb_Control_ReadRegister_BitMask(DAQ_REG_HRDWRE, ®val,
|
||||
DAQ_REG_HRDWRE_DSBL_16BIT_MSK)) {
|
||||
LOG(logERROR, ("Could not get 16 bit expansion (bit mode)\n"));
|
||||
return 0;
|
||||
}
|
||||
if (regval & DAQ_REG_HRDWRE_DSBL_16BIT_MSK) {
|
||||
if (regval) {
|
||||
*ret = 1;
|
||||
} else {
|
||||
*ret = 0;
|
||||
@ -1667,6 +1665,15 @@ int Feb_Control_GetReadNRows() {
|
||||
}
|
||||
|
||||
int Feb_Control_WriteRegister(uint32_t offset, uint32_t data) {
|
||||
return Feb_Control_WriteRegister_BitMask(offset, data, BIT32_MSK);
|
||||
}
|
||||
|
||||
int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval) {
|
||||
return Feb_Control_ReadRegister_BitMask(offset, retval, BIT32_MASK);
|
||||
}
|
||||
|
||||
int Feb_Control_WriteRegister_BitMask(uint32_t offset, uint32_t data,
|
||||
uint32_t bitmask) {
|
||||
uint32_t actualOffset = offset;
|
||||
char side[2][10] = {"right", "left"};
|
||||
unsigned int addr[2] = {Feb_Control_rightAddress, Feb_Control_leftAddress};
|
||||
@ -1690,24 +1697,41 @@ int Feb_Control_WriteRegister(uint32_t offset, uint32_t data) {
|
||||
|
||||
for (int iloop = 0; iloop < 2; ++iloop) {
|
||||
if (run[iloop]) {
|
||||
LOG(logDEBUG1,
|
||||
("Writing 0x%x to %s 0x%x\n", data, side[iloop], actualOffset));
|
||||
if (!Feb_Interface_WriteRegister(addr[iloop], actualOffset, data, 0,
|
||||
0)) {
|
||||
LOG(logERROR, ("Could not write 0x%x to %s addr 0x%x\n", data,
|
||||
LOG(logDEBUG1, ("Writing 0x%x to %s 0x%x (mask:0x%x)\n", data,
|
||||
side[iloop], actualOffset, bitmask));
|
||||
|
||||
uint32_t writeVal = 0;
|
||||
if (!Feb_Interface_ReadRegister(addr[iloop], actualOffset,
|
||||
&writeVal)) {
|
||||
LOG(logERROR, ("Could not read %s addr 0x%x register\n",
|
||||
side[iloop], actualOffset));
|
||||
return 0;
|
||||
}
|
||||
uint32_t regVal = 0;
|
||||
if (!Feb_Interface_ReadRegister(addr[iloop], actualOffset,
|
||||
®Val)) {
|
||||
LOG(logERROR, ("Could not read %s register\n", addr[iloop]));
|
||||
// set only the bits in the mask
|
||||
writeVal &= ~(bitmask);
|
||||
writeVal |= (data & bitmask);
|
||||
|
||||
LOG(logDEBUG1, ("writing 0x%x to 0x%x\n", writeVal, actualOffset));
|
||||
if (!Feb_Interface_WriteRegister(addr[iloop], actualOffset,
|
||||
writeVal, 0, 0)) {
|
||||
LOG(logERROR, ("Could not write 0x%x to %s addr 0x%x\n",
|
||||
writeVal, side[iloop], actualOffset));
|
||||
return 0;
|
||||
}
|
||||
if (regVal != data) {
|
||||
writeVal &= bitmask;
|
||||
|
||||
uint32_t readVal = 0;
|
||||
if (!Feb_Interface_ReadRegister(addr[iloop], actualOffset,
|
||||
&readVal)) {
|
||||
return 0;
|
||||
}
|
||||
readVal &= bitmask;
|
||||
|
||||
if (writeVal != readVal) {
|
||||
LOG(logERROR,
|
||||
("Could not write %s register. Write 0x%x, read 0x%x\n",
|
||||
addr[iloop], data, regVal));
|
||||
("Could not write %s addr 0x%x register. Wrote "
|
||||
"0x%x, read 0x%x (mask:0x%x)\n",
|
||||
side[iloop], actualOffset, writeVal, readVal, bitmask));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -1716,7 +1740,9 @@ int Feb_Control_WriteRegister(uint32_t offset, uint32_t data) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval) {
|
||||
int Feb_Control_ReadRegister_BitMask(uint32_t offset, uint32_t *retval,
|
||||
uint32_t bitmask) {
|
||||
|
||||
uint32_t actualOffset = offset;
|
||||
char side[2][10] = {"right", "left"};
|
||||
unsigned int addr[2] = {Feb_Control_rightAddress, Feb_Control_leftAddress};
|
||||
@ -1746,8 +1772,9 @@ int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval) {
|
||||
side[iloop], actualOffset));
|
||||
return 0;
|
||||
}
|
||||
LOG(logDEBUG1, ("Read 0x%x from %s 0x%x\n", value[iloop],
|
||||
side[iloop], actualOffset));
|
||||
value[iloop] &= bitmask;
|
||||
LOG(logDEBUG1, ("Read 0x%x from %s 0x%x (mask:0x%x)\n",
|
||||
value[iloop], side[iloop], actualOffset, bitmask));
|
||||
*retval = value[iloop];
|
||||
// if not the other (left, not right OR right, not left), return the
|
||||
// value
|
||||
@ -1758,7 +1785,7 @@ int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval) {
|
||||
}
|
||||
// Inconsistent values when reading both registers
|
||||
if ((run[0] & run[1]) & (value[0] != value[1])) {
|
||||
LOG(logERROR, ("Inconsistent values read from %s 0x%x and %s 0x%x\n",
|
||||
LOG(logERROR, ("Inconsistent values read from %s: 0x%x and %s: 0x%x\n",
|
||||
side[0], value[0], side[1], value[1]));
|
||||
return 0;
|
||||
}
|
||||
@ -2180,6 +2207,51 @@ int Feb_Control_GetRightFPGATemp() {
|
||||
return (int)temperature;
|
||||
}
|
||||
|
||||
int Feb_Control_GetFPGAHardwareVersion(int *retval) {
|
||||
if (!Feb_Control_activated) {
|
||||
return 0;
|
||||
}
|
||||
unsigned int value = 0;
|
||||
if (!Feb_Control_ReadRegister_BitMask(FEB_REG_STATUS, &value,
|
||||
FEB_REG_STATUS_FX30_MSK)) {
|
||||
LOG(logERROR,
|
||||
("Trouble reading FEB_REG_STATUS reg to feb hardware version\n"));
|
||||
return 0;
|
||||
}
|
||||
*retval = (value >> FEB_REG_STATUS_FX30_OFST);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int64_t Feb_Control_GetFrontLeftFirmwareVersion() {
|
||||
if (!Feb_Control_activated) {
|
||||
return 0;
|
||||
}
|
||||
unsigned int value = 0;
|
||||
if (!Feb_Interface_ReadRegister(Feb_Control_leftAddress, FEB_REG_STATUS,
|
||||
&value)) {
|
||||
LOG(logERROR, ("Trouble reading FEB_REG_STATUS reg to get left feb "
|
||||
"fw version\n"));
|
||||
return 0;
|
||||
}
|
||||
return ((value & FEB_REG_STATUS_FW_VERSION_MSK) >>
|
||||
FEB_REG_STATUS_FW_VERSION_OFST);
|
||||
}
|
||||
|
||||
int64_t Feb_Control_GetFrontRightFirmwareVersion() {
|
||||
if (!Feb_Control_activated) {
|
||||
return 0;
|
||||
}
|
||||
unsigned int value = 0;
|
||||
if (!Feb_Interface_ReadRegister(Feb_Control_rightAddress, FEB_REG_STATUS,
|
||||
&value)) {
|
||||
LOG(logERROR, ("Trouble reading FEB_REG_STATUS reg to get right feb "
|
||||
"fw version\n"));
|
||||
return 0;
|
||||
}
|
||||
return ((value & FEB_REG_STATUS_FW_VERSION_MSK) >>
|
||||
FEB_REG_STATUS_FW_VERSION_OFST);
|
||||
}
|
||||
|
||||
int64_t Feb_Control_GetMeasuredPeriod() {
|
||||
if (!Feb_Control_activated) {
|
||||
return 0;
|
||||
|
@ -95,7 +95,10 @@ int Feb_Control_SetReadNRows(int value);
|
||||
int Feb_Control_GetReadNRows();
|
||||
int Feb_Control_WriteRegister(uint32_t offset, uint32_t data);
|
||||
int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval);
|
||||
|
||||
int Feb_Control_WriteRegister_BitMask(uint32_t offset, uint32_t data,
|
||||
uint32_t bitmask);
|
||||
int Feb_Control_ReadRegister_BitMask(uint32_t offset, uint32_t *retval,
|
||||
uint32_t bitmask);
|
||||
// pulsing
|
||||
int Feb_Control_Pulse_Pixel(int npulses, int x, int y);
|
||||
int Feb_Control_PulsePixelNMove(int npulses, int inc_x_pos, int inc_y_pos);
|
||||
@ -116,5 +119,7 @@ int Feb_Control_PrintCorrectedValues();
|
||||
// adcs
|
||||
int Feb_Control_GetLeftFPGATemp();
|
||||
int Feb_Control_GetRightFPGATemp();
|
||||
int64_t Feb_Control_GetFrontLeftFirmwareVersion();
|
||||
int64_t Feb_Control_GetFrontRightFirmwareVersion();
|
||||
int64_t Feb_Control_GetMeasuredPeriod();
|
||||
int64_t Feb_Control_GetSubMeasuredPeriod();
|
||||
|
@ -46,6 +46,10 @@
|
||||
#define FEB_REG_STATUS_WAIT_FOR_TRGGR_MSK (0x00000001 << FEB_REG_STATUS_WAIT_FOR_TRGGR_OFST)
|
||||
#define FEB_REG_STATUS_ACQ_DONE_OFST (6)
|
||||
#define FEB_REG_STATUS_ACQ_DONE_MSK (0x00000001 << FEB_REG_STATUS_ACQ_DONE_OFST)
|
||||
#define FEB_REG_STATUS_FX30_OFST (7)
|
||||
#define FEB_REG_STATUS_FX30_MSK (0x00000001 << FEB_REG_STATUS_FX30_OFST)
|
||||
#define FEB_REG_STATUS_FW_VERSION_OFST (8)
|
||||
#define FEB_REG_STATUS_FW_VERSION_MSK (0x000000FF << FEB_REG_STATUS_FW_VERSION_OFST)
|
||||
#define FEB_REG_STATUS_TEMP_OFST (16)
|
||||
#define FEB_REG_STATUS_TEMP_MSK (0x0000FFFF << FEB_REG_STATUS_TEMP_OFST)
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user