mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 13:57:13 +02:00
Compare commits
660 Commits
6.0.0-rc1
...
2022.05.10
Author | SHA1 | Date | |
---|---|---|---|
f55bdd6eae | |||
36a1159f38 | |||
98e2ddbb74 | |||
fa12ab2858 | |||
afeee5501c | |||
b7153fe3e0 | |||
2db2694660 | |||
e1642cf37c | |||
086d22f1a3 | |||
52882cba20 | |||
27c7fd9a97 | |||
5d16ba7e16 | |||
d8c6f9141d | |||
e9dc3d8c38 | |||
62418c1316 | |||
835aa575b0 | |||
b42d65c5e2 | |||
150d27cf95 | |||
95ed9551c0 | |||
0f2ec47b5f | |||
fe895cd782 | |||
11bf6a5c58 | |||
8bce87c082 | |||
61f38bf5a9 | |||
cbc7066620 | |||
509ed9101f | |||
191cfa0abe | |||
f712847061 | |||
b875a95bd5 | |||
45f57ebeb7 | |||
0309eba3c6 | |||
f0448b3cec | |||
a18af0b726 | |||
6aa5cb8d3e | |||
479906a9eb | |||
28a503ed5a | |||
b3c5a431d0 | |||
43cde3609a | |||
9d2d8fe1d7 | |||
1826dd46cb | |||
cf6423dbbe | |||
8b1851e652 | |||
5913864cbb | |||
c2ef6d700e | |||
76296507ff | |||
03d2158472 | |||
bb7b676ca2 | |||
e1988bf088 | |||
8ef1a209c9 | |||
28572af3ab | |||
c57e528447 | |||
74e325edb4 | |||
e68499bb09 | |||
8ce6868e46 | |||
f5cca7a98f | |||
b9aa0f46e4 | |||
6cd780ae99 | |||
f2be834d55 | |||
e55e18d5e9 | |||
66900da476 | |||
13ec32c79a | |||
1ff35edb99 | |||
9a969c1549 | |||
039e1fd829 | |||
fc41d4313f | |||
4bd4364a3a | |||
4b697dd9db | |||
6470277e43 | |||
2453390cc3 | |||
fa694dbc4c | |||
ea1222ac5b | |||
cbed2e88c6 | |||
4cce1dbd7f | |||
1710177af4 | |||
5c79a1a1e8 | |||
0f02ffdc9a | |||
83d76267f9 | |||
9ff43efdc5 | |||
21c21a423d | |||
e479b7d4be | |||
8f0398681e | |||
b112cf81c4 | |||
589124845a | |||
90d1d0f8b8 | |||
1e564a1b33 | |||
5fe10c19a1 | |||
de5c298d99 | |||
2a1f6dc544 | |||
fc21a6763d | |||
fd8e1b2ef7 | |||
0803f1bc1f | |||
9995b74217 | |||
2823451c9d | |||
0f4bcf3a9d | |||
74d55db3f0 | |||
2b35101b17 | |||
f538b8b10b | |||
fb012aa9e9 | |||
82bad7fec6 | |||
717922f380 | |||
3250dda7eb | |||
dffac3014e | |||
586149f3e7 | |||
088dd2c9f8 | |||
89395bd990 | |||
3144f40068 | |||
2fe24c108b | |||
bbfe3b278f | |||
c9fd8ba569 | |||
faa4f09a82 | |||
1ca2e61a85 | |||
7fa51e2a8e | |||
adbd2b853d | |||
0e6d92118f | |||
3796182eb1 | |||
570651a9f8 | |||
afbc414afe | |||
ca0aa7144c | |||
3e5b8840b4 | |||
f1da831e10 | |||
06281ccae9 | |||
509946d964 | |||
95f9da9d70 | |||
4a663e9e50 | |||
b02dec8157 | |||
c361b9517c | |||
78823760b3 | |||
d80006a024 | |||
561777dad6 | |||
c1895c4bc8 | |||
7b66466186 | |||
ef1c52ddc1 | |||
7bd4b9d9d9 | |||
39d3ee2b15 | |||
401467c700 | |||
c9769579e3 | |||
7663d4ef53 | |||
9c1bc262e5 | |||
c17914e0a1 | |||
7d91a15834 | |||
43c46841c1 | |||
fc6c6985e6 | |||
14c63810d6 | |||
6f0eebfbb8 | |||
c8bed64b91 | |||
e1762605e8 | |||
62fff64d87 | |||
7a39822813 | |||
de9e83fd61 | |||
80d31bbb10 | |||
45171d82a4 | |||
9e050060f3 | |||
ed5a1cdf1c | |||
34588356e8 | |||
b6d63a8381 | |||
dd8aebb0ab | |||
261ac78743 | |||
0437bd0584 | |||
46578d1447 | |||
5566cfd24f | |||
5869c25658 | |||
0b7c202f98 | |||
4db34effda | |||
5a5d4eadf1 | |||
b9016fad12 | |||
a1ee681135 | |||
219318a52e | |||
89edf58f41 | |||
ef3df36e55 | |||
6d2302bcc1 | |||
939fc70284 | |||
6695b10354 | |||
94adba72bf | |||
1063e8b929 | |||
c9abeace8f | |||
5bfdbf59a2 | |||
1cd347a54d | |||
76eb09eb04 | |||
a936cc26cc | |||
92beb3aa2a | |||
543eb7bb60 | |||
2034362eca | |||
7245db5cc8 | |||
8c4a4b7182 | |||
11ad019d47 | |||
e29d73251e | |||
c14fb92c16 | |||
e4b80703ae | |||
2b2533f465 | |||
8f632db2a0 | |||
daa536077d | |||
bf1df92303 | |||
5e97bcde7f | |||
aa7dee1011 | |||
54313af2f8 | |||
ab302a5160 | |||
7a607c6dd1 | |||
83ff4ab112 | |||
fb631187fa | |||
8770c9f6fb | |||
6e0d7b91bd | |||
6433704086 | |||
aea0efa1b6 | |||
8ffa2c1d65 | |||
47f9ab4027 | |||
0d521b64b6 | |||
0fb6c8b823 | |||
d2731c77a3 | |||
40a9dce7e0 | |||
2ba89b8a45 | |||
4cfb35c176 | |||
4107938921 | |||
6d794cdf4b | |||
29cd944c11 | |||
e5ec218e5f | |||
0ac20a3bc8 | |||
c38f292613 | |||
faa9ecf97c | |||
6e32679def | |||
649451f824 | |||
83a65f85ab | |||
8eb5c19187 | |||
a1888bf7c9 | |||
fa929b138e | |||
7eb9cb1840 | |||
7e5e9faf1c | |||
9a9a8ae836 | |||
f2cca765be | |||
e8ededc1d1 | |||
dc1fbb8ce4 | |||
2cf539c16e | |||
bcca99e38c | |||
abfa627246 | |||
f9a88b0f79 | |||
5b4cc53f8c | |||
251f07a9ae | |||
75f98b27a3 | |||
c9fbd7afdf | |||
f228fde6f7 | |||
20f3fb19af | |||
cfe627d348 | |||
753387c34c | |||
83e0599a37 | |||
b8de1955e3 | |||
ac5d60155d | |||
7535decd7f | |||
8f2bacfd53 | |||
771b1e7877 | |||
e8cf366616 | |||
3350e3997e | |||
dae77a50e6 | |||
bb5782eb92 | |||
26faaa307b | |||
510d8717b5 | |||
bc4cf95d0e | |||
97417737b6 | |||
47c6954044 | |||
7af5d991d9 | |||
cace18e535 | |||
778fe17f2b | |||
6aa8eff6ea | |||
d92d696c2b | |||
abdc755dc2 | |||
2c842afbf4 | |||
6c662b1370 | |||
1a1533cad8 | |||
59085f7dc3 | |||
8f30394f63 | |||
f49e45ca6c | |||
ef1e41fc12 | |||
d0f761b2ad | |||
5825428779 | |||
0ed7d1e9b1 | |||
9168bc3ec9 | |||
158719e325 | |||
2a63548f40 | |||
bf83c9b3e2 | |||
c236cbf17b | |||
6793f5e530 | |||
63ebc03df0 | |||
df6b9e192b | |||
a1b2bed3aa | |||
ca8a1c046a | |||
a4cd4fd14a | |||
328279d315 | |||
92c767859f | |||
3eafcd69a7 | |||
aa992840b6 | |||
b17a49c06b | |||
1f308a5730 | |||
8e98bba9c5 | |||
963e9ee501 | |||
8d7a55c2df | |||
5a3caf22d4 | |||
4cd027507d | |||
a771c56f6f | |||
80c1c6428a | |||
b5070f384a | |||
bae41e74eb | |||
76901d4135 | |||
5e817d68da | |||
e5b42d411e | |||
3c0b57eaa1 | |||
5d4c35ddbe | |||
6a02264af6 | |||
6be983ca1c | |||
ab28615999 | |||
8995d3db8d | |||
7b37489cdc | |||
5a69c60205 | |||
f6e76145c1 | |||
28fe6eadb5 | |||
0d0429983b | |||
379d08dd03 | |||
bf43b003b6 | |||
dbb6accfbe | |||
a2f46aa2dd | |||
eb715e82cb | |||
8a64d055b3 | |||
6c0356ff90 | |||
7cc7d979e4 | |||
a44284834a | |||
27e48851e6 | |||
c554bbb2d3 | |||
c45f2a282c | |||
623b1de8a0 | |||
9328aadfa3 | |||
4a15b31b04 | |||
01e8414162 | |||
3b11000532 | |||
f38c1c8714 | |||
664c992028 | |||
02174f79d1 | |||
5f40e32924 | |||
ef8de7b2be | |||
7c740445dc | |||
f95a15c841 | |||
193ab75ebe | |||
062ab63289 | |||
50c1056eb2 | |||
14d10d2f8f | |||
5403656e79 | |||
26aa129004 | |||
945adebe2e | |||
753cbbd18c | |||
bfccc004e8 | |||
987404a14e | |||
a41b6f73d4 | |||
7871a78c8f | |||
e5be13f064 | |||
c15131f8f6 | |||
15c887f413 | |||
01d7831abf | |||
182e5fdadb | |||
fd655437ab | |||
88869c1746 | |||
c92d0e5ee2 | |||
549fef5680 | |||
79affe1ea4 | |||
2aaf59adb3 | |||
f9eed62a45 | |||
f818ac46b8 | |||
1e309b67ef | |||
22c820771a | |||
ae9691e848 | |||
4fce0dcd9c | |||
77fb8280f1 | |||
2dd98c6054 | |||
9101200283 | |||
6057de2a6d | |||
f476266e5e | |||
066706872d | |||
f98c403f06 | |||
5dcc2ab35c | |||
d80c5e1c02 | |||
7acc201797 | |||
57a52ba2dc | |||
c011129c43 | |||
2ed8b85143 | |||
5ac2fc33ff | |||
c169e6b896 | |||
497d29db39 | |||
2fbf0d6996 | |||
16246407c5 | |||
4a89bef87b | |||
a146257b13 | |||
340b18ca83 | |||
271f6da92e | |||
9d20bf25c6 | |||
6668fef61a | |||
a455a95aab | |||
7f7a691b25 | |||
7536971b34 | |||
8ca11ec705 | |||
00d63e48bb | |||
146da0f20f | |||
993ba5926e | |||
44424bcbe3 | |||
3570795469 | |||
a9d61526ef | |||
2a5116f49a | |||
5e0408474d | |||
e7b11f3eb1 | |||
c1e374ed51 | |||
eb690437c9 | |||
f076c1cbb7 | |||
de9854e773 | |||
150d8f5fda | |||
b0a5a76065 | |||
77e610f5a5 | |||
0689c82e98 | |||
ce94364c73 | |||
1ed10acc01 | |||
2c57d5f72d | |||
0d867c91d9 | |||
845920f8cc | |||
eff4ba01b9 | |||
bcf0922b8d | |||
d689c415e4 | |||
e9caa53af0 | |||
81eb0217ad | |||
0e23665de5 | |||
044843c8b7 | |||
9d63875802 | |||
9aea183f5c | |||
f39f93b2c8 | |||
ed2e6e4e28 | |||
74348afcf6 | |||
a101e18d60 | |||
d9686e0b6a | |||
5f38165b07 | |||
9d859cb4c2 | |||
7772eb153d | |||
e37725ac12 | |||
f3c95148a7 | |||
b9b3055984 | |||
464ebe70f1 | |||
4f76219456 | |||
18b0e84fbf | |||
1c6e33064b | |||
a74f71be0e | |||
848884f6cf | |||
4690bd0b19 | |||
f7286d29fa | |||
eb666d8b05 | |||
148c979727 | |||
00775b543e | |||
904af4de06 | |||
eb69d7cb69 | |||
0ffd30e147 | |||
eda66e63a5 | |||
6e276770eb | |||
4fb19ceaa5 | |||
1840ad218a | |||
93a191f122 | |||
c532ecc2e8 | |||
25eecf7039 | |||
85d350b48b | |||
ec1ee635d5 | |||
18bbce70b1 | |||
fa822634aa | |||
93a86324fb | |||
9d21062f5a | |||
a099637b7e | |||
4dfdd6f10b | |||
4f6640a6f1 | |||
65a2a9eb06 | |||
169361d459 | |||
0144eff60b | |||
4f5f8408cf | |||
32d664a77d | |||
4a8c365447 | |||
4b46091be2 | |||
5190e2ab30 | |||
adc6cf214a | |||
fb7daf426f | |||
0e9c88dfa2 | |||
233d374a4d | |||
15aa42d328 | |||
14ee2087dc | |||
1e134276ca | |||
d9168803ae | |||
0090c183bf | |||
f5d62b50ce | |||
098601e717 | |||
898ee9b7b7 | |||
1fd15fadf8 | |||
db88f67cda | |||
0f08ddd454 | |||
f8e2522a11 | |||
5143295711 | |||
a59537088b | |||
dde98fc8b6 | |||
c0e3bbbc61 | |||
bf778b5336 | |||
99c44b2592 | |||
6569e4a8bf | |||
3ebfbb123d | |||
8d2bb3d678 | |||
e81e06696a | |||
99ad1d9228 | |||
33c86db019 | |||
f085b4ca1e | |||
7558c43b8c | |||
e332439020 | |||
ea44151cb1 | |||
3167aade45 | |||
44709b1384 | |||
717d68c217 | |||
c218d7dc00 | |||
30d38ecae9 | |||
254b918408 | |||
1506c70329 | |||
729441dcc6 | |||
90b9b57865 | |||
29a41c6b19 | |||
64a25a242b | |||
7b4f8c118b | |||
54ee4ec653 | |||
59bcf6a0d0 | |||
6462a7162e | |||
e15028e94c | |||
81e1221e0d | |||
953fc9bb48 | |||
91cf18c5d1 | |||
642989cab2 | |||
d438b53c68 | |||
6e49b77b08 | |||
5f94ca30f1 | |||
98cf908918 | |||
cb39a59508 | |||
b68ef6cbd0 | |||
eff64f99f2 | |||
2b1028d636 | |||
1da2761654 | |||
7c2e64d9fe | |||
340d708b12 | |||
3f517420af | |||
05c9fcfe19 | |||
dcae1b7a2b | |||
d8570bc9a9 | |||
e3bfdaf38e | |||
5188e600a2 | |||
45b3514118 | |||
2813cd5ac2 | |||
2d2287e189 | |||
c3eff0246a | |||
c911fe4c85 | |||
87a515a549 | |||
0b2d294a19 | |||
b62a6eff64 | |||
dde62f13d5 | |||
146b012eff | |||
95897085ec | |||
e53a71f88f | |||
274ec27934 | |||
1454cc8434 | |||
76c86cb5ac | |||
ec4aca0dd4 | |||
9f27478f95 | |||
ec1bdffa1a | |||
258a0f794c | |||
6caafaea00 | |||
727e52b9e8 | |||
fdd3ab2a60 | |||
a84bd1f881 | |||
1f8823a3b7 | |||
1f4d94b3cc | |||
effbc6f571 | |||
8c8aa175a6 | |||
42b1f9a623 | |||
9e23648801 | |||
6dc4634495 | |||
4b7d73a4ee | |||
0358749b3b | |||
333a23c7e2 | |||
802bd27e50 | |||
0909eabfaf | |||
2f7a0898d6 | |||
e89dd393e2 | |||
76dc6db5c0 | |||
9b321d2ee1 | |||
f7a6160e67 | |||
156ce6a2e5 | |||
9dc217aaa3 | |||
ae736cd0e5 | |||
c5962f40eb | |||
aab5418166 | |||
f61d14a2f1 | |||
836e4c51f3 | |||
b39c64032d | |||
3726ae3fd1 | |||
98c2d52200 | |||
54097ba21c | |||
b8b7966d79 | |||
a1c9947821 | |||
469d4e5c7c | |||
bd0eb22392 | |||
3a543daf55 | |||
c061baaaee | |||
b9fab9bc1f | |||
6cf5072293 | |||
8db1dfb2ce | |||
a54a570a78 | |||
3cfdc063fc | |||
9b521ade27 | |||
313216443a | |||
318a5fd9d5 | |||
dd2e9ff7f3 | |||
27c4d8652e | |||
927f30e55e | |||
51c2e78a31 | |||
a0004dc775 | |||
db4f345b47 | |||
195d28d091 | |||
d7bbcb24c9 | |||
6b94f266bf | |||
203d6465a1 | |||
43bbf66e85 | |||
b665ed87b4 | |||
29fbef7ced | |||
f3ca25d104 | |||
e4b141dda5 | |||
843a35d2f9 | |||
1e2395bd44 | |||
ed81ce2877 | |||
12945916b7 | |||
4367a39b98 | |||
519b09fcad | |||
84f56ff314 | |||
3e70f0cbfb | |||
96f7bf05c8 | |||
7eb05a3637 | |||
ca08cd9ec1 | |||
a0ecf056d8 | |||
479fa23acb | |||
fada085f0e | |||
b913c0059a | |||
dac60ad76d | |||
4de7bb51ed | |||
0801957203 | |||
2d7ffdd603 | |||
576157351e | |||
86a9aa9e38 | |||
928ed201f6 | |||
ae4473d631 | |||
cbe2956ee4 | |||
aff3a6ed20 | |||
e6b18f6a95 | |||
93550ebed7 | |||
8fb4393981 | |||
2bfe0a939d | |||
cfbc4c699f | |||
c0edbc8631 | |||
34bc596ea6 | |||
e172156829 | |||
1c13dd95a0 | |||
c836371b7c | |||
7426110e8a | |||
e84f5bec0b |
@ -19,6 +19,7 @@ Checks: '*,
|
|||||||
-google-readability-braces-around-statements,
|
-google-readability-braces-around-statements,
|
||||||
-modernize-use-trailing-return-type,
|
-modernize-use-trailing-return-type,
|
||||||
-readability-isolate-declaration,
|
-readability-isolate-declaration,
|
||||||
|
-readability-implicit-bool-conversion,
|
||||||
-llvmlibc-*'
|
-llvmlibc-*'
|
||||||
|
|
||||||
HeaderFilterRegex: \.h
|
HeaderFilterRegex: \.h
|
||||||
|
225
CMakeLists.txt
Executable file → Normal file
225
CMakeLists.txt
Executable file → Normal file
@ -1,13 +1,15 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
project(slsDetectorPackage)
|
project(slsDetectorPackage)
|
||||||
set(PROJECT_VERSION 5.1.0)
|
set(PROJECT_VERSION 6.1.1)
|
||||||
include(CheckIPOSupported)
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||||
|
|
||||||
cmake_policy(SET CMP0074 NEW)
|
cmake_policy(SET CMP0074 NEW)
|
||||||
include(cmake/project_version.cmake)
|
include(cmake/project_version.cmake)
|
||||||
|
include(cmake/SlsAddFlag.cmake)
|
||||||
# Include additional modules that are used unconditionally
|
include(cmake/SlsFindZeroMQ.cmake)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# If conda build, always set lib dir to 'lib'
|
# If conda build, always set lib dir to 'lib'
|
||||||
@ -21,7 +23,7 @@ string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
|
|||||||
|
|
||||||
# Set targets export name (used by slsDetectorPackage and dependencies)
|
# Set targets export name (used by slsDetectorPackage and dependencies)
|
||||||
set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWER}-targets")
|
set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWER}-targets")
|
||||||
#set(namespace "${PROJECT_NAME}::")
|
set(namespace "sls::")
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
@ -32,6 +34,8 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
|||||||
set(SLS_MASTER_PROJECT ON)
|
set(SLS_MASTER_PROJECT ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
option(SLS_USE_HDF5 "HDF5 File format" OFF)
|
option(SLS_USE_HDF5 "HDF5 File format" OFF)
|
||||||
option(SLS_BUILD_SHARED_LIBRARIES "Build shared libaries" ON)
|
option(SLS_BUILD_SHARED_LIBRARIES "Build shared libaries" ON)
|
||||||
option(SLS_USE_TEXTCLIENT "Text Client" ON)
|
option(SLS_USE_TEXTCLIENT "Text Client" ON)
|
||||||
@ -51,7 +55,33 @@ option(SLS_TUNE_LOCAL "tune to local machine" OFF)
|
|||||||
option(SLS_DEVEL_HEADERS "install headers for devel" OFF)
|
option(SLS_DEVEL_HEADERS "install headers for devel" OFF)
|
||||||
option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF)
|
option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF)
|
||||||
|
|
||||||
# set(ClangFormat_BIN_NAME clang-format)
|
#Convenience option to switch off defaults when building Moench binaries only
|
||||||
|
option(SLS_BUILD_ONLY_MOENCH "compile only Moench" OFF)
|
||||||
|
if(SLS_BUILD_ONLY_MOENCH)
|
||||||
|
message(STATUS "Build MOENCH binaries only!")
|
||||||
|
set(SLS_BUILD_SHARED_LIBRARIES OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||||
|
set(SLS_USE_TEXTCLIENT OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||||
|
set(SLS_USE_DETECTOR OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||||
|
set(SLS_USE_RECEIVER OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||||
|
set(SLS_USE_RECEIVER_BINARIES OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||||
|
set(SLS_USE_MOENCH ON CACHE BOOL "Enable" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
option(SLS_EXT_BUILD "external build of part of the project" OFF)
|
||||||
|
if(SLS_EXT_BUILD)
|
||||||
|
message(STATUS "External build using already installed libraries")
|
||||||
|
set(SLS_BUILD_SHARED_LIBRARIES OFF CACHE BOOL "Should already exist" FORCE)
|
||||||
|
set(SLS_USE_TEXTCLIENT OFF CACHE BOOL "Should already exist" FORCE)
|
||||||
|
set(SLS_USE_DETECTOR OFF CACHE BOOL "Should already exist" FORCE)
|
||||||
|
set(SLS_USE_RECEIVER OFF CACHE BOOL "Should already exist" FORCE)
|
||||||
|
set(SLS_USE_RECEIVER_BINARIES OFF CACHE BOOL "Should already exist" FORCE)
|
||||||
|
set(SLS_MASTER_PROJECT OFF CACHE BOOL "No master proj in case of extbuild" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#Maybe have an option guarding this?
|
||||||
|
set(SLS_INTERNAL_RAPIDJSON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/rapidjson)
|
||||||
|
|
||||||
set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
||||||
"libs/"
|
"libs/"
|
||||||
"slsDetectorCalibration/"
|
"slsDetectorCalibration/"
|
||||||
@ -62,11 +92,6 @@ set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
|||||||
${CMAKE_BINARY_DIR})
|
${CMAKE_BINARY_DIR})
|
||||||
find_package(ClangFormat)
|
find_package(ClangFormat)
|
||||||
|
|
||||||
#Enable LTO if available
|
|
||||||
check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
|
|
||||||
message(STATUS "SLS_LTO_AVAILABLE:" ${SLS_LTO_AVAILABLE})
|
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
@ -75,70 +100,77 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#Add two fake libraries to manage options
|
#Enable LTO if available
|
||||||
add_library(slsProjectOptions INTERFACE)
|
include(CheckIPOSupported)
|
||||||
add_library(slsProjectWarnings INTERFACE)
|
check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
|
||||||
target_compile_features(slsProjectOptions INTERFACE cxx_std_11)
|
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
||||||
target_compile_options(slsProjectWarnings INTERFACE
|
message(STATUS "Building with link time optimization")
|
||||||
-Wall
|
else()
|
||||||
-Wextra
|
message(STATUS "Building without link time optimization")
|
||||||
-Wno-unused-parameter #Needs to be slowly mitigated
|
endif()
|
||||||
# -Wold-style-cast
|
|
||||||
-Wnon-virtual-dtor
|
|
||||||
-Woverloaded-virtual
|
|
||||||
-Wdouble-promotion
|
|
||||||
-Wformat=2
|
|
||||||
-Wredundant-decls
|
|
||||||
# -Wconversion
|
|
||||||
-Wvla
|
|
||||||
-Wdouble-promotion
|
|
||||||
-Werror=return-type
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#Settings for C code
|
|
||||||
add_library(slsProjectCSettings INTERFACE)
|
|
||||||
target_compile_features(slsProjectCSettings INTERFACE c_std_99)
|
|
||||||
target_compile_options(slsProjectCSettings INTERFACE
|
|
||||||
-Wall
|
|
||||||
-Wextra
|
|
||||||
-Wno-unused-parameter
|
|
||||||
-Wdouble-promotion
|
|
||||||
-Wformat=2
|
|
||||||
-Wredundant-decls
|
|
||||||
-Wdouble-promotion
|
|
||||||
-Werror=return-type
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
#Testing for minimum version for compilers
|
if(SLS_EXT_BUILD)
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
# Find ourself in case of external build
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.2)
|
find_package(slsDetectorPackage ${PROJECT_VERSION} REQUIRED)
|
||||||
message(FATAL_ERROR "Clang version must be at least 3.2!")
|
endif()
|
||||||
endif()
|
|
||||||
target_compile_options(slsProjectWarnings INTERFACE -Wshadow) #Clag does not warn on constructor
|
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
|
|
||||||
message(FATAL_ERROR "GCC version must be at least 4.8!")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
|
|
||||||
|
|
||||||
|
# slsProjectOptions and slsProjectWarnings are used
|
||||||
|
# to control options for the libraries
|
||||||
|
if(NOT TARGET slsProjectOptions)
|
||||||
|
add_library(slsProjectOptions INTERFACE)
|
||||||
|
target_compile_features(slsProjectOptions INTERFACE cxx_std_11)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT TARGET slsProjectWarnings)
|
||||||
|
add_library(slsProjectWarnings INTERFACE)
|
||||||
|
target_compile_options(slsProjectWarnings INTERFACE
|
||||||
|
-Wall
|
||||||
|
-Wextra
|
||||||
|
-Wno-unused-parameter
|
||||||
|
# -Wold-style-cast
|
||||||
|
-Wnon-virtual-dtor
|
||||||
|
-Woverloaded-virtual
|
||||||
|
-Wdouble-promotion
|
||||||
|
-Wformat=2
|
||||||
|
-Wredundant-decls
|
||||||
|
# -Wconversion
|
||||||
|
-Wvla
|
||||||
|
-Wdouble-promotion
|
||||||
|
-Werror=return-type
|
||||||
|
)
|
||||||
|
# Add or disable warnings depending on if the compiler supports them
|
||||||
|
# The function checks internally and sets HAS_warning-name
|
||||||
|
sls_enable_cxx_warning("-Wnull-dereference")
|
||||||
|
sls_enable_cxx_warning("-Wduplicated-cond")
|
||||||
|
sls_disable_cxx_warning("-Wclass-memaccess")
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
target_compile_options(slsProjectWarnings INTERFACE
|
target_compile_options(slsProjectWarnings INTERFACE
|
||||||
-Wno-missing-field-initializers)
|
-Wno-missing-field-initializers)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
|
|
||||||
target_compile_options(slsProjectWarnings INTERFACE
|
|
||||||
-Wno-misleading-indentation # mostly in rapidjson remove using clang format
|
|
||||||
-Wduplicated-cond
|
|
||||||
-Wnull-dereference )
|
|
||||||
|
|
||||||
endif()
|
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
|
|
||||||
target_compile_options(slsProjectWarnings INTERFACE
|
|
||||||
-Wno-class-memaccess )
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if (NOT TARGET slsProjectCSettings)
|
||||||
|
#Settings for C code
|
||||||
|
add_library(slsProjectCSettings INTERFACE)
|
||||||
|
target_compile_options(slsProjectCSettings INTERFACE
|
||||||
|
-std=gnu99 #fixed
|
||||||
|
-Wall
|
||||||
|
-Wextra
|
||||||
|
-Wno-unused-parameter
|
||||||
|
-Wdouble-promotion
|
||||||
|
-Wformat=2
|
||||||
|
-Wredundant-decls
|
||||||
|
-Wdouble-promotion
|
||||||
|
-Werror=return-type
|
||||||
|
)
|
||||||
|
sls_disable_c_warning("-Wstringop-truncation")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@ -154,68 +186,32 @@ if(SLS_TUNE_LOCAL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#rapidjson
|
if(SLS_MASTER_PROJECT)
|
||||||
add_library(rapidjson INTERFACE)
|
install(TARGETS slsProjectOptions slsProjectWarnings
|
||||||
target_include_directories(rapidjson INTERFACE
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libs/rapidjson>
|
|
||||||
)
|
|
||||||
|
|
||||||
# Install fake the libraries
|
|
||||||
install(TARGETS slsProjectOptions slsProjectWarnings rapidjson
|
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_INSTALL_RPATH $ORIGIN)
|
set(CMAKE_INSTALL_RPATH $ORIGIN)
|
||||||
# set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
|
||||||
|
|
||||||
set(ZeroMQ_HINT "" CACHE STRING "Hint where ZeroMQ could be found")
|
custom_find_zmq()
|
||||||
#Adapted from: https://github.com/zeromq/cppzmq/
|
|
||||||
if (NOT TARGET libzmq)
|
|
||||||
if(ZeroMQ_HINT)
|
|
||||||
message(STATUS "Looking for ZeroMQ in: ${ZeroMQ_HINT}")
|
|
||||||
find_package(ZeroMQ 4
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
HINTS ${ZeroMQ_DIR}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
find_package(ZeroMQ 4 QUIET)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# libzmq autotools install: fallback to pkg-config
|
|
||||||
if(NOT ZeroMQ_FOUND)
|
|
||||||
message(STATUS "CMake libzmq package not found, trying again with pkg-config (normal install of zeromq)")
|
|
||||||
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/libzmq-pkg-config)
|
|
||||||
find_package(ZeroMQ 4 REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# TODO "REQUIRED" above should already cause a fatal failure if not found, but this doesn't seem to work
|
|
||||||
if(NOT ZeroMQ_FOUND)
|
|
||||||
message(FATAL_ERROR "ZeroMQ was not found, neither as a CMake package nor via pkg-config")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (ZeroMQ_FOUND AND NOT TARGET libzmq)
|
|
||||||
message(FATAL_ERROR "ZeroMQ version not supported!")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (SLS_USE_TESTS)
|
if (SLS_USE_TESTS)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif(SLS_USE_TESTS)
|
endif(SLS_USE_TESTS)
|
||||||
|
|
||||||
|
|
||||||
|
if(NOT SLS_EXT_BUILD)
|
||||||
|
add_subdirectory(slsSupportLib)
|
||||||
# Common functionallity to detector and receiver
|
endif()
|
||||||
add_subdirectory(slsSupportLib)
|
|
||||||
|
|
||||||
if (SLS_USE_DETECTOR OR SLS_USE_TEXTCLIENT)
|
if (SLS_USE_DETECTOR OR SLS_USE_TEXTCLIENT)
|
||||||
add_subdirectory(slsDetectorSoftware)
|
add_subdirectory(slsDetectorSoftware)
|
||||||
@ -239,7 +235,7 @@ endif (SLS_USE_INTEGRATION_TESTS)
|
|||||||
|
|
||||||
if (SLS_USE_PYTHON)
|
if (SLS_USE_PYTHON)
|
||||||
find_package (Python 3.6 COMPONENTS Interpreter Development)
|
find_package (Python 3.6 COMPONENTS Interpreter Development)
|
||||||
add_subdirectory(libs/pybind11)
|
add_subdirectory(libs/pybind11 ${CMAKE_BINARY_DIR}/bin/)
|
||||||
add_subdirectory(python)
|
add_subdirectory(python)
|
||||||
endif(SLS_USE_PYTHON)
|
endif(SLS_USE_PYTHON)
|
||||||
|
|
||||||
@ -259,16 +255,13 @@ if(SLS_BUILD_DOCS)
|
|||||||
add_subdirectory(docs)
|
add_subdirectory(docs)
|
||||||
endif(SLS_BUILD_DOCS)
|
endif(SLS_BUILD_DOCS)
|
||||||
|
|
||||||
|
|
||||||
if(SLS_USE_MOENCH)
|
if(SLS_USE_MOENCH)
|
||||||
|
add_subdirectory(slsDetectorCalibration/tiffio)
|
||||||
add_subdirectory(slsDetectorCalibration/moenchExecutables)
|
add_subdirectory(slsDetectorCalibration/moenchExecutables)
|
||||||
endif(SLS_USE_MOENCH)
|
endif(SLS_USE_MOENCH)
|
||||||
|
|
||||||
if(SLS_MASTER_PROJECT)
|
if(SLS_MASTER_PROJECT)
|
||||||
# Set install dir CMake packages
|
|
||||||
set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}")
|
set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}")
|
||||||
# Set the list of exported targets
|
|
||||||
set(PROJECT_LIBRARIES slsSupportShared slsDetectorShared slsReceiverShared)
|
set(PROJECT_LIBRARIES slsSupportShared slsDetectorShared slsReceiverShared)
|
||||||
# Generate and install package config file and version
|
|
||||||
include(cmake/package_config.cmake)
|
include(cmake/package_config.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
17
COPYING
Normal file
17
COPYING
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
The SLS Detector Package is provided under:
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
|
|
||||||
|
Being under the terms of the GNU Lesser General Public License version 3 or later,
|
||||||
|
according with:
|
||||||
|
|
||||||
|
LICENSES/LGPL-3.0
|
||||||
|
|
||||||
|
Source code under the Apache 2.0 License have the SPDX Identifier and are
|
||||||
|
according with:
|
||||||
|
|
||||||
|
LICENSES/ThirdParty/Apache-2.0
|
||||||
|
|
||||||
|
All contributions to the SLS Detector Package are subject to this COPYING file.
|
||||||
|
|
||||||
|
|
@ -1,3 +1,17 @@
|
|||||||
|
Valid-License-Identifier: GPL-3.0
|
||||||
|
Valid-License-Identifier: GPL-3.0+
|
||||||
|
SPDX-URL: https://spdx.org/licenses/GPL-3.0-or-later.html
|
||||||
|
Usage-Guide:
|
||||||
|
To use this license in source code, put one of the following SPDX
|
||||||
|
tag/value pairs into a comment according to the placement
|
||||||
|
guidelines in the licensing rules documentation.
|
||||||
|
For 'GNU Library General Public License (LGPL) version 3.0 only' use:
|
||||||
|
SPDX-License-Identifier: GPL-3.0
|
||||||
|
For 'GNU Library General Public License (LGPL) version 3.0 or any later
|
||||||
|
version' use:
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
License-Text:
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 3, 29 June 2007
|
Version 3, 29 June 2007
|
||||||
|
|
@ -1,3 +1,17 @@
|
|||||||
|
Valid-License-Identifier: LGPL-3.0
|
||||||
|
Valid-License-Identifier: LGPL-3.0+
|
||||||
|
SPDX-URL: https://spdx.org/licenses/LGPL-3.0-or-later.html
|
||||||
|
Usage-Guide:
|
||||||
|
To use this license in source code, put one of the following SPDX
|
||||||
|
tag/value pairs into a comment according to the placement
|
||||||
|
guidelines in the licensing rules documentation.
|
||||||
|
For 'GNU Library General Public License (LGPL) version 3.0 only' use:
|
||||||
|
SPDX-License-Identifier: LGPL-3.0
|
||||||
|
For 'GNU Library General Public License (LGPL) version 3.0 or any later
|
||||||
|
version' use:
|
||||||
|
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
|
License-Text:
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
Version 3, 29 June 2007
|
Version 3, 29 June 2007
|
||||||
|
|
210
LICENSES/Third Party/Apache-2.0
Normal file
210
LICENSES/Third Party/Apache-2.0
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
Valid-License-Identifier: Apache-2.0
|
||||||
|
SPDX-URL: https://spdx.org/licenses/Apache-2.0.html
|
||||||
|
Usage-Guide:
|
||||||
|
To use this license in source code, put one of the following SPDX
|
||||||
|
tag/value pairs into a comment according to the placement
|
||||||
|
guidelines in the licensing rules documentation.
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
License-Text:
|
||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
323
RELEASE.txt
323
RELEASE.txt
@ -1,7 +1,7 @@
|
|||||||
SLS Detector Package 6.0.0-rc1 released on 08.10.2021 (Release Candidate 1)
|
SLS Detector Package Minor Release 7.0.0 released on 25.11.2021
|
||||||
===========================================================================
|
===============================================================
|
||||||
|
|
||||||
This document describes the differences between v6.0.0-rc1 and v5.1.0.
|
This document describes the differences between v7.0.0 and v6.x.x
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -9,8 +9,8 @@ This document describes the differences between v6.0.0-rc1 and v5.1.0.
|
|||||||
--------
|
--------
|
||||||
1. New or Changed Features
|
1. New or Changed Features
|
||||||
2. Resolved Issues
|
2. Resolved Issues
|
||||||
3. Known Issues
|
3. Firmware Requirements
|
||||||
4. Firmware Requirements
|
4. Kernel Requirements
|
||||||
5. Download, Documentation & Support
|
5. Download, Documentation & Support
|
||||||
|
|
||||||
|
|
||||||
@ -19,235 +19,60 @@ This document describes the differences between v6.0.0-rc1 and v5.1.0.
|
|||||||
1. New or Changed Features
|
1. New or Changed Features
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
Client
|
- Fixed minor warnings (will fix commandline print of excess packets for missing packets)
|
||||||
------
|
- ctb slow adcs and any other adcs (other than temp) goes to the control Server
|
||||||
|
- number of udp interfaces is 2 for Eiger (CHANGE IN API??)
|
||||||
1. [Jungfrau] Chip version
|
- added module id for virtual servers into the udp header
|
||||||
Features for chipv1.1 incorporated
|
- refactoring (rxr)
|
||||||
Command line: chipversion, API: getchipVersion
|
- fixed patsetbit and patsetmask for moench
|
||||||
gets chip version (1.0 or 1.1)
|
- changed default vref of adc9257 to 2V for moench (from 1.33V)
|
||||||
chipv1.1 requires config_jungfrau.txt on detector server.
|
- moench and ctb - can set the starting frame number of next acquisition
|
||||||
|
- mythen server kernel check incompatible (cet timezone)
|
||||||
2. [Jungfrau] Chip configuration (only chipv1.1)
|
- rx_arping
|
||||||
powering on the chip and changing settings will configure the chip.
|
- rx_threadsids max is now 9 (breaking api)
|
||||||
Hence, required before acquisition.
|
- fixed datastream disabling for eiger. Its only available in 10g mode.
|
||||||
|
- m3 server crash (vthrehsold dac names were not provided)
|
||||||
3. [Jungfrau] Settings and Gain mode
|
- allow vtrim to be interpolated for Eiger settings
|
||||||
Settings can be gain0 and highgain0. Gain mode can be dynamicgain,
|
- m3 setThresholdEnergy and setAllThresholdEnergy was overwriting gaincaps with settings enum
|
||||||
forceswitchg1, forceswitchg2, fixg1, fixg2, fixg0. fixg0 must be
|
- can set localhost with virtual server with minimum configuration: (hostname localhost, rx_hostname localhost, udp_dstip auto)
|
||||||
used with EXTRA caution as you can damage the detector.
|
- increases the progress according to listened index. (not processed index)
|
||||||
Changing settings also changes dac values of 3 dacs () and reconfigures
|
- current frame index points to listened frame index (not processed index)
|
||||||
chip (only v1.1)
|
- when in discard partial frames or empty mode, the frame number doesnt increase by 1, it increases to that number (so its faster)
|
||||||
|
- file write disabled by default
|
||||||
4. [Jungfrau] Storage cells (only chipv1.1)
|
- eiger 12 bit mode
|
||||||
Additional number of storage cells not applicable for chipv1.1.
|
- start non blocking acquisition at modular level
|
||||||
Storage cell start is only allowed from 0 - 3 for chipv1.1
|
- connect master commands to api (allow set master for eiger)
|
||||||
(0 - 15 for chipv1.0).
|
--ignore-config command line
|
||||||
|
- command line argument 'master' mainly for virtual servers (also master/top for real eiger), only one virtual server for eiger, use command lines for master/top
|
||||||
5. [Gotthard2][Jungfrau] Filter Resistor
|
- stop servers also check for errors at startup( in case it was running with an older version)
|
||||||
Command line: filterresistor, API: getFilterResistor/ setFilterResistor
|
- hostname cmd failed when connecting to servers in update mode (ctb, moench, jungfrau, eiger)
|
||||||
Previous Command: filter, setFilter/ getFilter
|
- missingpackets signed (negative => extra packets)
|
||||||
Set Filter resistor. Increasing values for increasing resistance.
|
- framescaught and frameindex now returns a vector for each port
|
||||||
[Jungfrau] only for chipv1.1. Options: [0|1]. Default is 1.
|
- progress looks at activated or enabled ports, so progress does not stagnate
|
||||||
[Gotthard2] Options: [0|1|2|3]. Default is 0.
|
- (eiger) disable datastreaming also for virtual servers only for 10g
|
||||||
|
- missing packets also takes care of disabled ports
|
||||||
6. [Jungfrau] Filter cell (only chipv1.1)
|
- added geometry to metadata
|
||||||
Command line: filtercell, API: getFilterCell/ setFilterCell
|
- 10g eiger nextframenumber get fixed.
|
||||||
Set filter cell. Options: [0-12]. Advanced user command.
|
- stop, able to set nextframenumber to a consistent (max + 1) for all modules if different (eiger/ctb/jungfrau/moench)
|
||||||
|
- ctb: can set names for all the dacs
|
||||||
7. [Jungfrau] Comparator disable time (only chipv1.1)
|
- fpga/kernel programming, checks if drive is a special file and not a normal file
|
||||||
Command line: comp_disable_time, API: getComparatorDisableTime/
|
- gotthard 25 um image reconstructed in gui and virtual hdf5 (firmware updated for slave to reverse channels)
|
||||||
setComparatorDisableTime
|
- master binary file in json format now
|
||||||
One can customize the period to disable comparator.
|
- fixed bug introduced in 6.0.0: hdf5 files created 1 file per frame after the initial file which had maxframesperfile
|
||||||
|
- m3 polarity, interpolation (enables all counters when enabled), pump probe, analog pulsing, digital pulsing
|
||||||
8. [Eiger][Jungfrau] Flip rows
|
- updatedetectorserver - removes old server current binary pointing to for blackfin
|
||||||
Command line: fliprows, API: getFlipRows/ setFlipRows
|
- removing copydetectorserver using tftp
|
||||||
Previous command: flippeddatax, setBottom/ getBottom
|
>>>>>>> developer
|
||||||
[Jungfrau] Flips rows in detector only for HW v2.0.
|
- registerCallBackRawDataReady and registerCallBackRawDataModifyReady now gives a sls_receiver_header* instead of a char*, and uint32_t to size_t
|
||||||
slsReceiver and slsDetectorGui will not flip them again.
|
- registerCallBackStartAcquisition gave incorrect imagesize (+120 bytes). corrected.
|
||||||
[Eiger] same as before.
|
- registerCallBackStartAcquisition parameter is a const string reference
|
||||||
|
- m3 (runnig config second time with tengiga 0, dr !=32, counters !=0x7) calculated incorrect image size expected
|
||||||
9. [Eiger][Jungfrau] Read n rows
|
- fixed row column indexing (mainly for multi module Jungfrau 2 interfaces )
|
||||||
Command line: readnrows, API: getReadNRows/ setReadNRows
|
- eiger gui row indices not flipped anymore (fix in config)
|
||||||
Previous Command: readnlines, getPartialReadout/ setPartialReadout
|
|
||||||
[Eiger] same as before
|
|
||||||
[Jungfrau] Options: 8 - 512, multiples of 8. Default is 512.
|
|
||||||
|
|
||||||
10. [Gotthard2][Jungfrau] Current source
|
|
||||||
Command line: currentsource, API: getCurrentSource, setCurrentSource
|
|
||||||
Enable or disable current source. Default is disabled.
|
|
||||||
[Gotthard2] Can only enable or disable.
|
|
||||||
[Jungfrau] Can choose to fix, select source and choose normal or low
|
|
||||||
current. Normal/ low only for chipv1.1.
|
|
||||||
Select source is 0-63 for chipv1.0 and a 64 bit mask for chipv1.1.
|
|
||||||
|
|
||||||
11. Default dac
|
|
||||||
Command line: defaultdac, API: getDefaultDac/ setDefaultDac
|
|
||||||
change default value of a dac
|
|
||||||
[Jungfrau][Mythen3] Also change default value of dac for particular
|
|
||||||
setting.
|
|
||||||
|
|
||||||
12. Reset dacs
|
|
||||||
Command line: resetdacs, API: resetToDefaultDacs
|
|
||||||
Previous command: defaultdacs
|
|
||||||
Resets dacs to their default values or hard coded values.
|
|
||||||
|
|
||||||
13. [Mythen3] Gain Capacitance
|
|
||||||
Command line: gaincaps, API: getGainCaps/ setGainCaps
|
|
||||||
Set various gain capacitances.
|
|
||||||
|
|
||||||
14. [Gotthard2] Veto Streaming from chip
|
|
||||||
Command line: veto, API: getVeto/ setVeto
|
|
||||||
This command used to mean veto streaming from detector. Now, it means
|
|
||||||
veto streaming from chip (New feature). Default is disabled.
|
|
||||||
|
|
||||||
15. [Gotthard2] Veto streaming from detector
|
|
||||||
Command line: vetostream, API: getVetoStream, setVetoStream
|
|
||||||
Options: None, local link interface, 10 10GbE, Both
|
|
||||||
Default: None
|
|
||||||
10GbE (as before) will enable 2 udp interfaces in receiver.
|
|
||||||
|
|
||||||
16. [Gotthard2] Veto algorithm
|
|
||||||
Command line: vetoalg, API: getVetoAlgorithm/ setVetoAlgorithm
|
|
||||||
Set veto algorithm for each interface.
|
|
||||||
Options: hits, raw
|
|
||||||
|
|
||||||
17. [Eiger][Gotthard2][Mythen3] Module ID
|
|
||||||
Command line: moduleid, API: getModuleId
|
|
||||||
Previous command (Eiger only): serialnumber, getSerialNumber
|
|
||||||
Unique id read from txt file on detector and streamed out in udp header.
|
|
||||||
|
|
||||||
18. [Gotthard2]
|
|
||||||
Command line: dbitpipeline, API: getDBITPipeline/ setDBITPipeline
|
|
||||||
Set pipeline to latch digital bits. Options: 0-7
|
|
||||||
|
|
||||||
19. [Eiger][Jungfrau] Round Robin commands
|
|
||||||
Command line, udp_dstlist, API: getDestinationUDPList/
|
|
||||||
setDestinationUDPList
|
|
||||||
Round robin commands at the moment does not configure the receiver.
|
|
||||||
Set multiple udp destinations in the detector to stream udp data packets
|
|
||||||
to. Upto 32 destinations. Refer documentation for details.
|
|
||||||
|
|
||||||
Command line, udp_numdst, API: getNumberofUDPDestinations
|
|
||||||
|
|
||||||
[Jungfrau] Command line, udp_firstdst, API: getFirstUDPDestination/
|
|
||||||
setFirstUDPDestination
|
|
||||||
|
|
||||||
20. Command Line Parsing
|
|
||||||
Parsing of detector index and module index has been modified to
|
|
||||||
integrate round robin index.
|
|
||||||
[detector index]-[module index]:[round robin index] [command]
|
|
||||||
|
|
||||||
It is backwards compatible.
|
|
||||||
For ease, one can also execute
|
|
||||||
sls_detector_put [module index] [command]
|
|
||||||
|
|
||||||
21. Clear Udp Destination
|
|
||||||
Command line, udp_cleardst, API: clearUDPDestinations
|
|
||||||
This is useful when changing receivers for a detector or for round robin
|
|
||||||
system.
|
|
||||||
|
|
||||||
22. Shared Memory Naming
|
|
||||||
Shared memory name has been changed to reflect a more appropriate naming
|
|
||||||
scheme.
|
|
||||||
|
|
||||||
23. [Eiger][Mythen3] Blocking trigger
|
|
||||||
Command line: blockingtrigger, API: sendSoftwareTrigger
|
|
||||||
Sends software trigger signal to detector and blocks till frames are
|
|
||||||
sent out for that trigger.
|
|
||||||
|
|
||||||
24. [Eiger] Data stream enable for ports
|
|
||||||
Command line: datastream, API: getDataStream/ setDataStream
|
|
||||||
Enable or disable each port. Default: enabled
|
|
||||||
|
|
||||||
25. Changing TCP ports
|
|
||||||
This will only affect shared memory and will not try to change the
|
|
||||||
current tcp port of the control/stop server in detector.
|
|
||||||
|
|
||||||
26. [Eiger][Jungfrau][Gotthard2] Speed
|
|
||||||
Command line: readoutspeed, readoutspeedlist API: getReadoutSpeed/ setReadoutSpeed /
|
|
||||||
getReadoutSpeedList
|
|
||||||
Previous command: speed, setSpeed/ getSpeed
|
|
||||||
[Eiger][Jungfrau] same as before.
|
|
||||||
[Gotthard2] New command to set readout speed. Options: 108, 144 (in MHz)
|
|
||||||
|
|
||||||
|
|
||||||
Detector servers
|
|
||||||
----------------
|
|
||||||
|
|
||||||
1. [Gotthard2] Bad Channels moved to a new register, default settings
|
|
||||||
including clock frequency changed
|
|
||||||
|
|
||||||
2. [Gotthard2] Updated config file in detector server
|
|
||||||
|
|
||||||
|
|
||||||
Virtual servers
|
|
||||||
----------------
|
|
||||||
|
|
||||||
1. Artifical pixel values increasing by every packet, instead of every pixel.
|
|
||||||
|
|
||||||
2. All possible features updated.
|
|
||||||
|
|
||||||
|
|
||||||
Receiver
|
|
||||||
--------
|
|
||||||
|
|
||||||
1. Frames caught in metadata
|
|
||||||
Frames caught by the master receiver is added to master file metadata.
|
|
||||||
Hdf5 and Binary version numbers changed to 6.3
|
|
||||||
|
|
||||||
2. Removed Padding option for Deactivated half modules.
|
|
||||||
|
|
||||||
3. Changing Receiver TCP ports
|
|
||||||
This will only affect shared memory and will not try to change the
|
|
||||||
current tcp port of the receiver.
|
|
||||||
|
|
||||||
Gui
|
|
||||||
----
|
|
||||||
|
|
||||||
1. [Mythen3] counters added in settings tab
|
|
||||||
|
|
||||||
|
|
||||||
2. Resolved Issues
|
2. Resolved Issues
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Detector Servers
|
|
||||||
----------------
|
|
||||||
|
|
||||||
1. [Gotthard2] Tolerance in time parameters.
|
|
||||||
Eg. 220 ns was being set to 215 ns, instead of 222ns.
|
|
||||||
|
|
||||||
2. [Jungfrau] Stopping in trigger mode and then switching to auto timing mode
|
|
||||||
blocks data streaming from detector. Workaround fix made in
|
|
||||||
detector server to reset core until next firmware release.
|
|
||||||
|
|
||||||
3. [Jungfrau][CTB][Moench][Gotthard][Gotthard2][Mythen3] Firmware Programming
|
|
||||||
Firmware programming incorporates more validations such as checksum of
|
|
||||||
program. Always ensure client and server are of same release before
|
|
||||||
programming firmware.
|
|
||||||
|
|
||||||
4. [Eiger] Stop sends last frame
|
|
||||||
Stop acquisition will now also send out all complete frames in fifo.
|
|
||||||
|
|
||||||
5. [Eiger] Bottom not rotated in quad mode. Fixed.
|
|
||||||
|
|
||||||
6. [Mythen3] counter mask effect on vthreshold
|
|
||||||
Setting counter mask changes vth daac values (ie. disabling sets to 2800),
|
|
||||||
vthreshold only changes for enabled counters, setting vth overwrites
|
|
||||||
dac even if counter disabled and when counters enabled, remembers set
|
|
||||||
values.
|
|
||||||
|
|
||||||
7. [Eiger] fast quad fix for loading trimbits
|
|
||||||
|
|
||||||
Receiver
|
|
||||||
--------
|
|
||||||
|
|
||||||
1. Disabled port or deactivated (half) modules will not create files.
|
|
||||||
|
|
||||||
|
|
||||||
- better control of what is built (PR)?
|
|
||||||
- cmake package has hardcoded path to zeromq library
|
|
||||||
|
|
||||||
|
|
||||||
3. Firmware Requirements
|
3. Firmware Requirements
|
||||||
========================
|
========================
|
||||||
@ -268,11 +93,11 @@ This document describes the differences between v6.0.0-rc1 and v5.1.0.
|
|||||||
|
|
||||||
Mythen3
|
Mythen3
|
||||||
=======
|
=======
|
||||||
Compatible version : 10.09.2021 (development)
|
Compatible version : 10.09.2021 (v1.1)
|
||||||
|
|
||||||
Gotthard2
|
Gotthard2
|
||||||
=========
|
=========
|
||||||
Compatible version : 27.05.2021 (v1.0)
|
Compatible version : 27.05.2021 (v0.1)
|
||||||
|
|
||||||
Moench
|
Moench
|
||||||
======
|
======
|
||||||
@ -284,7 +109,6 @@ This document describes the differences between v6.0.0-rc1 and v5.1.0.
|
|||||||
|
|
||||||
Detector Upgrade
|
Detector Upgrade
|
||||||
================
|
================
|
||||||
|
|
||||||
The following can be upgraded remotely:
|
The following can be upgraded remotely:
|
||||||
Eiger via bit files
|
Eiger via bit files
|
||||||
Jungfrau via command <.pof>
|
Jungfrau via command <.pof>
|
||||||
@ -303,25 +127,34 @@ This document describes the differences between v6.0.0-rc1 and v5.1.0.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4. Kernel Requirements
|
||||||
|
======================
|
||||||
|
|
||||||
|
Blackfin
|
||||||
|
========
|
||||||
|
Latest version: Fri Oct 29 00:00:00 2021
|
||||||
|
|
||||||
|
Older ones will work, but might have issues with programming firmware via
|
||||||
|
the package.
|
||||||
|
|
||||||
5. Known Issues
|
Nios
|
||||||
===============
|
====
|
||||||
|
Compatible version: Mon May 10 18:00:21 CEST 2021
|
||||||
|
|
||||||
Receiver
|
Kernel Upgrade
|
||||||
--------
|
==============
|
||||||
1. It does not handle readnrows or partial readout. Only the summary
|
Eiger via bit files
|
||||||
is adjusted to print in red. However, it will still write complete
|
Others via command
|
||||||
images with missing data padded. Roi will be implemented in future
|
|
||||||
that can be complimented with this feature to remove the additional
|
|
||||||
data in files.
|
|
||||||
|
|
||||||
2. Round robin is not implemented in receiver side, ie. one cannot configure
|
Commands: udpatekernel, kernelversion
|
||||||
more than 1 receiver at a time. This will/might be done in the future.
|
Instructions available at
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/commandline.html
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/detector.html
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/pydetector.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
6. Download, Documentation & Support
|
5. Download, Documentation & Support
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
Download
|
Download
|
||||||
|
64
cmake/SlsAddFlag.cmake
Normal file
64
cmake/SlsAddFlag.cmake
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
|
||||||
|
|
||||||
|
function(enable_cxx_warning flag target)
|
||||||
|
string(REPLACE "-W" "HAS_" flag_name ${flag})
|
||||||
|
check_cxx_compiler_flag(${flag} ${flag_name})
|
||||||
|
if(${flag_name})
|
||||||
|
target_compile_options(${target} INTERFACE ${flag})
|
||||||
|
message(STATUS "Adding: ${flag} to ${target}")
|
||||||
|
else()
|
||||||
|
message(STATUS "Flag: ${flag} not supported")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(enable_c_warning flag target)
|
||||||
|
string(REPLACE "-W" "HAS_" flag_name ${flag})
|
||||||
|
check_c_compiler_flag(${flag} ${flag_name})
|
||||||
|
if(${flag_name})
|
||||||
|
target_compile_options(${target} INTERFACE ${flag})
|
||||||
|
message(STATUS "Adding: ${flag} to ${target}")
|
||||||
|
else()
|
||||||
|
message(STATUS "Flag: ${flag} not supported")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
function(disable_cxx_warning flag target)
|
||||||
|
string(REPLACE "-W" "HAS_" flag_name ${flag})
|
||||||
|
check_cxx_compiler_flag(${flag} ${flag_name})
|
||||||
|
|
||||||
|
if(${flag_name})
|
||||||
|
string(REPLACE "-W" "-Wno-" neg_flag ${flag})
|
||||||
|
message(STATUS "Adding: ${neg_flag} to ${target}")
|
||||||
|
target_compile_options(${target} INTERFACE ${neg_flag})
|
||||||
|
else()
|
||||||
|
message(STATUS "Warning: ${flag} not supported no need to disable")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(disable_c_warning flag target)
|
||||||
|
string(REPLACE "-W" "HAS_" flag_name ${flag})
|
||||||
|
check_c_compiler_flag(${flag} ${flag_name})
|
||||||
|
if(${flag_name})
|
||||||
|
string(REPLACE "-W" "-Wno-" neg_flag ${flag})
|
||||||
|
message(STATUS "Adding: ${neg_flag} to ${target}")
|
||||||
|
target_compile_options(${target} INTERFACE ${neg_flag})
|
||||||
|
else()
|
||||||
|
message(STATUS "Warning: ${flag} not supported no need to disable")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
function(sls_disable_c_warning flag)
|
||||||
|
disable_c_warning(${flag} slsProjectCSettings)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(sls_enable_cxx_warning flag)
|
||||||
|
enable_cxx_warning(${flag} slsProjectWarnings)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(sls_disable_cxx_warning flag)
|
||||||
|
disable_cxx_warning(${flag} slsProjectWarnings)
|
||||||
|
endfunction()
|
38
cmake/SlsFindZeroMQ.cmake
Normal file
38
cmake/SlsFindZeroMQ.cmake
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
function(custom_find_zmq)
|
||||||
|
set(ZeroMQ_HINT "" CACHE STRING "Hint where ZeroMQ could be found")
|
||||||
|
#Adapted from: https://github.com/zeromq/cppzmq/
|
||||||
|
if (NOT TARGET libzmq)
|
||||||
|
if(ZeroMQ_HINT)
|
||||||
|
message(STATUS "Looking for ZeroMQ in: ${ZeroMQ_HINT}")
|
||||||
|
find_package(ZeroMQ 4
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
HINTS ${ZeroMQ_HINT}
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
find_package(ZeroMQ 4 QUIET)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# libzmq autotools install: fallback to pkg-config
|
||||||
|
if(ZeroMQ_FOUND)
|
||||||
|
message(STATUS "Found libzmq using find_package")
|
||||||
|
else()
|
||||||
|
message(STATUS "CMake libzmq package not found, trying again with pkg-config (normal install of zeromq)")
|
||||||
|
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/libzmq-pkg-config)
|
||||||
|
find_package(ZeroMQ 4 REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# TODO "REQUIRED" above should already cause a fatal failure if not found, but this doesn't seem to work
|
||||||
|
if(NOT ZeroMQ_FOUND)
|
||||||
|
message(FATAL_ERROR "ZeroMQ was not found, neither as a CMake package nor via pkg-config")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ZeroMQ_FOUND AND NOT TARGET libzmq)
|
||||||
|
message(FATAL_ERROR "ZeroMQ version not supported!")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_target_property(VAR libzmq IMPORTED_LOCATION)
|
||||||
|
message(STATUS "Using libzmq: ${VAR}")
|
||||||
|
|
||||||
|
|
||||||
|
endfunction()
|
36
cmake/libzmq-pkg-config/FindZeroMQ.cmake
Executable file
36
cmake/libzmq-pkg-config/FindZeroMQ.cmake
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#From: https://github.com/zeromq/cppzmq/
|
||||||
|
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON)
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(PC_LIBZMQ QUIET libzmq)
|
||||||
|
|
||||||
|
set(ZeroMQ_VERSION ${PC_LIBZMQ_VERSION})
|
||||||
|
|
||||||
|
find_path(ZeroMQ_INCLUDE_DIR zmq.h
|
||||||
|
PATHS ${ZeroMQ_DIR}/include
|
||||||
|
${PC_LIBZMQ_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(ZeroMQ_LIBRARY
|
||||||
|
NAMES zmq
|
||||||
|
PATHS ${ZeroMQ_DIR}/lib
|
||||||
|
${PC_LIBZMQ_LIBDIR}
|
||||||
|
${PC_LIBZMQ_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(ZeroMQ_LIBRARY OR ZeroMQ_STATIC_LIBRARY)
|
||||||
|
set(ZeroMQ_FOUND ON)
|
||||||
|
message(STATUS "Found libzmq using PkgConfig")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set ( ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY} )
|
||||||
|
set ( ZeroMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR} )
|
||||||
|
|
||||||
|
if (NOT TARGET libzmq)
|
||||||
|
add_library(libzmq UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(libzmq PROPERTIES
|
||||||
|
IMPORTED_LOCATION ${ZeroMQ_LIBRARIES}
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES ${ZeroMQ_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include ( FindPackageHandleStandardArgs )
|
||||||
|
find_package_handle_standard_args ( ZeroMQ DEFAULT_MSG ZeroMQ_LIBRARIES ZeroMQ_INCLUDE_DIRS )
|
@ -26,7 +26,7 @@ install(FILES
|
|||||||
)
|
)
|
||||||
|
|
||||||
install(FILES
|
install(FILES
|
||||||
"${CMAKE_SOURCE_DIR}/libzmq-pkg-config/FindZeroMQ.cmake"
|
"${CMAKE_SOURCE_DIR}/cmake/libzmq-pkg-config/FindZeroMQ.cmake"
|
||||||
COMPONENT devel
|
COMPONENT devel
|
||||||
DESTINATION ${CMAKE_INSTALL_DIR}/libzmq-pkg-config
|
DESTINATION ${CMAKE_INSTALL_DIR}/libzmq-pkg-config
|
||||||
)
|
)
|
||||||
|
2
cmk.sh
2
cmk.sh
@ -1,4 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
CMAKE="cmake3"
|
CMAKE="cmake3"
|
||||||
BUILDDIR="build"
|
BUILDDIR="build"
|
||||||
INSTALLDIR=""
|
INSTALLDIR=""
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
mkdir install
|
mkdir install
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
echo "|<-------- starting python build"
|
echo "|<-------- starting python build"
|
||||||
cd python
|
cd python
|
||||||
|
@ -3,6 +3,7 @@ python:
|
|||||||
- 3.7
|
- 3.7
|
||||||
- 3.8
|
- 3.8
|
||||||
- 3.9
|
- 3.9
|
||||||
|
- 3.10
|
||||||
|
|
||||||
numpy:
|
numpy:
|
||||||
- 1.17
|
- 1.17
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
mkdir $PREFIX/lib
|
mkdir $PREFIX/lib
|
||||||
mkdir $PREFIX/bin
|
mkdir $PREFIX/bin
|
||||||
mkdir $PREFIX/include
|
mkdir $PREFIX/include
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#Copy the GUI
|
#Copy the GUI
|
||||||
mkdir -p $PREFIX/bin
|
mkdir -p $PREFIX/bin
|
||||||
cp build/install/bin/slsDetectorGui $PREFIX/bin/.
|
cp build/install/bin/slsDetectorGui $PREFIX/bin/.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
mkdir -p $PREFIX/lib
|
mkdir -p $PREFIX/lib
|
||||||
mkdir -p $PREFIX/bin
|
mkdir -p $PREFIX/bin
|
||||||
@ -17,4 +19,4 @@ cp build/install/bin/slsMultiReceiver $PREFIX/bin/.
|
|||||||
|
|
||||||
|
|
||||||
cp build/install/include/sls/* $PREFIX/include/sls
|
cp build/install/include/sls/* $PREFIX/include/sls
|
||||||
cp -r build/install/share/ $PREFIX/share
|
cp -rv build/install/share $PREFIX
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
#Copy the Moench executables
|
#Copy the Moench executables
|
||||||
mkdir -p $PREFIX/bin
|
mkdir -p $PREFIX/bin
|
||||||
cp build/install/bin/moench04ZmqProcess $PREFIX/bin/.
|
cp build/install/bin/moench* $PREFIX/bin/.
|
||||||
cp build/install/bin/moenchZmqProcess $PREFIX/bin/.
|
|
||||||
|
@ -1 +1,3 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
ctest -j2
|
ctest -j2
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
|
||||||
find_package(ROOT CONFIG REQUIRED COMPONENTS Core Gui)
|
find_package(ROOT CONFIG REQUIRED COMPONENTS Core Gui)
|
||||||
@ -32,7 +34,7 @@ add_executable(ctbGui
|
|||||||
ctbAdcs.cpp
|
ctbAdcs.cpp
|
||||||
ctbPattern.cpp
|
ctbPattern.cpp
|
||||||
ctbAcquisition.cpp
|
ctbAcquisition.cpp
|
||||||
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/tiffIO.cpp
|
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/tiffio/src/tiffIO.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -41,6 +43,7 @@ target_include_directories(ctbGui PRIVATE
|
|||||||
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/dataStructures
|
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/dataStructures
|
||||||
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/interpolations
|
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/interpolations
|
||||||
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/
|
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/
|
||||||
|
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/tiffio/include/
|
||||||
)
|
)
|
||||||
|
|
||||||
# Headders needed for ROOT dictionary generation
|
# Headders needed for ROOT dictionary generation
|
||||||
@ -59,7 +62,6 @@ set( HEADERS
|
|||||||
#set(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
#set(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
# ROOT dictionary generation
|
# ROOT dictionary generation
|
||||||
include("${ROOT_DIR}/RootMacros.cmake")
|
|
||||||
root_generate_dictionary(ctbDict ${HEADERS} LINKDEF ctbLinkDef.h)
|
root_generate_dictionary(ctbDict ${HEADERS} LINKDEF ctbLinkDef.h)
|
||||||
add_library(ctbRootLib SHARED ctbDict.cxx)
|
add_library(ctbRootLib SHARED ctbDict.cxx)
|
||||||
target_include_directories(ctbRootLib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(ctbRootLib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
@ -84,4 +86,5 @@ target_link_libraries(ctbGui PUBLIC
|
|||||||
set_target_properties(ctbGui PROPERTIES
|
set_target_properties(ctbGui PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
|
||||||
INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h
|
INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
|
||||||
INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h
|
INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h
|
||||||
|
2
ctbGui/ctbAcquisition.cpp
Executable file → Normal file
2
ctbGui/ctbAcquisition.cpp
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
//#define TESTADC
|
//#define TESTADC
|
||||||
|
|
||||||
|
|
||||||
|
2
ctbGui/ctbAcquisition.h
Executable file → Normal file
2
ctbGui/ctbAcquisition.h
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#ifndef CTBACQUISITION_H
|
#ifndef CTBACQUISITION_H
|
||||||
#define CTBACQUISITION_H
|
#define CTBACQUISITION_H
|
||||||
#include <TGFrame.h>
|
#include <TGFrame.h>
|
||||||
|
2
ctbGui/ctbAdcs.cpp
Executable file → Normal file
2
ctbGui/ctbAdcs.cpp
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include <TApplication.h>
|
#include <TApplication.h>
|
||||||
#include <TGClient.h>
|
#include <TGClient.h>
|
||||||
#include <TCanvas.h>
|
#include <TCanvas.h>
|
||||||
|
2
ctbGui/ctbAdcs.h
Executable file → Normal file
2
ctbGui/ctbAdcs.h
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
ctbGui/ctbDacs.cpp
Executable file → Normal file
2
ctbGui/ctbDacs.cpp
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
2
ctbGui/ctbDacs.h
Executable file → Normal file
2
ctbGui/ctbDacs.h
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
|
||||||
#ifndef CTBDACS_H
|
#ifndef CTBDACS_H
|
||||||
|
2
ctbGui/ctbDefs.h
Executable file → Normal file
2
ctbGui/ctbDefs.h
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
2
ctbGui/ctbGui.cpp
Executable file → Normal file
2
ctbGui/ctbGui.cpp
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include <TApplication.h>
|
#include <TApplication.h>
|
||||||
#include <TColor.h>
|
#include <TColor.h>
|
||||||
|
|
||||||
|
2
ctbGui/ctbLinkDef.h
Executable file → Normal file
2
ctbGui/ctbLinkDef.h
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#pragma link C++ class ctbMain;
|
#pragma link C++ class ctbMain;
|
||||||
#pragma link C++ class ctbDacs;
|
#pragma link C++ class ctbDacs;
|
||||||
#pragma link C++ class ctbDac;
|
#pragma link C++ class ctbDac;
|
||||||
|
2
ctbGui/ctbMain.cpp
Executable file → Normal file
2
ctbGui/ctbMain.cpp
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include <TApplication.h>
|
#include <TApplication.h>
|
||||||
#include <TGClient.h>
|
#include <TGClient.h>
|
||||||
#include <TCanvas.h>
|
#include <TCanvas.h>
|
||||||
|
2
ctbGui/ctbMain.h
Executable file → Normal file
2
ctbGui/ctbMain.h
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#ifndef CTBMAIN_H
|
#ifndef CTBMAIN_H
|
||||||
#define CTBMAIN_H
|
#define CTBMAIN_H
|
||||||
#include <TGFrame.h>
|
#include <TGFrame.h>
|
||||||
|
2
ctbGui/ctbPattern.cpp
Executable file → Normal file
2
ctbGui/ctbPattern.cpp
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include <TApplication.h>
|
#include <TApplication.h>
|
||||||
#include <TGClient.h>
|
#include <TGClient.h>
|
||||||
#include <TCanvas.h>
|
#include <TCanvas.h>
|
||||||
|
2
ctbGui/ctbPattern.h
Executable file → Normal file
2
ctbGui/ctbPattern.h
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#ifndef CTBPATTERN_H
|
#ifndef CTBPATTERN_H
|
||||||
#define CTBPATTERN_H
|
#define CTBPATTERN_H
|
||||||
#include <TGFrame.h>
|
#include <TGFrame.h>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include <TGFrame.h>
|
#include <TGFrame.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#ifndef CTBPOWERS_H
|
#ifndef CTBPOWERS_H
|
||||||
#define CTBPOWERS_H
|
#define CTBPOWERS_H
|
||||||
|
|
||||||
|
2
ctbGui/ctbSignals.cpp
Executable file → Normal file
2
ctbGui/ctbSignals.cpp
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include <TApplication.h>
|
#include <TApplication.h>
|
||||||
#include <TGClient.h>
|
#include <TGClient.h>
|
||||||
#include <TCanvas.h>
|
#include <TCanvas.h>
|
||||||
|
2
ctbGui/ctbSignals.h
Executable file → Normal file
2
ctbGui/ctbSignals.h
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#ifndef CTBSIGNALS_H
|
#ifndef CTBSIGNALS_H
|
||||||
#define CTBSIGNALS_H
|
#define CTBSIGNALS_H
|
||||||
#include <TGFrame.h>
|
#include <TGFrame.h>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
|
||||||
#ifndef CTBSLOWADCS_H
|
#ifndef CTBSLOWADCS_H
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
if [ "$#" -eq 0 ]; then
|
if [ "$#" -eq 0 ]; then
|
||||||
echo "Wrong number of arguments: usage should be $0 patname"
|
echo "Wrong number of arguments: usage should be $0 patname"
|
||||||
exit 1
|
exit 1
|
||||||
@ -19,9 +21,10 @@ fi
|
|||||||
|
|
||||||
if [ -f "$infile" ]
|
if [ -f "$infile" ]
|
||||||
then
|
then
|
||||||
gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c ;
|
dir=$(dirname $infile)
|
||||||
|
gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c -I$dir;
|
||||||
echo compiling
|
echo compiling
|
||||||
echo gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c ;
|
echo gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c -I$dir;
|
||||||
$exe ;
|
$exe ;
|
||||||
echo cleaning
|
echo cleaning
|
||||||
rm $exe
|
rm $exe
|
||||||
|
8
ctbGui/patternGenerator/generator.c
Executable file → Normal file
8
ctbGui/patternGenerator/generator.c
Executable file → Normal file
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
usage to generate a patter test.pat from test.p
|
usage to generate a patter test.pat from test.p
|
||||||
|
|
||||||
@ -67,14 +69,14 @@ void setoutput(int bit) {
|
|||||||
mask=mask<<bit;
|
mask=mask<<bit;
|
||||||
iopat |= mask;
|
iopat |= mask;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
void setclk(int bit) {
|
void setclk(int bit) {
|
||||||
uint64_t mask=1;
|
uint64_t mask=1;
|
||||||
mask=mask<<bit;
|
mask=mask<<bit;
|
||||||
iopat |= mask;
|
iopat |= mask;
|
||||||
clkpat |= mask;
|
clkpat |= mask;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
void clearbit(int bit){
|
void clearbit(int bit){
|
||||||
uint64_t mask=1;
|
uint64_t mask=1;
|
||||||
mask=mask<<bit;
|
mask=mask<<bit;
|
||||||
@ -155,7 +157,7 @@ main(void) {
|
|||||||
#include INFILE
|
#include INFILE
|
||||||
|
|
||||||
fprintf(fd,"patioctrl 0x%016llx\n",iopat);
|
fprintf(fd,"patioctrl 0x%016llx\n",iopat);
|
||||||
fprintf(fd,"patclkctrl 0x%016llx\n",clkpat);
|
//fprintf(fd,"patclkctrl 0x%016llx\n",clkpat);
|
||||||
fprintf(fd,"patlimits 0x%04x 0x%04x\n",start, stop);
|
fprintf(fd,"patlimits 0x%04x 0x%04x\n",start, stop);
|
||||||
|
|
||||||
for (iloop=0; iloop<MAXLOOPS; iloop++) {
|
for (iloop=0; iloop<MAXLOOPS; iloop++) {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
find_package(Doxygen REQUIRED)
|
find_package(Doxygen REQUIRED)
|
||||||
find_package(Sphinx REQUIRED)
|
find_package(Sphinx REQUIRED)
|
||||||
|
|
||||||
|
@ -34,6 +34,12 @@ Python bindings
|
|||||||
* pybind11 (packaged in libs/)
|
* pybind11 (packaged in libs/)
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------
|
||||||
|
Moench executables
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
* libtiff
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
Documentation
|
Documentation
|
||||||
-----------------------
|
-----------------------
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
Firmware Upgrade
|
Firmware Upgrade
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Eiger
|
Eiger
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
@ -18,30 +16,9 @@ Upgrade
|
|||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
#. Tftp must be already installed on your pc to use the bcp script.
|
#. Tftp must be already installed on your pc to use the bcp script.
|
||||||
|
|
||||||
#. Kill the on-board servers and copy new servers to the board.
|
#. Copy new servers to the board. See :ref:`how to upgrade detector servers<Detector Server Upgrade>` for more detals. A reboot should have started the new linked servers automatically. For Eiger, do not reboot yet as we need to program the firmware via bit files.
|
||||||
|
|
||||||
.. code-block:: bash
|
* This step is crucial when registers between firmwares change. Failure to do so will result in linux on boards to crash and boards can't be pinged anymore.
|
||||||
|
|
||||||
# Option 1: from detector console
|
|
||||||
# kill old server
|
|
||||||
ssh root@bebxxx
|
|
||||||
killall eigerDetectorServer
|
|
||||||
|
|
||||||
# copy new server
|
|
||||||
cd executables
|
|
||||||
scp user@pc:/path/eigerDetectorServerxxx .
|
|
||||||
chmod 777 eigerDetectorServerxxx
|
|
||||||
ln -sf eigerDetectorServerxxx eigerDetectorServer
|
|
||||||
sync
|
|
||||||
|
|
||||||
# Options 2: from client console for multiple modules
|
|
||||||
for i in bebxxx bebyyy;
|
|
||||||
do ssh root@$i killall eigerDetectorServer;
|
|
||||||
scp eigerDetectorServerxxx root@$i:~/executables/eigerDetectorServer;
|
|
||||||
ssh root@$i sync; done
|
|
||||||
|
|
||||||
|
|
||||||
* This is crucial when registers between firmwares change. Failure to do so will result in linux on boards to crash and boards can't be pinged anymore.
|
|
||||||
|
|
||||||
#. Bring the board into programmable mode using either of the 2 ways. Both methods result in only the central LED blinking.
|
#. Bring the board into programmable mode using either of the 2 ways. Both methods result in only the central LED blinking.
|
||||||
|
|
||||||
@ -50,8 +27,13 @@ Upgrade
|
|||||||
Do a hard reset for each half module on back panel boards, between the LEDs, closer to each of the 1G ethernet connectors. Push until all LEDs start to blink.
|
Do a hard reset for each half module on back panel boards, between the LEDs, closer to each of the 1G ethernet connectors. Push until all LEDs start to blink.
|
||||||
|
|
||||||
* Software:
|
* Software:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Option 1: if the old server is still running:
|
||||||
|
sls_detector_put execcommand "./boot_recovery"
|
||||||
|
|
||||||
|
# Option 2:
|
||||||
ssh root@bebxxx
|
ssh root@bebxxx
|
||||||
cd executables
|
cd executables
|
||||||
./boot_recovery
|
./boot_recovery
|
||||||
@ -79,11 +61,24 @@ Upgrade
|
|||||||
#update front right fpga
|
#update front right fpga
|
||||||
bcp download.bit bebxxx:/febr
|
bcp download.bit bebxxx:/febr
|
||||||
|
|
||||||
#update kernel (only if required by the SLS Detector Group)
|
#update kernel (only if required by us)
|
||||||
bcp download.bit bebxxx:/kernel
|
bcp download.bit bebxxx:/kernel
|
||||||
|
|
||||||
#. Reboot the detector.
|
#. Reboot the detector.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# In the first terminal where we saw "Succeess"
|
||||||
|
# reconfig febX is necessary only if you have flashed a new feb firmware
|
||||||
|
reconfig febl
|
||||||
|
reconfig febr
|
||||||
|
# will reboot controller
|
||||||
|
reconfig fw0
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||||
|
|
||||||
Jungfrau
|
Jungfrau
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
@ -94,75 +89,26 @@ Download
|
|||||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||||
|
|
||||||
|
|
||||||
Upgrade (from v4.x.x)
|
Upgrade
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
.. note ::
|
||||||
|
|
||||||
#. Tftp must be installed on pc.
|
These instructions are for upgrades from v5.0.0. For earlier versions, contact us.
|
||||||
|
|
||||||
#. Update client package to the latest (5.x.x).
|
|
||||||
|
|
||||||
#. Disable server respawning or kill old server
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# Option 1: if respawning enabled
|
|
||||||
telnet bchipxxx
|
|
||||||
# edit /etc/inittab
|
|
||||||
# comment out line #ttyS0::respawn:/jungfrauDetectorServervxxx
|
|
||||||
reboot
|
|
||||||
# ensure servers did not start up after reboot
|
|
||||||
telnet bchipxxx
|
|
||||||
ps
|
|
||||||
|
|
||||||
# Option 2: if respawning already disabled
|
|
||||||
telnet bchipxxx
|
|
||||||
killall jungfrauDetectorServerv*
|
|
||||||
|
|
||||||
#. Copy new server and start in update mode
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
tftp pcxxx -r jungfrauDetectorServervxxx -g
|
|
||||||
chmod 777 jungfrauDetectorServervxxx
|
|
||||||
./jungfrauDetectorServervxxx -u
|
|
||||||
|
|
||||||
#. Program fpga from the client console
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
sls_detector_get free
|
|
||||||
# Crucial that the next command executes without any errors
|
|
||||||
sls_detector_put hostname bchipxxx
|
|
||||||
sls_detector_put programfpga xxx.pof
|
|
||||||
|
|
||||||
#. After programming, kill 'update server' using Ctrl + C in server console.
|
|
||||||
|
|
||||||
#. Enable server respawning if needed
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
telnet bchipxxx
|
|
||||||
# edit /etc/inittab
|
|
||||||
# uncomment out line #ttyS0::respawn:/jungfrauDetectorServervxxx
|
|
||||||
# ensure the line has the new server name
|
|
||||||
reboot
|
|
||||||
# ensure both servers are running using ps
|
|
||||||
jungfrauDetectorServervxxx
|
|
||||||
jungfrauDetectorServervxxx --stop-server 1953
|
|
||||||
|
|
||||||
|
|
||||||
Upgrade (from v5.0.0)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
|
|
||||||
#. Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies server from tftp folder of pc, programs fpga,
|
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
|
||||||
# removes old server from respawn, sets up new server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# and reboots
|
# programs fpga,
|
||||||
|
# reboots
|
||||||
sls_detector_put update jungfrauDetectorServervxxx pcxxx xx.pof
|
sls_detector_put update jungfrauDetectorServervxxx pcxxx xx.pof
|
||||||
|
|
||||||
# Or only program firmware
|
# Or only program firmware
|
||||||
@ -170,8 +116,8 @@ Always ensure that the client and server software are of the same release.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Gotthard
|
Gotthard I
|
||||||
---------
|
-----------
|
||||||
|
|
||||||
Download
|
Download
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
@ -186,7 +132,7 @@ Upgrade
|
|||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
.. warning ::
|
.. warning ::
|
||||||
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
|
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
|
||||||
| It is generally updated by the SLS Detector group.
|
| It is generally updated by us.
|
||||||
|
|
||||||
#. Download `Altera Quartus software or Quartus programmer <https://fpgasoftware.intel.com/20.1/?edition=standard&platform=linux&product=qprogrammer#tabs-4>`__.
|
#. Download `Altera Quartus software or Quartus programmer <https://fpgasoftware.intel.com/20.1/?edition=standard&platform=linux&product=qprogrammer#tabs-4>`__.
|
||||||
|
|
||||||
@ -197,7 +143,7 @@ Upgrade
|
|||||||
|
|
||||||
#. Plug the end of your USB-Blaster with the adaptor provided to the connector 'AS config' on the Gotthard board.
|
#. Plug the end of your USB-Blaster with the adaptor provided to the connector 'AS config' on the Gotthard board.
|
||||||
|
|
||||||
#. Click on 'Add file'. Select programming (pof) file provided by the SLS Detector group.
|
#. Click on 'Add file'. Select programming (pof) file provided by us.
|
||||||
|
|
||||||
#. Check "Program/Configure" and "Verify". Push the start button. Wait until the programming process is finished.
|
#. Check "Program/Configure" and "Verify". Push the start button. Wait until the programming process is finished.
|
||||||
|
|
||||||
@ -206,68 +152,69 @@ Upgrade
|
|||||||
#. Reboot the detector.
|
#. Reboot the detector.
|
||||||
|
|
||||||
|
|
||||||
Mythen3
|
Mythen III
|
||||||
-------
|
-----------
|
||||||
|
|
||||||
.. note ::
|
.. note ::
|
||||||
|
|
||||||
As it is still in developement, the rbf files must be picked up from the SLS Detector Group.
|
As it is still in development, the rbf files must be picked up from us.
|
||||||
|
|
||||||
Download
|
Download
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
|
|
||||||
- rbf files (in developement)
|
- `rbf files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||||
|
|
||||||
|
|
||||||
Upgrade (from v5.0.0)
|
Upgrade
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
#. Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies server from tftp folder of pc, programs fpga,
|
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
|
||||||
# and reboots (new server not respawned currently)
|
# programs fpga,
|
||||||
|
# reboots
|
||||||
sls_detector_put update mythen3DetectorServervxxx pcxxx xxx.rbf
|
sls_detector_put update mythen3DetectorServervxxx pcxxx xxx.rbf
|
||||||
|
|
||||||
# Or only program firmware
|
# Or only program firmware
|
||||||
sls_detector_put programfpga xxx.rbf
|
sls_detector_put programfpga xxx.rbf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Gotthard2
|
|
||||||
-------------
|
|
||||||
|
|
||||||
.. note ::
|
.. note ::
|
||||||
|
|
||||||
As it is still in developement, the rbf files must be picked up from the SLS Detector Group.
|
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||||
|
|
||||||
|
Gotthard II
|
||||||
|
-------------
|
||||||
|
|
||||||
Download
|
Download
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||||
|
|
||||||
- rbf files (in development)
|
- `rbf files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||||
|
|
||||||
|
Upgrade
|
||||||
Upgrade (from v5.0.0)
|
^^^^^^^^
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
#. Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies server from tftp folder of pc, programs fpga,
|
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
|
||||||
# and reboots (new server not respawned currently)
|
# programs fpga,
|
||||||
|
# reboots
|
||||||
sls_detector_put update gotthard2DetectorServervxxx pcxxx xxx.rbf
|
sls_detector_put update gotthard2DetectorServervxxx pcxxx xxx.rbf
|
||||||
|
|
||||||
# Or only program firmware
|
# Or only program firmware
|
||||||
sls_detector_put programfpga xxx.rbf
|
sls_detector_put programfpga xxx.rbf
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||||
|
|
||||||
Moench
|
Moench
|
||||||
-------
|
-------
|
||||||
@ -279,19 +226,21 @@ Download
|
|||||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||||
|
|
||||||
|
|
||||||
Upgrade (from v5.0.0)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
Upgrade
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
#. Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies server from tftp folder of pc, programs fpga,
|
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
|
||||||
# removes old server from respawn, sets up new server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# and reboots
|
# programs fpga,
|
||||||
|
# reboots
|
||||||
sls_detector_put update moenchDetectorServervxxx pcxxx xx.pof
|
sls_detector_put update moenchDetectorServervxxx pcxxx xx.pof
|
||||||
|
|
||||||
# Or only program firmware
|
# Or only program firmware
|
||||||
@ -307,19 +256,21 @@ Download
|
|||||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||||
|
|
||||||
|
|
||||||
Upgrade (from v5.0.0)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
Upgrade
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
#. Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies server from tftp folder of pc, programs fpga,
|
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
|
||||||
# removes old server from respawn, sets up new server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# and reboots
|
# programs fpga,
|
||||||
|
# reboots
|
||||||
sls_detector_put update ctbDetectorServervxxx pcxxx xx.pof
|
sls_detector_put update ctbDetectorServervxxx pcxxx xx.pof
|
||||||
|
|
||||||
# Or only program firmware
|
# Or only program firmware
|
||||||
@ -354,43 +305,53 @@ Firmware Troubleshooting with blackfin
|
|||||||
|
|
||||||
5. 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 (copying new kernel)
|
How to get back mtd3 drive remotely (udpating kernel)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
You have 2 alternatives to update the kernel.
|
||||||
|
|
||||||
.. code-block:: bash
|
1. Commands via software (>= v6.0.0)
|
||||||
|
|
||||||
# step 1: get the kernel image (uImage.lzma) from slsdetectorgroup
|
|
||||||
# and copy it to pc's tftp folder
|
|
||||||
|
|
||||||
# step 2: connect to the board
|
.. code-block:: bash
|
||||||
telnet bchipxxx
|
|
||||||
|
|
||||||
#step 3: go to directory for space
|
sls_detector_put updatekernel /home/...path-to-kernel-image
|
||||||
cd /var/tmp/
|
|
||||||
|
|
||||||
# step 3: copy kernel to board
|
|
||||||
tftp pcxxx -r uImage.lzma -g
|
|
||||||
|
|
||||||
# step 4: verify kernel copied properly
|
2. or command line
|
||||||
ls -lrt
|
|
||||||
|
|
||||||
# step 5: erase flash
|
|
||||||
flash_eraseall /dev/mtd1
|
|
||||||
|
|
||||||
# step 6: copy new image to kernel drive
|
|
||||||
cat uImage.lzma > /dev/mtd1
|
|
||||||
|
|
||||||
# step 7:
|
|
||||||
sync
|
|
||||||
|
|
||||||
# step 8:
|
|
||||||
reboot
|
|
||||||
|
|
||||||
# step 9: verification
|
|
||||||
telnet bchipxxx
|
|
||||||
uname -a # verify kernel date
|
|
||||||
more /proc/mtd # verify mtd3 is listed
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# step 1: get the kernel image (uImage.lzma) from slsdetectorgroup
|
||||||
|
# and copy it to pc's tftp folder
|
||||||
|
|
||||||
|
# step 2: connect to the board
|
||||||
|
telnet bchipxxx
|
||||||
|
|
||||||
|
#step 3: go to directory for space
|
||||||
|
cd /var/tmp/
|
||||||
|
|
||||||
|
# step 3: copy kernel to board
|
||||||
|
tftp pcxxx -r uImage.lzma -g
|
||||||
|
|
||||||
|
# step 4: verify kernel copied properly
|
||||||
|
ls -lrt
|
||||||
|
|
||||||
|
# step 5: erase flash
|
||||||
|
flash_eraseall /dev/mtd1
|
||||||
|
|
||||||
|
# step 6: copy new image to kernel drive
|
||||||
|
cat uImage.lzma > /dev/mtd1
|
||||||
|
|
||||||
|
# step 7:
|
||||||
|
sync
|
||||||
|
|
||||||
|
# step 8:
|
||||||
|
reboot
|
||||||
|
|
||||||
|
# step 9: verification
|
||||||
|
telnet bchipxxx
|
||||||
|
uname -a # verify kernel date
|
||||||
|
more /proc/mtd # verify mtd3 is listed
|
||||||
|
|
||||||
|
|
||||||
Last Resort using USB Blaster
|
Last Resort using USB Blaster
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
/**
|
/**
|
||||||
* Utility program to generate input files for the command line
|
* Utility program to generate input files for the command line
|
||||||
* documentation. Uses the string returned from sls_detector_help cmd
|
* documentation. Uses the string returned from sls_detector_help cmd
|
||||||
@ -43,6 +45,7 @@ int main() {
|
|||||||
|
|
||||||
for (const auto &cmd : commands) {
|
for (const auto &cmd : commands) {
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
|
std::cout << cmd << '\n';
|
||||||
proxy.Call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os);
|
proxy.Call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os);
|
||||||
|
|
||||||
auto tmp = os.str().erase(0, cmd.size());
|
auto tmp = os.str().erase(0, cmd.size());
|
||||||
|
@ -71,4 +71,19 @@ exposed to Python through pybind11.
|
|||||||
:undoc-members:
|
:undoc-members:
|
||||||
|
|
||||||
.. autoclass:: timingSourceType
|
.. autoclass:: timingSourceType
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
|
.. autoclass:: M3_GainCaps
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
|
.. autoclass:: portPosition
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
|
.. autoclass:: streamingInterface
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
|
.. autoclass:: vetoAlgorithm
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
|
.. autoclass:: gainMode
|
||||||
:undoc-members:
|
:undoc-members:
|
@ -136,7 +136,7 @@ can use dir()
|
|||||||
'__str__', '__subclasshook__', '_adc_register', '_frozen',
|
'__str__', '__subclasshook__', '_adc_register', '_frozen',
|
||||||
'_register', 'acquire', 'adcclk', 'adcphase', 'adcpipeline',
|
'_register', 'acquire', 'adcclk', 'adcphase', 'adcpipeline',
|
||||||
'adcreg', 'asamples', 'auto_comp_disable', 'clearAcquiringFlag',
|
'adcreg', 'asamples', 'auto_comp_disable', 'clearAcquiringFlag',
|
||||||
'clearBit', 'clearROI', 'client_version', 'config', 'copyDetectorServer',
|
'clearBit', 'clearROI', 'client_version', 'config',
|
||||||
'counters', 'daclist', 'dacvalues', 'dbitclk', 'dbitphase' ...
|
'counters', 'daclist', 'dacvalues', 'dbitclk', 'dbitphase' ...
|
||||||
|
|
||||||
Since the list for Detector is rather long it's an good idea to filter it.
|
Since the list for Detector is rather long it's an good idea to filter it.
|
||||||
|
@ -36,6 +36,7 @@ Detector Servers include:
|
|||||||
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
||||||
|
|
||||||
|
|
||||||
|
.. _Automatic start servers:
|
||||||
Automatic start
|
Automatic start
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
@ -1,114 +1,66 @@
|
|||||||
|
.. _Detector Server Upgrade:
|
||||||
Detector Server Upgrade
|
Detector Server Upgrade
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Eiger
|
|
||||||
-------------
|
|
||||||
|
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
For Mythen3, Gotthard2 and Eiger, you need to add scripts to automatically start detector server upon power on. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
|
||||||
|
|
||||||
|
|
||||||
|
From 6.1.1 and above (no tftp required)
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
#. Program from console
|
||||||
|
|
||||||
#. Kill old server and copy new server
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Option 1: from detector console
|
# the following command copies new server, creates a soft link to xxxDetectorServerxxx
|
||||||
# kill old server
|
# [Jungfrau][CTB][Moench] also deletes the old server binary and edits initttab to respawn server on reboot
|
||||||
ssh root@bebxxx
|
# Then, the detector controller will reboot (except Eiger)
|
||||||
killall eigerDetectorServer
|
sls_detector_put updatedetectorserver /complete-path-to-binary/xxxDetectorServerxxx
|
||||||
|
|
||||||
# copy new server
|
#. Copy the detector server specific config files or any others required to the detector:
|
||||||
cd executables
|
|
||||||
scp user@pc:/path/eigerDetectorServerxxx .
|
|
||||||
chmod 777 eigerDetectorServerxxx
|
|
||||||
ln -sf eigerDetectorServerxxx eigerDetectorServer
|
|
||||||
sync
|
|
||||||
|
|
||||||
# Options 2: from client console for multiple modules
|
.. code-block:: bash
|
||||||
for i in bebxxx bebyyy;
|
|
||||||
do ssh root@$i killall eigerDetectorServer;
|
|
||||||
scp eigerDetectorServerxxx root@$i:~/executables/eigerDetectorServer;
|
|
||||||
ssh root@$i sync; done
|
|
||||||
|
|
||||||
|
sls_detector_put execcommand "tftp pcxxx -r configxxx -g"
|
||||||
|
|
||||||
#. Reboot the detector.
|
5.0.0 - 6.1.1
|
||||||
|
--------------
|
||||||
|
|
||||||
Jungfrau
|
|
||||||
-------------
|
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
#. Install tftp and copy detector server binary to tftp folder
|
||||||
#. Program from console (only from 5.0.0-rcx)
|
#. Program from console
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# copies new server from pc tftp folder, respawns and reboots
|
# the following command copies new server from pc tftp folder, creates a soft link to xxxDetectorServerxxx
|
||||||
sls_detector_put copydetectorserver jungfrauDetectorServerxxx pcxxx
|
# [Jungfrau][CTB][Moench] also edits initttab to respawn server on reboot
|
||||||
|
# Then, the detector controller will reboot (except Eiger)
|
||||||
|
sls_detector_put copydetectorserver xxxDetectorServerxxx pcxxx
|
||||||
|
|
||||||
|
#. Copy the detector server specific config files or any others required to the detector:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sls_detector_put execcommand "tftp pcxxx -r configxxx -g"
|
||||||
|
|
||||||
|
|
||||||
Gotthard
|
Troubleshooting with tftp
|
||||||
---------
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
#. tftp write error: There is no space left. Please delete some old binaries and try again.
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
#. text file busy: You are trying to copy the same server.
|
||||||
#. Program from console (only from 5.0.0-rcx)
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# copies new server from pc tftp folder, respawns and reboots
|
|
||||||
sls_detector_put copydetectorserver gotthardDetectorServerxxx pcxxx
|
|
||||||
|
|
||||||
|
|
||||||
|
Older than 5.0.0
|
||||||
|
-----------------
|
||||||
|
|
||||||
Mythen3
|
Please contact us.
|
||||||
-------
|
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
|
||||||
#. Program from console (only from 5.0.0-rcx)
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# copies new server from pc tftp folder and reboots (does not respawn)
|
|
||||||
sls_detector_put copydetectorserver mythen3DetectorServerxxx pcxxx
|
|
||||||
|
|
||||||
|
|
||||||
Gotthard2
|
|
||||||
----------
|
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
|
||||||
#. Program from console (only from 5.0.0-rcx)
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# copies new server from pc tftp folder and reboots (does not respawn)
|
|
||||||
sls_detector_put copydetectorserver gotthard2DetectorServerxxx pcxxx
|
|
||||||
|
|
||||||
|
|
||||||
Moench
|
|
||||||
------
|
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
|
||||||
#. Program from console (only from 5.0.0-rcx)
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# copies new server from pc tftp folder, respawns and reboots
|
|
||||||
sls_detector_put copydetectorserver moenchDetectorServerxxx pcxxx
|
|
||||||
|
|
||||||
|
|
||||||
Ctb
|
|
||||||
---
|
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
|
||||||
|
|
||||||
#. Install tftp and copy detector server binary to tftp folder
|
|
||||||
#. Program from console (only from 5.0.0-rcx)
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# copies new server from pc tftp folder, respawns and reboots
|
|
||||||
sls_detector_put copydetectorserver ctbDetectorServerxxx pcxxx
|
|
@ -247,6 +247,19 @@ Possible causes could be the following:
|
|||||||
* For Jungfrau, refer to :ref:`Jungfrau Power Supply Troubleshooting<Jungfrau Troubleshooting Power Supply>`.
|
* For Jungfrau, refer to :ref:`Jungfrau Power Supply Troubleshooting<Jungfrau Troubleshooting Power Supply>`.
|
||||||
|
|
||||||
|
|
||||||
|
Cannot ping module (Nios)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If you executed "reboot" command on the board, you cannot ping it anymore unless you power cycle. To reboot the controller, please use the software command ("rebootcontroller"), which talks to the microcontroller.
|
||||||
|
|
||||||
|
Gotthard2
|
||||||
|
---------
|
||||||
|
|
||||||
|
Cannot get data without a module attached
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
You cannot get data without a module attached as a specific pin is floating. Attach module to get data.
|
||||||
|
|
||||||
|
|
||||||
Gotthard
|
Gotthard
|
||||||
----------
|
----------
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
GITREPO1='git remote -v'
|
GITREPO1='git remote -v'
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
||||||
BRANCH1='git branch -v'
|
BRANCH1='git branch -v'
|
||||||
|
@ -3,33 +3,33 @@
|
|||||||
### edit with hostname or IP address of your detector
|
### edit with hostname or IP address of your detector
|
||||||
############################################
|
############################################
|
||||||
#hostname bchip181+
|
#hostname bchip181+
|
||||||
hostname bchip181+
|
hostname bchip119.psi.ch
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with hostname or 1Gbs IP address of your server
|
### edit with hostname or 1Gbs IP address of your server
|
||||||
############################################
|
############################################
|
||||||
rx_hostname mpc2011
|
rx_hostname mpc2011:1777
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 10 Gbs IP of your server
|
### edit with 10 Gbs IP of your server
|
||||||
############################################
|
############################################
|
||||||
udp_dstip 10.1.1.102
|
udp_dstip 10.1.2.102
|
||||||
#############################################
|
#############################################
|
||||||
### edit with any number in the subnet of your server (first 3 numbers as above)
|
### edit with any number in the subnet of your server (first 3 numbers as above)
|
||||||
############################################
|
############################################
|
||||||
udp_srcip 10.1.1.19
|
udp_srcip 10.1.2.19
|
||||||
udp_dstport 32411
|
udp_dstport 32000
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 10 Gbs IP of your server
|
### edit with 10 Gbs IP of your server
|
||||||
############################################
|
############################################
|
||||||
rx_zmqip 10.1.1.102
|
rx_zmqip 10.1.2.102
|
||||||
rx_zmqport 50003
|
rx_zmqport 77000
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 1 Gbs IP of PC where you will run the GUI
|
### edit with 1 Gbs IP of PC where you will run the GUI
|
||||||
############################################
|
############################################
|
||||||
zmqip 129.129.202.98
|
zmqip 129.129.202.132
|
||||||
zmqport 50001
|
zmqport 77001
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ rx_zmqstream 1
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
frames 100000
|
frames 1000
|
||||||
period 0.0006
|
period 0.0006
|
||||||
exptime 0.00035
|
exptime 0.00035
|
||||||
|
|
||||||
@ -62,3 +62,9 @@ highvoltage 90
|
|||||||
#adcreg 0x14 0x40
|
#adcreg 0x14 0x40
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
frames 10
|
||||||
|
period 0.1
|
||||||
|
rx_jsonpara subframes 1
|
||||||
|
rx_jsonpara frameMode raw
|
||||||
|
rx_jsonpara detectorMode analog
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#####! /bin/awk -f
|
#####! /bin/awk -f
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
# MESSAGE( STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR} )
|
# MESSAGE( STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||||
# MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
|
# MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include "DetectorImpl.h"
|
#include "DetectorImpl.h"
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
#include "sls/string_utils.h"
|
#include "sls/string_utils.h"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include "DetectorImpl.h"
|
#include "DetectorImpl.h"
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
#include "sls/string_utils.h"
|
#include "sls/string_utils.h"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
// tests-main.cpp
|
// tests-main.cpp
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
5832
libs/catch/catch.hpp
5832
libs/catch/catch.hpp
File diff suppressed because it is too large
Load Diff
Submodule libs/pybind11 updated: 8de7772cc7...914c06fb25
@ -1,27 +0,0 @@
|
|||||||
#From: https://github.com/zeromq/cppzmq/
|
|
||||||
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON)
|
|
||||||
find_package(PkgConfig)
|
|
||||||
pkg_check_modules(PC_LIBZMQ QUIET libzmq)
|
|
||||||
|
|
||||||
set(ZeroMQ_VERSION ${PC_LIBZMQ_VERSION})
|
|
||||||
find_library(ZeroMQ_LIBRARY NAMES libzmq.so libzmq.dylib libzmq.dll
|
|
||||||
PATHS ${PC_LIBZMQ_LIBDIR} ${PC_LIBZMQ_LIBRARY_DIRS})
|
|
||||||
find_library(ZeroMQ_STATIC_LIBRARY NAMES libzmq-static.a libzmq.a libzmq.dll.a
|
|
||||||
PATHS ${PC_LIBZMQ_LIBDIR} ${PC_LIBZMQ_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
if(ZeroMQ_LIBRARY OR ZeroMQ_STATIC_LIBRARY)
|
|
||||||
set(ZeroMQ_FOUND ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (TARGET libzmq)
|
|
||||||
# avoid errors defining targets twice
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(libzmq SHARED IMPORTED)
|
|
||||||
set_property(TARGET libzmq PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PC_LIBZMQ_INCLUDE_DIRS})
|
|
||||||
set_property(TARGET libzmq PROPERTY IMPORTED_LOCATION ${ZeroMQ_LIBRARY})
|
|
||||||
|
|
||||||
add_library(libzmq-static STATIC IMPORTED ${PC_LIBZMQ_INCLUDE_DIRS})
|
|
||||||
set_property(TARGET libzmq-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PC_LIBZMQ_INCLUDE_DIRS})
|
|
||||||
set_property(TARGET libzmq-static PROPERTY IMPORTED_LOCATION ${ZeroMQ_STATIC_LIBRARY})
|
|
@ -1,16 +0,0 @@
|
|||||||
Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
|
|
||||||
This file is part of the SLS Detecotor Package.
|
|
||||||
|
|
||||||
SLS Detecotor Package is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
SLS Detecotor Package is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with SLS Detecotor Package. If not, see <https://www.gnu.org/licenses/>.
|
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
pybind11_add_module(_slsdet
|
pybind11_add_module(_slsdet
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
|
@ -1,63 +0,0 @@
|
|||||||
# sls_detector: Python interface to slsDetectorPackage
|
|
||||||
Python interface to the Sls Detector Software.
|
|
||||||
|
|
||||||
### Documentation ###
|
|
||||||
Sphinx built documentation is available here:
|
|
||||||
[https://slsdetectorgroup.github.io/sls_detector/](https://slsdetectorgroup.github.io/sls_detector/)
|
|
||||||
|
|
||||||
|
|
||||||
### Install using conda ###
|
|
||||||
|
|
||||||
Binaries are available using conda. This installs both the detector software and the Python
|
|
||||||
interface.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
#Add conda channels
|
|
||||||
conda config --add channels conda-forge
|
|
||||||
conda config --add channels slsdetectorgroup
|
|
||||||
|
|
||||||
#Install latest version
|
|
||||||
conda install sls_detector
|
|
||||||
|
|
||||||
#Install specific version
|
|
||||||
conda install sls_detector=3.0.1
|
|
||||||
|
|
||||||
#Scientific Linux 6 version (GLIBC2.12)
|
|
||||||
conda install sls_detector=SL6_3.0.1
|
|
||||||
```
|
|
||||||
|
|
||||||
### Building using conda-build ###
|
|
||||||
|
|
||||||
Needs [sls_detector_software](https://github.com/slsdetectorgroup/sls_detector_software) installed.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
#Clone source code
|
|
||||||
git clone https://github.com/slsdetectorgroup/sls_detector.git
|
|
||||||
|
|
||||||
#Checkout the branch needed
|
|
||||||
git checkout 3.0.1
|
|
||||||
|
|
||||||
#Build and install the local version
|
|
||||||
conda-build sls_detector
|
|
||||||
conda install --use-local sls_detector
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
### Developer build ###
|
|
||||||
|
|
||||||
IF you if you are developing and are making constant changes to the code it's a bit cumbersome
|
|
||||||
to build with conda and install. Then an easier way is to build the C/C++ parts in the package
|
|
||||||
directory and temporary add this to the path
|
|
||||||
|
|
||||||
```bash
|
|
||||||
#in path/to/sls_detector
|
|
||||||
python setup.py build_ext --inplace
|
|
||||||
```
|
|
||||||
Then in your Python script
|
|
||||||
```python
|
|
||||||
|
|
||||||
import sys
|
|
||||||
sys.path.append('/path/to/sls_detector')
|
|
||||||
from sls_detector import Detector
|
|
||||||
```
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
"""
|
"""
|
||||||
Example showing how to set and get exposure times
|
Example showing how to set and get exposure times
|
||||||
"""
|
"""
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
|
||||||
from slsdet import Detector, patternParameters
|
from slsdet import Detector, patternParameters
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
import time
|
import time
|
||||||
from multiprocessing import Process
|
from multiprocessing import Process
|
||||||
from slsdet import Detector, runStatus
|
from slsdet import Detector, runStatus
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
import time
|
import time
|
||||||
from slsdet import Detector, runStatus
|
from slsdet import Detector, runStatus
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
from slsdet import Detector, Eiger, dacIndex
|
from slsdet import Detector, Eiger, dacIndex
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
from slsdet import Detector, Eiger, dacIndex
|
from slsdet import Detector, Eiger, dacIndex
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
from slsdet import Eiger
|
from slsdet import Eiger
|
||||||
|
|
||||||
d = Eiger()
|
d = Eiger()
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
from slsdet import Detector, currentSrcParameters
|
from slsdet import Detector, currentSrcParameters
|
||||||
|
|
||||||
s = currentSrcParameters()
|
s = currentSrcParameters()
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
# Most settings are represented as enums that can be
|
# Most settings are represented as enums that can be
|
||||||
# explicitly imported
|
# explicitly imported
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
from slsdet import Mythen3, scanParameters, dacIndex
|
from slsdet import Mythen3, scanParameters, dacIndex
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
import subprocess
|
import subprocess
|
||||||
import locale
|
import locale
|
||||||
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
|
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
"""
|
"""
|
||||||
Code generator for enum bindings in the Python extension.
|
Code generator for enum bindings in the Python extension.
|
||||||
Reads the sls_detector_defs.h and enums_in.cpp then outputs
|
Reads the sls_detector_defs.h and enums_in.cpp then outputs
|
||||||
@ -11,11 +13,11 @@ import subprocess
|
|||||||
|
|
||||||
from parse import remove_comments
|
from parse import remove_comments
|
||||||
|
|
||||||
allow_bitwise_op = ["M3_GainCaps"]
|
|
||||||
allow_bitwise_op = ["streamingInterface"]
|
|
||||||
|
|
||||||
op_key = {"operator|": "__or__",
|
allow_bitwise_op = ["streamingInterface", "M3_GainCaps"]
|
||||||
"operator&" : "__and__"}
|
|
||||||
|
op_key = {"operator|": "|",
|
||||||
|
"operator&" : "&"}
|
||||||
|
|
||||||
def single_line_enum(line):
|
def single_line_enum(line):
|
||||||
sub = line[line.find('{')+1:line.find('}')]
|
sub = line[line.find('{')+1:line.find('}')]
|
||||||
@ -90,8 +92,7 @@ def generate_enum_string(enums):
|
|||||||
|
|
||||||
#Here add the operators
|
#Here add the operators
|
||||||
for op in operators:
|
for op in operators:
|
||||||
data.append(f"\n\t.def(\"{op_key[op]}\", py::overload_cast< const slsDetectorDefs::streamingInterface&, const slsDetectorDefs::streamingInterface&>(&{op}))")
|
data.append(f"\n\t.def(py::self {op_key[op]} slsDetectorDefs::{key}())")
|
||||||
|
|
||||||
|
|
||||||
data.append(';\n\n')
|
data.append(';\n\n')
|
||||||
return ''.join(data)
|
return ''.join(data)
|
||||||
|
@ -1,52 +1,62 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
"""
|
"""
|
||||||
This file is used to auto generate Python bindings for the
|
This file is used to auto generate Python bindings for the
|
||||||
sls::Detector class. The tool needs the libclang bindings
|
sls::Detector class. The tool needs the libclang bindings
|
||||||
to be installed.
|
to be installed.
|
||||||
|
|
||||||
When the Detector API is updated this file should be run
|
When the Detector API is updated this file should be run
|
||||||
manually
|
manually.
|
||||||
"""
|
"""
|
||||||
from clang import cindex
|
from clang import cindex
|
||||||
import subprocess
|
import subprocess
|
||||||
import argparse
|
import argparse
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
from pathlib import Path
|
||||||
|
from parse import system_include_paths, clang_format_version
|
||||||
|
|
||||||
|
REDC = '\033[91m'
|
||||||
|
GREENC = '\033[92m'
|
||||||
|
ENDC = '\033[0m'
|
||||||
|
def red(msg):
|
||||||
|
return f'{REDC}{msg}{ENDC}'
|
||||||
|
|
||||||
|
def green(msg):
|
||||||
|
return f'{GREENC}{msg}{ENDC}'
|
||||||
|
|
||||||
|
def check_clang_format_version(required_version):
|
||||||
|
if (ver := clang_format_version()) != required_version:
|
||||||
|
msg = red(f'Clang format version {required_version} required, detected: {ver}. Bye!')
|
||||||
|
print(msg)
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
msg = green(f'Found clang-format version {ver}')
|
||||||
|
print(msg)
|
||||||
|
|
||||||
|
def check_for_compile_commands_json(path):
|
||||||
|
# print(f"Looking for compile data base in: {path}")
|
||||||
|
compile_data_base_file = path/'compile_commands.json'
|
||||||
|
if not compile_data_base_file.exists():
|
||||||
|
msg = red(f"No compile_commands.json file found in {path}. Bye!")
|
||||||
|
print(msg)
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
msg = green(f'Found: {compile_data_base_file}')
|
||||||
|
print(msg)
|
||||||
|
|
||||||
from parse import system_include_paths
|
|
||||||
|
|
||||||
default_build_path = "/home/l_frojdh/sls/build/"
|
default_build_path = "/home/l_frojdh/sls/build/"
|
||||||
fpath = "../../slsDetectorSoftware/src/Detector.cpp"
|
fpath = "../../slsDetectorSoftware/src/Detector.cpp"
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument(
|
|
||||||
"-p",
|
|
||||||
"--build_path",
|
|
||||||
help="Path to the build database",
|
|
||||||
type=str,
|
|
||||||
default=default_build_path,
|
|
||||||
)
|
|
||||||
cargs = parser.parse_args()
|
|
||||||
|
|
||||||
db = cindex.CompilationDatabase.fromDirectory(cargs.build_path)
|
|
||||||
index = cindex.Index.create()
|
|
||||||
args = db.getCompileCommands(fpath)
|
|
||||||
args = list(iter(args).__next__().arguments)[0:-1]
|
|
||||||
args = args + "-x c++ --std=c++11".split()
|
|
||||||
syspath = system_include_paths("clang++")
|
|
||||||
incargs = ["-I" + inc for inc in syspath]
|
|
||||||
args = args + incargs
|
|
||||||
|
|
||||||
|
|
||||||
tu = index.parse(fpath, args=args)
|
|
||||||
|
|
||||||
|
|
||||||
m = []
|
m = []
|
||||||
ag = []
|
ag = []
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
|
|
||||||
ag2 = []
|
ag2 = []
|
||||||
|
|
||||||
cn = []
|
cn = []
|
||||||
|
|
||||||
def get_arguments(node):
|
def get_arguments(node):
|
||||||
@ -64,7 +74,7 @@ def get_arguments_with_default(node):
|
|||||||
args = []
|
args = []
|
||||||
for arg in node.get_arguments():
|
for arg in node.get_arguments():
|
||||||
tokens = [t.spelling for t in arg.get_tokens()]
|
tokens = [t.spelling for t in arg.get_tokens()]
|
||||||
print(tokens)
|
# print(tokens)
|
||||||
if '=' in tokens:
|
if '=' in tokens:
|
||||||
if arg.type.spelling == "sls::Positions": #TODO! automate
|
if arg.type.spelling == "sls::Positions": #TODO! automate
|
||||||
args.append("py::arg() = Positions{}")
|
args.append("py::arg() = Positions{}")
|
||||||
@ -109,33 +119,67 @@ def visit(node):
|
|||||||
lines.append(
|
lines.append(
|
||||||
f'.def("{child.spelling}",{fs} &Detector::{child.spelling}{args})'
|
f'.def("{child.spelling}",{fs} &Detector::{child.spelling}{args})'
|
||||||
)
|
)
|
||||||
|
if cargs.verbose:
|
||||||
|
print(f'&Detector::{child.spelling}{args})')
|
||||||
cn.append(child)
|
cn.append(child)
|
||||||
for child in node.get_children():
|
for child in node.get_children():
|
||||||
visit(child)
|
visit(child)
|
||||||
|
|
||||||
# .def("setRxHostname",
|
|
||||||
# (void (Detector::*)(const std::string &, Positions)) &
|
|
||||||
# Detector::setRxHostname,
|
|
||||||
# py::arg(), py::arg() = Positions{})
|
|
||||||
# .def("setRxHostname",
|
|
||||||
# (void (Detector::*)(const std::vector<std::string> &)) &
|
|
||||||
# Detector::setRxHostname,
|
|
||||||
# py::arg())
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
|
"-p",
|
||||||
|
"--build_path",
|
||||||
|
help="Path to the build database",
|
||||||
|
type=Path,
|
||||||
|
default=default_build_path,
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-v",
|
||||||
|
"--verbose",
|
||||||
|
help="more output",
|
||||||
|
action='store_true',
|
||||||
|
)
|
||||||
|
cargs = parser.parse_args()
|
||||||
|
|
||||||
|
check_clang_format_version(12)
|
||||||
|
check_for_compile_commands_json(cargs.build_path)
|
||||||
|
|
||||||
visit(tu.cursor)
|
print("Parsing functions in Detector.h - ", end = "", flush = True)
|
||||||
|
t0 = time.perf_counter()
|
||||||
|
#parse functions
|
||||||
|
db = cindex.CompilationDatabase.fromDirectory(cargs.build_path)
|
||||||
|
index = cindex.Index.create()
|
||||||
|
args = db.getCompileCommands(fpath)
|
||||||
|
args = list(iter(args).__next__().arguments)[0:-1]
|
||||||
|
args = args + "-x c++ --std=c++11".split()
|
||||||
|
syspath = system_include_paths("clang++")
|
||||||
|
incargs = ["-I" + inc for inc in syspath]
|
||||||
|
args = args + incargs
|
||||||
|
tu = index.parse(fpath, args=args)
|
||||||
|
visit(tu.cursor)
|
||||||
|
print(green('OK'))
|
||||||
|
print(f'Parsing took {time.perf_counter()-t0:.3f}s')
|
||||||
|
|
||||||
|
print("Read detector_in.cpp - ", end = "")
|
||||||
|
with open("../src/detector_in.cpp") as f:
|
||||||
|
data = f.read()
|
||||||
|
s = "".join(lines)
|
||||||
|
s += ";"
|
||||||
|
text = data.replace("[[FUNCTIONS]]", s)
|
||||||
|
warning = "/* WARINING This file is auto generated any edits might be overwritten without warning */\n\n"
|
||||||
|
print(green("OK"))
|
||||||
|
print("Writing to detector.cpp - ", end = "")
|
||||||
|
with open("../src/detector.cpp", "w") as f:
|
||||||
|
f.write(warning)
|
||||||
|
f.write(text)
|
||||||
|
print(green('OK'))
|
||||||
|
|
||||||
with open("../src/detector_in.cpp") as f:
|
# run clang format on the output
|
||||||
data = f.read()
|
print('Running clang format on generated source -', end = "")
|
||||||
s = "".join(lines)
|
subprocess.run(["clang-format", "../src/detector.cpp", "-i"])
|
||||||
s += ";"
|
print(green(" OK"))
|
||||||
text = data.replace("[[FUNCTIONS]]", s)
|
|
||||||
warning = "/* WARINING This file is auto generated any edits might be overwritten without warning */\n\n"
|
|
||||||
with open("../src/detector.cpp", "w") as f:
|
|
||||||
f.write(warning)
|
|
||||||
f.write(text)
|
|
||||||
|
|
||||||
# run clang format on the output
|
|
||||||
subprocess.run(["clang-format", "../src/detector.cpp", "-i"])
|
|
||||||
|
|
||||||
|
print("Changes since last commit:")
|
||||||
|
subprocess.run(['git', 'diff', '../src/detector.cpp'])
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
"""
|
"""
|
||||||
Utility to find and list which command line functions have tests and
|
Utility to find and list which command line functions have tests and
|
||||||
where the tests are located
|
where the tests are located
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
from subprocess import PIPE
|
from subprocess import PIPE
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
def clang_format_version():
|
||||||
|
p = subprocess.run(['clang-format', '--version'], capture_output = True)
|
||||||
|
ver = p.stdout.decode().split()[2]
|
||||||
|
major = int(ver.split('.')[0])
|
||||||
|
return major
|
||||||
|
|
||||||
|
|
||||||
def remove_comments(text):
|
def remove_comments(text):
|
||||||
def replacer(match):
|
def replacer(match):
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
import pytest
|
import pytest
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
"""
|
"""
|
||||||
Setup file for slsdet
|
Setup file for slsdet
|
||||||
Build upon the pybind11 example found here: https://github.com/pybind/python_example
|
Build upon the pybind11 example found here: https://github.com/pybind/python_example
|
||||||
@ -25,6 +27,7 @@ ext_modules = [
|
|||||||
Pybind11Extension(
|
Pybind11Extension(
|
||||||
'_slsdet',
|
'_slsdet',
|
||||||
['src/main.cpp',
|
['src/main.cpp',
|
||||||
|
'src/current.cpp',
|
||||||
'src/enums.cpp',
|
'src/enums.cpp',
|
||||||
'src/detector.cpp',
|
'src/detector.cpp',
|
||||||
'src/network.cpp',
|
'src/network.cpp',
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
# from .detector import Detector, DetectorError, free_shared_memory
|
# from .detector import Detector, DetectorError, free_shared_memory
|
||||||
from .eiger import Eiger
|
from .eiger import Eiger
|
||||||
from .ctb import Ctb
|
from .ctb import Ctb
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
from functools import partial
|
from functools import partial
|
||||||
class Adc:
|
class Adc:
|
||||||
def __init__(self, name, enum, detector):
|
def __init__(self, name, enum, detector):
|
||||||
|
@ -1,41 +1,45 @@
|
|||||||
from .detector import Detector
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
from .detector import Detector, freeze
|
||||||
from .utils import element_if_equal
|
from .utils import element_if_equal
|
||||||
from .dacs import DetectorDacs
|
from .dacs import DetectorDacs, NamedDacs
|
||||||
import _slsdet
|
import _slsdet
|
||||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||||
from .detector_property import DetectorProperty
|
from .detector_property import DetectorProperty
|
||||||
|
|
||||||
class CtbDacs(DetectorDacs):
|
# class CtbDacs(DetectorDacs):
|
||||||
"""
|
# """
|
||||||
Ctb dacs
|
# Ctb dacs
|
||||||
"""
|
# """
|
||||||
_dacs = [('dac0', dacIndex(0), 0, 4000, 1400),
|
# _dacs = [('dac0', dacIndex(0), 0, 4000, 1400),
|
||||||
('dac1', dacIndex(1), 0, 4000, 1200),
|
# ('dac1', dacIndex(1), 0, 4000, 1200),
|
||||||
('dac2', dacIndex(2), 0, 4000, 900),
|
# ('dac2', dacIndex(2), 0, 4000, 900),
|
||||||
('dac3', dacIndex(3), 0, 4000, 1050),
|
# ('dac3', dacIndex(3), 0, 4000, 1050),
|
||||||
('dac4', dacIndex(4), 0, 4000, 1400),
|
# ('dac4', dacIndex(4), 0, 4000, 1400),
|
||||||
('dac5', dacIndex(5), 0, 4000, 655),
|
# ('dac5', dacIndex(5), 0, 4000, 655),
|
||||||
('dac6', dacIndex(6), 0, 4000, 2000),
|
# ('dac6', dacIndex(6), 0, 4000, 2000),
|
||||||
('dac7', dacIndex(7), 0, 4000, 1400),
|
# ('dac7', dacIndex(7), 0, 4000, 1400),
|
||||||
('dac8', dacIndex(8), 0, 4000, 850),
|
# ('dac8', dacIndex(8), 0, 4000, 850),
|
||||||
('dac9', dacIndex(9), 0, 4000, 2000),
|
# ('dac9', dacIndex(9), 0, 4000, 2000),
|
||||||
('dac10', dacIndex(10), 0, 4000, 2294),
|
# ('dac10', dacIndex(10), 0, 4000, 2294),
|
||||||
('dac11', dacIndex(11), 0, 4000, 983),
|
# ('dac11', dacIndex(11), 0, 4000, 983),
|
||||||
('dac12', dacIndex(12), 0, 4000, 1475),
|
# ('dac12', dacIndex(12), 0, 4000, 1475),
|
||||||
('dac13', dacIndex(13), 0, 4000, 1200),
|
# ('dac13', dacIndex(13), 0, 4000, 1200),
|
||||||
('dac14', dacIndex(14), 0, 4000, 1600),
|
# ('dac14', dacIndex(14), 0, 4000, 1600),
|
||||||
('dac15', dacIndex(15), 0, 4000, 1455),
|
# ('dac15', dacIndex(15), 0, 4000, 1455),
|
||||||
('dac16', dacIndex(16), 0, 4000, 0),
|
# ('dac16', dacIndex(16), 0, 4000, 0),
|
||||||
('dac17', dacIndex(17), 0, 4000, 1000),
|
# ('dac17', dacIndex(17), 0, 4000, 1000),
|
||||||
]
|
# ]
|
||||||
_dacnames = [_d[0] for _d in _dacs]
|
# _dacnames = [_d[0] for _d in _dacs]
|
||||||
|
|
||||||
from .utils import element
|
from .utils import element
|
||||||
|
@freeze
|
||||||
class Ctb(Detector):
|
class Ctb(Detector):
|
||||||
def __init__(self, id = 0):
|
def __init__(self, id = 0):
|
||||||
super().__init__(id)
|
super().__init__(id)
|
||||||
self._frozen = False
|
self._frozen = False
|
||||||
self._dacs = CtbDacs(self)
|
# self._dacs = CtbDacs(self)
|
||||||
|
self._dacs = NamedDacs(self)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def dacs(self):
|
def dacs(self):
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
from .detector_property import DetectorProperty
|
from .detector_property import DetectorProperty
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -34,6 +36,79 @@ class Dac(DetectorProperty):
|
|||||||
dacstr = ''.join([f'{item:5d}' for item in self.get()])
|
dacstr = ''.join([f'{item:5d}' for item in self.get()])
|
||||||
return f'{self.__name__:15s}:{dacstr}'
|
return f'{self.__name__:15s}:{dacstr}'
|
||||||
|
|
||||||
|
class NamedDacs:
|
||||||
|
"""
|
||||||
|
New implementation of the detector dacs. Used at the momen for
|
||||||
|
Ctb but should replace the old one for all detectors
|
||||||
|
"""
|
||||||
|
_frozen = False
|
||||||
|
_direct_access = ['_detector', '_current', '_dacnames']
|
||||||
|
def __init__(self, detector):
|
||||||
|
self._detector = detector
|
||||||
|
self._current = 0
|
||||||
|
|
||||||
|
self._dacnames = [n.replace(" ", "") for n in detector.getDacNames()]
|
||||||
|
# # Populate the dacs
|
||||||
|
for i,name in enumerate(self._dacnames):
|
||||||
|
#name, enum, low, high, default, detector
|
||||||
|
setattr(self, name, Dac(name, dacIndex(i), 0, 4000, 1000, detector))
|
||||||
|
|
||||||
|
self._frozen = True
|
||||||
|
|
||||||
|
# def __getattr__(self, name):
|
||||||
|
# return self.__getattribute__('_' + name)
|
||||||
|
|
||||||
|
def __setattr__(self, name, value):
|
||||||
|
if not self._frozen:
|
||||||
|
#durining init we need to be able to set up the class
|
||||||
|
super().__setattr__(name, value)
|
||||||
|
else:
|
||||||
|
#Later we restrict us to manipulate dacs and a few fields
|
||||||
|
if name in self._direct_access:
|
||||||
|
super().__setattr__(name, value)
|
||||||
|
elif name in self._dacnames:
|
||||||
|
return self.__getattribute__(name).__setitem__(slice(None, None, None), value)
|
||||||
|
else:
|
||||||
|
raise AttributeError(f'Dac not found: {name}')
|
||||||
|
|
||||||
|
def __next__(self):
|
||||||
|
if self._current >= len(self._dacnames):
|
||||||
|
self._current = 0
|
||||||
|
raise StopIteration
|
||||||
|
else:
|
||||||
|
self._current += 1
|
||||||
|
return self.__getattribute__(self._dacnames[self._current-1])
|
||||||
|
# return self.__getattr__(self._dacnames[self._current-1])
|
||||||
|
|
||||||
|
def __iter__(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
r_str = ['========== DACS =========']
|
||||||
|
r_str += [repr(dac) for dac in self]
|
||||||
|
return '\n'.join(r_str)
|
||||||
|
def get_asarray(self):
|
||||||
|
"""
|
||||||
|
Read the dacs into a numpy array with dimensions [ndacs, nmodules]
|
||||||
|
"""
|
||||||
|
dac_array = np.zeros((len(self._dacnames), len(self._detector)))
|
||||||
|
for i, _d in enumerate(self):
|
||||||
|
dac_array[i,:] = _d[:]
|
||||||
|
return dac_array
|
||||||
|
|
||||||
|
def to_array(self):
|
||||||
|
return self.get_asarray()
|
||||||
|
|
||||||
|
def set_from_array(self, dac_array):
|
||||||
|
"""
|
||||||
|
Set the dacs from an numpy array with dac values. [ndacs, nmodules]
|
||||||
|
"""
|
||||||
|
dac_array = dac_array.astype(np.int)
|
||||||
|
for i, _d in enumerate(self):
|
||||||
|
_d[:] = dac_array[i]
|
||||||
|
|
||||||
|
def from_array(self, dac_array):
|
||||||
|
self.set_from_array(dac_array)
|
||||||
|
|
||||||
class DetectorDacs:
|
class DetectorDacs:
|
||||||
_dacs = []
|
_dacs = []
|
||||||
@ -48,7 +123,7 @@ class DetectorDacs:
|
|||||||
# Index to support iteration
|
# Index to support iteration
|
||||||
self._current = 0
|
self._current = 0
|
||||||
|
|
||||||
# Populate the dacs
|
# Name the attributes?
|
||||||
for _d in self._dacs:
|
for _d in self._dacs:
|
||||||
setattr(self, '_'+_d[0], Dac(*_d, detector))
|
setattr(self, '_'+_d[0], Dac(*_d, detector))
|
||||||
|
|
||||||
@ -57,7 +132,10 @@ class DetectorDacs:
|
|||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
return self.__getattribute__('_' + name)
|
return self.__getattribute__('_' + name)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dacnames(self):
|
||||||
|
return [_d[0] for _d in _dacs]
|
||||||
|
|
||||||
def __setattr__(self, name, value):
|
def __setattr__(self, name, value):
|
||||||
if name in self._dacnames:
|
if name in self._dacnames:
|
||||||
return self.__getattribute__('_' + name).__setitem__(slice(None, None, None), value)
|
return self.__getattribute__('_' + name).__setitem__(slice(None, None, None), value)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
"""
|
"""
|
||||||
Automatically improt all enums from slsDetectorDefs and give an
|
Automatically improt all enums from slsDetectorDefs and give an
|
||||||
alias with their name in the enum module. All names from the enum
|
alias with their name in the enum module. All names from the enum
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user