Compare commits

...

339 Commits

Author SHA1 Message Date
f7aedf7711 client bug fix: typo in command line, get returned rx_udpip instead of rx_udpip2, same with mac 2019-05-28 16:56:15 +02:00
8c112efdb3 jungfrau bug fix: setting clkdivider also set adcphase: break inswitch 2019-05-28 14:14:08 +02:00
938e1e87ff bugfix: vref adc voltage 2019-05-28 12:31:19 +02:00
82308daf7b jungfrau server bug fix: vref adc voltage overwritten by default for ctb 2019-05-28 12:28:44 +02:00
aa99309caf Merge branch 'jungfrau2.0' into developer 2019-05-28 10:32:01 +02:00
a0f697ce71 jungfrau feature change: outer is default and connects to bottom, inner is secondary but connects to top 2019-05-28 10:31:36 +02:00
14dd753397 updated build nr 2019-05-27 16:59:42 +02:00
7e43472b7b minor help editing 2019-05-27 16:29:56 +02:00
ac7c85029c Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-05-27 16:22:04 +02:00
639ea0eb56 Merge branch 'condabuild' into developer 2019-05-27 16:11:57 +02:00
659e204b35 solved conflicts 2019-05-27 15:05:40 +02:00
2c2fb7358c jungfrau board 2 adc defines, full speed limitation for old boards 2019-05-27 15:04:13 +02:00
d3646f0ac5 pinned conda-build version 2019-05-27 14:33:17 +02:00
54a396065d ctb versioning bug fix 2019-05-27 14:08:41 +02:00
7fdab08256 ctb receiver fix: extract in 8 bit batches instead of 32 for less padding 2019-05-27 11:30:54 +02:00
e2ef043e04 removed old configure file 2019-05-24 16:31:25 +02:00
43dc9df6db removed unused scripts 2019-05-24 10:25:34 +02:00
10f89599e0 bug fix: hdf5 printError still called once. replcaed with printErrorStack 2019-05-22 19:11:35 +02:00
452fd1e457 new defaults for CMake 2019-05-22 09:45:08 +02:00
7b817fa194 Merge branch 'developer' into jungfrauv0.8 2019-05-17 19:21:01 +02:00
1a1c6b9b42 jungfrau server: feature finish: switching between 2 interfaces 2019-05-17 19:19:03 +02:00
3e5d34647e updated test for argument parser 2019-05-17 10:00:49 +02:00
591ff53b84 fixed MacAddr 0 output 2019-05-17 09:08:13 +02:00
fff79fbbb6 const char* for command 2019-05-16 16:58:03 +02:00
1943e77b24 server interface: ip made to use inet_ntop, mac address and ip to string made common 2019-05-16 15:12:42 +02:00
9315768159 client bug fix: smaller ips convert to hex 2019-05-16 14:07:58 +02:00
f1a1391866 Factored out time conversion (#23)
* time conversion

* with comment

* lround in slsDetectorCommand
2019-05-15 10:22:38 +02:00
877bdb8979 Using FixedCapacityContainer for rxDbitList (#22)
* fixed capacity container

* changed shm date
2019-05-15 09:16:18 +02:00
bf0847e967 removed ClientInterface 2019-05-15 08:38:49 +02:00
97dd329a7b client: zmqip bug fix (typo with strlen) 2019-05-14 18:57:39 +02:00
6847175743 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-05-14 18:38:42 +02:00
f90d8c6aff ctb server: added adcvpp option to get and in mv 2019-05-14 18:38:30 +02:00
45ae8a41ab updating eiger server 2019-05-14 17:43:34 +02:00
24fc5de58d clang-tidy header include order 2019-05-14 17:34:51 +02:00
7314c52c63 removed unneccecary includes 2019-05-14 17:32:21 +02:00
bc4d0452af removed unused error_defs.h 2019-05-14 17:25:43 +02:00
97692ae3ab moved from c headers 2019-05-14 17:17:21 +02:00
55f482f915 clang-tidy nullptr 2019-05-14 17:11:27 +02:00
74d67261a9 no check for null when deleting 2019-05-14 17:09:24 +02:00
741ee3b44c ctb server bug fix: udp ip not reset before overwriting (smaller size creates problems) 2019-05-14 17:08:07 +02:00
29be6f3b34 no check for null when deleting 2019-05-14 17:07:56 +02:00
81e858ea4d clang-tidy implicit bool 2019-05-14 17:05:27 +02:00
0f8d099196 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-05-14 16:53:59 +02:00
ab5aa78b8a clang-tidy modernize 2019-05-14 16:53:50 +02:00
3f6736ad23 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-05-14 16:44:09 +02:00
3e654977ca slsReceiver bug fix in ctb extracting digital bits 2019-05-14 16:41:25 +02:00
1029ce9705 minor 2019-05-14 14:53:59 +02:00
d114f8db90 receiver bug fix: ctb extractng bits source pointer bug 2019-05-14 11:43:45 +02:00
9fd2866fc0 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-05-14 11:41:50 +02:00
aff6e30b65 short sleep in socket test 2019-05-14 11:41:39 +02:00
0224dccd2e Added noexcept and constexpr (#21)
* noexcept and constexpr

* check size
2019-05-14 11:08:25 +02:00
fbada2e81a commented qwt for now 2019-05-14 10:13:24 +02:00
40d88002c0 Merge pull request #20 from slsdetectorgroup/fix-conda-install-instructions
Fix typo in conda install instructions
2019-05-13 15:31:24 +02:00
3a8c7c6e2a Fix typo in conda install instructions 2019-05-13 10:58:54 +02:00
2a1c89f712 Fixed container (#19)
* added FixedCapacityContainer

* added empty to FixedCapacityContainer

* removed commented out section

* added FixedCapacityContainer to public headers
2019-05-08 12:34:45 +02:00
0e0e7ea81f Merge pull request #18 from slsdetectorgroup/rxctb
Rxctb
2019-05-07 12:51:43 +02:00
df938c2535 review: removing size in sendtoDetector 2019-05-07 09:47:53 +02:00
932e377765 review fdback: using sendtoReceiver, not using size of for specifyng arguments to sendtodetector 2019-05-06 19:13:31 +02:00
0904d1db29 updated ctb binary 2019-05-03 20:46:08 +02:00
20720bc073 Merge branch 'developer' into rxctb 2019-05-03 20:38:32 +02:00
e14519c236 slsReceiver: removed special receiver config, added rx_dbitlist, rx_dbitoffset to put bits together in file, connected adcinvert, extsamplingsrc and extsampling properly to the detector, added tests 2019-05-03 20:37:40 +02:00
e2f08da3e6 Merge branch 'tidywarning' into developer 2019-05-03 16:14:07 +02:00
181ac4f509 small renaming 2019-05-03 16:13:32 +02:00
a0f5224d09 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-05-03 15:27:20 +02:00
6a0d44e358 rate capability plots 2019-05-03 15:27:11 +02:00
1094d5d30c Build doxygen documentation by cmake (#17)
* added cmake command to make doxygen docs

* added back doxyfile for users
2019-05-03 14:58:15 +02:00
9231dff626 clang tidy implicit bool 2019-05-03 14:49:47 +02:00
92b447c83a minor fixes 2019-05-03 14:39:22 +02:00
aaa7576f7d clang-tidy 2019-05-03 14:15:13 +02:00
96d7345124 delays in manual 2019-05-03 13:45:06 +02:00
4f13b29c7f fixed copyserver bug 2019-05-02 18:18:49 +02:00
a55ae38874 changed to matching names 2019-05-02 18:11:36 +02:00
7683b18fa3 ensuring only analog is not in callback 2019-05-01 20:18:46 +02:00
71dd43d252 connected analog databytes 2019-05-01 12:25:21 +02:00
fc7d3bcaea ctb callback used 2019-05-01 12:10:15 +02:00
2f3b0e0b06 ctb:separated analog and digital samples in server and send analog and digital data packed separately per frame to reciever 2019-04-30 18:55:32 +02:00
b0cffcd570 master file option, adcdisable changed to adcenable 2019-04-30 12:13:28 +02:00
56d1994b8c ctb file frame header back in 2019-04-30 11:18:09 +02:00
668cff1c65 fix for corrupt merge 2019-04-29 11:30:19 +02:00
06d4c7ce37 client: finishing up of gotthard for roi and ctb and moench for setting adcenablemask 2019-04-29 09:10:17 +02:00
c0f06fcfca fix reset frames caught 2019-04-26 17:11:32 +02:00
33efd42bdc fix merge 2019-04-26 17:06:59 +02:00
af5eb9fc12 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-26 16:53:35 +02:00
61a939ef53 ctb: removed setroi, instead using adcenablemask 2019-04-26 16:53:23 +02:00
a3342f86d8 names 2019-04-26 16:47:08 +02:00
554f9dc2ee minor 2019-04-26 16:28:21 +02:00
c4aa5ef7bb sendToDetectorStop 2019-04-26 15:15:56 +02:00
d7eadd5782 sendToReceiver 2019-04-26 12:58:40 +02:00
65930002b3 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-25 19:20:25 +02:00
f5feb081ab removing header metadata for ctb binary files 2019-04-25 19:20:13 +02:00
714e456d7d Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-25 17:56:32 +02:00
b76d123df1 shorter functino 2019-04-25 17:56:20 +02:00
2eac75aa0b Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-25 17:39:56 +02:00
18558e1288 bug fix command line patnloops should print in decimal, receiver ctb: added p option to print data for debugging, fixed initializing of result in memory 2019-04-25 17:39:46 +02:00
b853bd92c8 template for sending to detector 2019-04-25 17:01:04 +02:00
4da85b15a0 cleaning 2019-04-25 13:55:45 +02:00
77d34d5b6e fix 2019-04-25 08:24:56 +02:00
6472cc4dd7 test for socket 2019-04-24 21:30:04 +02:00
67eef8ba75 fix for hdf5 compilation with new cmake 2019-04-24 18:09:53 +02:00
91a338cf52 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-24 16:17:07 +02:00
9b53a295e1 my302 receiver modified to be debugged later 2019-04-24 16:16:56 +02:00
8cc8b58b05 sendToDetector 2019-04-24 15:24:56 +02:00
ec9f360c75 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-24 14:39:20 +02:00
dbf927901f more of sendToDetector 2019-04-24 14:39:08 +02:00
9e16dcb1e6 reverting cmake policy change 2019-04-24 13:46:19 +02:00
eb88fabfbc receiver callback rearranging data for mythen302 2019-04-24 13:32:21 +02:00
92310f845c Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-24 13:31:06 +02:00
262140728f receiver callback rearranging data for mythen302 2019-04-24 13:30:57 +02:00
834b1e58ea cleaning slsDetector 2019-04-24 10:57:02 +02:00
5192be6784 more tests 2019-04-24 08:28:16 +02:00
5c0e1643f2 complete dac test for EIGER 2019-04-23 18:02:05 +02:00
7dc014f19c Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-23 17:37:11 +02:00
02fd4b356e adding config for tests 2019-04-23 17:37:02 +02:00
eac992ee03 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-23 14:35:20 +02:00
4e3baf41cb ctb server: introducing 1 us delay between rd strobe and fifo read due to different clocks 2019-04-23 14:35:07 +02:00
72091f47d9 format and mod constructor 2019-04-23 10:48:31 +02:00
21cab38921 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-18 17:18:14 +02:00
3d40fb2d2c ctb address check, integration test added for ctb pattern 2019-04-18 17:18:01 +02:00
83c2775d6c fixed python 2019-04-18 15:57:59 +02:00
e3859c3097 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-18 15:40:30 +02:00
833ca071c4 fix 2019-04-18 15:40:20 +02:00
45884a72da eiger binary updated 2019-04-18 15:35:36 +02:00
61aa673be9 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-18 15:32:25 +02:00
1bc6e7f978 conflict resolved 2019-04-18 15:32:07 +02:00
202d88d6be experimental python 2019-04-18 15:31:07 +02:00
266520741a ctb patterns interface rewritten 2019-04-18 15:29:43 +02:00
faf7e0db82 fix 2019-04-18 15:09:36 +02:00
7aaaeae30c minor 2019-04-18 15:06:17 +02:00
86afb2bd0e more ctb commands 2019-04-18 15:03:01 +02:00
a29466b396 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-18 13:39:53 +02:00
c7259538e9 python commands 2019-04-18 13:39:43 +02:00
ff4ce48e5d receiver memory alignment: all data and header is a multiple of 64 bit, just the fifo header size needed to be 8 2019-04-18 11:35:08 +02:00
f3beda6bcf Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-18 11:16:33 +02:00
8256b7ba84 eiger receiver fix: setting eth2 as well for eiger 2019-04-18 11:16:02 +02:00
7c4aa7f3a7 added commands to python 2019-04-18 10:53:06 +02:00
1e19b99a78 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-18 09:33:23 +02:00
f591adccb8 added getPatternLoop 2019-04-18 09:33:14 +02:00
7abe070ea8 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-18 09:27:26 +02:00
708975acb5 receiver bug fix: function pointer not initialized as null in dataprocessor 2019-04-18 09:27:02 +02:00
849d3ba049 removed create and delete module 2019-04-17 17:17:59 +02:00
ee20cfab1e removed pointers added constructor 2019-04-17 16:19:18 +02:00
b46e107f35 moved detParameters to sls_detector_defs 2019-04-17 14:28:53 +02:00
91813a2c68 moved sls_detector_module outside slsDetectorDefs class 2019-04-17 09:27:45 +02:00
cedde395a0 conda meta 2019-04-17 09:05:21 +02:00
c7169f3c36 moved setDetectorSpecific parameters to constructor of detectorParameters 2019-04-16 12:15:31 +02:00
dd6bb85230 clang-tidy fix 2019-04-16 10:31:04 +02:00
bad8b99b25 clang-tidy fix 2019-04-16 10:21:35 +02:00
001ce4a93e clang-tidy warnings 2019-04-16 09:28:29 +02:00
0527880747 slsDetector implicit conversion 2019-04-16 09:15:17 +02:00
d31446ce07 unused values and comments 2019-04-15 18:14:58 +02:00
0cc0c2715b Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-15 17:22:40 +02:00
248306d570 minor 2019-04-15 17:22:31 +02:00
6b4d6084f5 merge conflict resolved 2019-04-12 19:23:16 +02:00
79c6f5310b eiger server and client: cleaning up setting of dynamic range for eiger, where multi client takes care of checking rate correction in a separate call, tests included 2019-04-12 19:20:31 +02:00
f59b172cfd adding python to cmk.sh 2019-04-12 17:14:11 +02:00
25d7781878 ctb bug fix:digitial io delay and led were checking if receiver was online instead of detector 2019-04-12 15:33:15 +02:00
721f80a493 Merge branch 'refactor' into dynamicrange 2019-04-12 14:16:20 +02:00
192ac229e9 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-04-12 14:05:46 +02:00
4cbf8483ba ctb version update 2019-04-12 14:05:25 +02:00
77c1ffffb1 fix 2019-04-12 11:32:46 +02:00
c16b19ed1f supress waring on gcc<6 2019-04-12 11:31:03 +02:00
cafca86bbf removed ascii from file formats 2019-04-12 11:12:58 +02:00
89a06f099c merging refactor (replacing) 2019-04-12 10:53:09 +02:00
6c7c91307b Merge branch 'developer' into refactor (keeping everything from refactor -s ours) 2019-04-12 10:51:05 +02:00
5fdb090926 fixing warnings, and completing bug fix of gui and data gui call back 2019-04-12 10:13:02 +02:00
d17fd54a9d undoing changes from refgui 2019-04-12 10:01:48 +02:00
9543171504 merge from refgui. not completed 2019-04-12 09:12:44 +02:00
74f2783b10 Client (data call back API) and Gui (Eiger 4 bit mode with multiple images) bug fix: npixelsx and npixelsy was not updated to complete detector level when calling call back function to give complete image 2019-04-11 16:21:25 +02:00
4a5cb011f7 ver in meta 2019-04-11 14:38:49 +02:00
dce7dcbfd4 partial frames 2019-04-11 12:14:52 +02:00
d00fd70d6d integration test 2019-04-11 11:29:34 +02:00
04146e683c updated reading 2019-04-10 16:54:33 +02:00
4b7c5c5950 getFileIndex 2019-04-10 14:16:04 +02:00
92b674354d Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-04-10 12:37:25 +02:00
8cb123cdcb more getters setters 2019-04-10 12:37:16 +02:00
6b5aa5ff66 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-04-10 12:31:34 +02:00
2b377df0bd manual 2019-04-10 12:31:28 +02:00
ec17529c52 seperate get/set 2019-04-10 12:15:19 +02:00
404d3fa677 error handling 2019-04-09 17:35:36 +02:00
026d4019c5 minor 2019-04-09 17:32:54 +02:00
31a4a46fb6 lzmq 2019-04-09 15:23:48 +02:00
8c3691f767 mitigating clang-tidy warnings 2019-04-09 14:31:08 +02:00
70b2a41d5e clang tidy 2019-04-09 10:59:09 +02:00
39221f1230 enable lto 2019-04-08 14:57:10 +02:00
fad308754b turned off -Wshadow for gcc 2019-04-08 09:28:40 +02:00
33f726ff7e shadowing variables 2019-04-05 17:01:29 +02:00
cbacf471d6 tests and std::sort 2019-04-05 16:24:28 +02:00
f11db00aef removed old typedef 2019-04-05 10:14:41 +02:00
951d4d6091 new try 2019-04-04 18:26:14 +02:00
025b3a8d4c cleaning 2019-04-04 18:04:24 +02:00
acf32a5524 removed old error handling 2019-04-04 17:42:55 +02:00
55ba2afc05 better test + conda 2019-04-04 17:39:31 +02:00
498569a42a update for trimEn 2019-04-04 12:31:46 +02:00
d6360ca197 removed warning 2019-04-04 12:21:48 +02:00
05720c12ac Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-04-04 12:19:39 +02:00
85516e42c0 trimEn now takes vector 2019-04-04 12:19:30 +02:00
b35a8f0650 ctb server updated 2019-04-04 11:51:37 +02:00
c284b24397 operator<< test 2019-04-03 20:05:29 +02:00
7256a1e422 added test 2019-04-03 19:59:37 +02:00
69a11f8950 cleaning up 2019-04-03 18:41:21 +02:00
0270e18882 new tests 2019-04-03 18:11:48 +02:00
697c020a49 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-04-03 16:17:16 +02:00
90b257a74d warnings 2019-04-03 16:17:09 +02:00
bb025adc09 cmake3 in cmk.sh and removed warnings 2019-04-03 16:03:19 +02:00
1558ca2bb5 version check of compiler 2019-04-03 15:21:11 +02:00
a7ab8aa9e6 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-04-03 14:48:04 +02:00
3b4d36c3d4 bumped cmake to 3.5 2019-04-03 14:47:58 +02:00
59a0f5fac9 Merge branch 'address' into refactor, including minor change in formal argument name 2019-04-03 14:22:10 +02:00
bbfb5df30d conflict resolved, changed to using hex() instead of str() in configuremac 2019-04-03 14:11:01 +02:00
09f1a8956e ignore .vscode 2019-04-03 10:22:00 +02:00
d6c0f7be05 constexpr 2019-04-02 17:59:59 +02:00
11d7ebd298 Merge branch 'program2' into refactor 2019-04-02 17:29:56 +02:00
d9ea8e6747 Merge branch 'refactor' into program2 2019-04-02 17:29:00 +02:00
5131245f0a all servers except eiger: easier to update firmware and software using update or copydetectorserver, rebootcontroller, and programfpga 2019-04-02 17:27:01 +02:00
6fc388bf78 reset to info 2019-04-02 17:15:21 +02:00
24f28f14f4 clean up 2019-04-02 17:00:00 +02:00
45fd35b243 Merge branch 'refactor' into address 2019-04-02 15:44:57 +02:00
11a452545c added parallel call for void return 2019-04-02 15:44:19 +02:00
b198b50377 class for Ip and Mac 2019-04-02 15:24:25 +02:00
df2d67d90d classes for ip and mac addr 2019-04-02 11:56:33 +02:00
73ad238028 removed missed cout 2019-04-01 13:15:38 +02:00
959d9aa5d1 cleaning and new functions 2019-04-01 10:36:47 +02:00
45b837b42a program fpga printouts for errors 2019-04-01 10:22:50 +02:00
969551ae37 program fpga made parallel 2019-03-29 17:59:06 +01:00
05709e2f47 finished 2019-03-29 16:29:00 +01:00
1fce125d47 Merge branch 'refactor' into address 2019-03-29 10:18:15 +01:00
d134e54810 ip 2019-03-29 10:18:10 +01:00
ed9dc3b386 fixed bug not clearing socket descriptor 2019-03-29 10:14:07 +01:00
990848554c midpoint 2019-03-28 16:16:41 +01:00
78fcb7eb98 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-28 15:48:34 +01:00
94c4e4c352 new constuctor 2019-03-28 15:48:26 +01:00
3e23a38fc8 moench server: sync increases when other clocks do 2019-03-28 15:24:47 +01:00
37b80bcc0d ctb server: pll reset to keep the phase after setting clock 2019-03-28 15:22:13 +01:00
fc0306564c ctb server: sync is min clock and must go higher when the others do 2019-03-28 14:22:40 +01:00
c38bebd615 jungfrau server: added deg and maxadcphaseshift, ctb & moench server: set adc phase like jungfrau that positive shift is positive, moved conversion between shift to degrees to the common function. receiver: removed unused variables 2019-03-28 09:35:53 +01:00
5a4122ae7c ctb & moench server: reset phase when changing clock 2019-03-27 15:48:55 +01:00
2ccd03a3b0 added eiger binary 2019-03-27 12:26:10 +01:00
c7c52c63cd ctb & moench: phase fix for absolute within limits, option to set as degrees and get max phase shift, bug fix for eiger with implementation of 2 udp interface 2019-03-27 12:25:38 +01:00
c7ad548e4c conflict git fix 2019-03-26 15:01:58 +01:00
7cd5bc8b2d jungfrau: switching between 2 and 1 interface, implementation for server required when firmware done 2019-03-26 15:00:19 +01:00
8c2ee57591 ctb/moench server: clock fix, max shifts per clock is calculated everytime 2019-03-25 14:41:15 +01:00
c15e72510c new commands 2019-03-22 17:41:14 +01:00
ac1511c3b0 rmem max 2019-03-22 16:35:42 +01:00
cd5aea895b jungfrau server: changes for new firmware, aligning adc deserializer. ctb serveR: removed unnecessary pll reset and polling mode for pll 2019-03-22 15:09:29 +01:00
5bf37a4f0d changes to jungfrau server 2019-03-22 11:27:15 +01:00
0bb800cc8a manual 2019-03-05 15:48:20 +01:00
ed74e710d6 merge from 4.0.1 2019-02-11 14:37:54 +01:00
907d1655d1 merge from 4.0.1 2019-02-11 14:04:09 +01:00
a7ba5eb0d8 updated release.txt 2019-02-08 17:46:13 +01:00
6bf1a944da updaterev 2019-02-08 17:28:44 +01:00
3c77447868 removed minor warnings 2019-02-08 16:32:23 +01:00
046fb11e5e Merge branch '4.0.1-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.1-rc 2019-02-08 16:02:15 +01:00
b89d56001e CMake: prefixing the options with SLS_ 2019-02-08 16:02:05 +01:00
de204dee38 Merge branch '4.0.1-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.1-rc 2019-02-08 14:03:56 +01:00
0ef030354f warning 2019-02-08 14:03:49 +01:00
dccce9bf55 Merge branch 'esrf-bliss-add-targets-export-name' into 4.0.1-rc 2019-02-08 13:09:06 +01:00
441c3dc5db Merge branch 'add-targets-export-name' of https://github.com/esrf-bliss/slsDetectorPackage into esrf-bliss-add-targets-export-name
Pull request from Samuel ESRF
2019-02-08 13:07:08 +01:00
afd9e29424 updated release.txt to have eriks bug fix for receiver gap pixels enable in reciever 2019-02-08 12:53:58 +01:00
ce939b3cd6 Merge branch '4.0.1-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.1-rc 2019-02-08 12:45:45 +01:00
0984654fd0 updated release.txt 2019-02-08 12:33:04 +01:00
cd738106ec printf and uninitialized variables 2019-02-08 11:14:16 +01:00
0e120330f4 fixed comparisons to build with clang 2019-02-08 10:16:32 +01:00
bf0e0ac601 updated binaries in serverbin 2019-02-07 17:06:07 +01:00
143682cfb1 updaterev 2019-02-07 16:55:01 +01:00
18ab437ae5 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-02-06 16:30:59 +01:00
3b56091e2f new header for raw files 2019-02-06 16:30:37 +01:00
dcad6c80ce minor modifications for interpolation and mythe data structure 2019-02-06 16:22:17 +01:00
22686e1e25 eiger server bug fix: getmeasured period and exptime gets 32 bit from Febinterface and needs to be casted to int64_t before multiplying by 10 2019-02-06 14:52:52 +01:00
e13ecc8625 Add slsReceiver and slsDetector targets to the export set (used by donwstream project)
set TARGETS_EXPORT_NAME if the project is built directly.
2019-02-05 11:51:03 +01:00
ef3e01b9bd Merge branch '4.0.1-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.1-rc 2019-02-05 10:49:46 +01:00
dffa4d9de5 eiger manual 2019-02-05 10:46:37 +01:00
dfca81208b manual acq: uncomment insignificant 2019-02-05 10:36:33 +01:00
37be7d0e2b manual acq config added 2019-02-04 17:54:58 +01:00
49812a34ae manual acq changes for debugging 2019-02-04 17:31:58 +01:00
133b82ad61 Merge branch '4.0.1-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.1-rc 2019-02-04 16:43:44 +01:00
61e769773b got rid of insignificant printouts from debugging 2019-02-04 16:43:37 +01:00
23dce681b2 added clang format and clang tidy from refactor 2019-02-04 14:11:06 +01:00
6abfdcb2c8 manual 2019-02-04 10:48:42 +01:00
7481c7f0e6 Merge branch '4.0.1-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.1-rc 2019-02-01 18:50:08 +01:00
3c2bbf6ad4 gotthard server: possible fix for master and slave sync problem when configuring mac for different frames and sending dummy image, still problem of missing or extra 2 packets inslave or master not sending any frames sometimes, multi: possible fix of image reconstruction in x direction in gui 2019-02-01 18:48:51 +01:00
b8fec6c050 gotthard server: possible fix for master and slave sync problem when configuring mac for different frames and sending dummy image, still problem of missing or extra 2 packets inslave or master not sending any frames sometimes 2019-02-01 18:48:25 +01:00
2f11681d3f gotthard server: configmac should also set cycles for sending dummy frame 2019-01-30 18:24:25 +01:00
12f8166d25 manual acq changed config file, added some changes for jungfrau that aren;t tested, but soleil acq test passed 2019-01-29 15:49:41 +01:00
fd68a41918 udp socket creation error, udpsocket assigned only after. unique ptr later 2019-01-16 19:46:08 +01:00
9e5ec6a57b only destroy sem if it was initialized 2019-01-16 11:54:01 +01:00
d45375947f only destroy sem if it was initialized 2019-01-16 11:53:16 +01:00
73ae8c6151 removing static libs 2019-01-15 17:24:20 +01:00
615dd2a84f jungfrau server: minor change 2019-01-07 12:06:04 +01:00
dc80dccb8a jungfrau server: updated binaries 2019-01-07 11:52:36 +01:00
de34d85761 jungfrau server for firmware 0.7, updated required FW version to run current code 2019-01-07 11:51:25 +01:00
f747c908dc soleils test plus some modifications 2019-01-04 11:09:53 +01:00
64d94b978b for temporary testing 2019-01-04 09:13:33 +01:00
f810a9e9fb updated rev 2019-01-04 09:13:00 +01:00
152186ee59 updated gotthard server binaries 2019-01-03 14:14:17 +01:00
d9551fa07f gotthard server: updated gotthard api version 2019-01-03 11:45:39 +01:00
8738c6b9a2 jungfrau server: updated severdefs to correspond to registerdefs update, need to update firmware version required for jungffrau server exe 2019-01-03 11:43:21 +01:00
f701c731fb few changes to jungfrau server registers, mainly temp 2018-12-18 18:06:52 +01:00
9d3134c3de Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2018-12-14 18:11:46 +01:00
563d644d2f Improved the interpolation with adaptive bins and implemented flat field correction when saving the interpolated images 2018-12-14 18:11:12 +01:00
e2306bd41c conda recipe 2018-12-12 16:46:01 +01:00
e379b98631 added header files 2018-12-12 16:10:01 +01:00
f98259adc9 added build requirements to subpackages 2018-12-12 15:50:55 +01:00
88e0914405 added conda recipe as a test 2018-12-12 15:23:24 +01:00
9d8aa5fe91 Works with CTB5 (and should be backward compatible with the rest) 2018-12-06 17:26:54 +01:00
dceea92f1a Fixed big problem with CPU readout 2018-12-06 12:58:54 +01:00
2815458652 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2018-12-06 10:55:32 +01:00
d8140d8db9 anna version 2018-12-06 10:55:18 +01:00
5e71aeb85f binaries modified 2018-12-04 13:39:27 +01:00
3a51d107bd gotthard server bug fix: switching between roi and no roi has complex fnum reengineering as fnum and pnum doesnt exist for gotthard, sol at the moment: send an image when configuremac, identify first packet if first two channels is 0xcacacaca, ifthe fnum is odd, then increment. Looking at this only at first image in an acquisition, also reduces roi time by configuring mac only when setting roi, not when getting 2018-12-04 12:09:46 +01:00
6b4a9be870 in between 2018-12-04 10:45:55 +01:00
b4b38cb607 bugfix for gotthard roi and noroi frame number, temporary fix to look at CACACACA to know if its a second packet, and first time look at last bit to know wheter to increment or not for consecutive frames fr no roi 2018-12-03 16:25:24 +01:00
03e7a83e74 incorrect mac address in config file should set error flag and give fail upon calling readconfig file 2018-12-03 12:10:37 +01:00
0869a975e4 updated makefile in manual-api to point to binaries in bin and not build/bin. cmake points to build/bin anyway 2018-12-03 12:05:38 +01:00
2cebec90ee users: added setroi and getroi, modified multi to allow imod for setroi on sls level, modified detectorsize to set a single roi or give roi if only one roi 2018-12-03 11:50:56 +01:00
c611523352 updated users class: get/set detector size sets one roi /get roi if roi enabled. mythen is not supported anymore, hence 2018-12-03 11:17:30 +01:00
a774c62cd4 binaries udpated 2018-12-03 10:56:24 +01:00
550ed4b1c2 eiger server bug fix: read and write reg only wrote to the right fpga, fixed 2018-12-03 10:55:32 +01:00
2c08c1e7ce updated binary 2018-12-03 10:49:26 +01:00
2b0208bd98 gotthard server bug fix: adc channel shifted by one fixed changin token timing rev for board 2 2018-12-03 10:48:52 +01:00
05d8ef6277 bug fix for starting and stopping receiver, without listening 2018-12-03 10:45:46 +01:00
228cfa35c0 receiver bug fix: padding was set only if deactivated, frame padding enabled and deactivated padding enabled. Fixed that frame padding and deactivated padding is independent. Padding is done if frame padding enabled or if deactivated and deactivated padding enabled 2018-11-30 16:10:13 +01:00
f120f9c3dd users bug fix:getting id(version) for single/multi detector 2018-11-30 16:00:27 +01:00
262bf1b307 users class: added stopped to getrunstatus list 2018-11-30 15:42:13 +01:00
4d0090dfcc ctb server: added brackets around char* in write to socket 2018-11-21 15:57:46 +01:00
e98d60c26e updated ctb binary 2018-11-21 15:35:59 +01:00
cd3135c01d loophole for blackfin not checking the data sent, hence splitting data to a few packets when size > 30k bytes 2018-11-21 15:34:58 +01:00
40dedb8b07 manual 2018-11-16 17:47:41 +01:00
2e83db7d45 changed cluster file format 2018-11-09 12:34:14 +01:00
817736fcd5 after merging with developer 2018-11-02 10:48:06 +01:00
660ed4c177 changed users set/getDetectorsize API to include a single ROI 2018-10-25 14:11:40 +02:00
0d96272db5 manual 2018-10-23 11:29:27 +02:00
38a6393dde fixed probelem with multiThreadedInterpolatingDetector 2018-10-16 17:17:24 +02:00
4aa720eecb added data structure for moench03 rectangual pixels module 019 2018-10-11 09:32:47 +02:00
d68c3b73a8 pdf manual 2018-10-05 14:30:54 +02:00
ae8678cdc2 New Zmq header staructur implemented and works, still different number of pixels in the GUI should be fixed (but it does not crash) 2018-09-25 09:36:47 +02:00
19e7ced332 moench zmq process implemented - command implementation is missing 2018-09-13 16:07:43 +02:00
f288390255 Zmq communication uses additional headers, moench processing fixed 2018-09-11 17:05:11 +02:00
83600fcb15 Added data structure for moench02 dynamic gain switching 2018-08-17 12:29:07 +02:00
921ae01bbe jungfrau module data, fixel moench02 for jctb and jctb server actualized for both buses 2018-08-13 16:27:36 +02:00
597 changed files with 23987 additions and 24894 deletions

View File

@ -2,5 +2,5 @@ BasedOnStyle: LLVM
IndentWidth: 4
UseTab: Never
ColumnLimit: 100
ColumnLimit: 80
AlignConsecutiveAssignments: false

View File

@ -1,7 +1,32 @@
---
Checks: '*, -google-runtime-references, -hicpp-no-array-decay, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, -cppcoreguidelines-pro-bounds-pointer-arithmetic, -fuchsia*,-readability-else-after-return,-readability-avoid-const-params-in-decls,-hicpp-signed-bitwise,-cppcoreguidelines-pro-bounds-constant-array-index,-llvm-header-guard,-readability-static-accessed-through-instance,-google-readability-todo'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
Checks: '*,
-android-cloexec-fopen,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-fuchsia*,
-readability-else-after-return,
-readability-avoid-const-params-in-decls,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-type-reinterpret-cast,
-llvm-header-guard,
-readability-static-accessed-through-instance,
-readability-braces-around-statements,
-hicpp-signed-bitwise,
-hicpp-no-array-decay,
-hicpp-braces-around-statements,
-google-runtime-references,
-google-readability-todo,
-google-readability-braces-around-statements'
HeaderFilterRegex: \.h
AnalyzeTemporaryDtors: false
FormatStyle: none
CheckOptions:
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
# - { key: readability-identifier-naming.FunctionCase, value: lower_case }
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
# - { key: readability-identifier-naming.MethodCase, value: CamelCase }
# - { key: readability-identifier-naming.StructCase, value: CamelCase }
# - { key: readability-identifier-naming.VariableCase, value: lower_case }
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
...

2
.gitignore vendored
View File

@ -7,9 +7,11 @@ bin/
*.out
*.toc
*.o
.*
build
docs/
RELEASE.txt
Testing/
*.pyc

View File

@ -25,7 +25,9 @@ install:
- conda config --add channels slsdetectorgroup
- conda update conda
- conda update --all
- conda install conda-build anaconda-client
- conda install conda-build=3.17
- conda install anaconda-client
- conda install conda-verify
# Useful for debugging any issues with conda
- conda info -a
@ -37,12 +39,12 @@ install:
- conda-build .
script:
- echo "No test scripts to be run!"
- CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2
deploy:
provider: script
script: find $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64 -name "*.tar.bz2" -exec anaconda -t $CONDA_TOKEN upload --force {} \;
on:
all_branches: true
branch: developer

118
CMakeLists.txt Normal file → Executable file
View File

@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 2.8)
# cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.9)
project(slsDetectorPackage)
set(PROJECT_VERSION 5.0.0)
include(cmake/project_version.cmake)
include(CheckIPOSupported)
# Include additional modules that are used unconditionally
include(GNUInstallDirs)
@ -28,59 +30,100 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(SLS_MASTER_PROJECT ON)
endif()
option (SLS_USE_HDF5 "HDF5 File format" OFF)
option (SLS_USE_TEXTCLIENT "Text Client" OFF)
option (SLS_USE_RECEIVER "Receiver" OFF)
option (SLS_USE_TEXTCLIENT "Text Client" ON)
option (SLS_USE_RECEIVER "Receiver" ON)
option (SLS_USE_GUI "GUI" OFF)
option (SLS_USE_TESTS "TESTS" ON)
option (SLS_USE_INTEGRATION_TESTS "Integration Tests" ON)
option (SLS_USE_TESTS "TESTS" OFF)
option (SLS_USE_INTEGRATION_TESTS "Integration Tests" OFF)
option(SLS_USE_SANITIZER "Sanitizers for debugging" OFF)
option(SLS_USE_PYTHON "Python bindings" OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (default Release)" FORCE)
endif()
#Add two fake libraries to manage options
add_library(slsProjectOptions INTERFACE)
add_library(slsProjectWarnings INTERFACE)
target_compile_features(slsProjectOptions INTERFACE cxx_std_11)
target_compile_options(slsProjectWarnings INTERFACE
-Wall
-Wextra
-Wno-unused-parameter #Needs to be slowly mitigated
# -Wold-style-cast
-Wnon-virtual-dtor
-Woverloaded-virtual
-Wdouble-promotion
-Wformat=2
-Wredundant-decls
# -Wconversion
-Wdouble-promotion
)
#Testing for minimum version for compilers
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# clang does not support -Wno-misleading-indentation
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.2)
message(FATAL_ERROR "Clang version must be at least 3.2!")
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()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-misleading-indentation -Wno-stringop-truncation -Wno-class-memaccess")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
target_compile_options(slsProjectWarnings INTERFACE
-Wno-missing-field-initializers)
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()
# Suppressed warnings in GCC
# -Wno-stringop-truncation happens when we do sls::strcpy_safe truncates string instead of overwrite buffer
# -Wno-class-memaccess - on memcpy in rapidjson should be investigated upgrade implementation?
# -Wno-misleading-indentation - until clang format
#set (CMAKE_CXX_STANDARD 11)
#set (CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 ")
if(SLS_USE_SANITIZER)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address,undefined")
set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address,undefiend")
target_compile_options(slsProjectOptions INTERFACE -fsanitize=address,undefined)
target_link_libraries(slsProjectOptions INTERFACE -fsanitize=address,undefined)
# target_compile_options(slsProjectOptions INTERFACE -fsanitize=thread)
# target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
endif()
# Install fake the libraries
install(TARGETS slsProjectOptions slsProjectWarnings
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
find_package(Doxygen)
find_package(ZeroMQ 4 REQUIRED)
if (SLS_USE_TESTS)
enable_testing()
add_subdirectory(tests)
endif(SLS_USE_TESTS)
# Support library containing functionallity common to
# detector and receiver
# Common functionallity to detector and receiver
add_subdirectory(slsSupportLib)
if (SLS_USE_TEXTCLIENT)
@ -103,10 +146,6 @@ if (SLS_USE_GUI)
endif()
endif (SLS_USE_GUI)
if (SLS_USE_TESTS)
enable_testing()
endif(SLS_USE_TESTS)
if (SLS_USE_INTEGRATION_TESTS)
add_subdirectory(integrationTests)
endif (SLS_USE_INTEGRATION_TESTS)
@ -115,6 +154,26 @@ if (SLS_USE_PYTHON)
add_subdirectory(python)
endif(SLS_USE_PYTHON)
configure_file( .clang-tidy
${CMAKE_BINARY_DIR}/.clang-tidy
)
if (DOXYGEN_FOUND)
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
# note the option ALL which allows to build the docs together with the application
add_custom_target( docs
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
if(SLS_MASTER_PROJECT)
# Set install dir CMake packages
@ -124,4 +183,3 @@ if(SLS_MASTER_PROJECT)
# Generate and install package config file and version
include(cmake/package_config.cmake)
endif()

0
README.md Normal file → Executable file
View File

0
RELEASE.txt Normal file → Executable file
View File

0
catch/catch.hpp Normal file → Executable file
View File

175
cmake/Catch.cmake Executable file
View File

@ -0,0 +1,175 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
Catch
-----
This module defines a function to help use the Catch test framework.
The :command:`catch_discover_tests` discovers tests by asking the compiled test
executable to enumerate its tests. This does not require CMake to be re-run
when tests change. However, it may not work in a cross-compiling environment,
and setting test properties is less convenient.
This command is intended to replace use of :command:`add_test` to register
tests, and will create a separate CTest test for each Catch test case. Note
that this is in some cases less efficient, as common set-up and tear-down logic
cannot be shared by multiple test cases executing in the same instance.
However, it provides more fine-grained pass/fail information to CTest, which is
usually considered as more beneficial. By default, the CTest test name is the
same as the Catch name; see also ``TEST_PREFIX`` and ``TEST_SUFFIX``.
.. command:: catch_discover_tests
Automatically add tests with CTest by querying the compiled test executable
for available tests::
catch_discover_tests(target
[TEST_SPEC arg1...]
[EXTRA_ARGS arg1...]
[WORKING_DIRECTORY dir]
[TEST_PREFIX prefix]
[TEST_SUFFIX suffix]
[PROPERTIES name1 value1...]
[TEST_LIST var]
)
``catch_discover_tests`` sets up a post-build command on the test executable
that generates the list of tests by parsing the output from running the test
with the ``--list-test-names-only`` argument. This ensures that the full
list of tests is obtained. Since test discovery occurs at build time, it is
not necessary to re-run CMake when the list of tests changes.
However, it requires that :prop_tgt:`CROSSCOMPILING_EMULATOR` is properly set
in order to function in a cross-compiling environment.
Additionally, setting properties on tests is somewhat less convenient, since
the tests are not available at CMake time. Additional test properties may be
assigned to the set of tests as a whole using the ``PROPERTIES`` option. If
more fine-grained test control is needed, custom content may be provided
through an external CTest script using the :prop_dir:`TEST_INCLUDE_FILES`
directory property. The set of discovered tests is made accessible to such a
script via the ``<target>_TESTS`` variable.
The options are:
``target``
Specifies the Catch executable, which must be a known CMake executable
target. CMake will substitute the location of the built executable when
running the test.
``TEST_SPEC arg1...``
Specifies test cases, wildcarded test cases, tags and tag expressions to
pass to the Catch executable with the ``--list-test-names-only`` argument.
``EXTRA_ARGS arg1...``
Any extra arguments to pass on the command line to each test case.
``WORKING_DIRECTORY dir``
Specifies the directory in which to run the discovered test cases. If this
option is not provided, the current binary directory is used.
``TEST_PREFIX prefix``
Specifies a ``prefix`` to be prepended to the name of each discovered test
case. This can be useful when the same test executable is being used in
multiple calls to ``catch_discover_tests()`` but with different
``TEST_SPEC`` or ``EXTRA_ARGS``.
``TEST_SUFFIX suffix``
Similar to ``TEST_PREFIX`` except the ``suffix`` is appended to the name of
every discovered test case. Both ``TEST_PREFIX`` and ``TEST_SUFFIX`` may
be specified.
``PROPERTIES name1 value1...``
Specifies additional properties to be set on all tests discovered by this
invocation of ``catch_discover_tests``.
``TEST_LIST var``
Make the list of tests available in the variable ``var``, rather than the
default ``<target>_TESTS``. This can be useful when the same test
executable is being used in multiple calls to ``catch_discover_tests()``.
Note that this variable is only available in CTest.
#]=======================================================================]
#------------------------------------------------------------------------------
function(catch_discover_tests TARGET)
cmake_parse_arguments(
""
""
"TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST"
"TEST_SPEC;EXTRA_ARGS;PROPERTIES"
${ARGN}
)
if(NOT _WORKING_DIRECTORY)
set(_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endif()
if(NOT _TEST_LIST)
set(_TEST_LIST ${TARGET}_TESTS)
endif()
## Generate a unique name based on the extra arguments
string(SHA1 args_hash "${_TEST_SPEC} ${_EXTRA_ARGS}")
string(SUBSTRING ${args_hash} 0 7 args_hash)
# Define rule to generate test list for aforementioned test executable
set(ctest_include_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_include-${args_hash}.cmake")
set(ctest_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_tests-${args_hash}.cmake")
get_property(crosscompiling_emulator
TARGET ${TARGET}
PROPERTY CROSSCOMPILING_EMULATOR
)
add_custom_command(
TARGET ${TARGET} POST_BUILD
BYPRODUCTS "${ctest_tests_file}"
COMMAND "${CMAKE_COMMAND}"
-D "TEST_TARGET=${TARGET}"
-D "TEST_EXECUTABLE=$<TARGET_FILE:${TARGET}>"
-D "TEST_EXECUTOR=${crosscompiling_emulator}"
-D "TEST_WORKING_DIR=${_WORKING_DIRECTORY}"
-D "TEST_SPEC=${_TEST_SPEC}"
-D "TEST_EXTRA_ARGS=${_EXTRA_ARGS}"
-D "TEST_PROPERTIES=${_PROPERTIES}"
-D "TEST_PREFIX=${_TEST_PREFIX}"
-D "TEST_SUFFIX=${_TEST_SUFFIX}"
-D "TEST_LIST=${_TEST_LIST}"
-D "CTEST_FILE=${ctest_tests_file}"
-P "${_CATCH_DISCOVER_TESTS_SCRIPT}"
VERBATIM
)
file(WRITE "${ctest_include_file}"
"if(EXISTS \"${ctest_tests_file}\")\n"
" include(\"${ctest_tests_file}\")\n"
"else()\n"
" add_test(${TARGET}_NOT_BUILT-${args_hash} ${TARGET}_NOT_BUILT-${args_hash})\n"
"endif()\n"
)
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0")
# Add discovered tests to directory TEST_INCLUDE_FILES
set_property(DIRECTORY
APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
)
else()
# Add discovered tests as directory TEST_INCLUDE_FILE if possible
get_property(test_include_file_set DIRECTORY PROPERTY TEST_INCLUDE_FILE SET)
if (NOT ${test_include_file_set})
set_property(DIRECTORY
PROPERTY TEST_INCLUDE_FILE "${ctest_include_file}"
)
else()
message(FATAL_ERROR
"Cannot set more than one TEST_INCLUDE_FILE"
)
endif()
endif()
endfunction()
###############################################################################
set(_CATCH_DISCOVER_TESTS_SCRIPT
${CMAKE_CURRENT_LIST_DIR}/CatchAddTests.cmake
)

78
cmake/CatchAddTests.cmake Executable file
View File

@ -0,0 +1,78 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
set(prefix "${TEST_PREFIX}")
set(suffix "${TEST_SUFFIX}")
set(spec ${TEST_SPEC})
set(extra_args ${TEST_EXTRA_ARGS})
set(properties ${TEST_PROPERTIES})
set(script)
set(suite)
set(tests)
function(add_command NAME)
set(_args "")
foreach(_arg ${ARGN})
if(_arg MATCHES "[^-./:a-zA-Z0-9_]")
set(_args "${_args} [==[${_arg}]==]") # form a bracket_argument
else()
set(_args "${_args} ${_arg}")
endif()
endforeach()
set(script "${script}${NAME}(${_args})\n" PARENT_SCOPE)
endfunction()
# Run test executable to get list of available tests
if(NOT EXISTS "${TEST_EXECUTABLE}")
message(FATAL_ERROR
"Specified test executable '${TEST_EXECUTABLE}' does not exist"
)
endif()
execute_process(
COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-test-names-only
OUTPUT_VARIABLE output
RESULT_VARIABLE result
)
# Catch --list-test-names-only reports the number of tests, so 0 is... surprising
if(${result} EQUAL 0)
message(WARNING
"Test executable '${TEST_EXECUTABLE}' contains no tests!\n"
)
elseif(${result} LESS 0)
message(FATAL_ERROR
"Error running test executable '${TEST_EXECUTABLE}':\n"
" Result: ${result}\n"
" Output: ${output}\n"
)
endif()
string(REPLACE "\n" ";" output "${output}")
# Parse output
foreach(line ${output})
set(test ${line})
# use escape commas to handle properly test cases with commans inside the name
string(REPLACE "," "\\," test_name ${test})
# ...and add to script
add_command(add_test
"${prefix}${test}${suffix}"
${TEST_EXECUTOR}
"${TEST_EXECUTABLE}"
"${test_name}"
${extra_args}
)
add_command(set_tests_properties
"${prefix}${test}${suffix}"
PROPERTIES
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
${properties}
)
list(APPEND tests "${prefix}${test}${suffix}")
endforeach()
# Create a list of all discovered tests, which users may use to e.g. set
# properties on the tests
add_command(set ${TEST_LIST} ${tests})
# Write CTest script
file(WRITE "${CTEST_FILE}" "${script}")

0
cmake/FindCBF.cmake Normal file → Executable file
View File

0
cmake/FindQwt.cmake Normal file → Executable file
View File

0
cmake/FindROOT.cmake Normal file → Executable file
View File

0
cmake/FindZeroMQ.cmake Normal file → Executable file
View File

203
cmake/ParseAndAddCatchTests.cmake Executable file
View File

@ -0,0 +1,203 @@
#==================================================================================================#
# supported macros #
# - TEST_CASE, #
# - SCENARIO, #
# - TEST_CASE_METHOD, #
# - CATCH_TEST_CASE, #
# - CATCH_SCENARIO, #
# - CATCH_TEST_CASE_METHOD. #
# #
# Usage #
# 1. make sure this module is in the path or add this otherwise: #
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake.modules/") #
# 2. make sure that you've enabled testing option for the project by the call: #
# enable_testing() #
# 3. add the lines to the script for testing target (sample CMakeLists.txt): #
# project(testing_target) #
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake.modules/") #
# enable_testing() #
# #
# find_path(CATCH_INCLUDE_DIR "catch.hpp") #
# include_directories(${INCLUDE_DIRECTORIES} ${CATCH_INCLUDE_DIR}) #
# #
# file(GLOB SOURCE_FILES "*.cpp") #
# add_executable(${PROJECT_NAME} ${SOURCE_FILES}) #
# #
# include(ParseAndAddCatchTests) #
# ParseAndAddCatchTests(${PROJECT_NAME}) #
# #
# The following variables affect the behavior of the script: #
# #
# PARSE_CATCH_TESTS_VERBOSE (Default OFF) #
# -- enables debug messages #
# PARSE_CATCH_TESTS_NO_HIDDEN_TESTS (Default OFF) #
# -- excludes tests marked with [!hide], [.] or [.foo] tags #
# PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME (Default ON) #
# -- adds fixture class name to the test name #
# PARSE_CATCH_TESTS_ADD_TARGET_IN_TEST_NAME (Default ON) #
# -- adds cmake target name to the test name #
# PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS (Default OFF) #
# -- causes CMake to rerun when file with tests changes so that new tests will be discovered #
# #
# One can also set (locally) the optional variable OptionalCatchTestLauncher to precise the way #
# a test should be run. For instance to use test MPI, one can write #
# set(OptionalCatchTestLauncher ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${NUMPROC}) #
# just before calling this ParseAndAddCatchTests function #
# #
#==================================================================================================#
cmake_minimum_required(VERSION 2.8.8)
option(PARSE_CATCH_TESTS_VERBOSE "Print Catch to CTest parser debug messages" OFF)
option(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS "Exclude tests with [!hide], [.] or [.foo] tags" OFF)
option(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME "Add fixture class name to the test name" ON)
option(PARSE_CATCH_TESTS_ADD_TARGET_IN_TEST_NAME "Add target name to the test name" ON)
option(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS "Add test file to CMAKE_CONFIGURE_DEPENDS property" OFF)
function(PrintDebugMessage)
if(PARSE_CATCH_TESTS_VERBOSE)
message(STATUS "ParseAndAddCatchTests: ${ARGV}")
endif()
endfunction()
# This removes the contents between
# - block comments (i.e. /* ... */)
# - full line comments (i.e. // ... )
# contents have been read into '${CppCode}'.
# !keep partial line comments
function(RemoveComments CppCode)
string(ASCII 2 CMakeBeginBlockComment)
string(ASCII 3 CMakeEndBlockComment)
string(REGEX REPLACE "/\\*" "${CMakeBeginBlockComment}" ${CppCode} "${${CppCode}}")
string(REGEX REPLACE "\\*/" "${CMakeEndBlockComment}" ${CppCode} "${${CppCode}}")
string(REGEX REPLACE "${CMakeBeginBlockComment}[^${CMakeEndBlockComment}]*${CMakeEndBlockComment}" "" ${CppCode} "${${CppCode}}")
string(REGEX REPLACE "\n[ \t]*//+[^\n]+" "\n" ${CppCode} "${${CppCode}}")
set(${CppCode} "${${CppCode}}" PARENT_SCOPE)
endfunction()
# Worker function
function(ParseFile SourceFile TestTarget)
# According to CMake docs EXISTS behavior is well-defined only for full paths.
get_filename_component(SourceFile ${SourceFile} ABSOLUTE)
if(NOT EXISTS ${SourceFile})
message(WARNING "Cannot find source file: ${SourceFile}")
return()
endif()
PrintDebugMessage("parsing ${SourceFile}")
file(STRINGS ${SourceFile} Contents NEWLINE_CONSUME)
# Remove block and fullline comments
RemoveComments(Contents)
# Find definition of test names
string(REGEX MATCHALL "[ \t]*(CATCH_)?(TEST_CASE_METHOD|SCENARIO|TEST_CASE)[ \t]*\\([^\)]+\\)+[ \t\n]*{+[ \t]*(//[^\n]*[Tt][Ii][Mm][Ee][Oo][Uu][Tt][ \t]*[0-9]+)*" Tests "${Contents}")
if(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS AND Tests)
PrintDebugMessage("Adding ${SourceFile} to CMAKE_CONFIGURE_DEPENDS property")
set_property(
DIRECTORY
APPEND
PROPERTY CMAKE_CONFIGURE_DEPENDS ${SourceFile}
)
endif()
foreach(TestName ${Tests})
# Strip newlines
string(REGEX REPLACE "\\\\\n|\n" "" TestName "${TestName}")
# Get test type and fixture if applicable
string(REGEX MATCH "(CATCH_)?(TEST_CASE_METHOD|SCENARIO|TEST_CASE)[ \t]*\\([^,^\"]*" TestTypeAndFixture "${TestName}")
string(REGEX MATCH "(CATCH_)?(TEST_CASE_METHOD|SCENARIO|TEST_CASE)" TestType "${TestTypeAndFixture}")
string(REGEX REPLACE "${TestType}\\([ \t]*" "" TestFixture "${TestTypeAndFixture}")
# Get string parts of test definition
string(REGEX MATCHALL "\"+([^\\^\"]|\\\\\")+\"+" TestStrings "${TestName}")
# Strip wrapping quotation marks
string(REGEX REPLACE "^\"(.*)\"$" "\\1" TestStrings "${TestStrings}")
string(REPLACE "\";\"" ";" TestStrings "${TestStrings}")
# Validate that a test name and tags have been provided
list(LENGTH TestStrings TestStringsLength)
if(TestStringsLength GREATER 2 OR TestStringsLength LESS 1)
message(FATAL_ERROR "You must provide a valid test name and tags for all tests in ${SourceFile}")
endif()
# Assign name and tags
list(GET TestStrings 0 Name)
if("${TestType}" STREQUAL "SCENARIO")
set(Name "Scenario: ${Name}")
endif()
if(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME AND TestFixture)
set(CTestName "${TestFixture}:${Name}")
else()
set(CTestName "${Name}")
endif()
if(PARSE_CATCH_TESTS_ADD_TARGET_IN_TEST_NAME)
set(CTestName "${TestTarget}:${CTestName}")
endif()
# add target to labels to enable running all tests added from this target
set(Labels ${TestTarget})
if(TestStringsLength EQUAL 2)
list(GET TestStrings 1 Tags)
string(TOLOWER "${Tags}" Tags)
# remove target from labels if the test is hidden
if("${Tags}" MATCHES ".*\\[!?(hide|\\.)\\].*")
list(REMOVE_ITEM Labels ${TestTarget})
endif()
string(REPLACE "]" ";" Tags "${Tags}")
string(REPLACE "[" "" Tags "${Tags}")
else()
# unset tags variable from previous loop
unset(Tags)
endif()
list(APPEND Labels ${Tags})
list(FIND Labels "!hide" IndexOfHideLabel)
set(HiddenTagFound OFF)
foreach(label ${Labels})
string(REGEX MATCH "^!hide|^\\." result ${label})
if(result)
set(HiddenTagFound ON)
break()
endif(result)
endforeach(label)
if(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS AND ${HiddenTagFound} AND ${CMAKE_VERSION} VERSION_LESS "3.9")
PrintDebugMessage("Skipping test \"${CTestName}\" as it has [!hide], [.] or [.foo] label")
else()
PrintDebugMessage("Adding test \"${CTestName}\"")
if(Labels)
PrintDebugMessage("Setting labels to ${Labels}")
endif()
# Escape commas in the test spec
string(REPLACE "," "\\," Name ${Name})
# Add the test and set its properties
add_test(NAME "\"${CTestName}\"" COMMAND ${OptionalCatchTestLauncher} ${TestTarget} ${Name} ${AdditionalCatchParameters})
# Old CMake versions do not document VERSION_GREATER_EQUAL, so we use VERSION_GREATER with 3.8 instead
if(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS AND ${HiddenTagFound} AND ${CMAKE_VERSION} VERSION_GREATER "3.8")
PrintDebugMessage("Setting DISABLED test property")
set_tests_properties("\"${CTestName}\"" PROPERTIES DISABLED ON)
else()
set_tests_properties("\"${CTestName}\"" PROPERTIES FAIL_REGULAR_EXPRESSION "No tests ran"
LABELS "${Labels}")
endif()
endif()
endforeach()
endfunction()
# entry point
function(ParseAndAddCatchTests TestTarget)
PrintDebugMessage("Started parsing ${TestTarget}")
get_target_property(SourceFiles ${TestTarget} SOURCES)
PrintDebugMessage("Found the following sources: ${SourceFiles}")
foreach(SourceFile ${SourceFiles})
ParseFile(${SourceFile} ${TestTarget})
endforeach()
PrintDebugMessage("Finished parsing ${TestTarget}")
endfunction()

0
cmake/package_config.cmake Normal file → Executable file
View File

0
cmake/project-config.cmake.in Normal file → Executable file
View File

0
cmake/project_version.cc.in Normal file → Executable file
View File

48
cmake/project_version.cmake Normal file → Executable file
View File

@ -57,28 +57,28 @@ if (GIT_CMD AND NOT "${GIT_TOPLEVEL}" STREQUAL "")
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
#message(STATUS "GIT_DESCRIBE: " ${GIT_DESCRIBE})
if (GIT_DESCRIBE)
string(REGEX REPLACE "v?([0-9.]+).*" "\\1" GIT_VERSION ${GIT_DESCRIBE})
message(STATUS "GIT_VERSION: " ${GIT_VERSION})
# if (GIT_DESCRIBE)
# string(REGEX REPLACE "v?([0-9.]+).*" "\\1" GIT_VERSION ${GIT_DESCRIBE})
# message(STATUS "GIT_VERSION: " ${GIT_VERSION})
# as package version we use the full version from git describe: 1.7.1+7+ge324c81
if (GIT_DESCRIBE MATCHES ".*-g.*")
# convert a git describe string to usable debian version, e.g. v1.7.1-7-ge324c81 to 1.7.1+7+ge324c81
string(REGEX REPLACE "v?([0-9]*.[0-9.]*).*-([0-9]*)-([a-g0-9]*)" "\\1+\\2+\\3" GIT_FULL_VERSION ${GIT_DESCRIBE})
else()
# current HEAD is git tag (i.e. releaase), directly use the version
set(GIT_FULL_VERSION ${GIT_VERSION})
endif()
else ()
# no (suitable) tag found
set(GIT_VERSION "0.0.0")
# get number of commits in repo
execute_process(COMMAND ${GIT_CMD} rev-list --count HEAD
WORKING_DIRECTORY ${GIT_TOPLEVEL}
OUTPUT_VARIABLE GIT_COMMIT_COUNT
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(GIT_FULL_VERSION 0.0.0+${GIT_COMMIT_COUNT}+g${GIT_SHA1})
endif ()
# # as package version we use the full version from git describe: 1.7.1+7+ge324c81
# if (GIT_DESCRIBE MATCHES ".*-g.*")
# # convert a git describe string to usable debian version, e.g. v1.7.1-7-ge324c81 to 1.7.1+7+ge324c81
# string(REGEX REPLACE "v?([0-9]*.[0-9.]*).*-([0-9]*)-([a-g0-9]*)" "\\1+\\2+\\3" GIT_FULL_VERSION ${GIT_DESCRIBE})
# else()
# # current HEAD is git tag (i.e. releaase), directly use the version
# set(GIT_FULL_VERSION ${GIT_VERSION})
# endif()
# else ()
# # no (suitable) tag found
# set(GIT_VERSION "0.0.0")
# # get number of commits in repo
# execute_process(COMMAND ${GIT_CMD} rev-list --count HEAD
# WORKING_DIRECTORY ${GIT_TOPLEVEL}
# OUTPUT_VARIABLE GIT_COMMIT_COUNT
# OUTPUT_STRIP_TRAILING_WHITESPACE)
# set(GIT_FULL_VERSION 0.0.0+${GIT_COMMIT_COUNT}+g${GIT_SHA1})
# endif ()
endif ()
# get version from package.xml if it exists
@ -104,10 +104,10 @@ if (NOT PROJECT_VERSION)
set(PROJECT_VERSION "0.0.0")
endif ()
endif ()
if (NOT PACKAGE_VERSION)
message(WARNING "PACKAGE_VERSION not set! Falling back to (${PROJECT_VERSION})")
# if (NOT PACKAGE_VERSION)
# message(WARNING "PACKAGE_VERSION not set! Falling back to (${PROJECT_VERSION})")
set(PACKAGE_VERSION ${PROJECT_VERSION})
endif ()
# endif ()
# warn if versions don't match
if (GIT_VERSION AND NOT GIT_VERSION MATCHES ${PROJECT_VERSION})

0
cmake/project_version.h.in Normal file → Executable file
View File

64
cmk.sh
View File

@ -7,6 +7,7 @@ TEXTCLIENT=0
RECEIVER=0
GUI=0
DEBUG=0
PYTHON=0
CLEAN=0
@ -15,10 +16,11 @@ CMAKE_PRE=""
CMAKE_POST=""
usage() { echo -e "
Usage: $0 [-c] [-b] [-h] [-d <HDF5 directory>] [-j]
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [-h] [-d <HDF5 directory>] [-j] <Number of threads>
-[no option]: only make
-c: Clean
-b: Builds/Rebuilds CMake files normal mode
-p: Builds/Rebuilds Python API
-h: Builds/Rebuilds Cmake files with HDF5 package
-d: HDF5 Custom Directory
-t: Build/Rebuilds only text client
@ -26,6 +28,12 @@ Usage: $0 [-c] [-b] [-h] [-d <HDF5 directory>] [-j]
-g: Build/Rebuilds only gui
-j: Number of threads to compile through
-e: Debug mode
Rebuild when you switch to a new build and compile in parallel:
./cmk.sh -bj5
Rebuild python
./cmk.sh -p
For only make:
./cmk.sh
@ -55,12 +63,17 @@ For rebuilding only certain sections
" ; exit 1; }
while getopts ":bchd:j:trge" opt ; do
while getopts ":bpchd:j:trges:" opt ; do
case $opt in
b)
echo "Building of CMake files Required"
REBUILD=1
;;
p)
echo "Compiling Options: Python"
PYTHON=1
REBUILD=1
;;
c)
echo "Clean Required"
CLEAN=1
@ -96,7 +109,7 @@ while getopts ":bchd:j:trge" opt ; do
e)
echo "Compiling Options: Debug"
DEBUG=1
;;
;;
\?)
echo "Invalid option: -$OPTARG"
usage
@ -111,28 +124,30 @@ while getopts ":bchd:j:trge" opt ; do
done
#python
if [ $PYTHON -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_PYTHON=ON "
echo "Enabling Compile Option: Python"
fi
if [ $TEXTCLIENT -eq 0 ] && [ $RECEIVER -eq 0 ] && [ $GUI -eq 0 ]; then
# CMAKE_POST+=" -DSLS_USE_TEXTCLIENT=ON -DSLS_USE_RECEIVER=ON -DSLS_USE_GUI=ON "
CMAKE_POST+=" -DSLS_USE_TEXTCLIENT=ON -DSLS_USE_RECEIVER=ON "
echo "Compile Option: TextClient, Receiver and GUI"
#CMAKE_POST+=" -DSLS_USE_TEXTCLIENT=ON -DSLS_USE_RECEIVER=ON -DSLS_USE_GUI=ON "
CMAKE_POST+=" -DSLS_USE_TEXTCLIENT=ON -DSLS_USE_RECEIVER=ON -DSLS_USE_GUI=OFF "
echo "Enabling Compile Option: TextClient, Receiver and GUI"
else
if [ $TEXTCLIENT -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_TEXTCLIENT=ON "
echo "Compile Option: TextClient"
fi
if [ $RECEIVER -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_RECEIVER=ON "
echo "Compile Option: Receiver"
fi
if [ $GUI -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_GUI=ON "
echo "Compile Option: GUI"
fi
if [ $TEXTCLIENT -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_TEXTCLIENT=ON "
echo "Enabling Compile Option: TextClient"
fi
if [ $RECEIVER -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_RECEIVER=ON "
echo "Enabling Compile Option: Receiver"
fi
if [ $GUI -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_GUI=ON "
echo "Enabling Compile Option: GUI"
fi
fi
@ -154,14 +169,15 @@ fi
#Debug
if [ $DEBUG -eq 1 ]; then
CMAKE_POST+=" -DCMAKE_BUILD_TYPE=Debug "
CMAKE_POST+=" -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON "
echo "Debug Option enabled"
fi
#hdf5 rebuild
if [ $HDF5 -eq 1 ]; then
CMAKE_PRE+="HDF5_ROOT="$HDF5DIR
# CMAKE_PRE+="HDF5_ROOT="$HDF5DIR
CMAKE_POST+=" -DCMAKE_INSTALL_PREFIX="$HDF5DIR
CMAKE_POST+=" -DSLS_USE_HDF5=ON "
#normal mode rebuild
else
@ -178,7 +194,7 @@ echo "in "$PWD
#cmake
if [ $REBUILD -eq 1 ]; then
rm -f CMakeCache.txt
BUILDCOMMAND="$CMAKE_PRE cmake $CMAKE_POST .."
BUILDCOMMAND="$CMAKE_PRE cmake3 $CMAKE_POST .."
echo $BUILDCOMMAND
eval $BUILDCOMMAND
fi

6
conda-recepie/build.sh Normal file → Executable file
View File

@ -7,9 +7,13 @@ cmake .. \
-DSLS_USE_TEXTCLIENT=ON \
-DSLS_USE_RECEIVER=ON \
-DSLS_USE_GUI=OFF \
-DSLS_USE_TESTS=ON \
-DSLS_USE_PYTHON=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DSLS_USE_HDF5=OFF\
cmake --build . -- -j10
cmake --build . --target install
cmake --build . --target install
CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2

14
conda-recepie/build_pylib.sh Executable file
View File

@ -0,0 +1,14 @@
# mkdir $PREFIX/lib
# mkdir $PREFIX/include
# #Shared and static libraries
# cp build/bin/_sls_detector* $PREFIX/lib/.
# #Binaries
# cp -r build/bin/sls_detector $PREFIX/lib/.
cd python
${PYTHON} setup.py install

0
conda-recepie/copy_gui.sh Normal file → Executable file
View File

0
conda-recepie/copy_lib.sh Normal file → Executable file
View File

42
conda-recepie/meta.yaml Normal file → Executable file
View File

@ -1,13 +1,13 @@
package:
name: sls_detector_software
version: "refactor"
version: "developer"
source:
- path: ..
build:
number: 0
number: 1
rpaths:
- lib/
@ -16,8 +16,8 @@ requirements:
- {{ compiler('c') }}
- {{compiler('cxx')}}
- cmake
- qwt 6.*
- qt=4.8.7=7
# - qwt 6.* #require qt5 investigate befor activating gui
# - qt=4.8.7=7
- zeromq=4.2.5=hfc679d8_5
- pyzmq
- xorg-libx11
@ -30,14 +30,13 @@ requirements:
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
host:
- libstdcxx-ng
- libgcc-ng
- libpng >=1.6.32,<1.6.35
- xorg-libx11
- xorg-libice
- xorg-libxext
@ -50,18 +49,41 @@ requirements:
- libstdcxx-ng
- libgcc-ng
outputs:
- name: sls_detector_lib
version: "refactor"
script: copy_lib.sh
- name: sls_detector
script: build_pylib.sh
requirements:
build:
- {{ compiler('c') }}
- {{compiler('cxx')}}
- python {{ python }}
- setuptools
- sls_detector_lib
- pyzmq
- pybind11 2.2
host:
- python
- pybind11 2.2
- pyzmq
- sls_detector_lib
- libstdcxx-ng
- libgcc-ng
run:
- python
- numpy
- sls_detector_lib=developer
- pyzmq
- libstdcxx-ng
- libgcc-ng
test:
imports:
- sls_detector
# - name: sls_detector
# version: "refactor"
# script: copy_lib.sh
# requirements:
# build:
# - {{ compiler('c') }}

1
conda-recepie/run_test.sh Executable file
View File

@ -0,0 +1 @@
ctest -j2

58
configure vendored
View File

@ -1,58 +0,0 @@
##!/bin/bash
: ${INSTALLROOT=$PWD}
read -p "Installation directory [default:\"$INSTALLROOT\"]:" -e t3
if [ -z "$t3" ]
then
echo
else
INSTALLROOT=$t3
fi
echo "INSTALLROOT will be \"$INSTALLROOT\""
export INSTALLROOT
: ${BINDIR="bin"}
read -p "Binaries directory [default:\"$BINDIR\"]:" -e t4
if [ -z "$t4" ]
then
BINDIR=$INSTALLROOT/$BINDIR
else
BINDIR=$INSTALLROOT/$t4
fi
echo "BINDIR will be \"$BINDIR\""
export BINDIR
: ${LIBDIR="bin"}
read -p "Libraries directory [default:\"$LIBDIR\"]:" -e t5
if [ -z "$t5" ]
then
LIBDIR=$INSTALLROOT/$LIBDIR
else
LIBDIR=$INSTALLROOT/$t5
fi
echo "LIBDIR will be \"$LIBDIR\""
export LIBDIR
: ${INCDIR="include"}
read -p "Includes directory [default:\"$INCDIR\"]:" -e t6
if [ -z "$t6" ]
then
INCDIR=$INSTALLROOT/$INCDIR
else
INCDIR=$INSTALLROOT/$t6
fi
echo "INCDIR will be \"$INCDIR\""
export INCDIR
: ${DOCDIR="doc"}
read -p "Documentation directory [default:\"$DOCDIR\"]:" -e t7
if [ -z "$t7" ]
then
DOCDIR=$INSTALLROOT/$DOCDIR
else
DOCDIR=$INSTALLROOT/$t7
fi
echo "DOCDIR will be \"$DOCDIR\""
export DOCDIR

2482
doxygen/Doxyfile.in Normal file

File diff suppressed because it is too large Load Diff

0
evalVersionVariables.sh Normal file → Executable file
View File

View File

@ -1,24 +0,0 @@
module 0 center 6.395E+02 +- 0.00E+00 conversion 6.5660E-05 +- 7.10E-09 offset 0.00000 +- 0.00015
module 1 center 6.395E+02 +- 0.00E+00 conversion 6.5650E-05 +- 7.09E-09 offset 5.00211 +- 0.00015
module 2 center 6.395E+02 +- 0.00E+00 conversion 6.5625E-05 +- 7.09E-09 offset 10.00733 +- 0.00015
module 3 center 6.395E+02 +- 0.00E+00 conversion 6.5618E-05 +- 7.09E-09 offset 15.00742 +- 0.00015
module 4 center 6.395E+02 +- 0.00E+00 conversion 6.5642E-05 +- 7.15E-09 offset 20.00620 +- 0.00015
module 5 center 6.395E+02 +- 0.00E+00 conversion 6.5612E-05 +- 7.09E-09 offset 25.00281 +- 0.00015
module 6 center 6.395E+02 +- 0.00E+00 conversion 6.5623E-05 +- 6.93E-09 offset 30.00704 +- 0.00015
module 7 center 6.395E+02 +- 0.00E+00 conversion 6.5605E-05 +- 7.10E-09 offset 34.99715 +- 0.00015
module 8 center 6.395E+02 +- 0.00E+00 conversion 6.5643E-05 +- 7.21E-09 offset 39.99533 +- 0.00015
module 9 center 6.395E+02 +- 0.00E+00 conversion 6.5638E-05 +- 7.09E-09 offset 44.99969 +- 0.00015
module 10 center 6.395E+02 +- 0.00E+00 conversion 6.5638E-05 +- 6.94E-09 offset 49.99859 +- 0.00015
module 11 center 6.395E+02 +- 0.00E+00 conversion 6.5644E-05 +- 7.10E-09 offset 54.99499 +- 0.00015
module 12 center 6.395E+02 +- 0.00E+00 conversion 6.5618E-05 +- 7.09E-09 offset 59.99120 +- 0.00015
module 13 center 6.395E+02 +- 0.00E+00 conversion 6.5607E-05 +- 7.11E-09 offset 64.98880 +- 0.00015
module 14 center 6.395E+02 +- 0.00E+00 conversion 6.5609E-05 +- 7.09E-09 offset 69.98205 +- 0.00015
module 15 center 6.395E+02 +- 0.00E+00 conversion 6.5611E-05 +- 7.09E-09 offset 74.98379 +- 0.00015
module 16 center 6.395E+02 +- 0.00E+00 conversion 6.5619E-05 +- 4.72E-09 offset 79.98559 +- 0.00015
module 17 center 6.395E+02 +- 0.00E+00 conversion 6.5604E-05 +- 7.09E-09 offset 84.98376 +- 0.00015
module 18 center 6.395E+02 +- 0.00E+00 conversion 6.5605E-05 +- 7.09E-09 offset 89.98307 +- 0.00015
module 19 center 6.395E+02 +- 0.00E+00 conversion 6.5616E-05 +- 7.09E-09 offset 94.98907 +- 0.00015
module 20 center 6.395E+02 +- 0.00E+00 conversion 6.5634E-05 +- 7.08E-09 offset 99.97965 +- 0.00015
module 21 center 6.395E+02 +- 0.00E+00 conversion 6.5608E-05 +- 4.16E-09 offset 104.99732 +- 0.00016
module 22 center 6.395E+02 +- 0.00E+00 conversion 6.5608E-05 +- 7.09E-09 offset 109.98646 +- 0.00015
module 23 center 6.395E+02 +- 0.00E+00 conversion 6.5649E-05 +- 7.09E-09 offset 114.98765 +- 0.00015

View File

@ -1,5 +0,0 @@
15
1528
5000
6513

0
examples/config_gen_script/beb_31_25.config_gen Normal file → Executable file
View File

0
examples/config_gen_script/eiger_2m_1gb.config_gen Normal file → Executable file
View File

View File

@ -0,0 +1,39 @@
hostname hostname1+hostname2+hostname3+hostname55+
header_var1 wow
header_var2 great
header_var3 very nice
0:counter1 100
0:counter2 1024
0:counter3 1500
0:forallmodules val_mod1
0:constant1 const1
0:constant2 const2
0:constant3 const3 /path/to/something
1:counter1 101
1:counter2 1036
1:counter3 1503
1:forallmodules val_mod2
1:constant1 const1
1:constant2 const2
1:constant3 const3 /path/to/something
2:counter1 102
2:counter2 1048
2:counter3 1506
2:forallmodules val_mod3
2:constant1 const1
2:constant2 const2
2:constant3 const3 /path/to/something
3:counter1 103
3:counter2 1060
3:counter3 1509
3:forallmodules val_mod4
3:constant1 const1
3:constant2 const2
3:constant3 const3 /path/to/something
footer1 foot1
footer2 somethingelseathebottom

View File

@ -0,0 +1,47 @@
#!/bin/bash
# local variables
a_variable=/path/to/something
# HOSTNAMES is special
# Beside of the hostname line it also defines the amount of modules
# for the body part
# take care for the last space
HOSTNAMES="hostname1 hostname2 hostname3 hostname55 "
## header contains constant values at the beginning of the file
header=(
header_var1="wow"
header_var2="great"
header_var3="very nice"
)
## the body part is for each half module
# counters will count automatically
# the number behind ':' indicates the incrementation value
counters=(
counter1="100:1"
counter2="1024:12"
counter3="1500:3"
)
# constant values
constants=(
constant1="const1"
constant2="const2"
constant3="const3 ${a_variable}"
)
# lists contains space separated lists each value for each half module
lists=(
forallmodules="val_mod1 val_mod2 val_mod3 val_mod4"
)
## footer contains constant values for the end of the file
footer=(
footer1=foot1
footer2=somethingelseathebottom
)

0
examples/eiger_10Gb.config Normal file → Executable file
View File

0
examples/eiger_1Gb.config Normal file → Executable file
View File

0
examples/gotthard.config Normal file → Executable file
View File

0
examples/gotthard_setup.det Normal file → Executable file
View File

0
examples/gotthard_two.config Normal file → Executable file
View File

0
examples/howto_gotthard_twomodules.txt Normal file → Executable file
View File

0
examples/jungfrau.config Normal file → Executable file
View File

0
examples/jungfrau_two.config Normal file → Executable file
View File

0
examples/moench01_T1_lab.config Normal file → Executable file
View File

View File

@ -1,32 +0,0 @@
type Mythen+
0:hostname mcs1x21
0:port 1952
0:stopport 1953
0:settingsdir /afs/psi.ch/user/b/bergamaschi
0:outdir /afs/psi.ch/user/b/bergamaschi
0:angdir 1.000000
0:moveflag 1.000000
0:lock 0
0:caldir /afs/psi.ch/user/b/bergamaschi
0:ffdir /afs/psi.ch/user/b/bergamaschi
0:nmod 1
0:waitstates 13
0:setlength 3
0:clkdivider 6
0:extsig:0 gate_in_active_high
0:extsig:1 trigger_in_rising_edge
0:extsig:2 off
0:extsig:3 off
master -1
sync none
outdir /afs/psi.ch/user/b/bergamaschi
ffdir /afs/psi.ch/user/b/bergamaschi
headerbefore none
headerafter none
headerbeforepar none
headerafterpar none
badchannels none
angconv none
globaloff 0.000000
binsize 0.001000
threaded 1

View File

@ -1 +0,0 @@
dataport 1955

View File

@ -1,10 +0,0 @@
#!/bin/csh -f
#set l = `ipcs -m | grep "$USER"| cut -c12-19`
set l = `ipcs -m | cut -c0-10`
foreach s ( $l )
echo $s
ipcrm -M $s
end
#if ($#l != 0 )
echo $#l shared memory\(s\) for $user removed

0
examples/scripts/.parab Normal file → Executable file
View File

View File

@ -1,142 +0,0 @@
#! /bin/awk -f
# this is an awk script to start a run
# you first need to run inimodule.awk to initialize
# the pattern, set Vc and set the trimbits
#
#####################################################################
# revision history #
#####################################################################
# 31.10.2001 first version #
#####################################################################
# #
# Bernd Schmitt #
# #
# bernd.schmitt@psi.ch #
# #
#####################################################################
# #
# modifications: #
# #
# 1.3.2002 BS adapted for use with DCB #
# #
# 25.5.2002 BS adapted to new convert program #
# #
# 29.5.2002 sleep -> usleep for meas. time , TS #
# #
#####################################################################
BEGIN {
# initialize variables
NPAR=3
PAR[1]="nrun"
PAR[2]="fn"
PAR[3]="par"
# initialize default values
PARVAL[1] = 100
PARVAL[2] = "microstrip_july2007"
PARVAL[3]=0
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
# read command line defined variables
if (ARGC>1) {
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
for (i=1; i<=ARGC; i++) {
printf("%s \n", ARGV[i]);
nsplit=split(ARGV[i],array,"=")
VAR = array[1];
VAL = array[2];
for (j=1; j<=NPAR; j++) {
if ( VAR==PAR[j] ) {
PARVAL[j] = VAL
}
}
}
}
run=PARVAL[1]
fn=PARVAL[2]
par=PARVAL[3]
# print command line arguments
for (i=1; i<=NPAR; i++){
printf("\t... %2i.\t%7s = %s\n", i, PAR[i], PARVAL[i] );
}
printf("\n\n");
# generate parameter file
fnamep=fn".parab"
printf("header before\n")>> fnamep
system("date >>"fnamep)
printf("run=%i \n", run ) >> fnamep
#print detector parameters to file
if (par==1) {
command="sls_detector_get exptime| awk -F \" \" '{print $2}'"
command | getline var
printf("acquisition time = %11.6f second(s)\n", var) >> fnamep
command="sls_detector_get settings| awk -F \" \" '{print $2}'"
command | getline var
printf("settings = %s\n", var) >> fnamep;
command="sls_detector_get threshold| awk -F \" \" '{print $2}'"
command | getline var
printf("threshold energy = %d eV\n", var) >> fnamep;
command="sls_detector_get badchannels| awk -F \" \" '{print $2}'"
command | getline var
printf("bad channel list = %s\n",var) >> fnamep;
command="sls_detector_get angconv| awk -F \" \" '{print $2}'"
command | getline var
printf("angle calibration conversion = %s\n",var) >> fnamep;
command="sls_detector_get globaloff| awk -F \" \" '{print $2}'"
command | getline var
printf("beamline offset = %f deg\n", var) >> fnamep;
command="sls_detector_get fineoff| awk -F \" \" '{print $2}'"
command | getline var
printf("fine offset = %f deg\n", var) >> fnamep;
command="sls_detector_get flatfield| awk -F \" \" '{print $2}'"
command | getline var
printf("Flat field corrections = %s\n",var) >> fnamep;
command="sls_detector_get ratecorr| awk -F \" \" '{print $2}'"
command | getline var
printf("Dead time corrections tau = %d ns\n",var) >> fnamep;
}
#print beamline parameters to file
#read detector position
system("caget X04SA-ES2-TH2:RO.RBV >>"fnamep)
#read I0
system("caget X04SA-ES2-SC:CH6>>"fnamep)
}

View File

@ -1,87 +0,0 @@
#! /bin/awk -f
# this is an awk script to start a run
# you first need to run inimodule.awk to initialize
# the pattern, set Vc and set the trimbits
#
#####################################################################
# revision history #
#####################################################################
# 31.10.2001 first version #
#####################################################################
# #
# Bernd Schmitt #
# #
# bernd.schmitt@psi.ch #
# #
#####################################################################
# #
# modifications: #
# #
# 1.3.2002 BS adapted for use with DCB #
# #
# 25.5.2002 BS adapted to new convert program #
# #
# 29.5.2002 sleep -> usleep for meas. time , TS #
# #
#####################################################################
BEGIN {
# initialize variables
NPAR=4
PAR[1]="nrun"
PAR[2]="fn"
PAR[3]="var"
PAR[4]="par"
# initialize default values
PARVAL[1] = 100
PARVAL[2] = "myfname"
PARVAL[3] = 0
PARVAL[2] = "none"
# read command line defined variables
if (ARGC>1) {
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
for (i=1; i<=ARGC; i++) {
nsplit=split(ARGV[i],array,"=")
VAR = array[1];
VAL = array[2];
for (j=1; j<=NPAR; j++) {
if ( VAR==PAR[j] ) {
PARVAL[j] = VAL
}
}
}
}
run=PARVAL[1]
fn=PARVAL[2]
var=PARVAL[3]
par=PARVAL[4]
# print command line arguments
for (i=1; i<=NPAR; i++){
printf("\t... %2i.\t%7s = %s\n", i, PAR[i], PARVAL[i] );
}
#execute you command hereafter e.g. change temperature etc.
}

View File

@ -1,100 +0,0 @@
#! /bin/awk -f
# this is an awk script to start a run
# you first need to run inimodule.awk to initialize
# the pattern, set Vc and set the trimbits
#
#####################################################################
# revision history #
#####################################################################
# 31.10.2001 first version #
#####################################################################
# #
# Bernd Schmitt #
# #
# bernd.schmitt@psi.ch #
# #
#####################################################################
# #
# modifications: #
# #
# 1.3.2002 BS adapted for use with DCB #
# #
# 25.5.2002 BS adapted to new convert program #
# #
# 29.5.2002 sleep -> usleep for meas. time , TS #
# #
#####################################################################
BEGIN {
# initialize variables
NPAR=7
PAR[1]="nrun"
PAR[2]="fn"
PAR[3]="par"
PAR[4]="sv0"
PAR[5]="sv1"
PAR[6]="p0"
PAR[7]="p1"
# initialize default values
PARVAL[1] = 100
PARVAL[2] = "myfname"
PARVAL[3] = 1
PARVAL[4] = 0
PARVAL[5] = 0
PARVAL[6] = "none"
PARVAL[7] = "none"
# read command line defined variables
if (ARGC>1) {
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
for (i=1; i<=ARGC; i++) {
nsplit=split(ARGV[i],array,"=")
VAR = array[1];
VAL = array[2];
for (j=1; j<=NPAR; j++) {
if ( VAR==PAR[j] ) {
PARVAL[j] = VAL
}
}
}
}
run=PARVAL[1]
fn=PARVAL[2]
"par"PAR[3]=
sv0=PAR[4]
sv1=PAR[5]
p0=PAR[6]
p1=PAR[7]
# print command line arguments
for (i=1; i<=NPAR; i++){
printf("\t... %2i.\t%7s = %s\n", i, PAR[i], PARVAL[i] );
}
# printf("\n\n");
# system("close_shutter_g95")
# execute your actions hereafter
if (par==1) {
#open shutter
} else {
#close shutter
}
}

View File

@ -1,79 +0,0 @@
#! /bin/awk -f
# this is an awk script to start a run
# you first need to run inimodule.awk to initialize
# the pattern, set Vc and set the trimbits
#
#####################################################################
# revision history #
#####################################################################
# 31.10.2001 first version #
#####################################################################
# #
# Bernd Schmitt #
# #
# bernd.schmitt@psi.ch #
# #
#####################################################################
# #
# modifications: #
# #
# 1.3.2002 BS adapted for use with DCB #
# #
# 25.5.2002 BS adapted to new convert program #
# #
# 29.5.2002 sleep -> usleep for meas. time , TS #
# #
#####################################################################
BEGIN {
# initialize variables
NPAR=2
PAR[1]="nrun"
PAR[2]="par"
# initialize default values
PARVAL[1] = 100
PARVAL[2] = "none"
# read command line defined variables
if (ARGC>1) {
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
for (i=1; i<=ARGC; i++) {
nsplit=split(ARGV[i],array,"=")
VAR = array[1];
VAL = array[2];
for (j=1; j<=NPAR; j++) {
if ( VAR==PAR[j] ) {
PARVAL[j] = VAL
}
}
}
}
run=PARVAL[1]
par=PARVAL[2]
# print command line arguments
for (i=1; i<=NPAR; i++){
printf("\t... %2i.\t%7s = %s\n", i, PAR[i], PARVAL[i] );
}
#execute action hereafter
}

0
examples/two_gotthard.config Normal file → Executable file
View File

View File

@ -1,64 +0,0 @@
#####Any line with a # is not read######
#type Gotthard+
hostname bchip007+bchip009+
#0:hostname bchip007
#0:port 1952
#0:stopport 1953
#0:rx_tcpport 1956
0:settingsdir /home/l_msdetect/dhanya/slsDetectorsPackage/settingsdir/gotthard
0:angdir 1.000000
0:moveflag 0.000000
0:lock 0
0:caldir /home/l_msdetect/dhanya/slsDetectorsPackage/settingsdir/gotthard
0:ffdir /home/l_msdetect
0:extsig:0 off
0:extsig:1 off
0:extsig:2 off
0:extsig:3 off
#0:detectorip 10.1.1.2
#0:detectormac 00:aa:bb:cc:dd:ee
#0:rx_udpport 50001
#0:rx_udpip 10.1.1.1
#0:rx_hostname 129.129.202.134
0:outdir /data/speedt
0:vhighvoltage 120
#1:hostname bchip009
#1:port 1952
#1:stopport 1953
1:rx_tcpport 1957
1:settingsdir /home/l_msdetect/dhanya/slsDetectorsPackage/settingsdir/gotthard
1:angdir 1.000000
1:moveflag 0.000000
1:lock 0
1:caldir /home/l_msdetect/dhanya/slsDetectorsPackage/settingsdir/gotthard
1:ffdir /home/l_msdetect
1:extsig:0 off
1:extsig:1 off
1:extsig:2 off
1:extsig:3 off
#1:detectorip 10.1.2.2
#1:detectormac 00:aa:bb:cc:dd:ee
#1:rx_udpport 50004
#1:rx_udpip 10.1.2.1
#1:rx_hostname 129.129.202.134
1:outdir /data/speedt
1:vhighvoltage 120
master -1
sync none
outdir /data/speedt
ffdir /home/l_msdetect
headerbefore none
headerafter none
headerbeforepar none
headerafterpar none
badchannels none
angconv none
globaloff 0.000000
binsize 0.001000
threaded 1

70
integrationTests/CMakeLists.txt Normal file → Executable file
View File

@ -1,39 +1,49 @@
MESSAGE( STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR} )
MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
# MESSAGE( STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR} )
# MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
include_directories(
${PROJECT_SOURCE_DIR}/catch
# include_directories(
# ${PROJECT_SOURCE_DIR}/catch
# )
target_sources(tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/test-integrationMulti.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test-integrationDectector.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test-eigerIntegration.cpp
)
if(SLS_USE_TESTS)
set(TEST_SOURCES
src/test-slsDetector.cpp
src/test.cpp
)
add_executable(detector_test ${TEST_SOURCES})
# if(SLS_USE_TESTS)
# set(TEST_SOURCES
# src/test-slsDetector.cpp
# src/test.cpp
# )
# add_executable(detector_test ${TEST_SOURCES})
target_link_libraries(detector_test
slsDetectorShared
slsSupportLib
pthread
rt
)
set_target_properties(detector_test PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
add_executable(a src/a.cpp)
# target_link_libraries(detector_test
# slsDetectorShared
# slsProjectOptions
# slsProjectWarnings
# slsSupportLib
# pthread
# rt
# )
# set_target_properties(detector_test PROPERTIES
# RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
# )
target_link_libraries(a
slsDetectorShared
slsSupportLib
pthread
rt
)
set_target_properties(a PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
# add_executable(a src/a.cpp)
# target_link_libraries(a
# slsProjectOptions
# slsProjectWarnings
# slsDetectorShared
# slsSupportLib
# pthread
# rt
# )
# set_target_properties(a PROPERTIES
# RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
# )
endif()
# endif()

88
integrationTests/a.cpp Normal file
View File

@ -0,0 +1,88 @@
#include "catch.hpp"
#include "ClientSocket.h"
#include "Timer.h"
#include "logger.h"
#include "network_utils.h"
#include "slsDetector.h"
#include "sls_detector_defs.h"
#include "sls_detector_exceptions.h"
#include "sls_detector_funcs.h"
#include <iomanip>
#include <iostream>
#include <vector>
#include <arpa/inet.h>
#include <netdb.h>
#include <string>
#include <sys/socket.h>
#include <sys/types.h>
#include <algorithm>
#include "network_utils.h"
using namespace sls;
using ROI = slsDetectorDefs::ROI;
// Easy printing of an ROI
std::ostream &operator<<(std::ostream &out, const ROI &r) {
return out << "xmin: " << std::setw(5) << r.xmin
<< " xmax: " << std::setw(5) << r.xmax
<< " ymin: " << std::setw(5) << r.ymin
<< " ymax: " << std::setw(5) << r.ymax;
}
int main() {
std::cout << "nullptr: " << sizeof(nullptr) << "\n";
// int ret[]{0,0,0};
// for (auto i: ret)
// std::cout << i << "\n";
// uint32_t imageSize = 101;
// uint32_t packetSize = 100;
// std::cout << "a: " << std::ceil((double)imageSize / (double)packetSize) <<'\n';
// std::cout << "b: " << imageSize / packetSize <<'\n';
// std::cout << "c: " << static_cast<double>(imageSize / packetSize) << '\n';
// std::cout << "c: " << (imageSize + packetSize-1) / packetSize << '\n';
// slsDetectorDefs::ROI roilimits[5];
// roilimits[0].xmin = 5;
// roilimits[0].xmax = 12;
// roilimits[0].ymin = 5;
// roilimits[0].ymax = 15;
// roilimits[1].xmin = 0;
// roilimits[1].xmax = 3;
// roilimits[1].ymin = 20;
// roilimits[1].ymax = 25;
// roilimits[2].xmin = 500;
// roilimits[2].xmax = 600;
// roilimits[2].ymin = 100;
// roilimits[2].ymax = 200;
// roilimits[3].xmin = 300;
// roilimits[3].xmax = 500;
// roilimits[3].ymin = 800;
// roilimits[3].ymax = 900;
// roilimits[4].xmin = 1000;
// roilimits[4].xmax = 2000;
// roilimits[4].ymin = 300;
// roilimits[4].ymax = 500;
// std::cout << "Before sorting:\n";
// for (auto r : roilimits) {
// std::cout << r << '\n';
// }
// std::sort(std::begin(roilimits), std::end(roilimits),
// [](ROI a, ROI b) { return a.xmin < b.xmin; });
// std::cout << "After sorting: \n";
// for (auto r : roilimits) {
// std::cout << r << '\n';
// }
}

View File

@ -1,94 +0,0 @@
#include "catch.hpp"
#include "ClientSocket.h"
#include "Timer.h"
#include "logger.h"
#include "slsDetector.h"
#include "sls_detector_defs.h"
#include "sls_detector_exceptions.h"
#include "sls_detector_funcs.h"
#include <iostream>
#include <vector>
#define VERBOSE
using sls::RuntimeError;
using sls::SharedMemoryError;
using sls::SocketError;
using sls::DetectorError;
int main() {
const std::string hostname = "beb083";
auto type = slsDetector::getTypeFromDetector(hostname);
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
std::cout << "hostname: " << d.getHostname() << '\n';
d.setThresholdTemperature(50);
// try{
// d.setThresholdTemperature(50);
// }catch(const DetectorError &e){
// std::cout << "Caught: " << e.what() << '\n';
// }
// std::cout << "hostname: " << d.getHostname() << '\n';
// std::cout << "exptime: " << d.setDAC(-1, slsDetectorDefs::E_Vrf, 0) << '\n';
// slsDetector d2(type);
// std::cout << "Online: " << d2.getOnlineFlag() << '\n';
// d2.setHostname("beb55555");
// d2.setOnline(true);
// std::cout << "Online: " << d2.getOnlineFlag() << '\n';
// std::cout << "hostname: " << d2.getHostname() << '\n';
// std::cout << "port: " << d.getControlPort() << '\n';
// d.setOnline(true);
// d.setReceiverOnline(true);
// std::cout << "reciver version: " << std::hex << d.getReceiverVersion() << '\n';
// // std::cout << "version: " << d.getId(slsDetectorDefs::CLIENT_RECEIVER_API_VERSION) << '\n';
// d.freeSharedMemory();
// //Catch exception
// try {
// throw RuntimeError("something went wrong");
// } catch (RuntimeError &e) {
// std::cout << "Caught RuntimeError with message : " << e.what() << '\n';
// }
// //Catch base class
// try {
// throw SharedMemoryError("Could not create shared memory");
// } catch (RuntimeError &e) {
// std::cout << "Caught: " << e.what() << '\n';
// }
// //Catch base class after looking for something else
// try {
// throw SharedMemoryError("Could not create shared memory");
// } catch (SocketError &e) {
// std::cout << "Caught Socket error: " << e.what() << '\n';
// } catch (RuntimeError &e) {
// std::cout << "Caught base class: " << e.what() << '\n';
// }
// //Catch any after looking for something else
// try {
// throw SharedMemoryError("Could not create shared memory");
// } catch (SocketError &e) {
// std::cout << "Caught Socket error: " << e.what() << '\n';
// } catch (...) {
// std::cout << "Caught Something else probably should have let me crash\n";
// }
// throw RuntimeError("This one we missed");
return 0;
}

View File

@ -1,11 +0,0 @@
// #include "catch.hpp"
// #include "multiSlsDetector.h"
// #include <iostream>
// TEST_CASE("Initialize a detector") {
// multiSlsDetector det(0, true, true);
// std::cout << "Size: " << det.getNumberOfDetectors() << std::endl;
// std::cout << "Hostname: " << det.getHostname() << std::endl;
// REQUIRE(false);
// }

View File

@ -1,199 +0,0 @@
#include "catch.hpp"
#include "ClientSocket.h"
#include "logger.h"
#include "slsDetector.h"
#include "sls_detector_defs.h"
#include "Timer.h"
#include "sls_detector_funcs.h"
#include <iostream>
#include <vector>
#define VERBOSE
auto type_enum = slsDetectorDefs::detectorType::EIGER;
const std::string hostname = "beb083";
const std::string type_string = "Eiger";
const std::string my_ip = "129.129.205.242";
TEST_CASE("single EIGER detector no receiver basic set and get") {
//TODO! this test should take command line arguments for config
//Read type by connecting to the detector
auto type = slsDetector::getTypeFromDetector(hostname);
CHECK(type == type_enum);
//Create slsDetector of said type and set hostname and detector online
slsDetector d(type);
CHECK(d.getDetectorTypeAsEnum() == type);
CHECK(d.getDetectorTypeAsString() == type_string);
d.setHostname(hostname);
CHECK(d.getHostname() == hostname);
d.setOnline(true);
CHECK(d.getOnlineFlag() == true);
CHECK(d.getReceiverOnline() == false);
CHECK(d.checkDetectorVersionCompatibility() == slsDetectorDefs::OK);
//Setting and reading exposure time
auto t = 1000000000;
d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, t);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME) == t);
//size of an eiger half module with and without gap pixels
CHECK(d.getTotalNumberOfChannels() == 256 * 256 * 4);
CHECK(d.getTotalNumberOfChannels(slsDetectorDefs::dimension::X) == 1024);
CHECK(d.getTotalNumberOfChannels(slsDetectorDefs::dimension::Y) == 256);
// CHECK(d.getTotalNumberOfChannels(slsDetectorDefs::dimension::Z) == 1);
CHECK(d.getTotalNumberOfChannelsInclGapPixels(slsDetectorDefs::dimension::X) == 1024);
CHECK(d.getTotalNumberOfChannelsInclGapPixels(slsDetectorDefs::dimension::Y) == 256);
// CHECK(d.getTotalNumberOfChannelsInclGapPixels(slsDetectorDefs::dimension::Z) == 1);
CHECK(d.getNChans() == 256 * 256);
CHECK(d.getNChans(slsDetectorDefs::dimension::X) == 256);
CHECK(d.getNChans(slsDetectorDefs::dimension::Y) == 256);
// CHECK(d.getNChans(slsDetectorDefs::dimension::Z) == 1);
CHECK(d.getNChips() == 4);
CHECK(d.getNChips(slsDetectorDefs::dimension::X) == 4);
CHECK(d.getNChips(slsDetectorDefs::dimension::Y) == 1);
// CHECK(d.getNChips(slsDetectorDefs::dimension::Z) == 1);
d.freeSharedMemory();
}
TEST_CASE("Set control port then create a new object with this control port") {
/*
TODO!
Standard port but should not be hardcoded
Is this the best way to initialize the detectors
Using braces to make the object go out of scope
*/
int old_cport = DEFAULT_PORTNO;
int old_sport = DEFAULT_PORTNO + 1;
int new_cport = 1993;
int new_sport = 2000;
{
auto type = slsDetector::getTypeFromDetector(hostname);
CHECK(type == type_enum);
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
CHECK(d.getControlPort() == old_cport);
d.setControlPort(new_cport);
CHECK(d.getStopPort() == old_sport);
d.setStopPort(new_sport);
d.freeSharedMemory();
}
{
auto type = slsDetector::getTypeFromDetector(hostname, new_cport);
CHECK(type == type_enum);
slsDetector d(type);
d.setHostname(hostname);
d.setControlPort(new_cport);
d.setStopPort(new_sport);
CHECK(d.getControlPort() == new_cport);
CHECK(d.getStopPort() == new_sport);
d.setOnline(true);
//Reset standard ports
d.setControlPort(old_cport);
d.setStopPort(old_sport);
d.freeSharedMemory();
}
auto type = slsDetector::getTypeFromDetector(hostname);
CHECK(type == type_enum);
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
CHECK(d.getStopPort() == DEFAULT_PORTNO + 1);
}
TEST_CASE("Locking mechanism and last ip") {
auto type = slsDetector::getTypeFromDetector(hostname);
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
//Check that detector server is unlocked then lock
CHECK(d.lockServer() == 0);
d.lockServer(1);
CHECK(d.lockServer() == 1);
//Can we do things while it is locked
auto t = 1300000000;
d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, t);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME) == t);
//unlock again
d.lockServer(0);
CHECK(d.lockServer() == 0);
CHECK(d.getLastClientIP() == my_ip);
}
TEST_CASE("Excersise all possible set timer functions") {
// FRAME_NUMBER, /**< number of real time frames: total number of acquisitions is number or frames*number of cycles */
// ACQUISITION_TIME, /**< exposure time */
// FRAME_PERIOD, /**< period between exposures */
// DELAY_AFTER_TRIGGER, /**< delay between trigger and start of exposure or readout (in triggered mode) */
// GATES_NUMBER, /**< number of gates per frame (in gated mode) */
// CYCLES_NUMBER, /**< number of cycles: total number of acquisitions is number or frames*number of cycles */
// ACTUAL_TIME, /**< Actual time of the detector's internal timer */
// MEASUREMENT_TIME, /**< Time of the measurement from the detector (fifo) */
// PROGRESS, /**< fraction of measurement elapsed - only get! */
// MEASUREMENTS_NUMBER,
// FRAMES_FROM_START,
// FRAMES_FROM_START_PG,
// SAMPLES,
// SUBFRAME_ACQUISITION_TIME, /**< subframe exposure time */
// STORAGE_CELL_NUMBER, /**<number of storage cells */
// SUBFRAME_DEADTIME, /**< subframe deadtime */
// MEASURED_PERIOD, /**< measured period */
// MEASURED_SUBPERIOD, /**< measured subperiod */
// MAX_TIMERS
auto type = slsDetector::getTypeFromDetector(hostname);
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
//Number of frames
auto frames = 10;
d.setTimer(slsDetectorDefs::timerIndex::FRAME_NUMBER, frames);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::FRAME_NUMBER) == frames);
auto t = 10000000;
d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, t);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME) == t);
auto period = 1000000000;
d.setTimer(slsDetectorDefs::timerIndex::FRAME_PERIOD, period);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::FRAME_PERIOD) == period);
// not implemented for EIGER
// auto delay = 10000;
// d.setTimer(slsDetectorDefs::timerIndex::DELAY_AFTER_TRIGGER, delay);
// CHECK(d.setTimer(slsDetectorDefs::timerIndex::DELAY_AFTER_TRIGGER) == delay);
// auto gates = 1;
// d.setTimer(slsDetectorDefs::timerIndex::GATES_NUMBER, gates);
// CHECK(d.setTimer(slsDetectorDefs::timerIndex::GATES_NUMBER) == gates);
auto cycles = 2;
d.setTimer(slsDetectorDefs::timerIndex::CYCLES_NUMBER, cycles);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::CYCLES_NUMBER) == cycles);
auto subtime = 200;
d.setTimer(slsDetectorDefs::timerIndex::SUBFRAME_ACQUISITION_TIME, subtime);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::SUBFRAME_ACQUISITION_TIME) == subtime);
}
// TEST_CASE()

