mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 13:57:13 +02:00
Compare commits
357 Commits
2020.11.02
...
2021.01.20
Author | SHA1 | Date | |
---|---|---|---|
7aeb394514 | |||
f9f50f1d84 | |||
a62e068a9a | |||
85bc37f04d | |||
a3f5315015 | |||
d63a182996 | |||
f147c7bfcb | |||
4218fe5f2f | |||
511f5a7ca5 | |||
a5ab5c1fa0 | |||
8b7023d9a3 | |||
c8c7bca6e0 | |||
8ddc407e62 | |||
7a2827f693 | |||
f4be0b8efa | |||
a6e23b0509 | |||
64de9f3ad0 | |||
390a842b97 | |||
040cc9c14f | |||
0a1c4992e2 | |||
59b56c764f | |||
ff7afd0de7 | |||
835e62425f | |||
c8cdbfc488 | |||
2f75143245 | |||
6f7c31b747 | |||
75c2d987c4 | |||
726f5eba29 | |||
4404ee717a | |||
54530ab103 | |||
6126780660 | |||
9b7f9b1be1 | |||
26c829d766 | |||
3fde5c5b55 | |||
3e5f546ebe | |||
9833a7d330 | |||
8f9155e578 | |||
9df1eac3c1 | |||
5ededf9be4 | |||
3e8774798a | |||
9048e7f6c4 | |||
1ce56764fa | |||
8c091eece2 | |||
d69e238e67 | |||
95fe1720c0 | |||
69f558c072 | |||
e382df21b9 | |||
8e773c97dd | |||
c043e74c07 | |||
d4518b2ca3 | |||
fd3108a61b | |||
e8fedfa55f | |||
0eb204bfd3 | |||
d9b2a90651 | |||
8ca1d9c50c | |||
baff0518bb | |||
2e669c585b | |||
ca0bc3e0f3 | |||
08ea179519 | |||
557cab9c50 | |||
8e6dfe9b0f | |||
6901368fd6 | |||
3f1dbb7d67 | |||
a12dd153ef | |||
f6126abe31 | |||
8bf9f974a3 | |||
e63fa1d7c2 | |||
1e8dacf9b8 | |||
58fb5321f0 | |||
9e8c8f4bbc | |||
faf885d2e0 | |||
c120c70678 | |||
d5dcc8e138 | |||
90a9cea670 | |||
2eea1882d2 | |||
c6eefac0eb | |||
46e0c0abed | |||
a5f0f6eb34 | |||
62c86f56b1 | |||
77080a524a | |||
3dce1e46f9 | |||
08ecc1e52d | |||
8c1974b34e | |||
d89d349247 | |||
910961cf41 | |||
595b7aa5e8 | |||
f72ad4326f | |||
2306e44ae3 | |||
10fa57ebb9 | |||
0ca9115cb8 | |||
06dbf82e93 | |||
8565ac6cf2 | |||
a26f22a052 | |||
30f9d53520 | |||
7b81532f54 | |||
dcf0b58a6d | |||
e39ea64560 | |||
77dacdf40d | |||
5397a9a78b | |||
3fbafb3c1d | |||
e3721e89e0 | |||
ec75728941 | |||
9b6a10d7ce | |||
57904446f0 | |||
3d48501d30 | |||
d364e5e2ec | |||
aacd7c4bec | |||
abfc0dc266 | |||
85a6d82d9f | |||
56be47669f | |||
b96b1849cd | |||
902919f2df | |||
1efdc90719 | |||
e852158b83 | |||
f48eff49e9 | |||
f7ecabdb51 | |||
cbf61ed05e | |||
8be579ea53 | |||
7fcac35549 | |||
6563965787 | |||
73d582744e | |||
fa8fdced5f | |||
5142603103 | |||
2fa3ebd8e6 | |||
a534271aff | |||
d2eed6177c | |||
ddf43dbd24 | |||
bfe8cb7020 | |||
40f6eb8ede | |||
5c71dd7246 | |||
146d605d19 | |||
918f3f3fde | |||
a36a294515 | |||
f19bc8880a | |||
0cb7d62ad5 | |||
5ee95cf811 | |||
980d76a15a | |||
4385df18b7 | |||
121450b8cc | |||
e7ecb38b29 | |||
59e12bbed8 | |||
bd76a66770 | |||
f592b98beb | |||
a6d696a0f8 | |||
4c4e2ccb6b | |||
b6b9a5d598 | |||
eb221e083d | |||
8d9382c25b | |||
5017818fb4 | |||
2020407438 | |||
121a3ad733 | |||
f6fff9d916 | |||
707601832f | |||
5687bdd6a2 | |||
e7a1960741 | |||
64be2e0297 | |||
66df5fe8ee | |||
876207c8cd | |||
ec21624aeb | |||
1de5b85ce2 | |||
b4e4033736 | |||
820bc01505 | |||
4e54d1c318 | |||
dec4183e0f | |||
feed09f2f4 | |||
c6aa8d6072 | |||
4ec38a071c | |||
0c4b721e13 | |||
fae884e658 | |||
f20f084991 | |||
20ce79872f | |||
328375924f | |||
a1d91e590e | |||
679db120b0 | |||
7a6797b23e | |||
93f8e8ecb3 | |||
d112956f79 | |||
9649982932 | |||
eca2836703 | |||
d14c9600bb | |||
42971c94b7 | |||
b0fd4f4c44 | |||
06473cfcb2 | |||
6f2aad3836 | |||
38aad40fef | |||
51c5520472 | |||
75838f77b3 | |||
54bedeaa0a | |||
b33b2edbd0 | |||
f7cb2b5dcd | |||
9ea3cbc8f1 | |||
53bb677f8c | |||
663999a539 | |||
98b45b32fd | |||
74c08cd742 | |||
696073b505 | |||
e4645a8273 | |||
c0cd25460d | |||
e7e30693f0 | |||
dd96aac3cd | |||
5697393a70 | |||
052dd8058f | |||
4d99ce8c52 | |||
633c646239 | |||
2a88bc6a1e | |||
d8af2e594a | |||
8da7c3e805 | |||
ddfbea76be | |||
c5f2275703 | |||
8c491f18fd | |||
e07e2f2da0 | |||
d981e1b8e5 | |||
58e6338f9c | |||
27f3af5365 | |||
350b4f0368 | |||
445f3c66fd | |||
1189b991e5 | |||
3e2b471ee1 | |||
8c76d5d52c | |||
e7eee67fed | |||
fade48dcfa | |||
8e58e7f8bf | |||
c8f56ee23c | |||
32d951e28a | |||
5c63c8fc8f | |||
7b70274d4f | |||
1cd905c08b | |||
13e809acd4 | |||
46533b0411 | |||
4f4de15d3a | |||
4f99aeabd2 | |||
f36a12e454 | |||
5e246c0754 | |||
518c6783cc | |||
0706564694 | |||
2108bbda66 | |||
82feed1ab8 | |||
4be0b5d436 | |||
f7eb256eb6 | |||
250fc26308 | |||
06a50520c1 | |||
fc766055d4 | |||
828b1479c7 | |||
22ed52605c | |||
a1a95ebb20 | |||
d7ce5fedfd | |||
3a2682ffe7 | |||
bf74a4135e | |||
252ecf2769 | |||
de01ab75e9 | |||
5698da5f95 | |||
7300d73675 | |||
d4b467a641 | |||
7b71076180 | |||
9197d2b209 | |||
e094e41d89 | |||
512e1a3136 | |||
6d04c14bd6 | |||
64183d8d6a | |||
287efde54a | |||
faa25b9e9f | |||
1b92b01a46 | |||
4849063b6c | |||
5cd020ae81 | |||
160fabe02c | |||
90dd8e70e5 | |||
08e121c71f | |||
cb3b337a99 | |||
5d9a952316 | |||
8cc05c5848 | |||
d69d69e892 | |||
07a120fc4a | |||
11e8796847 | |||
f79b009978 | |||
3259bfb008 | |||
934bc5b9db | |||
6d11faed87 | |||
35fc52dae7 | |||
e599bfe56f | |||
764becc271 | |||
7462d1002d | |||
834794ad98 | |||
56c504abbb | |||
4d6346e678 | |||
dc7e448759 | |||
e658cbacda | |||
1e6c6dea71 | |||
0e5d4d1d8e | |||
a2986784d3 | |||
975cbb576e | |||
e48a92d9cd | |||
befdcf7f36 | |||
02f5c472a8 | |||
75ed2cd2e4 | |||
3be045f9b6 | |||
8fae982802 | |||
128ec88b5f | |||
d5fc158330 | |||
864e6e4c81 | |||
343d96ff16 | |||
4142328437 | |||
6c797988c7 | |||
215c262981 | |||
081b809078 | |||
9263567cd8 | |||
58e90a85be | |||
025c836e25 | |||
5d5abae3f4 | |||
e2ad46386e | |||
308d44e452 | |||
69da61b1fb | |||
460168ce04 | |||
4e429c0d77 | |||
bf4fab549d | |||
f7705eb1da | |||
a2217e2066 | |||
aaa02706fc | |||
6a80bc5b54 | |||
b9275646ad | |||
9e2f2697c7 | |||
b6b0df62b6 | |||
0ba537e479 | |||
75ddf535dc | |||
b1de501bef | |||
0f3a63f101 | |||
3b4b2d707f | |||
f405aa1733 | |||
df0fdb7ecb | |||
91b7a87557 | |||
9468b9ca1e | |||
d7982e178e | |||
9cf5714a5b | |||
0c9ac8911a | |||
4730c8c0a9 | |||
43efb8acfd | |||
6ecca8fcb0 | |||
17cb63a57f | |||
4f83fcb001 | |||
ab94af6d29 | |||
7c725cc69b | |||
f0198d2d2e | |||
5ddccbdee4 | |||
8fb39b8c7e | |||
bd5293f4b1 | |||
b91180f5b2 | |||
7c3b5065a5 | |||
9aef802bea | |||
f7d85231f2 | |||
5b3a911e8d | |||
65f5e1c1ab | |||
839896c7e6 | |||
4a7e246604 | |||
7f293115c4 | |||
f59f40a659 | |||
64fd82f92c | |||
cd232fd732 | |||
172fa66b1f |
@ -31,7 +31,7 @@ script:
|
||||
|
||||
deploy:
|
||||
provider: script
|
||||
script: find $HOME/miniconda/envs/testenv/conda-bld/${TRAVIS_OS_NAME}-64 -name "*.tar.bz2" -exec anaconda -t $CONDA_TOKEN upload --force {} \;
|
||||
script: find $HOME/miniconda/envs/testenv/conda-bld/${TRAVIS_OS_NAME}-64 -name "*.tar.bz2" -exec anaconda -v --show-traceback -t $CONDA_TOKEN upload --force {} \;
|
||||
on:
|
||||
branch: developer
|
||||
tags: true
|
||||
|
@ -61,20 +61,9 @@ find_package(ClangFormat)
|
||||
|
||||
#Enable LTO if available
|
||||
check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
|
||||
message(STATUS "SLS_LTO_AVAILABLE:" ${SLS_LTO_AVAILABLE})
|
||||
|
||||
|
||||
# # Use ld.gold if it is available and isn't disabled explicitly
|
||||
# option(SLS_USE_LD_GOLD "Use GNU gold linker" ON)
|
||||
# if (SLS_USE_LD_GOLD)
|
||||
# execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
||||
# if ("${LD_VERSION}" MATCHES "GNU gold")
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
# set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
# else ()
|
||||
# message(WARNING "GNU gold linker isn't available, using the default system linker.")
|
||||
# endif ()
|
||||
# endif ()
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
@ -186,20 +175,12 @@ if (SLS_USE_TEXTCLIENT)
|
||||
add_subdirectory(slsDetectorSoftware)
|
||||
endif (SLS_USE_TEXTCLIENT)
|
||||
|
||||
|
||||
if (SLS_USE_RECEIVER)
|
||||
if (SLS_USE_HDF5)
|
||||
find_package(HDF5 1.10 COMPONENTS CXX REQUIRED)
|
||||
endif (SLS_USE_HDF5)
|
||||
add_subdirectory(slsReceiverSoftware)
|
||||
endif (SLS_USE_RECEIVER)
|
||||
|
||||
if (SLS_USE_GUI)
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(Qwt 6.1 REQUIRED)
|
||||
if (QT4_FOUND AND QWT_FOUND)
|
||||
add_subdirectory(slsDetectorGui)
|
||||
endif()
|
||||
endif (SLS_USE_GUI)
|
||||
|
||||
if (SLS_USE_SIMULATOR)
|
||||
@ -211,7 +192,7 @@ if (SLS_USE_INTEGRATION_TESTS)
|
||||
endif (SLS_USE_INTEGRATION_TESTS)
|
||||
|
||||
if (SLS_USE_PYTHON)
|
||||
set(PYBIND11_CPP_STANDARD -std=c++11)
|
||||
find_package (Python 3.6 COMPONENTS Interpreter Development)
|
||||
add_subdirectory(libs/pybind11)
|
||||
add_subdirectory(python)
|
||||
endif(SLS_USE_PYTHON)
|
||||
|
37
README.md
37
README.md
@ -4,7 +4,7 @@ Please do not update to any xxxx.xx.xx.dev0 tags. They are not releases, but tag
|
||||
Use only releases with tags such as x.x.x or x.x.x-rcx.
|
||||
|
||||
### Documentation
|
||||
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support)
|
||||
Detailed documentation on the latest release of 5.0.0 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).
|
||||
|
||||
### Binaries
|
||||
Binaries for the slsDetectorPackage are available through conda.
|
||||
@ -12,6 +12,7 @@ Binaries for the slsDetectorPackage are available through conda.
|
||||
#Add conda channels
|
||||
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)
|
||||
@ -29,10 +30,8 @@ git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
|
||||
```
|
||||
#### Dependencies
|
||||
* Lib: c++11 compiler (gcc=>4.8), ZeroMQ 4
|
||||
* Gui: Qt 4.8 and Qwt 6.0
|
||||
* Calibration wizards and ctbGUI: ROOT
|
||||
* Optional: HDF5
|
||||
|
||||
Refer [this page](https://slsdetectorgroup.github.io/devdoc/dependencies.html) for dependencies.
|
||||
|
||||
|
||||
#### Compilation
|
||||
@ -42,15 +41,19 @@ cmk.sh or directly with cmake for more control.
|
||||
|
||||
**1. Compile using script cmk.sh**<br>
|
||||
|
||||
After compiling, the libraries and executables will be found in `slsDetectorPackage/build/bin` directory<br>
|
||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
||||
```
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
Usage: [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [-h] [-d <HDF5 directory>] [-j] <Number of threads>
|
||||
Usage: $0 [-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
|
||||
@ -59,9 +62,16 @@ Usage: [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [-h] [-d <HDF5 directory>] [-j
|
||||
-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
|
||||
|
||||
eg. Rebuild when you switch to a new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
# get all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
```
|
||||
|
||||
**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.
|
||||
@ -71,3 +81,12 @@ Use cmake to create out-of-source builds, by creating a build folder parallel to
|
||||
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
|
||||
$ make -j12 #or whatever number of threads wanted
|
||||
```
|
||||
|
||||
To install binaries using CMake
|
||||
```
|
||||
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
|
||||
```
|
||||
|
119
RELEASE.txt
119
RELEASE.txt
@ -1,67 +1,75 @@
|
||||
SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||
===========================================================================
|
||||
SLS Detector Package 5.1.0 released on xx.xx.2020 (Minor Release)
|
||||
===================================================================
|
||||
|
||||
This document describes the differences between 5.1.0 and 5.x.x releases.
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1. Firmware Requirements
|
||||
2. Download, Documentation & Support
|
||||
1. Topics Concerning
|
||||
2. New Features
|
||||
2. Resolved Issues
|
||||
3. Known Issues
|
||||
4. Firmware Requirements
|
||||
5. Download, Documentation & Support
|
||||
|
||||
|
||||
1. Firmware Requirements
|
||||
|
||||
1. Topics Concerning
|
||||
====================
|
||||
|
||||
- potentital memory leak in receiver
|
||||
- scanParameters in Python
|
||||
- cmk.sh refactored
|
||||
- m3 settings and threshold
|
||||
|
||||
|
||||
2. New Features
|
||||
===============
|
||||
|
||||
Client
|
||||
------
|
||||
|
||||
1. Aded settings and threshold features for Mythen3.
|
||||
|
||||
|
||||
3. Resolved Issues
|
||||
==================
|
||||
|
||||
|
||||
Receiver
|
||||
--------
|
||||
|
||||
1. Current code only calls Implementation::setDetectorType from constructor,
|
||||
but potential memory leak if called out of constructor context. Fixed.
|
||||
|
||||
Client
|
||||
------
|
||||
|
||||
1. Fixed missing scanParameters class in Python
|
||||
|
||||
2. cmk.sh refactored to have better option handling
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
4. Firmware Requirements
|
||||
========================
|
||||
|
||||
Eiger
|
||||
=====
|
||||
Compatible version : 08.09.2020 (v27)
|
||||
|
||||
Jungfrau
|
||||
========
|
||||
Compatible version : 24.07.2020 (v1.1, PCB v1.0)
|
||||
: 21.07.2020 (v2.1, PCB v2.0)
|
||||
|
||||
Gotthard
|
||||
========
|
||||
Compatible version : 08.02.2018 (50um and 25um Master)
|
||||
: 09.02.2018 (25 um Slave)
|
||||
|
||||
Mythen3
|
||||
=======
|
||||
Compatible version : 25.09.2020 (development)
|
||||
|
||||
Gotthard2
|
||||
=========
|
||||
Compatible version : 25.09.2020 (development)
|
||||
|
||||
Moench
|
||||
======
|
||||
Compatible version : 10.05.2020 (v1.0)
|
||||
|
||||
Ctb
|
||||
===
|
||||
Compatible version : 10.05.2019 (v1.0)
|
||||
No updates from 5.0.0
|
||||
|
||||
|
||||
Detector Upgrade
|
||||
================
|
||||
|
||||
The following can be upgraded remotely:
|
||||
Eiger via bit files
|
||||
Jungfrau via command <.pof>
|
||||
Mythen3 via command <.rbf>
|
||||
Gotthard2 via command <.rbf>
|
||||
Moench via command <.pof>
|
||||
Ctb via command <.pof>
|
||||
5. Known Issues
|
||||
===============
|
||||
|
||||
The following cannot be upgraded remotely:
|
||||
Gotthard
|
||||
|
||||
Instructions available at
|
||||
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
||||
and
|
||||
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||
No updates from 5.0.0
|
||||
|
||||
|
||||
2. Download, Documentation & Support
|
||||
|
||||
6. Download, Documentation & Support
|
||||
====================================
|
||||
|
||||
Download
|
||||
@ -88,6 +96,9 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||
Consuming slsDetectorPackage:
|
||||
https://slsdetectorgroup.github.io/devdoc/consuming.html
|
||||
|
||||
API Examples:
|
||||
https://github.com/slsdetectorgroup/api-examples
|
||||
|
||||
Command Line Documentation:
|
||||
https://slsdetectorgroup.github.io/devdoc/commandline.html
|
||||
|
||||
@ -106,6 +117,10 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||
Python API Example:
|
||||
https://slsdetectorgroup.github.io/devdoc/pyexamples.html
|
||||
|
||||
Receivers (including custom receiver):
|
||||
https://slsdetectorgroup.github.io/devdoc/receivers.html
|
||||
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html
|
||||
|
||||
TroubleShooting:
|
||||
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
|
||||
|
||||
@ -121,4 +136,4 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
|
||||
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
||||
anna.bergamaschi@psi.ch
|
||||
|
||||
|
33
cmk.sh
33
cmk.sh
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
CMAKE="cmake3"
|
||||
BUILDDIR="build"
|
||||
INSTALLDIR=""
|
||||
HDF5DIR="/opt/hdf5v1.10.0"
|
||||
HDF5=0
|
||||
COMPILERTHREADS=0
|
||||
@ -22,13 +24,15 @@ CMAKE_PRE=""
|
||||
CMAKE_POST=""
|
||||
|
||||
usage() { echo -e "
|
||||
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-j] <Number of threads>
|
||||
Usage: $0 [-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
|
||||
@ -75,7 +79,7 @@ For rebuilding only certain sections
|
||||
|
||||
" ; exit 1; }
|
||||
|
||||
while getopts ":bpchd:j:trgeisumnz" opt ; do
|
||||
while getopts ":bpchd:k:l:j:trgeisumnz" opt ; do
|
||||
case $opt in
|
||||
b)
|
||||
echo "Building of CMake files Required"
|
||||
@ -99,6 +103,14 @@ while getopts ":bpchd:j:trgeisumnz" opt ; do
|
||||
echo "New HDF5 directory: $OPTARG"
|
||||
HDF5DIR=$OPTARG
|
||||
;;
|
||||
l)
|
||||
echo "CMake install directory: $OPTARG"
|
||||
INSTALLDIR="$OPTARG"
|
||||
;;
|
||||
k)
|
||||
echo "CMake command: $OPTARG"
|
||||
CMAKE="$OPTARG"
|
||||
;;
|
||||
j)
|
||||
echo "Number of compiler threads: $OPTARG"
|
||||
COMPILERTHREADS=$OPTARG
|
||||
@ -252,7 +264,15 @@ else
|
||||
fi
|
||||
|
||||
|
||||
#install
|
||||
if [ -n "$INSTALLDIR" ]; then
|
||||
CMAKE_POST+=" -DCMAKE_INSTALL_PREFIX=$INSTALLDIR"
|
||||
CMAKE_POST+=" -DCMAKE_FIND_ROOT_PATH=$INSTALLDIR"
|
||||
fi
|
||||
|
||||
|
||||
#enter build dir
|
||||
#pushd $BUILDDIR;
|
||||
cd $BUILDDIR;
|
||||
echo "in "$PWD
|
||||
|
||||
@ -261,7 +281,7 @@ echo "in "$PWD
|
||||
#cmake
|
||||
if [ $REBUILD -eq 1 ]; then
|
||||
rm -f CMakeCache.txt
|
||||
BUILDCOMMAND="$CMAKE_PRE cmake3 $CMAKE_POST .."
|
||||
BUILDCOMMAND="$CMAKE_PRE $CMAKE $CMAKE_POST .."
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
fi
|
||||
@ -305,6 +325,13 @@ else
|
||||
fi
|
||||
|
||||
|
||||
#install
|
||||
if [ -n "$INSTALLDIR" ]; then
|
||||
make install
|
||||
# popd
|
||||
# $CMAKE --build $BUILDDIR --target install
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -5,10 +5,6 @@ mkdir -p $PREFIX/include/sls
|
||||
# mkdir $PREFIX/include/slsDetectorPackage
|
||||
|
||||
#Shared and static libraries
|
||||
# cp build/bin/libSlsDetector.so $PREFIX/lib/.
|
||||
# cp build/bin/libSlsReceiver.so $PREFIX/lib/.
|
||||
# cp build/bin/libSlsSupport.so $PREFIX/lib/.
|
||||
|
||||
cp build/install/lib/* $PREFIX/lib/
|
||||
|
||||
#Binaries
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <TColor.h>
|
||||
#include <TTimer.h>
|
||||
#include <TH2F.h>
|
||||
#include <TSystem.h>
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -36,7 +36,7 @@ Depreciated commands
|
||||
------------------------
|
||||
|
||||
.. note ::
|
||||
All dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector.
|
||||
All the dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector.
|
||||
|
||||
.. csv-table:: Depreciated commands
|
||||
:file: ../depreciated.csv
|
||||
|
@ -9,7 +9,7 @@ CMake approaches.
|
||||
One can test with :ref:`detector simulators<Virtual Detector Servers>` before testing the API with a real detector or when a real detector is not at hand.
|
||||
|
||||
CMake: slsDetectorPackage as submodule in your project
|
||||
---------------------------------------
|
||||
---------------------------------------------------------------
|
||||
|
||||
If you are using CMake to build your integration and want to build everything
|
||||
in one go, we support adding slsDetectorPackage as a subfolder in your cmake project.
|
||||
|
@ -12,32 +12,7 @@ Download
|
||||
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- bit files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
-
|
||||
- 08.09.2020
|
||||
- `v27 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v27/>`__
|
||||
-
|
||||
* - v4.0.0 - v4.2.0
|
||||
-
|
||||
- 30.07.2019
|
||||
- `v24 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v24/>`__
|
||||
-
|
||||
* - v3.1.0 - v3.1.5
|
||||
-
|
||||
- 17.08.2017
|
||||
- `v20 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v20/>`__
|
||||
-
|
||||
|
||||
- `bit files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
@ -116,37 +91,7 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- pof files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
- 2.0
|
||||
- 21.07.2020
|
||||
- `v2.1 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v2_1/jungfrau_v2_1.pof>`__
|
||||
-
|
||||
* - v5.0.0-rcx
|
||||
- 1.0
|
||||
- 24.07.2020
|
||||
- `v1.1 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v1_1/jungfrau_v1_1.pof>`__
|
||||
-
|
||||
* - v4.0.1 - v4.2.0
|
||||
- 1.0
|
||||
- 06.12.2018
|
||||
- `v0.7 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v0_7/jungfrau_v0_7.pof>`__
|
||||
-
|
||||
* - v3.1.0 - v3.1.5
|
||||
- 1.0
|
||||
- 13.11.2017
|
||||
- `v0.6 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v0_6/jungfrau_v0_6.pof>`__
|
||||
-
|
||||
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
|
||||
Upgrade (from v4.x.x)
|
||||
@ -156,7 +101,7 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
|
||||
|
||||
#. Tftp must be installed on pc.
|
||||
|
||||
#. Update client package to the latest (5.0.0-rc1).
|
||||
#. Update client package to the latest (5.x.x).
|
||||
|
||||
#. Disable server respawning or kill old server
|
||||
.. code-block:: bash
|
||||
@ -204,7 +149,7 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
|
||||
jungfrauDetectorServervxxx --stop-server 1953
|
||||
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
@ -230,31 +175,8 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- pof files
|
||||
.. list-table::
|
||||
:widths: 15 15 15 15 5
|
||||
:header-rows: 1
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - All versions
|
||||
- 50um
|
||||
- 08.02.2018
|
||||
- `50um <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/50um/gotthard_I_50um.pof>`__
|
||||
-
|
||||
* - All versions
|
||||
- 25um (master)
|
||||
- 08.02.2018
|
||||
- `25um (master) <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/25um/master/gotthard_I_25um_master.pof>`__
|
||||
-
|
||||
* - All versions
|
||||
- 25um (slave)
|
||||
- 09.02.2018
|
||||
- `25um (slave) <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/25um/slave/gotthard_I_25um_slave.pof>`__
|
||||
-
|
||||
|
||||
.. _firmware upgrade using blaster for blackfin:
|
||||
|
||||
@ -294,24 +216,10 @@ Download
|
||||
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- rbf files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
-
|
||||
- 25.09.2020
|
||||
-
|
||||
- development
|
||||
- rbf files (in developement)
|
||||
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. Program from console
|
||||
@ -337,23 +245,10 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- rbf files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
- rbf files (in development)
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
-
|
||||
- 25.09.2020
|
||||
-
|
||||
- development
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. Program from console
|
||||
@ -375,28 +270,10 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- pof files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
- EPCQ128
|
||||
- 05.10.2020
|
||||
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/moench/EPCQ128/v1_0/moench_v1_0_201005.pof>`__
|
||||
-
|
||||
* - v5.0.0-rcx
|
||||
- EPCS128
|
||||
- 05.10.2020
|
||||
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/moench/EPCS128/v1_0/moench_v1_0_201005.pof>`__
|
||||
-
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
@ -419,28 +296,10 @@ Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- pof files
|
||||
.. list-table::
|
||||
:widths: 25 10 30 25 10
|
||||
:header-rows: 1
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
* - Software
|
||||
- Hardware
|
||||
- Firmware Date
|
||||
- Firmware Link
|
||||
- Comments
|
||||
* - v5.0.0-rcx
|
||||
- EPCQ128
|
||||
- 05.10.2020
|
||||
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/ctb/EPCQ128/v1_0/ctb_v1_0_201005.pof>`__
|
||||
-
|
||||
* - v5.0.0-rcx
|
||||
- EPCS128
|
||||
- 05.10.2020
|
||||
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/ctb/EPCS128/v1_0/ctb_v1_0_201005.pof>`__
|
||||
-
|
||||
|
||||
Upgrade (from v5.0.0-rcx)
|
||||
Upgrade (from v5.0.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
@ -462,11 +321,12 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
|
||||
Firmware Troubleshooting with blackfin
|
||||
----------------------------------------
|
||||
|
||||
#. v4.x.x client after programming will most likely reboot the blackfin processor, regardless of error.
|
||||
1. v4.x.x client after programming will most likely reboot the blackfin processor, regardless of error.
|
||||
|
||||
#. v5.x.x-rcx client after programming will not reboot the blackfin processor, if error occurred.
|
||||
2. v5.x.x-rcx client after programming will not reboot the blackfin processor, if error occurred.
|
||||
|
||||
3. If a reboot occured with an incomplete firmware in flash, the blackfin will most likely not find the mtd3 drive. To see if this drive exists:
|
||||
|
||||
#. If a reboot occured with an incomplete firmware in flash, the blackfin will most likely not find the mtd3 drive. To see if this drive exists:
|
||||
.. code-block:: bash
|
||||
|
||||
# connect to the board
|
||||
@ -482,7 +342,7 @@ Firmware Troubleshooting with blackfin
|
||||
|
||||
4. If one can see the mtd3 drive, one can already try to flash again using the **programfpga** command (without rebooting blackfin or detector).
|
||||
|
||||
#. If one can't list it, read the next section to try to get the blackfin to list it.
|
||||
5. If one can't list it, read the next section to try to get the blackfin to list it.
|
||||
|
||||
How to get back mtd3 drive remotely
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -55,7 +55,7 @@ int main() {
|
||||
std::ofstream fs2("depreciated.csv");
|
||||
fs2 << "Old, New\n";
|
||||
auto cmds = proxy.GetDepreciatedCommands();
|
||||
for (auto it : cmds){
|
||||
for (auto it : cmds) {
|
||||
fs2 << it.first << ", " << it.second << '\n';
|
||||
}
|
||||
}
|
||||
|
@ -49,25 +49,39 @@ The easiest way to configure options is to use the ccmake utility.
|
||||
|
||||
Build using cmk.sh script
|
||||
-------------------------
|
||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
# new build and make with 9 parallel threads
|
||||
./cmk.sh -cbj9
|
||||
|
||||
# build with python
|
||||
./cmk.sh -bpj9
|
||||
|
||||
# build with GUI
|
||||
./cmk.sh -bgj9
|
||||
|
||||
# build with hdf5
|
||||
./cmk.sh -hj9 -d [path of hdf5 dir]
|
||||
Usage: $0 [-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
|
||||
|
||||
|
||||
Install binaries using conda
|
||||
--------------------------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
Receiver
|
||||
==============================================
|
||||
|
||||
.. doxygenclass:: Receiver
|
||||
.. doxygenclass:: sls::Receiver
|
||||
:members:
|
||||
.. :undoc-members:
|
@ -48,3 +48,24 @@ Custom Receiver
|
||||
| Cannot use "auto" for **udp_dstip**.
|
||||
|
||||
| Also ensure that there are no **rx_** commands in the config file. These commands are for configuring the slsReceiver.
|
||||
|
||||
Example of a custom receiver config file
|
||||
|
||||
* The main difference is the lack of **rx_** commands or file commands (eg. fwrite, fpath) and the udp_dstmac is required in config file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# detector hostname
|
||||
hostname bchip052
|
||||
|
||||
# udp destination port (receiver)
|
||||
udp_dstport 50004
|
||||
|
||||
# udp destination ip (receiver)
|
||||
udp_dstip 10.0.1.100
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 10.0.1.184
|
||||
|
||||
# udp destination mac
|
||||
udp_dstmac 22:47:d5:48:ad:ef
|
||||
|
@ -1,6 +1,10 @@
|
||||
Troubleshooting
|
||||
=================
|
||||
|
||||
If something is missing, don't hesitate to
|
||||
open an issue at our `github repo issues
|
||||
<https://github.com/slsdetectorgroup/slsDetectorPackage/issues>`_.
|
||||
|
||||
Common
|
||||
------
|
||||
|
||||
|
@ -60,6 +60,7 @@ Client
|
||||
sls_detector_put virtual 2 1912
|
||||
|
||||
Use the same in the config file.
|
||||
Detector API has a method 'isVirtualDetectorServer' to check if on-board detector server is virtual.
|
||||
|
||||
|
||||
Sample Config file
|
||||
|
39
examples/jungfrau_custom_receiver.config
Executable file
39
examples/jungfrau_custom_receiver.config
Executable file
@ -0,0 +1,39 @@
|
||||
# detector hostname
|
||||
hostname bchip052
|
||||
|
||||
# do not use any rx_ or "file" (eg. fwrite, fpath) commands, which go to slsReceiver/slsMultiReceiver
|
||||
|
||||
# udp destination port (receiver)
|
||||
udp_dstport 50004
|
||||
|
||||
# udp destination ip (receiver)
|
||||
udp_dstip 10.0.1.100
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 10.0.1.184
|
||||
|
||||
# udp destination mac
|
||||
udp_dstmac 22:47:d5:48:ad:ef
|
||||
|
||||
|
||||
# PCBv2.0 (using 2 interfaces, top)
|
||||
udp_dstport2 50005
|
||||
udp_dstip2 10.0.2.100
|
||||
udp_srcip2 10.0.2.184
|
||||
udp_dstmac2 22:47:d5:48:ad:ff
|
||||
|
||||
|
||||
# enable two interfaces
|
||||
numinterfaces 2
|
||||
# select inner interface(effective only when numinterfaces is 1)
|
||||
#selinterface 1
|
||||
|
||||
# power on chip
|
||||
powerchip 1
|
||||
|
||||
# high voltage
|
||||
highvoltage 200
|
||||
|
||||
# timing to trigger
|
||||
timing trigger
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "DetectorImpl.h"
|
||||
#include "Module.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
@ -446,8 +446,8 @@ TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert",
|
||||
CHECK(m.readRegister(0x7b) == 0x1003E);
|
||||
}
|
||||
|
||||
TEST_CASE("Eiger or Jungfrau startingfnum",
|
||||
"[.eigerintegration][.jungfrauintegration][startingfnum]") {
|
||||
TEST_CASE("Eiger or Jungfrau nextframenumber",
|
||||
"[.eigerintegration][.jungfrauintegration][nextframenumber]") {
|
||||
SingleDetectorConfig c;
|
||||
|
||||
// pick up multi detector from shm id 0
|
||||
@ -465,8 +465,8 @@ TEST_CASE("Eiger or Jungfrau startingfnum",
|
||||
// starting fnum
|
||||
uint64_t val = 8;
|
||||
|
||||
m.setStartingFrameNumber(val);
|
||||
CHECK(m.getStartingFrameNumber() == val);
|
||||
m.setNextFrameNumber(val);
|
||||
CHECK(m.getNextFrameNumber() == val);
|
||||
CHECK(m.acquire() == slsDetectorDefs::OK);
|
||||
CHECK(m.getReceiverCurrentFrameIndex() == val);
|
||||
|
||||
@ -474,18 +474,18 @@ TEST_CASE("Eiger or Jungfrau startingfnum",
|
||||
CHECK(m.acquire() == slsDetectorDefs::OK);
|
||||
CHECK(m.getReceiverCurrentFrameIndex() == val);
|
||||
|
||||
CHECK_THROWS_AS(m.setStartingFrameNumber(0), sls::RuntimeError);
|
||||
CHECK_THROWS_AS(m.setNextFrameNumber(0), sls::RuntimeError);
|
||||
|
||||
if (m.getDetectorTypeAsString() == "Eiger") {
|
||||
val = 281474976710655;
|
||||
} else if (m.getDetectorTypeAsString() == "Jungfrau") {
|
||||
val = 18446744073709551615;
|
||||
}
|
||||
m.setStartingFrameNumber(val);
|
||||
CHECK(m.getStartingFrameNumber() == val);
|
||||
m.setNextFrameNumber(val);
|
||||
CHECK(m.getNextFrameNumber() == val);
|
||||
CHECK(m.acquire() == slsDetectorDefs::OK);
|
||||
CHECK(m.getReceiverCurrentFrameIndex() == val);
|
||||
CHECK(m.getStartingFrameNumber() == (val + 1));
|
||||
CHECK(m.getNextFrameNumber() == (val + 1));
|
||||
}
|
||||
|
||||
TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") {
|
||||
|
@ -1,19 +1,16 @@
|
||||
|
||||
# find_package (Python COMPONENTS Interpreter Development)
|
||||
|
||||
pybind11_add_module(_slsdet
|
||||
src/main.cpp
|
||||
src/enums.cpp
|
||||
src/detector.cpp
|
||||
src/network.cpp
|
||||
src/pattern.cpp
|
||||
src/scan.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(_slsdet PUBLIC
|
||||
slsDetectorShared
|
||||
slsReceiverShared
|
||||
slsSupportShared
|
||||
${ZeroMQ_LIBRARIES}
|
||||
)
|
||||
slsDetectorStatic
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -33,6 +30,7 @@ set( PYTHON_FILES
|
||||
enums.py
|
||||
errors.py
|
||||
gotthard.py
|
||||
pattern.py
|
||||
gotthard2.py
|
||||
moench.py
|
||||
proxy.py
|
||||
|
14
python/examples/manipulate_pattern.py
Normal file
14
python/examples/manipulate_pattern.py
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
from slsdet import Detector, patternParameters
|
||||
|
||||
d = Detector()
|
||||
pat = patternParameters()
|
||||
|
||||
#Access to members of the structure using numpy arrays
|
||||
pat.patlimits = 0x0, 0xa
|
||||
|
||||
d.setPattern(pat)
|
||||
|
||||
#Load pattern from file
|
||||
pat.load("/some/dir/some.pat")
|
@ -6,7 +6,7 @@ d = Detector()
|
||||
d.fformat = fileFormat.BINARY
|
||||
|
||||
# Altough not recommended for convenience all enums
|
||||
# and some other things can be impored using *
|
||||
# and some other things can be imported using *
|
||||
|
||||
from slsdet import *
|
||||
d.speed = speedLevel.FULL_SPEED
|
||||
@ -15,6 +15,6 @@ d.speed = speedLevel.FULL_SPEED
|
||||
|
||||
import slsdet.enums
|
||||
for enum in dir(slsdet.enums):
|
||||
# filter out special memebers
|
||||
# filter out special members
|
||||
if not enum.startswith('_'):
|
||||
print(enum)
|
||||
|
19
python/examples/using_scan.py
Normal file
19
python/examples/using_scan.py
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
from slsdet import Mythen3, scanParameters, dacIndex
|
||||
|
||||
#Configure scan
|
||||
sp = scanParameters()
|
||||
sp.enable = 1
|
||||
sp.dacInd = dacIndex.VTH1
|
||||
sp.startOffset = 0
|
||||
sp.stopOffset = 1000
|
||||
sp.stepSize = 100
|
||||
sp.dacSettleTime_ns = int(1e9)
|
||||
|
||||
|
||||
# Send scan to detector
|
||||
d = Mythen3()
|
||||
d.setScan(sp)
|
||||
|
||||
|
||||
|
@ -10,6 +10,8 @@ from slsdet.lookup import view, find
|
||||
import slsdet
|
||||
|
||||
|
||||
|
||||
|
||||
d = Detector()
|
||||
e = Eiger()
|
||||
c = Ctb()
|
||||
|
@ -55,7 +55,7 @@ def generate_enum_string(enums):
|
||||
data.append('.export_values();\n\n')
|
||||
return ''.join(data)
|
||||
|
||||
with open('../../slsSupportLib/include/sls_detector_defs.h') as f:
|
||||
with open('../../slsSupportLib/include/sls/sls_detector_defs.h') as f:
|
||||
data = f.read()
|
||||
|
||||
data = remove_comments(data)
|
||||
|
@ -8,6 +8,8 @@ from .mythen3 import Mythen3
|
||||
from .gotthard2 import Gotthard2
|
||||
from .gotthard import Gotthard
|
||||
from .moench import Moench
|
||||
from .pattern import Pattern, patternParameters
|
||||
|
||||
|
||||
import _slsdet
|
||||
xy = _slsdet.xy
|
||||
@ -18,3 +20,4 @@ from .enums import *
|
||||
|
||||
IpAddr = _slsdet.IpAddr
|
||||
MacAddr = _slsdet.MacAddr
|
||||
scanParameters = _slsdet.scanParameters
|
@ -349,7 +349,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def nframes(self):
|
||||
def framecounter(self):
|
||||
"""
|
||||
[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control.
|
||||
Note
|
||||
@ -540,13 +540,13 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def startingfnum(self):
|
||||
"""[Eiger][Jungfrau] Starting frame number for next acquisition. Stopping acquisition might result in different frame numbers for different modules. """
|
||||
return self.getStartingFrameNumber()
|
||||
def nextframenumber(self):
|
||||
"""[Eiger][Jungfrau] Next frame number. Stopping acquisition might result in different frame numbers for different modules. """
|
||||
return self.getNextFrameNumber()
|
||||
|
||||
@startingfnum.setter
|
||||
def startingfnum(self, value):
|
||||
ut.set_using_dict(self.setStartingFrameNumber, value)
|
||||
@nextframenumber.setter
|
||||
def nextframenumber(self, value):
|
||||
ut.set_using_dict(self.setNextFrameNumber, value)
|
||||
|
||||
@property
|
||||
@element
|
||||
@ -1009,6 +1009,32 @@ class Detector(CppDetectorApi):
|
||||
ip = ut.make_ip(ip) #Convert from int or string to IpAddr
|
||||
ut.set_using_dict(self.setClientZmqIp, ip)
|
||||
|
||||
|
||||
@property
|
||||
def zmqhwm(self):
|
||||
"""
|
||||
Client's zmq receive high water mark. Default is the zmq library's default (1000), can also be set here using -1.
|
||||
This is a high number and can be set to 2 for gui purposes.
|
||||
One must also set the receiver's send high water mark to similar value. Final effect is sum of them.
|
||||
Setting it via command line is useful only before zmq enabled (before opening gui).
|
||||
"""
|
||||
return self.getClientZmqHwm()
|
||||
|
||||
@zmqhwm.setter
|
||||
def zmqhwm(self, n_frames):
|
||||
self.setClientZmqHwm(n_frames)
|
||||
|
||||
@property
|
||||
def rx_zmqhwm(self):
|
||||
"""
|
||||
Receiver's zmq send high water mark. Default is the zmq library's default (1000). This is a high number and can be set to 2 for gui purposes. One must also set the client's receive high water mark to similar value. Final effect is sum of them. Also restarts receiver zmq streaming if enabled. Can set to -1 to set default value.
|
||||
"""
|
||||
return self.getRxZmqHwm()
|
||||
|
||||
@rx_zmqhwm.setter
|
||||
def rx_zmqhwm(self, n_frames):
|
||||
self.setRxZmqHwm(n_frames)
|
||||
|
||||
@property
|
||||
@element
|
||||
def udp_dstip(self):
|
||||
@ -1499,7 +1525,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def timestamp(self):
|
||||
def frametime(self):
|
||||
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Timestamp at a frame start.
|
||||
Note
|
||||
----
|
||||
@ -1670,6 +1696,8 @@ class Detector(CppDetectorApi):
|
||||
To change settings as well or set threshold without trimbits, use setThresholdEnergy.
|
||||
:setter: It loads trim files from settingspath.
|
||||
"""
|
||||
if self.type == detectorType.MYTHEN3:
|
||||
return self.getAllThresholdEnergy()
|
||||
return self.getThresholdEnergy()
|
||||
|
||||
@threshold.setter
|
||||
@ -1965,7 +1993,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def now(self):
|
||||
def runtime(self):
|
||||
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up.
|
||||
Note
|
||||
-----
|
||||
@ -3079,6 +3107,14 @@ class Detector(CppDetectorApi):
|
||||
"""
|
||||
return ClkFreqProxy(self)
|
||||
|
||||
|
||||
def readout(self):
|
||||
"""
|
||||
Mythen3] Starts detector readout. Status changes to TRANSMITTING and automatically returns to idle at the end of readout.
|
||||
"""
|
||||
self.startDetectorReadout()
|
||||
|
||||
|
||||
"""
|
||||
---------------------------<<<Debug>>>---------------------------
|
||||
"""
|
||||
|
53
python/slsdet/pattern.py
Normal file
53
python/slsdet/pattern.py
Normal file
@ -0,0 +1,53 @@
|
||||
import _slsdet
|
||||
|
||||
from _slsdet import Pattern
|
||||
|
||||
|
||||
class patternParameters(_slsdet.patternParameters):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.view = self.numpy_view()
|
||||
self.names = self.view.dtype.names
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name in self.names:
|
||||
return self.view[name][0]
|
||||
else:
|
||||
raise KeyError(f"Key: {name} not found")
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
if name in ["view", "names"]:
|
||||
self.__dict__[name] = value
|
||||
elif name in self.names:
|
||||
self.view[name] = value
|
||||
else:
|
||||
raise KeyError(f"Key: {name} not found")
|
||||
|
||||
# Provide custom dir for tab completion
|
||||
def __dir__(self):
|
||||
return self.names
|
||||
|
||||
|
||||
class Pattern(_slsdet.Pattern):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.view = self.data().numpy_view()
|
||||
self.names = self.view.dtype.names
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name in self.names:
|
||||
return self.view[name][0]
|
||||
else:
|
||||
raise KeyError(f"Key: {name} not found")
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
if name in ["view", "names"]:
|
||||
self.__dict__[name] = value
|
||||
elif name in self.names:
|
||||
self.view[name] = value
|
||||
else:
|
||||
raise KeyError(f"Key: {name} not found")
|
||||
|
||||
# Provide custom dir for tab completion
|
||||
def __dir__(self):
|
||||
return self.names
|
@ -102,6 +102,34 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(defs::detectorSettings, sls::Positions)) &
|
||||
Detector::setSettings,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getThresholdEnergy",
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getThresholdEnergy,
|
||||
py::arg() = Positions{})
|
||||
.def("getAllThresholdEnergy",
|
||||
(Result<std::array<int, 3>>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getAllThresholdEnergy,
|
||||
py::arg() = Positions{})
|
||||
.def("setThresholdEnergy",
|
||||
(void (Detector::*)(int, defs::detectorSettings, bool,
|
||||
sls::Positions)) &
|
||||
Detector::setThresholdEnergy,
|
||||
py::arg(), py::arg() = defs::STANDARD, py::arg() = true,
|
||||
py::arg() = Positions{})
|
||||
.def("setThresholdEnergy",
|
||||
(void (Detector::*)(std::array<int, 3>, defs::detectorSettings,
|
||||
bool, sls::Positions)) &
|
||||
Detector::setThresholdEnergy,
|
||||
py::arg(), py::arg() = defs::STANDARD, py::arg() = true,
|
||||
py::arg() = Positions{})
|
||||
.def("getSettingsPath",
|
||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getSettingsPath,
|
||||
py::arg() = Positions{})
|
||||
.def("setSettingsPath",
|
||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||
Detector::setSettingsPath,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("loadTrimbits",
|
||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||
Detector::loadTrimbits,
|
||||
@ -114,12 +142,24 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(int, sls::Positions)) &
|
||||
Detector::setAllTrimbits,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getTrimEnergies",
|
||||
(Result<std::vector<int>>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getTrimEnergies,
|
||||
py::arg() = Positions{})
|
||||
.def("setTrimEnergies",
|
||||
(void (Detector::*)(std::vector<int>, sls::Positions)) &
|
||||
Detector::setTrimEnergies,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getGapPixelsinCallback",
|
||||
(bool (Detector::*)() const) & Detector::getGapPixelsinCallback)
|
||||
.def("setGapPixelsinCallback",
|
||||
(void (Detector::*)(const bool)) &
|
||||
Detector::setGapPixelsinCallback,
|
||||
py::arg())
|
||||
.def("isVirtualDetectorServer",
|
||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||
Detector::isVirtualDetectorServer,
|
||||
py::arg() = Positions{})
|
||||
.def("registerAcquisitionFinishedCallback",
|
||||
(void (Detector::*)(void (*)(double, int, void *), void *)) &
|
||||
Detector::registerAcquisitionFinishedCallback,
|
||||
@ -314,6 +354,9 @@ void init_det(py::module &m) {
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getDacList", (std::vector<defs::dacIndex>(Detector::*)() const) &
|
||||
Detector::getDacList)
|
||||
.def("setDefaultDacs",
|
||||
(void (Detector::*)(sls::Positions)) & Detector::setDefaultDacs,
|
||||
py::arg() = Positions{})
|
||||
.def("getDAC",
|
||||
(Result<int>(Detector::*)(defs::dacIndex, bool, sls::Positions)
|
||||
const) &
|
||||
@ -356,6 +399,8 @@ void init_det(py::module &m) {
|
||||
.def("startReceiver", (void (Detector::*)()) & Detector::startReceiver)
|
||||
.def("stopReceiver", (void (Detector::*)()) & Detector::stopReceiver)
|
||||
.def("startDetector", (void (Detector::*)()) & Detector::startDetector)
|
||||
.def("startDetectorReadout",
|
||||
(void (Detector::*)()) & Detector::startDetectorReadout)
|
||||
.def("stopDetector", (void (Detector::*)()) & Detector::stopDetector)
|
||||
.def("getDetectorStatus",
|
||||
(Result<defs::runStatus>(Detector::*)(sls::Positions) const) &
|
||||
@ -374,13 +419,13 @@ void init_det(py::module &m) {
|
||||
(Result<std::vector<uint64_t>>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getNumMissingPackets,
|
||||
py::arg() = Positions{})
|
||||
.def("getStartingFrameNumber",
|
||||
.def("getNextFrameNumber",
|
||||
(Result<uint64_t>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getStartingFrameNumber,
|
||||
Detector::getNextFrameNumber,
|
||||
py::arg() = Positions{})
|
||||
.def("setStartingFrameNumber",
|
||||
.def("setNextFrameNumber",
|
||||
(void (Detector::*)(uint64_t, sls::Positions)) &
|
||||
Detector::setStartingFrameNumber,
|
||||
Detector::setNextFrameNumber,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("sendSoftwareTrigger",
|
||||
(void (Detector::*)(sls::Positions)) &
|
||||
@ -599,15 +644,15 @@ void init_det(py::module &m) {
|
||||
Detector::setPartialFramesPadding,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getRxUDPSocketBufferSize",
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxUDPSocketBufferSize,
|
||||
py::arg() = Positions{})
|
||||
.def("setRxUDPSocketBufferSize",
|
||||
(void (Detector::*)(int64_t, sls::Positions)) &
|
||||
(void (Detector::*)(int, sls::Positions)) &
|
||||
Detector::setRxUDPSocketBufferSize,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getRxRealUDPSocketBufferSize",
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxRealUDPSocketBufferSize,
|
||||
py::arg() = Positions{})
|
||||
.def("getRxLock",
|
||||
@ -747,6 +792,17 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const sls::IpAddr, sls::Positions)) &
|
||||
Detector::setClientZmqIp,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getClientZmqHwm",
|
||||
(int (Detector::*)() const) & Detector::getClientZmqHwm)
|
||||
.def("setClientZmqHwm",
|
||||
(void (Detector::*)(const int)) & Detector::setClientZmqHwm,
|
||||
py::arg())
|
||||
.def("getRxZmqHwm",
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxZmqHwm,
|
||||
py::arg() = Positions{})
|
||||
.def("setRxZmqHwm",
|
||||
(void (Detector::*)(const int)) & Detector::setRxZmqHwm, py::arg())
|
||||
.def("getSubExptime",
|
||||
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getSubExptime,
|
||||
@ -763,24 +819,6 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(sls::ns, sls::Positions)) &
|
||||
Detector::setSubDeadTime,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getThresholdEnergy",
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getThresholdEnergy,
|
||||
py::arg() = Positions{})
|
||||
.def("setThresholdEnergy",
|
||||
(void (Detector::*)(int, defs::detectorSettings, bool,
|
||||
sls::Positions)) &
|
||||
Detector::setThresholdEnergy,
|
||||
py::arg(), py::arg() = defs::STANDARD, py::arg() = true,
|
||||
py::arg() = Positions{})
|
||||
.def("getSettingsPath",
|
||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getSettingsPath,
|
||||
py::arg() = Positions{})
|
||||
.def("setSettingsPath",
|
||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||
Detector::setSettingsPath,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getOverFlowMode",
|
||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getOverFlowMode,
|
||||
@ -796,14 +834,6 @@ void init_det(py::module &m) {
|
||||
.def("setBottom",
|
||||
(void (Detector::*)(bool, sls::Positions)) & Detector::setBottom,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getTrimEnergies",
|
||||
(Result<std::vector<int>>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getTrimEnergies,
|
||||
py::arg() = Positions{})
|
||||
.def("setTrimEnergies",
|
||||
(void (Detector::*)(std::vector<int>, sls::Positions)) &
|
||||
Detector::setTrimEnergies,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getRateCorrection",
|
||||
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRateCorrection,
|
||||
@ -1251,9 +1281,17 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||
Detector::setPattern,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("setPattern",
|
||||
(void (Detector::*)(const sls::Pattern &, sls::Positions)) &
|
||||
Detector::setPattern,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("savePattern",
|
||||
(void (Detector::*)(const std::string &)) & Detector::savePattern,
|
||||
py::arg())
|
||||
.def("loadDefaultPattern",
|
||||
(void (Detector::*)(sls::Positions)) &
|
||||
Detector::loadDefaultPattern,
|
||||
py::arg() = Positions{})
|
||||
.def("getPatternIOControl",
|
||||
(Result<uint64_t>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getPatternIOControl,
|
||||
|
@ -2,10 +2,12 @@
|
||||
* warning */
|
||||
|
||||
#include <pybind11/chrono.h>
|
||||
#include <pybind11/numpy.h>
|
||||
#include <pybind11/operators.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
#include "sls/Pattern.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
namespace py = pybind11;
|
||||
void init_enums(py::module &m) {
|
||||
|
@ -1,18 +1,19 @@
|
||||
#include <pybind11/chrono.h>
|
||||
#include <pybind11/numpy.h>
|
||||
#include <pybind11/operators.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "sls/Pattern.h"
|
||||
namespace py = pybind11;
|
||||
void init_enums(py::module &m) {
|
||||
py::class_<slsDetectorDefs> Defs(m, "slsDetectorDefs");
|
||||
py::class_<slsDetectorDefs::xy> xy(m, "xy");
|
||||
xy.def(py::init());
|
||||
xy.def(py::init<int,int>());
|
||||
xy.def(py::init<int, int>());
|
||||
xy.def_readwrite("x", &slsDetectorDefs::xy::x);
|
||||
xy.def_readwrite("y", &slsDetectorDefs::xy::y);
|
||||
|
||||
[[ENUMS]]
|
||||
|
||||
[[ENUMS]]
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ void init_enums(py::module &);
|
||||
void init_experimental(py::module &);
|
||||
void init_det(py::module &);
|
||||
void init_network(py::module &);
|
||||
void init_pattern(py::module &);
|
||||
void init_scan(py::module &);
|
||||
PYBIND11_MODULE(_slsdet, m) {
|
||||
m.doc() = R"pbdoc(
|
||||
C/C++ API
|
||||
@ -33,6 +35,8 @@ PYBIND11_MODULE(_slsdet, m) {
|
||||
init_enums(m);
|
||||
init_det(m);
|
||||
init_network(m);
|
||||
init_pattern(m);
|
||||
init_scan(m);
|
||||
// init_experimental(m);
|
||||
|
||||
|
||||
|
29
python/src/pattern.cpp
Normal file
29
python/src/pattern.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include <pybind11/chrono.h>
|
||||
#include <pybind11/numpy.h>
|
||||
#include <pybind11/operators.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
#include "sls/Pattern.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
namespace py = pybind11;
|
||||
void init_pattern(py::module &m) {
|
||||
|
||||
using pat = sls::patternParameters;
|
||||
py::class_<pat> patternParameters(m, "patternParameters");
|
||||
|
||||
PYBIND11_NUMPY_DTYPE(pat, word, ioctrl, limits, loop, nloop, wait,
|
||||
waittime);
|
||||
|
||||
patternParameters.def(py::init());
|
||||
patternParameters.def("numpy_view", [](py::object &obj) {
|
||||
pat &o = obj.cast<pat &>();
|
||||
return py::array_t<pat>(1, &o, obj);
|
||||
});
|
||||
|
||||
py::class_<sls::Pattern> Pattern(m, "Pattern");
|
||||
Pattern.def(py::init());
|
||||
Pattern.def("load", &sls::Pattern::load);
|
||||
Pattern.def("data", (pat * (sls::Pattern::*)()) & sls::Pattern::data,
|
||||
py::return_value_policy::reference);
|
||||
}
|
39
python/src/scan.cpp
Normal file
39
python/src/scan.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
#include <pybind11/chrono.h>
|
||||
#include <pybind11/numpy.h>
|
||||
#include <pybind11/operators.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
#include <sstream>
|
||||
#include "sls/sls_detector_defs.h"
|
||||
namespace py = pybind11;
|
||||
void init_scan(py::module &m) {
|
||||
|
||||
using sp = slsDetectorDefs::scanParameters;
|
||||
py::class_<sp> scanParameters(m, "scanParameters");
|
||||
|
||||
scanParameters.def(py::init());
|
||||
|
||||
scanParameters.def(py::init<slsDetectorDefs::dacIndex, int, int, int>());
|
||||
scanParameters.def(py::init<slsDetectorDefs::dacIndex, int, int, int, std::chrono::nanoseconds>());
|
||||
scanParameters.def_readwrite("enable", &sp::enable);
|
||||
scanParameters.def_readwrite("dacInd", &sp::dacInd);
|
||||
scanParameters.def_readwrite("startOffset", &sp::startOffset);
|
||||
scanParameters.def_readwrite("stopOffset", &sp::stopOffset);
|
||||
scanParameters.def_readwrite("stepSize", &sp::stepSize);
|
||||
scanParameters.def_readwrite("dacSettleTime_ns", &sp::dacSettleTime_ns);
|
||||
scanParameters.def("__repr__", [](const sp &a){
|
||||
std::ostringstream oss;
|
||||
auto indent = " ";
|
||||
oss << "<scanParameters>\n";
|
||||
oss << indent << "enable: " << a.enable << '\n';
|
||||
oss << indent << "dacInd: " << a.dacInd << '\n';
|
||||
oss << indent << "startOffset: " << a.startOffset << '\n';
|
||||
oss << indent << "stopOffset: " << a.stopOffset << '\n';
|
||||
oss << indent << "stepSize: " << a.stepSize << '\n';
|
||||
oss << indent << "dacSettleTime_ns: " << a.dacSettleTime_ns;
|
||||
return oss.str();
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
800 10
|
@ -1 +0,0 @@
|
||||
829 9.3
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
800 10
|
@ -1 +0,0 @@
|
||||
804 15.0
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
800 10
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
817 11.6
|
File diff suppressed because it is too large
Load Diff
BIN
settingsdir/mythen3/fast/11200eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/fast/11200eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/11200eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/fast/11200eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/4500eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/fast/4500eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/4500eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/fast/4500eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/5400eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/fast/5400eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/5400eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/fast/5400eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/6400eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/fast/6400eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/6400eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/fast/6400eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/8000eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/fast/8000eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/8000eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/fast/8000eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/9900eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/fast/9900eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/fast/9900eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/fast/9900eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/11200eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/highgain/11200eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/11200eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/highgain/11200eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/4500eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/highgain/4500eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/4500eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/highgain/4500eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/5400eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/highgain/5400eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/5400eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/highgain/5400eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/6400eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/highgain/6400eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/6400eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/highgain/6400eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/8000eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/highgain/8000eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/8000eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/highgain/8000eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/9900eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/highgain/9900eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/highgain/9900eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/highgain/9900eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/11200eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/standard/11200eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/11200eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/standard/11200eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/4500eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/standard/4500eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/4500eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/standard/4500eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/5400eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/standard/5400eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/5400eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/standard/5400eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/6400eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/standard/6400eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/6400eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/standard/6400eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/8000eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/standard/8000eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/8000eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/standard/8000eV/trim.snxxxx
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/9900eV/trim.sn0000
Normal file
BIN
settingsdir/mythen3/standard/9900eV/trim.sn0000
Normal file
Binary file not shown.
BIN
settingsdir/mythen3/standard/9900eV/trim.snxxxx
Normal file
BIN
settingsdir/mythen3/standard/9900eV/trim.snxxxx
Normal file
Binary file not shown.
@ -24,10 +24,10 @@ foreach(exe ${MOENCH_EXECUTABLES})
|
||||
|
||||
target_link_libraries(${exe}
|
||||
PUBLIC
|
||||
slsSupportShared
|
||||
slsSupportStatic
|
||||
${ZeroMQ_LIBRARIES}
|
||||
pthread
|
||||
tiff
|
||||
TIFF::TIFF
|
||||
|
||||
PRIVATE
|
||||
slsProjectWarnings
|
||||
@ -37,4 +37,9 @@ foreach(exe ${MOENCH_EXECUTABLES})
|
||||
set_target_properties(${exe} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
if(SLS_LTO_AVAILABLE)
|
||||
set_property(TARGET ${exe} PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
||||
endif()
|
||||
|
||||
|
||||
endforeach(exe ${MOENCH_EXECUTABLES})
|
||||
|
@ -16,7 +16,7 @@
|
||||
//CBFlib must be installed to use this program
|
||||
//
|
||||
/*****************************************************************************/
|
||||
#include "tiffio.h"
|
||||
#include <tiffio.h>
|
||||
|
||||
#undef cbf_failnez
|
||||
#define cbf_failnez(x) \
|
||||
|
@ -1,5 +1,7 @@
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(Qwt 6.1 REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
@ -90,7 +92,7 @@ target_include_directories(slsDetectorGui PUBLIC
|
||||
target_link_libraries(slsDetectorGui PUBLIC
|
||||
slsProjectOptions
|
||||
slsProjectWarnings
|
||||
slsDetectorShared
|
||||
slsDetectorStatic
|
||||
${QT_QTCORE_LIBRARIES}
|
||||
${QT_QTGUI_LIBRARIES}
|
||||
${QWT_LIBRARIES}
|
||||
@ -104,6 +106,9 @@ target_link_libraries(slsDetectorGui PUBLIC
|
||||
set_target_properties(slsDetectorGui PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
if(SLS_LTO_AVAILABLE)
|
||||
set_property(TARGET slsDetectorGui PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
||||
endif()
|
||||
|
||||
install(TARGETS slsDetectorGui
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
|
@ -344,7 +344,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="spinStartingFrameNumber">
|
||||
<widget class="QSpinBox" name="spinNextFrameNumber">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -361,7 +361,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The starting frame number of next acquisition.</p><p>#startingfnum</p></body></html></string>
|
||||
<string><html><head/><body><p>The next frame number</p><p>#nextframenumber</p></body></html></string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
@ -390,12 +390,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblStartingFrameNumber">
|
||||
<widget class="QLabel" name="lblNextFrameNumber">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The starting frame number of next acquisition.</p><p>#startingfnum</p></body></html></string>
|
||||
<string><html><head/><body><p>The next frame number</p><p>#nextframenumber</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Next Frame Number: </string>
|
||||
|
@ -32,17 +32,23 @@
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="spinThreshold">
|
||||
<item row="1" column="4">
|
||||
<widget class="QSpinBox" name="spinThreshold3">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -63,10 +69,69 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="spinThreshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblDynamicRange">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dynamic Range:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
@ -74,7 +139,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<height>190</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@ -86,10 +151,16 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.67772e+07</string>
|
||||
@ -112,21 +183,102 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<item row="1" column="6">
|
||||
<widget class="QPushButton" name="btnSetThreshold">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<width>100</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/rightArrow.png</normaloff>:/icons/images/rightArrow.png</iconset>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblSettings">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="comboSettings">
|
||||
@ -141,10 +293,16 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Settings of the detector.
|
||||
#settings#</string>
|
||||
@ -266,40 +424,10 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblThreshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Threshold:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblDynamicRange">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dynamic Range:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblSettings">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
@ -307,7 +435,82 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>190</height>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblThreshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Threshold:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QSpinBox" name="spinThreshold2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@ -317,6 +520,9 @@
|
||||
<tabstops>
|
||||
<tabstop>comboSettings</tabstop>
|
||||
<tabstop>spinThreshold</tabstop>
|
||||
<tabstop>spinThreshold2</tabstop>
|
||||
<tabstop>spinThreshold3</tabstop>
|
||||
<tabstop>btnSetThreshold</tabstop>
|
||||
<tabstop>comboDynamicRange</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "sls/Detector.h"
|
||||
#include "qDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "ui_form_detectormain.h"
|
||||
#include <QTabWidget>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "sls/Detector.h"
|
||||
#include "qDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "ui_form_plot.h"
|
||||
#include <mutex>
|
||||
|
||||
@ -63,7 +63,7 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
|
||||
|
||||
signals:
|
||||
void AcquireFinishedSignal();
|
||||
void AbortSignal();
|
||||
void AbortSignal(QString);
|
||||
void UpdateSignal();
|
||||
|
||||
private:
|
||||
|
@ -16,7 +16,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
|
||||
public slots:
|
||||
void AcquireFinished();
|
||||
void AbortAcquire();
|
||||
void AbortAcquire(QString exmsg);
|
||||
|
||||
private slots:
|
||||
void SetTimingMode(int val);
|
||||
@ -35,7 +35,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void SetFileName(bool force = false);
|
||||
void ForceSetFileName();
|
||||
void SetRunIndex(int val);
|
||||
void SetStartingFrameNumber(int val);
|
||||
void SetNextFrameNumber(int val);
|
||||
void UpdateProgress();
|
||||
void StartAcquisition();
|
||||
void StopAcquisition();
|
||||
@ -67,7 +67,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void GetFileWrite();
|
||||
void GetFileName();
|
||||
void GetRunIndex();
|
||||
void GetStartingFrameNumber();
|
||||
void GetNextFrameNumber();
|
||||
|
||||
void ResetProgress();
|
||||
|
||||
|
@ -14,6 +14,7 @@ class qTabSettings : public QWidget, private Ui::TabSettingsObject {
|
||||
void SetSettings(int index);
|
||||
void SetDynamicRange(int index);
|
||||
void SetThresholdEnergy(int index);
|
||||
void SetThresholdEnergies();
|
||||
|
||||
private:
|
||||
void SetupWidgetWindow();
|
||||
@ -23,6 +24,7 @@ class qTabSettings : public QWidget, private Ui::TabSettingsObject {
|
||||
void GetSettings();
|
||||
void GetDynamicRange();
|
||||
void GetThresholdEnergy();
|
||||
void GetThresholdEnergies();
|
||||
|
||||
sls::Detector *det;
|
||||
enum {
|
||||
|
@ -270,7 +270,8 @@ void qDetectorMain::Initialization() {
|
||||
// Plotting
|
||||
connect(plot, SIGNAL(AcquireFinishedSignal()), tabMeasurement,
|
||||
SLOT(AcquireFinished()));
|
||||
connect(plot, SIGNAL(AbortSignal()), tabMeasurement, SLOT(AbortAcquire()));
|
||||
connect(plot, SIGNAL(AbortSignal(QString)), tabMeasurement,
|
||||
SLOT(AbortAcquire(QString)));
|
||||
|
||||
// menubar
|
||||
// Modes Menu
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "qDrawPlot.h"
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include "SlsQt2DPlot.h"
|
||||
#include "sls/detectorData.h"
|
||||
#include "qCloneWidget.h"
|
||||
#include "sls/detectorData.h"
|
||||
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/detectorData.h"
|
||||
@ -672,18 +672,15 @@ void qDrawPlot::AcquireThread() {
|
||||
// handle it
|
||||
if (!mess.empty()) {
|
||||
LOG(logERROR) << "Acquisition Finished with an exception: " << mess;
|
||||
qDefs::ExceptionMessage("Acquire unsuccessful.", mess,
|
||||
"qDrawPlot::AcquireFinished");
|
||||
// qDefs::ExceptionMessage("Acquire unsuccessful.", mess,
|
||||
// "qDrawPlot::AcquireFinished");
|
||||
try {
|
||||
det->stopDetector();
|
||||
}
|
||||
CATCH_DISPLAY("Could not stop detector acquisition.",
|
||||
"qDrawPlot::AcquireFinished");
|
||||
try {
|
||||
det->stopReceiver();
|
||||
} catch (...) {
|
||||
;
|
||||
}
|
||||
CATCH_DISPLAY("Could not stop receiver.", "qDrawPlot::AcquireFinished");
|
||||
emit AbortSignal();
|
||||
emit AbortSignal(QString(mess.c_str()));
|
||||
}
|
||||
LOG(logDEBUG) << "End of Acquisition Finished";
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "qTabAdvanced.h"
|
||||
#include "sls/network_utils.h"
|
||||
#include "qDefs.h"
|
||||
#include "qDrawPlot.h"
|
||||
#include "sls/network_utils.h"
|
||||
|
||||
qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector,
|
||||
qDrawPlot *p)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "qTabDebugging.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "qDefs.h"
|
||||
#include "sls/ToString.h"
|
||||
#include <QDesktopWidget>
|
||||
#include <QGridLayout>
|
||||
#include <QTreeWidget>
|
||||
|
@ -56,13 +56,13 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
delayImplemented = false;
|
||||
lblStartingFrameNumber->setEnabled(true);
|
||||
spinStartingFrameNumber->setEnabled(true);
|
||||
lblNextFrameNumber->setEnabled(true);
|
||||
spinNextFrameNumber->setEnabled(true);
|
||||
startingFnumImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
lblStartingFrameNumber->setEnabled(true);
|
||||
spinStartingFrameNumber->setEnabled(true);
|
||||
lblNextFrameNumber->setEnabled(true);
|
||||
spinNextFrameNumber->setEnabled(true);
|
||||
startingFnumImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
@ -141,8 +141,8 @@ void qTabMeasurement::Initialization() {
|
||||
SLOT(ForceSetFileName()));
|
||||
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int)));
|
||||
if (startingFnumImplemented) {
|
||||
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetStartingFrameNumber(int)));
|
||||
connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNextFrameNumber(int)));
|
||||
}
|
||||
connect(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress()));
|
||||
connect(btnStart, SIGNAL(clicked()), this, SLOT(StartAcquisition()));
|
||||
@ -825,29 +825,29 @@ void qTabMeasurement::SetRunIndex(int val) {
|
||||
&qTabMeasurement::GetRunIndex)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetStartingFrameNumber() {
|
||||
void qTabMeasurement::GetNextFrameNumber() {
|
||||
LOG(logDEBUG) << "Getting Starting Frame Number";
|
||||
disconnect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetStartingFrameNumber(int)));
|
||||
disconnect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNextFrameNumber(int)));
|
||||
try {
|
||||
auto retval = det->getStartingFrameNumber().tsquash(
|
||||
auto retval = det->getNextFrameNumber().tsquash(
|
||||
"Inconsistent starting frame number for all detectors.");
|
||||
spinStartingFrameNumber->setValue(retval);
|
||||
spinNextFrameNumber->setValue(retval);
|
||||
}
|
||||
CATCH_DISPLAY("Could not get starting frame number.",
|
||||
"qTabMeasurement::GetStartingFrameNumber")
|
||||
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetStartingFrameNumber(int)));
|
||||
"qTabMeasurement::GetNextFrameNumber")
|
||||
connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNextFrameNumber(int)));
|
||||
}
|
||||
|
||||
void qTabMeasurement::SetStartingFrameNumber(int val) {
|
||||
void qTabMeasurement::SetNextFrameNumber(int val) {
|
||||
LOG(logINFO) << "Setting Starting frame number to " << val;
|
||||
try {
|
||||
det->setStartingFrameNumber(val);
|
||||
det->setNextFrameNumber(val);
|
||||
}
|
||||
CATCH_HANDLE("Could not set starting frame number.",
|
||||
"qTabMeasurement::SetStartingFrameNumber", this,
|
||||
&qTabMeasurement::GetStartingFrameNumber)
|
||||
"qTabMeasurement::SetNextFrameNumber", this,
|
||||
&qTabMeasurement::GetNextFrameNumber)
|
||||
}
|
||||
|
||||
void qTabMeasurement::ResetProgress() {
|
||||
@ -928,7 +928,7 @@ void qTabMeasurement::AcquireFinished() {
|
||||
UpdateProgress();
|
||||
GetRunIndex();
|
||||
if (startingFnumImplemented) {
|
||||
GetStartingFrameNumber();
|
||||
GetNextFrameNumber();
|
||||
}
|
||||
LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished";
|
||||
// next measurement if acq is not stopped
|
||||
@ -948,8 +948,11 @@ void qTabMeasurement::AcquireFinished() {
|
||||
}
|
||||
}
|
||||
|
||||
void qTabMeasurement::AbortAcquire() {
|
||||
void qTabMeasurement::AbortAcquire(QString exmsg) {
|
||||
LOG(logINFORED) << "Abort Acquire";
|
||||
qDefs::ExceptionMessage("Acquire unsuccessful.",
|
||||
exmsg.toAscii().constData(),
|
||||
"qDrawPlot::AcquireFinished");
|
||||
isAcquisitionStopped = true;
|
||||
AcquireFinished();
|
||||
}
|
||||
@ -995,7 +998,7 @@ void qTabMeasurement::Refresh() {
|
||||
GetFileName();
|
||||
GetRunIndex();
|
||||
if (startingFnumImplemented) {
|
||||
GetStartingFrameNumber();
|
||||
GetNextFrameNumber();
|
||||
}
|
||||
ResetProgress();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "qTabSettings.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "qDefs.h"
|
||||
#include "sls/ToString.h"
|
||||
#include <QStandardItemModel>
|
||||
|
||||
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)
|
||||
@ -14,14 +14,24 @@ qTabSettings::~qTabSettings() {}
|
||||
|
||||
void qTabSettings::SetupWidgetWindow() {
|
||||
|
||||
spinThreshold2->hide();
|
||||
spinThreshold3->hide();
|
||||
btnSetThreshold->hide();
|
||||
btnSetThreshold->setEnabled(false);
|
||||
// enabling according to det type
|
||||
slsDetectorDefs::detectorType detType = det->getDetectorType().squash();
|
||||
if (detType == slsDetectorDefs::MYTHEN3) {
|
||||
lblSettings->setEnabled(false);
|
||||
comboSettings->setEnabled(false);
|
||||
|
||||
lblDynamicRange->setEnabled(true);
|
||||
comboDynamicRange->setEnabled(true);
|
||||
|
||||
spinThreshold2->show();
|
||||
spinThreshold3->show();
|
||||
lblThreshold->setEnabled(true);
|
||||
spinThreshold->setEnabled(true);
|
||||
spinThreshold2->setEnabled(true);
|
||||
spinThreshold3->setEnabled(true);
|
||||
btnSetThreshold->setEnabled(true);
|
||||
btnSetThreshold->show();
|
||||
// disable dr
|
||||
QStandardItemModel *model =
|
||||
qobject_cast<QStandardItemModel *>(comboDynamicRange->model());
|
||||
@ -34,7 +44,6 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
item = model->itemFromIndex(index);
|
||||
item->setEnabled(false);
|
||||
}
|
||||
|
||||
} else if (detType == slsDetectorDefs::EIGER) {
|
||||
lblDynamicRange->setEnabled(true);
|
||||
comboDynamicRange->setEnabled(true);
|
||||
@ -48,6 +57,10 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
SetupDetectorSettings();
|
||||
}
|
||||
spinThreshold->setValue(-1);
|
||||
if (detType == slsDetectorDefs::MYTHEN3) {
|
||||
spinThreshold2->setValue(-1);
|
||||
spinThreshold3->setValue(-1);
|
||||
}
|
||||
Initialization();
|
||||
// default for the disabled
|
||||
GetDynamicRange();
|
||||
@ -104,6 +117,11 @@ void qTabSettings::SetupDetectorSettings() {
|
||||
item[(int)G4_HIGHGAIN]->setEnabled(true);
|
||||
item[(int)G4_LOWGAIN]->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
item[(int)STANDARD]->setEnabled(true);
|
||||
item[(int)FAST]->setEnabled(true);
|
||||
item[(int)HIGHGAIN]->setEnabled(true);
|
||||
break;
|
||||
default:
|
||||
LOG(logDEBUG) << "Unknown detector type. Exiting GUI.";
|
||||
qDefs::Message(qDefs::CRITICAL,
|
||||
@ -126,7 +144,13 @@ void qTabSettings::Initialization() {
|
||||
SLOT(SetDynamicRange(int)));
|
||||
|
||||
// Threshold
|
||||
if (spinThreshold->isEnabled())
|
||||
// m3
|
||||
if (btnSetThreshold->isEnabled()) {
|
||||
connect(btnSetThreshold, SIGNAL(clicked()), this,
|
||||
SLOT(SetThresholdEnergies()));
|
||||
}
|
||||
// eiger
|
||||
else if (spinThreshold->isEnabled())
|
||||
connect(spinThreshold, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetThresholdEnergy(int)));
|
||||
}
|
||||
@ -169,7 +193,7 @@ void qTabSettings::SetSettings(int index) {
|
||||
CATCH_HANDLE("Could not set settings.", "qTabSettings::SetSettings", this,
|
||||
&qTabSettings::GetSettings)
|
||||
// threshold
|
||||
if (spinThreshold->isEnabled()) {
|
||||
if (det->getDetectorType().squash() == slsDetectorDefs::EIGER) {
|
||||
SetThresholdEnergy(spinThreshold->value());
|
||||
}
|
||||
}
|
||||
@ -233,6 +257,23 @@ void qTabSettings::SetDynamicRange(int index) {
|
||||
&qTabSettings::GetDynamicRange)
|
||||
}
|
||||
|
||||
void qTabSettings::GetThresholdEnergies() {
|
||||
LOG(logDEBUG) << "Getting theshold energies";
|
||||
disconnect(btnSetThreshold, SIGNAL(clicked()), this,
|
||||
SLOT(SetThresholdEnergies()));
|
||||
try {
|
||||
auto retval = det->getAllThresholdEnergy().tsquash(
|
||||
"Inconsistent threhsold energies for all detectors.");
|
||||
spinThreshold->setValue(retval[0]);
|
||||
spinThreshold2->setValue(retval[1]);
|
||||
spinThreshold3->setValue(retval[2]);
|
||||
}
|
||||
CATCH_DISPLAY("Could not get threshold energy.",
|
||||
"qTabDataOutput::GetThresholdEnergies")
|
||||
connect(btnSetThreshold, SIGNAL(clicked()), this,
|
||||
SLOT(SetThresholdEnergies()));
|
||||
}
|
||||
|
||||
void qTabSettings::GetThresholdEnergy() {
|
||||
LOG(logDEBUG) << "Getting theshold energy";
|
||||
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this,
|
||||
@ -248,6 +289,23 @@ void qTabSettings::GetThresholdEnergy() {
|
||||
SLOT(SetThresholdEnergy(int)));
|
||||
}
|
||||
|
||||
void qTabSettings::SetThresholdEnergies() {
|
||||
std::array<int, 3> eV = {spinThreshold->value(), spinThreshold2->value(),
|
||||
spinThreshold3->value()};
|
||||
slsDetectorDefs::detectorSettings sett =
|
||||
static_cast<slsDetectorDefs::detectorSettings>(
|
||||
comboSettings->currentIndex());
|
||||
LOG(logINFO) << "Setting Threshold Energies to " << sls::ToString(eV)
|
||||
<< " (eV)";
|
||||
try {
|
||||
det->setThresholdEnergy(eV, sett);
|
||||
}
|
||||
CATCH_DISPLAY("Could not get threshold energies.",
|
||||
"qTabSettings::SetThresholdEnergies")
|
||||
// set the right value anyway (due to tolerance)
|
||||
GetThresholdEnergies();
|
||||
}
|
||||
|
||||
void qTabSettings::SetThresholdEnergy(int index) {
|
||||
LOG(logINFO) << "Setting Threshold Energy to " << index << " eV";
|
||||
try {
|
||||
@ -270,8 +328,14 @@ void qTabSettings::Refresh() {
|
||||
GetDynamicRange();
|
||||
}
|
||||
|
||||
if (spinThreshold->isEnabled())
|
||||
// m3
|
||||
if (btnSetThreshold->isEnabled())
|
||||
GetThresholdEnergies();
|
||||
// eiger
|
||||
else if (spinThreshold->isEnabled()) {
|
||||
LOG(logINFOBLUE) << "calling it!";
|
||||
GetThresholdEnergy();
|
||||
}
|
||||
|
||||
LOG(logDEBUG) << "**Updated Settings Tab";
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ add_executable(ctbDetectorServer_virtual
|
||||
include_directories(
|
||||
../slsDetectorServer/include
|
||||
../../slsSupportLib/include
|
||||
../../slsDetectorSoftware/include/sls/
|
||||
)
|
||||
|
||||
target_include_directories(ctbDetectorServer_virtual
|
||||
|
@ -2,10 +2,11 @@ current_dir = $(shell pwd)
|
||||
main_inc = ../slsDetectorServer/include/
|
||||
main_src = ../slsDetectorServer/src/
|
||||
support_lib = ../../slsSupportLib/include/
|
||||
det_lib = ../../slsDetectorSoftware/include/sls/
|
||||
|
||||
CROSS = bfin-uclinux-
|
||||
CC = $(CROSS)gcc
|
||||
CFLAGS += -Wall -std=gnu99 -DCHIPTESTBOARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
|
||||
CFLAGS += -Wall -std=gnu99 -DCHIPTESTBOARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
|
||||
LDLIBS += -lm -lrt -pthread
|
||||
PROGS = ctbDetectorServer
|
||||
DESTDIR ?= bin
|
||||
|
Binary file not shown.
@ -35,7 +35,7 @@ int Beb_activated = 1;
|
||||
uint32_t Beb_detid = 0;
|
||||
int Beb_top = 0;
|
||||
|
||||
uint64_t Beb_deactivatedStartFrameNumber = 0;
|
||||
uint64_t Beb_deactivatedNextFrameNumber = 0;
|
||||
int Beb_quadEnable = 0;
|
||||
int Beb_positions[2] = {0, 0};
|
||||
int Beb_readNLines = MAX_ROWS_PER_READOUT;
|
||||
@ -1441,22 +1441,22 @@ int Beb_SetDetectorPosition(int pos[]) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int Beb_SetStartingFrameNumber(uint64_t value) {
|
||||
int Beb_SetNextFrameNumber(uint64_t value) {
|
||||
if (!Beb_activated) {
|
||||
Beb_deactivatedStartFrameNumber = value;
|
||||
Beb_deactivatedNextFrameNumber = value;
|
||||
return OK;
|
||||
}
|
||||
LOG(logINFO,
|
||||
("Setting start frame number: %llu\n", (long long unsigned int)value));
|
||||
("Setting next frame number: %llu\n", (long long unsigned int)value));
|
||||
|
||||
u_int32_t *csp0base = 0;
|
||||
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_TEST_BASEADDR);
|
||||
if (fd < 0) {
|
||||
LOG(logERROR, ("Set Start Frame Number FAIL\n"));
|
||||
LOG(logERROR, ("Set next Frame Number FAIL\n"));
|
||||
return FAIL;
|
||||
}
|
||||
// since the read is not implemented in firmware yet
|
||||
Beb_deactivatedStartFrameNumber = value;
|
||||
Beb_deactivatedNextFrameNumber = value;
|
||||
|
||||
// decrement for firmware
|
||||
uint64_t valueInFirmware = value - 1;
|
||||
@ -1471,17 +1471,17 @@ int Beb_SetStartingFrameNumber(uint64_t value) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
int Beb_GetStartingFrameNumber(uint64_t *retval, int tengigaEnable) {
|
||||
int Beb_GetNextFrameNumber(uint64_t *retval, int tengigaEnable) {
|
||||
if (!Beb_activated) {
|
||||
*retval = Beb_deactivatedStartFrameNumber;
|
||||
*retval = Beb_deactivatedNextFrameNumber;
|
||||
return OK;
|
||||
}
|
||||
|
||||
LOG(logDEBUG1, ("Getting start frame number\n"));
|
||||
LOG(logDEBUG1, ("Getting next frame number\n"));
|
||||
u_int32_t *csp0base = 0;
|
||||
int fd = Beb_open(&csp0base, XPAR_COUNTER_BASEADDR);
|
||||
if (fd < 0) {
|
||||
LOG(logERROR, ("Get Start Frame Number FAIL\n"));
|
||||
LOG(logERROR, ("Get next Frame Number FAIL\n"));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user