View File

@ -0,0 +1,199 @@
#include "catch.hpp"
#include "multiSlsDetector.h"
#include "string_utils.h"
#include "tests/globals.h"
#include <iostream>
class MultiDetectorFixture {
protected:
multiSlsDetector d;
public:
MultiDetectorFixture() : d(0, true, true) {
d.setHostname(hostname.c_str());
if (my_ip != "undefined")
d.setReceiverHostname(my_ip);
}
~MultiDetectorFixture() { d.freeSharedMemory(); }
};
TEST_CASE_METHOD(MultiDetectorFixture, "Set and get dacs",
"[.eigerintegration][cli]") {
auto th = 1000;
// set and read back each individual dac of EIGER
d.setDAC(0, di::E_SvP, 0);
CHECK(d.setDAC(-1, di::E_SvP, 0) == 0);
d.setDAC(4000, di::E_SvN, 0);
CHECK(d.setDAC(-1, di::E_SvN, 0) == 4000);
d.setDAC(2000, di::E_Vtr, 0);
CHECK(d.setDAC(-1, di::E_Vtr, 0) == 2000);
d.setDAC(3500, di::E_Vrf, 0);
CHECK(d.setDAC(-1, di::E_Vrf, 0) == 3500);
d.setDAC(1400, di::E_Vrs, 0);
CHECK(d.setDAC(-1, di::E_Vrs, 0) == 1400);
d.setDAC(2556, di::E_Vtgstv, 0);
CHECK(d.setDAC(-1, di::E_Vtgstv, 0) == 2556);
d.setDAC(1500, di::E_Vcmp_ll, 0);
CHECK(d.setDAC(-1, di::E_Vcmp_ll, 0) == 1500);
d.setDAC(1400, di::E_Vcmp_lr, 0);
CHECK(d.setDAC(-1, di::E_Vcmp_lr, 0) == 1400);
d.setDAC(4000, di::E_cal, 0);
CHECK(d.setDAC(-1, di::E_cal, 0) == 4000);
d.setDAC(1300, di::E_Vcmp_rl, 0);
CHECK(d.setDAC(-1, di::E_Vcmp_rl, 0) == 1300);
d.setDAC(1200, di::E_Vcmp_rr, 0);
CHECK(d.setDAC(-1, di::E_Vcmp_rr, 0) == 1200);
d.setDAC(1100, di::E_rxb_rb, 0);
CHECK(d.setDAC(-1, di::E_rxb_rb, 0) == 1100);
d.setDAC(1100, di::E_rxb_lb, 0);
CHECK(d.setDAC(-1, di::E_rxb_lb, 0) == 1100);
d.setDAC(1500, di::E_Vcp, 0);
CHECK(d.setDAC(-1, di::E_Vcp, 0) == 1500);
d.setDAC(2000, di::E_Vcn, 0);
CHECK(d.setDAC(-1, di::E_Vcn, 0) == 2000);
d.setDAC(1550, di::E_Vis, 0);
CHECK(d.setDAC(-1, di::E_Vis, 0) == 1550);
d.setDAC(660, di::IO_DELAY, 0);
CHECK(d.setDAC(-1, di::IO_DELAY, 0) == 660);
// setting threshold sets all individual vcmp
d.setDAC(th, di::THRESHOLD, 0);
CHECK(d.setDAC(-1, di::THRESHOLD, 0) == th);
CHECK(d.setDAC(-1, di::E_Vcmp_ll, 0) == th);
CHECK(d.setDAC(-1, di::E_Vcmp_lr, 0) == th);
CHECK(d.setDAC(-1, di::E_Vcmp_rl, 0) == th);
CHECK(d.setDAC(-1, di::E_Vcmp_rr, 0) == th);
// different values gives -1
if (d.getNumberOfDetectors() > 1) {
d.setDAC(1600, di::E_Vcmp_ll, 0, 0);
d.setDAC(1700, di::E_Vcmp_ll, 0, 1);
CHECK(d.setDAC(-1, di::E_Vcmp_ll, 0, 0) == 1600);
CHECK(d.setDAC(-1, di::E_Vcmp_ll, 0, 1) == 1700);
CHECK(d.setDAC(-1, di::E_Vcmp_ll, 0) == -1);
CHECK(d.setDAC(-1, di::THRESHOLD, 0) == -1);
CHECK(d.setDAC(-1, di::THRESHOLD, 0, 0) == -1);
CHECK(d.setDAC(-1, di::THRESHOLD, 0, 1) == -1);
}
}
TEST_CASE_METHOD(MultiDetectorFixture, "Read temperatures",
"[.eigerintegration][cli]") {
std::vector<di> tempindex{di::TEMPERATURE_FPGA, di::TEMPERATURE_FPGA2,
di::TEMPERATURE_FPGA3};
for (auto index : tempindex) {
for (int i = 0; i != d.getNumberOfDetectors(); ++i) {
double temp = static_cast<double>(d.getADC(index, 0)) / 1000;
CHECK(temp > 20);
CHECK(temp < 60);
}
}
}
int to_time(uint32_t reg) {
uint32_t clocks = reg >> 3;
uint32_t exponent = (reg & 0b111) + 1;
return clocks * pow(10, exponent);
}
TEST_CASE_METHOD(MultiDetectorFixture, "Read/write register",
"[.eigerintegration][cli]") {
d.setTimer(ti::MEASUREMENTS_NUMBER, 1);
d.setNumberOfFrames(1);
d.setExposureTime(10000);
d.acquire();
CHECK(to_time(d.readRegister(0x4, 0)) == 10000);
d.writeRegister(0x4, 500);
CHECK(d.readRegister(0x4) == 500);
}
TEST_CASE_METHOD(MultiDetectorFixture, "Set dynamic range",
"[.eigerintegration][cli][dr]") {
std::vector<int> dynamic_range{4, 8, 16, 32};
for (auto dr : dynamic_range) {
d.setDynamicRange(dr);
CHECK(d.setDynamicRange() == dr);
}
}
TEST_CASE_METHOD(MultiDetectorFixture, "Set clock divider",
"[.eigerintegration][cli][this]") {
for (int i = 0; i != 3; ++i) {
d.setSpeed(sv::CLOCK_DIVIDER, i);
CHECK(d.setSpeed(sv::CLOCK_DIVIDER) == i);
}
}
TEST_CASE_METHOD(MultiDetectorFixture, "Get time left",
"[.eigerintegration][cli]") {
CHECK_THROWS(d.getTimeLeft(ti::PROGRESS));
}
TEST_CASE_METHOD(MultiDetectorFixture, "Get ID", "[.eigerintegration][cli]") {
std::string hn = hostname;
hn.erase(std::remove(begin(hn), end(hn), 'b'), end(hn));
hn.erase(std::remove(begin(hn), end(hn), 'e'), end(hn));
auto hostnames = sls::split(hn, '+');
CHECK(hostnames.size() == d.getNumberOfDetectors());
for (int i = 0; i != d.getNumberOfDetectors(); ++i) {
CHECK(d.getId(defs::DETECTOR_SERIAL_NUMBER, 0) ==
std::stoi(hostnames[0]));
}
}
TEST_CASE_METHOD(MultiDetectorFixture, "Lock server",
"[.eigerintegration][cli]") {
d.lockServer(1);
CHECK(d.lockServer() == 1);
d.lockServer(0);
CHECK(d.lockServer() == 0);
}
TEST_CASE_METHOD(MultiDetectorFixture, "Settings", "[.eigerintegration][cli]") {
CHECK(d.setSettings(defs::STANDARD) == defs::STANDARD);
}
TEST_CASE_METHOD(MultiDetectorFixture, "Set readout flags",
"[.eigerintegration][cli]") {
d.setReadOutFlags(defs::PARALLEL);
CHECK((d.setReadOutFlags() & defs::PARALLEL));
d.setReadOutFlags(defs::NONPARALLEL);
CHECK_FALSE((d.setReadOutFlags() & defs::PARALLEL));
CHECK((d.setReadOutFlags() & defs::NONPARALLEL));
}
// TEST_CASE_METHOD(MultiDetectorFixture, "Flow control and tengiga",
// "[.eigerintegration][cli]") {
// d.setFlowControl10G(1);
// CHECK(d.setFlowControl10G() == 1);
// d.setFlowControl10G(0);
// CHECK(d.setFlowControl10G() == 0);
// d.enableTenGigabitEthernet(1);
// CHECK(d.enableTenGigabitEthernet() == 1);
// d.enableTenGigabitEthernet(0);
// CHECK(d.enableTenGigabitEthernet() == 0);
// }
TEST_CASE_METHOD(MultiDetectorFixture, "activate", "[.eigerintegration][cli]") {
d.activate(0);
CHECK(d.activate() == 0);
d.activate(1);
CHECK(d.activate() == 1);
}
TEST_CASE_METHOD(MultiDetectorFixture, "all trimbits",
"[.eigerintegration][cli]") {
d.setAllTrimbits(32);
CHECK(d.setAllTrimbits(-1) == 32);
}
TEST_CASE_METHOD(MultiDetectorFixture, "rate correction",
"[.eigerintegration][cli]") {
d.setRateCorrection(200);
CHECK(d.getRateCorrection() == 200);
}

View File

@ -0,0 +1,482 @@
#include "catch.hpp"
#include "ClientSocket.h"
#include "logger.h"
#include "multiSlsDetector.h"
#include "slsDetector.h"
#include "sls_detector_defs.h"
#include "Timer.h"
#include "sls_detector_funcs.h"
#include <iostream>
#include <vector>
#define VERBOSE
// Header holding all configurations for different detectors
#include "tests/config.h"
#include "tests/globals.h"
// using dt = slsDetectorDefs::detectorType;
// extern std::string hostname;
// extern std::string detector_type;
// extern dt type;
TEST_CASE("Single detector no receiver", "[.integration][.single]") {
auto t = slsDetector::getTypeFromDetector(hostname);
CHECK(t == type);
slsDetector d(t);
CHECK(d.getDetectorTypeAsEnum() == t);
CHECK(d.getDetectorTypeAsString() == detector_type);
d.setHostname(hostname);
CHECK(d.getHostname() == hostname);
d.setOnline(true);
CHECK(d.getOnlineFlag() == true);
CHECK(d.setDetectorType() == type);
d.freeSharedMemory();
}
TEST_CASE("Set control port then create a new object with this control port",
"[.integration][.single]") {
/*
TODO!
Standard port but should not be hardcoded
Is this the best way to initialize the detectors
Using braces to make the object go out of scope
*/
int old_cport = DEFAULT_PORTNO;
int old_sport = DEFAULT_PORTNO + 1;
int new_cport = 1993;
int new_sport = 2000;
{
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
CHECK(d.getControlPort() == old_cport);
d.setControlPort(new_cport);
CHECK(d.getStopPort() == old_sport);
d.setStopPort(new_sport);
d.freeSharedMemory();
}
{
slsDetector d(type);
d.setHostname(hostname);
d.setControlPort(new_cport);
d.setStopPort(new_sport);
CHECK(d.getControlPort() == new_cport);
CHECK(d.getStopPort() == new_sport);
d.setOnline(true);
// Reset standard ports
d.setControlPort(old_cport);
d.setStopPort(old_sport);
d.freeSharedMemory();
}
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
CHECK(d.getStopPort() == DEFAULT_PORTNO + 1);
d.freeSharedMemory();
}
TEST_CASE("single EIGER detector no receiver basic set and get",
"[.integration][eiger]") {
// TODO! this test should take command line arguments for config
SingleDetectorConfig c;
// Read type by connecting to the detector
auto type = slsDetector::getTypeFromDetector(c.hostname);
CHECK(type == c.type_enum);
// Create slsDetector of said type and set hostname and detector online
slsDetector d(type);
CHECK(d.getDetectorTypeAsEnum() == type);
CHECK(d.getDetectorTypeAsString() == c.type_string);
d.setHostname(c.hostname);
CHECK(d.getHostname() == c.hostname);
d.setOnline(true);
CHECK(d.getOnlineFlag() == true);
CHECK(d.getReceiverOnline() == false);
CHECK(d.checkDetectorVersionCompatibility() == slsDetectorDefs::OK);
// Setting and reading exposure time
auto t = 1000000000;
d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, t);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME) == t);
// size of an eiger half module with and without gap pixels
CHECK(d.getTotalNumberOfChannels() == 256 * 256 * 4);
CHECK(d.getTotalNumberOfChannels(slsDetectorDefs::dimension::X) == 1024);
CHECK(d.getTotalNumberOfChannels(slsDetectorDefs::dimension::Y) == 256);
// CHECK(d.getTotalNumberOfChannels(slsDetectorDefs::dimension::Z) == 1);
CHECK(d.getTotalNumberOfChannelsInclGapPixels(
slsDetectorDefs::dimension::X) == 1024);
CHECK(d.getTotalNumberOfChannelsInclGapPixels(
slsDetectorDefs::dimension::Y) == 256);
// CHECK(d.getTotalNumberOfChannelsInclGapPixels(slsDetectorDefs::dimension::Z)
// == 1);
CHECK(d.getNChans() == 256 * 256);
CHECK(d.getNChans(slsDetectorDefs::dimension::X) == 256);
CHECK(d.getNChans(slsDetectorDefs::dimension::Y) == 256);
// CHECK(d.getNChans(slsDetectorDefs::dimension::Z) == 1);
CHECK(d.getNChips() == 4);
CHECK(d.getNChips(slsDetectorDefs::dimension::X) == 4);
CHECK(d.getNChips(slsDetectorDefs::dimension::Y) == 1);
// CHECK(d.getNChips(slsDetectorDefs::dimension::Z) == 1);
d.freeSharedMemory();
}
TEST_CASE("Locking mechanism and last ip", "[.integration][.single]") {
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
// Check that detector server is unlocked then lock
CHECK(d.lockServer() == 0);
d.lockServer(1);
CHECK(d.lockServer() == 1);
// Can we still access the detector while it's locked
auto t = 1300000000;
d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, t);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME) == t);
// unlock again and free
d.lockServer(0);
CHECK(d.lockServer() == 0);
CHECK(d.getLastClientIP() == my_ip);
d.freeSharedMemory();
}
TEST_CASE("Set settings", "[.integration][.single]"){
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
CHECK(d.setSettings(defs::STANDARD) == defs::STANDARD);
}
TEST_CASE("Timer functions", "[.integration][cli]") {
// FRAME_NUMBER, /**< number of real time frames: total number of
// acquisitions is number or frames*number of cycles */ ACQUISITION_TIME,
// /**< exposure time */ FRAME_PERIOD, /**< period between exposures */
// DELAY_AFTER_TRIGGER, /**< delay between trigger and start of exposure or
// readout (in triggered mode) */ GATES_NUMBER, /**< number of gates per
// frame (in gated mode) */ CYCLES_NUMBER, /**< number of cycles: total
// number of acquisitions is number or frames*number of cycles */
// ACTUAL_TIME, /**< Actual time of the detector's internal timer */
// MEASUREMENT_TIME, /**< Time of the measurement from the detector (fifo)
// */
// PROGRESS, /**< fraction of measurement elapsed - only get! */
// MEASUREMENTS_NUMBER,
// FRAMES_FROM_START,
// FRAMES_FROM_START_PG,
// SAMPLES,
// SUBFRAME_ACQUISITION_TIME, /**< subframe exposure time */
// STORAGE_CELL_NUMBER, /**<number of storage cells */
// SUBFRAME_DEADTIME, /**< subframe deadtime */
// MEASURED_PERIOD, /**< measured period */
// MEASURED_SUBPERIOD, /**< measured subperiod */
// MAX_TIMERS
slsDetector d(type);
d.setHostname(hostname);
d.setOnline(true);
// Number of frames
auto frames = 5;
d.setTimer(slsDetectorDefs::timerIndex::FRAME_NUMBER, frames);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::FRAME_NUMBER) == frames);
auto exptime = 2000000000;
d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, exptime);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME) == exptime);
auto period = 2000000000;
d.setTimer(slsDetectorDefs::timerIndex::FRAME_PERIOD, period);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::FRAME_PERIOD) == period);
if (type != dt::EIGER) {
auto delay = 10000;
d.setTimer(slsDetectorDefs::timerIndex::DELAY_AFTER_TRIGGER, delay);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::DELAY_AFTER_TRIGGER) ==
delay);
}
if (type != dt::EIGER) {
auto gates = 1;
d.setTimer(slsDetectorDefs::timerIndex::GATES_NUMBER, gates);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::GATES_NUMBER) == gates);
}
auto cycles = 2;
d.setTimer(slsDetectorDefs::timerIndex::CYCLES_NUMBER, cycles);
CHECK(d.setTimer(slsDetectorDefs::timerIndex::CYCLES_NUMBER) == cycles);
if (type == dt::EIGER) {
auto subtime = 200;
d.setTimer(slsDetectorDefs::timerIndex::SUBFRAME_ACQUISITION_TIME,
subtime);
CHECK(d.setTimer(
slsDetectorDefs::timerIndex::SUBFRAME_ACQUISITION_TIME) ==
subtime);
}
// for (int i =0; i!=frames; ++i)
d.startAndReadAll();
d.freeSharedMemory();
// If we add a timer we should add tests for the timer
CHECK(slsDetectorDefs::MAX_TIMERS == 19);
}
// TEST_CASE("Aquire", "[.integration][eiger]"){
// SingleDetectorConfig c;
// auto type = slsDetector::getTypeFromDetector(c.hostname);
// slsDetector d(type);
// d.setHostname(c.hostname);
// d.setOnline(true);
// auto period = 1000000000;
// auto exptime = 100000000;
// d.setTimer(slsDetectorDefs::timerIndex::FRAME_NUMBER, 5);
// d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, exptime);
// d.setTimer(slsDetectorDefs::timerIndex::FRAME_PERIOD, period);
// d.startAndReadAll();
// auto rperiod =
// d.getTimeLeft(slsDetectorDefs::timerIndex::MEASURED_PERIOD);
// CHECK(rperiod == 0.1);
// d.freeSharedMemory();
// }
TEST_CASE(
"Eiger Dynamic Range with effect on rate correction and clock divider",
"[.eigerintegration]") {
SingleDetectorConfig c;
int ratecorr = 125;
// pick up multi detector from shm id 0
multiSlsDetector m(0);
// ensure eiger detector type, hostname and online
REQUIRE(m.getDetectorTypeAsEnum() == c.type_enum);
REQUIRE(m.getHostname() == c.hostname);
REQUIRE(m.setOnline(true) == slsDetectorDefs::ONLINE_FLAG);
// starting state with rate correction off
CHECK(m.setRateCorrection(0) == 0);
// dr 16: clk divider, no change for ratecorr
CHECK(m.setDynamicRange(16) == 16);
CHECK(m.setSpeed(slsDetectorDefs::CLOCK_DIVIDER) == 1);
CHECK(m.getRateCorrection() == 0);
// dr 32: clk divider, no change for ratecorr
CHECK(m.setDynamicRange(32) == 32);
CHECK(m.setSpeed(slsDetectorDefs::CLOCK_DIVIDER) == 2);
CHECK(m.getRateCorrection() == 0);
// other drs: no change for clk divider, no change for ratecorr
CHECK(m.setDynamicRange(8) == 8);
CHECK(m.setSpeed(slsDetectorDefs::CLOCK_DIVIDER) == 2);
CHECK(m.getRateCorrection() == 0);
CHECK(m.setDynamicRange(4) == 4);
CHECK(m.setSpeed(slsDetectorDefs::CLOCK_DIVIDER) == 2);
CHECK(m.getRateCorrection() == 0);
// switching on rate correction with dr 16, 32
m.setDynamicRange(16);
m.setRateCorrection(ratecorr);
CHECK(m.getRateCorrection() == ratecorr);
m.setDynamicRange(32);
CHECK(m.getRateCorrection() == ratecorr);
// ratecorr fail with dr 4 or 8
CHECK_THROWS_AS(m.setDynamicRange(8), sls::NonCriticalError);
CHECK(m.getRateCorrection() == 0);
m.setDynamicRange(16);
m.setDynamicRange(16);
m.setRateCorrection(ratecorr);
m.setDynamicRange(16);
m.setRateCorrection(ratecorr);
CHECK_THROWS_AS(m.setDynamicRange(4), sls::NonCriticalError);
CHECK(m.getRateCorrection() == 0);
}
TEST_CASE("Chiptestboard Loading Patterns", "[.ctbintegration]") {
SingleDetectorConfig c;
// pick up multi detector from shm id 0
multiSlsDetector m(0);
// ensure ctb detector type, hostname and online
REQUIRE(m.getDetectorTypeAsEnum() == c.type_enum);
REQUIRE(m.getHostname() == c.hostname);
REQUIRE(m.setOnline(true) == slsDetectorDefs::ONLINE_FLAG);
uint64_t word = 0;
int addr = 0;
int level = 0;
const int MAX_ADDR = 0x7fff;
word = 0xc000000000f47ff;
CHECK(m.setPatternIOControl(word) == word);
CHECK(m.setPatternIOControl(-1) == word);
CHECK(m.setPatternIOControl(0) == 0);
CHECK(m.setPatternClockControl(word) == word);
CHECK(m.setPatternClockControl(-1) == word);
CHECK(m.setPatternClockControl(0) == 0);
// testing pattern word will execute the pattern as well
addr = 0;
m.setPatternWord(addr, word);
CHECK(m.setPatternWord(addr, -1) == word);
addr = MAX_ADDR - 1;
m.setPatternWord(addr, word);
CHECK(m.setPatternWord(addr, -1) == word);
addr = 0x2FF;
m.setPatternWord(addr, word);
CHECK(m.setPatternWord(addr, -1) == word);
addr = MAX_ADDR;
CHECK_THROWS_AS(m.setPatternWord(addr, word), sls::NonCriticalError);
CHECK_THROWS_WITH(m.setPatternWord(addr, word),
Catch::Matchers::Contains("be between 0 and"));
addr = -1;
CHECK_THROWS_AS(m.setPatternWord(addr, word), sls::NonCriticalError);
CHECK_THROWS_WITH(m.setPatternWord(addr, word),
Catch::Matchers::Contains("be between 0 and"));
addr = 0x2FF;
for (level = 0; level < 3; ++level) {
CHECK(m.setPatternWaitAddr(level, addr) == addr);
CHECK(m.setPatternWaitAddr(level, -1) == addr);
}
CHECK_THROWS_WITH(m.setPatternWaitAddr(-1, addr),
Catch::Matchers::Contains("be between 0 and"));
CHECK_THROWS_WITH(m.setPatternWaitAddr(0, MAX_ADDR),
Catch::Matchers::Contains("be between 0 and"));
for (level = 0; level < 3; ++level) {
CHECK(m.setPatternWaitTime(level, word) == word);
CHECK(m.setPatternWaitTime(level, -1) == word);
}
CHECK_THROWS_WITH(m.setPatternWaitTime(-1, word),
Catch::Matchers::Contains("be between 0 and"));
{
int startaddr = addr;
int stopaddr = addr + 5;
int nloops = 2;
for (level = 0; level < 3; ++level) {
m.setPatternLoops(level, startaddr, stopaddr, nloops);
auto r = m.getPatternLoops(level);
CHECK(r[0] == startaddr);
CHECK(r[1] == stopaddr);
CHECK(r[2] == nloops);
}
m.setPatternLoops(-1, startaddr, stopaddr, nloops);
auto r = m.getPatternLoops(-1);
CHECK(r[0] == startaddr);
CHECK(r[1] == stopaddr);
CHECK(r[2] == -1);
CHECK_THROWS_WITH(m.setPatternLoops(-1, startaddr, MAX_ADDR, nloops),
Catch::Matchers::Contains("be less than"));
CHECK_THROWS_WITH(m.setPatternLoops(-1, MAX_ADDR, stopaddr, nloops),
Catch::Matchers::Contains("be less than"));
}
}
TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert", "[.ctbintegration][dbit]") {
SingleDetectorConfig c;
// pick up multi detector from shm id 0
multiSlsDetector m(0);
// ensure ctb detector type, hostname and online
REQUIRE(m.getDetectorTypeAsEnum() == c.type_enum);
REQUIRE(m.getHostname() == c.hostname);
REQUIRE(m.setOnline(true) == slsDetectorDefs::ONLINE_FLAG);
// dbit offset
m.setReceiverDbitOffset(0);
CHECK(m.getReceiverDbitOffset() == 0);
m.setReceiverDbitOffset(-1);
CHECK(m.getReceiverDbitOffset() == 0);
m.setReceiverDbitOffset(5);
CHECK(m.getReceiverDbitOffset() == 5);
// dbit list
std::vector <int> list = m.getReceiverDbitList();
list.clear();
for (int i = 0; i < 10; ++i)
list.push_back(i);
m.setReceiverDbitList(list);
CHECK(m.getReceiverDbitList().size() == 10);
list.push_back(64);
CHECK_THROWS_AS(m.setReceiverDbitList(list), sls::RuntimeError);
CHECK_THROWS_WITH(m.setReceiverDbitList(list),
Catch::Matchers::Contains("be between 0 and 63"));
list.clear();
for (int i = 0; i < 65; ++i)
list.push_back(i);
CHECK(list.size() == 65);
CHECK_THROWS_WITH(m.setReceiverDbitList(list),
Catch::Matchers::Contains("be greater than 64"));
list.clear();
m.setReceiverDbitList(list);
CHECK(m.getReceiverDbitList().empty());
// adcinvert
m.setADCInvert(0);
CHECK(m.getADCInvert() == 0);
m.setADCInvert(5);
CHECK(m.getADCInvert() == 5);
m.setADCInvert(-1);
CHECK(m.getADCInvert() == -1);
// ext sampling reg
m.setExternalSamplingSource(0);
CHECK(m.getExternalSamplingSource() == 0);
m.setExternalSamplingSource(62);
CHECK(m.getExternalSamplingSource() == 62);
CHECK_THROWS_WITH(m.setExternalSamplingSource(64),
Catch::Matchers::Contains("be 0-63"));
CHECK(m.getExternalSamplingSource() == 62);
m.setExternalSampling(1);
CHECK(m.getExternalSampling() == 1);
m.setExternalSampling(0);
CHECK(m.getExternalSampling() == 0);
m.setExternalSampling(1);
CHECK(m.getExternalSampling() == 1);
CHECK(m.readRegister(0x7b) == 0x1003E);
}

View File

@ -0,0 +1,110 @@
#include "catch.hpp"
#include "multiSlsDetector.h"
#include "string_utils.h"
#include "tests/globals.h"
#include <iostream>
using namespace Catch::literals;
TEST_CASE("Initialize a multi detector", "[.integration][.multi]") {
auto hostnames = sls::split(hostname, '+');
multiSlsDetector d(0, true, true);
d.setHostname(hostname.c_str());
REQUIRE(d.setOnline() == true); // get!
CHECK(d.getHostname() == hostname);
for (size_t i = 0; i != hostnames.size(); ++i) {
CHECK(d.getHostname(i) == hostnames[i]);
}
CHECK(d.getDetectorTypeAsEnum() == type);
CHECK(d.getDetectorTypeAsString() == detector_type);
CHECK(d.getNumberOfDetectors() == hostnames.size());
d.freeSharedMemory();
}
TEST_CASE("Set and read timers", "[.integration][.multi]") {
multiSlsDetector d(0, true, true);
d.setHostname(hostname.c_str());
// FRAME_NUMBER
int n_frames = 3;
d.setNumberOfFrames(n_frames);
CHECK(d.setNumberOfFrames() == n_frames);
// ACQUISITION_TIME
double exptime = 0.3;
d.setExposureTime(exptime, true);
CHECK(d.setExposureTime(-1, true) == Approx(exptime));
CHECK(d.setExposureTime(-1) == Approx(exptime * 1E9));
// FRAME_PERIOD,
double period = 0.5;
d.setExposurePeriod(period, true);
CHECK(d.setExposurePeriod(-1, true) == Approx(period));
CHECK(d.setExposurePeriod(-1) == Approx(period * 1E9));
// DELAY_AFTER_TRIGGER,
// GATES_NUMBER,
// CYCLES_NUMBER,
// ACTUAL_TIME
// MEASUREMENT_TIME
// PROGRESS, /**< fraction of measurement elapsed - only get! */
// MEASUREMENTS_NUMBER,
int measurements = 2;
d.setTimer(ti::MEASUREMENTS_NUMBER, measurements);
CHECK(d.setTimer(ti::MEASUREMENTS_NUMBER, -1) == measurements);
// FRAMES_FROM_START,
// FRAMES_FROM_START_PG,
// SAMPLES,
// SUBFRAME_ACQUISITION_TIME, /**< subframe exposure time */
double subframe_exposure = 2000000; // ns
if (type == dt::EIGER) {
d.setSubFrameExposureTime(subframe_exposure);
CHECK(d.setSubFrameExposureTime(-1) == Approx(subframe_exposure));
}
// STORAGE_CELL_NUMBER, /**<number of storage cells */
// SUBFRAME_DEADTIME, /**< subframe deadtime */
double subframe_deadtime = 4000; // ns
if (type == dt::EIGER) {
d.setSubFrameExposureDeadTime(subframe_deadtime);
CHECK(d.setSubFrameExposureDeadTime(-1) == Approx(subframe_deadtime));
}
if (type == dt::EIGER) {
// 32bit is needed for subframe exposure
d.setDynamicRange(32);
CHECK(d.setDynamicRange(-1) == 32);
d.setReadOutFlags(ro::PARALLEL);
// Needed to have measured values
d.acquire();
// MEASURED_PERIOD, /**< measured period */
for (int i = 0; i != d.getNumberOfDetectors(); ++i) {
CHECK(d.getMeasuredPeriod(true, i) == Approx(period));
}
// MEASURED_SUBPERIOD, /**< measured subperiod */
for (int i = 0; i != d.getNumberOfDetectors(); ++i) {
CHECK(d.getMeasuredSubFramePeriod(false, i) ==
Approx(subframe_deadtime + subframe_exposure));
}
}
// MAX_TIMERS
d.freeSharedMemory();
}

View File

0
manual/Makefile Normal file → Executable file
View File

0
manual/index.html Normal file → Executable file
View File

0
manual/manual-api/CMakeLists.txt Normal file → Executable file
View File

0
manual/manual-api/Makefile Normal file → Executable file
View File

0
manual/manual-api/mainClient.cpp Normal file → Executable file
View File

12
manual/manual-api/mainReceiver.cpp Normal file → Executable file
View File

@ -19,18 +19,18 @@ It is linked in manual/manual-api from slsReceiverSoftware/include ]
#include "sls_detector_defs.h"
#include "slsReceiverUsers.h"
#include <iostream>
#include <string.h>
#include <signal.h> //SIGINT
#include <csignal> //SIGINT
#include <cstdlib> //system
#include <cstring>
#include <iostream>
//#include "utilities.h"
//#include "logger.h"
#include <cerrno>
#include <string>
#include <sys/types.h> //wait
#include <sys/wait.h> //wait
#include <string>
#include <unistd.h> //usleep
#include <errno.h>
#include <syscall.h> //tid
#include <unistd.h> //usleep
using namespace std;

0
manual/manual-api/slsDetectorUsers.doxy Normal file → Executable file
View File

0
manual/manual-calwiz/Advanced.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

0
manual/manual-calwiz/Constant_step.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

0
manual/manual-calwiz/GUI_Advanced.eps Normal file → Executable file
View File

0
manual/manual-calwiz/GUI_ThresholdScan.eps Normal file → Executable file
View File

0
manual/manual-calwiz/Makefile Normal file → Executable file
View File

0
manual/manual-calwiz/addEnergy.eps Normal file → Executable file
View File

0
manual/manual-calwiz/addEnergy.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

0
manual/manual-calwiz/ancCal.tex Normal file → Executable file
View File

0
manual/manual-calwiz/angleFit.eps Normal file → Executable file
View File

0
manual/manual-calwiz/angleFit.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

0
manual/manual-calwiz/angularCalibrationHowTo.tex Normal file → Executable file
View File

0
manual/manual-calwiz/calibrateModule.eps Normal file → Executable file
View File

0
manual/manual-calwiz/calibrateModule.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

0
manual/manual-calwiz/calibrationWizardsHowTo.tex Normal file → Executable file
View File

0
manual/manual-calwiz/enCal.tex Normal file → Executable file
View File

0
manual/manual-calwiz/enable_angcal.eps Normal file → Executable file
View File

0
manual/manual-calwiz/eneble_angcal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

0
manual/manual-calwiz/energyCalibrationHowTo.tex Normal file → Executable file
View File

0
manual/manual-calwiz/fig4.eps Normal file → Executable file
View File

0
manual/manual-calwiz/fig5.eps Normal file → Executable file
View File

0
manual/manual-calwiz/fig7.eps Normal file → Executable file
View File

0
manual/manual-calwiz/fig8.eps Normal file → Executable file
View File

0
manual/manual-calwiz/installation.tex Normal file → Executable file
View File

0
manual/manual-calwiz/peakFit.eps Normal file → Executable file
View File

0
manual/manual-calwiz/peakFit.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

0
manual/manual-calwiz/position_scan.eps Normal file → Executable file
View File

0
manual/manual-calwiz/position_scan.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

0
manual/manual-calwiz/setupAngcal.eps Normal file → Executable file
View File

0
manual/manual-calwiz/setupAngcal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 264 KiB

Some files were not shown because too many files have changed in this diff Show More