Compare commits

..

1384 Commits

Author SHA1 Message Date
a0c222b3c6 constructor 2020-01-20 14:23:28 +01:00
66b837eb59 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-01-16 16:57:12 +01:00
6170c42618 explicit also in MacAddr 2020-01-16 16:57:04 +01:00
69dd5f3b5e Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-01-16 16:37:44 +01:00
c1fac7cdb7 fixed conversion for IpAddr 2020-01-16 16:31:11 +01:00
de57146e1b Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-01-16 16:14:11 +01:00
fb75986c55 mythne3: counters fixed 2020-01-16 16:13:40 +01:00
f3598c1f39 nullptr 2020-01-16 14:17:57 +01:00
9ac08ad5c9 clang-tidy header include order 2020-01-16 14:00:43 +01:00
bcb4942793 cleaning 2020-01-16 12:26:22 +01:00
4b69ac5cfc const string& in exceptions constructor 2020-01-16 11:44:01 +01:00
7a00732fa8 various minor things from clang-tidy 2020-01-16 11:39:35 +01:00
30a4a1740f added Mythen3 2020-01-15 17:56:08 +01:00
39ec29c0e6 added counters to python 2020-01-15 17:26:07 +01:00
de53747ddd Counters (#71)
* mythen3: adding counters mask, firmware still takes only number of counters for now

* mythen3: checking if module attached before powering on chip

* bug fix: loop inital declaration not allowed in c

* fix scope eiger test

* mythen3: renamed setCounters to setCounterMask and getCounterMask in API

* mythen3 replacing counting bits with popcount

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
2020-01-14 17:40:46 +01:00
70c54f4315 added jungfrau again 2020-01-13 18:26:24 +01:00
a709384fbb renamed python detector 2020-01-13 16:33:02 +01:00
a1abd7587c Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-01-13 16:13:52 +01:00
8c8d213b56 python funcs 2020-01-13 16:13:47 +01:00
7b31fbc002 eiger virtual server bug fix: increasing subdeadtime 2020-01-13 14:18:43 +01:00
db9aa7589a tests fix 2020-01-13 12:07:30 +01:00
28f8a76dcc updated binaries 2020-01-10 09:05:26 +01:00
dac5ecd123 dbit 2020-01-08 16:44:42 +01:00
71b0ed271e CTB 2020-01-08 15:33:28 +01:00
c223f00511 Eiger 2020-01-08 14:55:16 +01:00
639ed52d65 pybind 2.4 2020-01-07 16:30:59 +01:00
6943763e3d Updated pybind11 to 2.4.3 2020-01-07 16:30:12 +01:00
4b3b518401 asamples dsamples 2020-01-07 16:18:36 +01:00
7379b1e2ef added python3.8 2020-01-07 15:48:38 +01:00
ed2a69744b Auto generating Python bindings (#70)
Auto generating python bindings
2020-01-07 15:47:38 +01:00
086cbacd84 mythen3: connected busy signal insttead of timer 2019-12-10 11:03:27 +01:00
af9b25fd67 eiger: validate trimval range 2019-12-10 10:32:28 +01:00
504fc2d095 ctb: validate asampes and dsamples > 0 for romode; client: exception caught in acquire to stop receiver and clear busy flag 2019-12-10 10:25:14 +01:00
5cf1502287 ctb bug fix: 10g adc enable mask 2019-12-09 11:30:54 +01:00
8881542156 ctb bug fix: clkioctrl not taken in hex 2019-12-05 17:15:31 +01:00
d9ae9a8cc6 eiger test 2019-12-05 11:00:55 +01:00
6765eb0c94 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-12-04 10:25:25 +01:00
be3d82b7b4 format 2019-12-04 10:25:17 +01:00
4e0d1fa711 ctb rxr for pawel: updated packetsize to 8192 (datasize to 8144) 2019-12-03 17:25:39 +01:00
619106e05f eiger tests 2019-12-03 11:47:49 +01:00
9bc60518d8 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-12-03 10:12:58 +01:00
12d168a6ef const strref 2019-12-03 10:12:47 +01:00
1a8337540a rxr: switched to threads for threadObject (from pthread), moved priorities to threadObject, mutex 2019-11-29 16:19:02 +01:00
16bec25b0c rxr: pthread to thread and created and destroyed tcp thread in constructor and destructor 2019-11-29 15:17:41 +01:00
f178b0da39 Merge branch 'rxr' into developer 2019-11-29 11:10:05 +01:00
2ece6b945e rxr: warnings shouldnt throw exception 2019-11-29 11:09:41 +01:00
1d6be74ee5 rxr: removed return ok or fail and replaced with exceptions 2019-11-29 10:29:36 +01:00
07455bb11e Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-27 18:42:27 +01:00
f4cdd759b0 clang-tidy 2019-11-27 18:42:16 +01:00
796890d1c8 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-27 18:25:14 +01:00
3486137de3 bfin warnings fixed 2019-11-27 18:22:33 +01:00
d53082c615 clang-tidy empty() 2019-11-27 18:15:55 +01:00
c94f6a2bf2 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-27 17:56:02 +01:00
2364364697 minor 2019-11-27 17:55:50 +01:00
ad0fb44573 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-27 17:29:26 +01:00
9455a5fba1 ctb: adcenable10g included, 10g readout enables included 2019-11-27 17:28:57 +01:00
a28fa66e54 renamed CmdLineParser to CmdParser 2019-11-27 13:56:14 +01:00
e996068328 more tests 2019-11-27 13:39:06 +01:00
1bbd77536c Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-27 11:35:16 +01:00
ace105a268 more tests 2019-11-27 11:35:00 +01:00
f299a34e59 ctb server binary update 2019-11-27 11:31:30 +01:00
b1c93bb3df Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-27 11:12:43 +01:00
9e8a874e39 rxr bug fix: update shm when updating rxr 2019-11-27 11:12:31 +01:00
2c7b730987 more tests 2019-11-27 11:12:18 +01:00
4fe1a2c6df eiger dacs 2019-11-27 08:41:23 +01:00
1322cff405 some eiger dacs 2019-11-26 21:37:57 +01:00
7f3d5e8a7e WIP 2019-11-26 20:34:17 +01:00
bf199767dc more rx tests 2019-11-25 16:32:12 +01:00
eaae54ebf5 fixed script for py36 2019-11-25 15:13:48 +01:00
6889741480 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-25 14:56:24 +01:00
3030c262f1 rx tests 2019-11-25 14:56:15 +01:00
6b391a34dc gotthard2: bug fix adconfiguration initialization 2019-11-25 14:14:05 +01:00
a2dd35ae38 minor 2019-11-25 13:01:07 +01:00
e00c5068af added list of tests 2019-11-25 12:53:45 +01:00
c951b10b0f fixed public header list 2019-11-25 12:11:23 +01:00
c5012a2d5a moving some tests 2019-11-25 12:08:27 +01:00
58050f72da moved headers 2019-11-25 11:58:45 +01:00
eae1fb6609 WIP 2019-11-25 11:42:21 +01:00
5b5e0f109b Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-25 11:20:33 +01:00
f2e69fb5a3 WIP 2019-11-25 11:20:24 +01:00
adf6a4c471 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-25 10:54:39 +01:00
94382c1ece m3 and g2: while setting clock freq, change phase only if there is a change in phase (removing more printouts, will still only set if needed ) 2019-11-25 10:54:30 +01:00
28f1f6c1cd more tests 2019-11-24 17:48:08 +01:00
a95ab1e13e servers: default compile not update versionign 2019-11-22 17:23:07 +01:00
5e9d70948b Merge branch 'userid' into developer 2019-11-22 17:03:17 +01:00
b0073597f7 rxr: effective userid option in rxr 2019-11-22 17:03:08 +01:00
c4675da0c3 m3: reset fixed 2019-11-22 16:40:43 +01:00
ba008db29a m3 ang g2: reset not yet imple 2019-11-22 11:54:45 +01:00
950096daf9 m3 ang g2: reset not yet imple 2019-11-22 11:54:30 +01:00
d07873ee39 mythen3 and gotthard2: wait request not needed, reset to be implemented 2019-11-22 11:29:24 +01:00
f8df11886a ctb: change in phase done in degrees (phase reset due to change in frequency) 2019-11-21 15:08:38 +01:00
d976c9fcf9 gotthard2: phase direction like mythen3 2019-11-21 14:41:54 +01:00
c4ae32b216 mythen3: setting clk frequecy and phase shifts work 2019-11-21 14:36:37 +01:00
c689b8b954 Merge branch 'developer' into rxr 2019-11-21 13:51:19 +01:00
fea94b15d5 mythen3:forgot binary 2019-11-21 13:48:39 +01:00
955bc74a91 mythen3: change vco freq to 1.25GHz 2019-11-21 13:38:54 +01:00
8727a93e3e WIP 2019-11-21 12:35:07 +01:00
83221ee955 Rxr: rearrangng in implementation 2019-11-21 12:23:32 +01:00
398f3734ec rxr: missing packets, stopacquistion lets rxr know to calculate missing packets from last frame caught 2019-11-20 16:16:14 +01:00
f96f716f39 rxr: stop printing forever about weird carry flag frame 2019-11-20 12:13:35 +01:00
781e8fc67f mythen3: workaround for busy signal 2019-11-20 11:57:14 +01:00
66e9b80995 gui: discard bits loop only when discard bits enabled 2019-11-20 10:58:32 +01:00
7bde337d58 minor: changed interrupted acq help (clearbusy), gui look in mythen3 developer tab 2019-11-19 18:19:54 +01:00
1cea6af590 mythen3, gotthard2: change phase, change freq bugfix 2019-11-19 17:57:28 +01:00
1539326fda mythen3 gui: discard bits option for debugging 2019-11-18 18:33:16 +01:00
dfc886a65b mythen3 gui 2019-11-18 17:57:19 +01:00
c4e7086d99 rxr: renamed files, removed unnecessary comments 2019-11-18 16:19:46 +01:00
5ce79ec9fa WIP 2019-11-18 15:20:58 +01:00
dc78e23449 rxr: removed slsReceiverUsers, start() and stop() 2019-11-18 15:16:20 +01:00
f2c0ff7f98 rxr: removed char array memebers in rxrimplementation 2019-11-18 14:29:01 +01:00
32cf46a8a3 moved cmdlineparser.h to includes, Paralel calls edited to throw exception if no detector added 2019-11-18 11:00:25 +01:00
fa2c842745 New command line app and removing slsDetectorCommand (#69)
* WIP

* WIP

* WIP

* WIP

* config2 working

* removed slsDetectorCommand

* WIP

* added test file

* more tests
2019-11-18 09:29:17 +01:00
6a27207875 gotthard2: vetoref, burstmode 2019-11-15 18:59:27 +01:00
a62d6a2fb8 gotthard2: veto reference, better code for byte aligment in server 2019-11-15 11:58:23 +01:00
5518531620 gotthard2: veto reference 2019-11-14 19:01:10 +01:00
fd631ebb71 tests fixed for inj_ch 2019-11-13 16:54:20 +01:00
21d23be522 gotthard2: inejct channel done 2019-11-13 16:49:35 +01:00
28a5aa8342 injectchannel WIP 2019-11-13 15:11:11 +01:00
5ee3f5cf4c rxr bug fix: if no rxr, shm variables should remember so that there is no order to rxr commands in config file 2019-11-13 13:56:09 +01:00
72ac2745ea gotthard2: server fix enum for onchip dac 2019-11-12 12:11:52 +01:00
206041989f mythen3, reading dr back fix 2019-11-11 18:33:59 +01:00
2fff9f5bfe merge 2019-11-11 18:03:13 +01:00
90c34e4942 gotthard2, dacs and onchip dacs from config file 2019-11-11 18:02:08 +01:00
bb26b993ea servers, firmware check message to init message, minor 2019-11-11 12:00:04 +01:00
d7ad995dd1 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-11 11:40:27 +01:00
f53d260202 mythen3: change vph and vpl 2019-11-11 11:40:06 +01:00
35556e96d1 mythen3 channels size 2019-11-11 11:31:03 +01:00
2123fb47a5 mythen3: config reg enable all counters, dr 2019-11-11 10:41:42 +01:00
38ad5d7931 mythen3 rxr 2019-11-08 18:11:27 +01:00
aaeaeab576 gotthard2 on chip dacs: -1 should set for all chips 2019-11-08 17:20:47 +01:00
03ec2c53ab WIP 2019-11-08 17:10:28 +01:00
d7e2ab8ec4 gotthard2: on chip dacs 2019-11-08 17:09:57 +01:00
a92d931a8f mythen3 frequency fixes 2019-11-07 14:35:13 +01:00
615b3b2557 WIP 2019-11-06 19:07:00 +01:00
1797d39216 updated mythen3 to configure phase, freq, delay left, period left, actual time, measurement time, framesfrom start and othe register mappings 2019-11-06 18:58:22 +01:00
0f9fd5cd73 rename of clkdivider to clkfrequency in servers 2019-11-06 16:58:34 +01:00
73b5c3ac57 merge 2019-11-06 16:46:00 +01:00
18b8720c17 separated parameters and versions 2019-11-06 16:43:59 +01:00
7de9401bc7 powerchip for mythen3 2019-11-06 11:50:09 +01:00
705ddb7f42 WIP 2019-11-06 11:11:57 +01:00
8eb04c33b5 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-11-06 11:09:56 +01:00
cd5d327988 virtual servers updated 2019-11-06 11:09:48 +01:00
c3180737ed fixed jungfau virtual server as well 2019-11-06 11:05:02 +01:00
ba37a51858 eiger virtual server exptime fixed 2019-11-06 10:54:33 +01:00
2417f9cd7b enums 2019-11-06 10:26:21 +01:00
b61ca18967 unrequired enum 2019-11-05 18:57:05 +01:00
567e821569 updated ieger server 2019-11-05 18:52:51 +01:00
1f64d2a4e2 speed separated 2019-11-05 18:50:35 +01:00
96d64778ee eiger virtual server bug fix, detectorip and detectormac of hostpc 2019-11-05 14:46:58 +01:00
2f2e4da628 Moved CmdLineProxy 2019-11-05 11:07:07 +01:00
b3587bcee5 new enums 2019-11-05 10:20:25 +01:00
40572b6b23 WIP 2019-11-04 16:48:40 +01:00
031241ae28 timer split up 2019-11-04 16:40:11 +01:00
f9fff97f8a mythen3 register mix up 2019-10-31 14:48:53 +01:00
6c5c4f00b3 mythen3 calc checksum 2019-10-31 12:31:51 +01:00
ba9a0c7917 removed unused multi functions 2019-10-30 18:20:16 +01:00
ba3bc9c408 starting of users class 2019-10-30 15:13:16 +01:00
026771f42d bug fix:temp in gui 2019-10-30 13:58:37 +01:00
d05be2519a WIP 2019-10-30 12:32:50 +01:00
11ea071543 adcinvert for jungfrau, gui for jungfrau dacs 2019-10-30 12:28:51 +01:00
4aba8b6ac0 daclist and dacvalues for ctb as well 2019-10-30 11:38:29 +01:00
82570bc084 daclist and dacvalues 2019-10-30 11:09:34 +01:00
fe467cdf70 jungfrau dacs named 2019-10-29 18:11:16 +01:00
925a750f9a WIP 2019-10-29 14:46:45 +01:00
eb2040f0a7 fixed effects of scan 2019-10-29 14:43:51 +01:00
4b2cb7ecc1 WIP 2019-10-29 11:35:25 +01:00
badff47663 WIP 2019-10-29 11:05:20 +01:00
1084e5361b WIP 2019-10-29 10:49:05 +01:00
828859838b WIP 2019-10-29 10:44:10 +01:00
9b7ef84515 WIP 2019-10-29 10:29:30 +01:00
aa8610fb04 WIP 2019-10-29 10:11:36 +01:00
798f221764 WIP 2019-10-29 10:07:07 +01:00
4155e301b8 WIP 2019-10-28 16:48:13 +01:00
8c279695de WIP 2019-10-28 16:27:20 +01:00
bc7ebd45df WIP 2019-10-28 15:59:18 +01:00
3fdae431b0 WIP 2019-10-28 15:47:18 +01:00
7b59b7e7d5 WIP 2019-10-28 12:26:30 +01:00
19b85b8e40 WIP 2019-10-28 11:56:15 +01:00
61d7c76d55 WIP 2019-10-28 11:34:58 +01:00
93bb0c9aed WIP 2019-10-28 11:17:27 +01:00
f9d832bf34 WIP 2019-10-24 19:39:58 +02:00
8e771c48bd WIP 2019-10-24 19:30:58 +02:00
5a49182626 WIP 2019-10-24 19:20:55 +02:00
f4a0780b51 patloops done 2019-10-24 18:59:23 +02:00
f73a15e786 tests made to pass ctb 2019-10-24 11:32:58 +02:00
fa84d17a19 gotthard tests passed 2019-10-22 17:07:38 +02:00
12c7389b8d tests made to check for nothrow 2019-10-22 16:17:43 +02:00
8006043a97 bug fixes for tests 2019-10-22 15:46:28 +02:00
45012df95b jungfrau registers updated 2019-10-22 14:02:52 +02:00
8c6da7da1b jungfrau storage cell bug fix 2019-10-22 13:38:17 +02:00
f2fc187f13 better testing for eiger 2019-10-21 15:10:31 +02:00
fee110c73a bugfix: flowcontrol10g cmdline typo 2019-10-21 10:59:52 +02:00
995f0924e5 Commandline (#66)
* WIP

* WIP

* removed status to string from defs

* WIP

* WIP

* WIP removed unused functions in multi

* WIP

* print hex in a terrible way

* WIP, loadconfig error

* WIP, type to string

* WIP

* fix to conversion

* WIP, hostname doesnt work

* WIP

* WIP

* WIP

* WIP, threshold

* WIP, threshold

* WIP

* WIP, triggers

* WIP, cycles to triggers

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* rx_udsocksize fx, WIP

* WIP

* WIP

* WIP

* file index (64 bit), WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* merge

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* New python mod
2019-10-21 10:29:06 +02:00
eebc1109b0 python 2019-10-18 15:02:39 +02:00
97d1c520e6 python 2019-10-18 12:24:17 +02:00
3822258dfa Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-10-17 18:30:45 +02:00
df4f37efc6 gotthard2, change clock, remember in degrees, and max clock divider is 512 2019-10-17 18:29:57 +02:00
107234f4c5 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-10-17 17:09:09 +02:00
59a7a462ab python 2019-10-17 17:09:01 +02:00
e16212bd23 tests for clk for gotthard2 2019-10-17 16:51:40 +02:00
be50344b45 set clock divider, phase and get clock freq for gotthard2, priliminary 2019-10-17 16:39:41 +02:00
0a3905802f removed dacs not required for mythen3 2019-10-09 16:59:34 +02:00
833c07707f gotthard2 dac commands removed in merge, added back 2019-10-09 16:56:34 +02:00
9b4fc02b0e start/stop statemachine for my3 (#68)
* start/stop statemachine for my3

* runStatus, readFrame, runBusy (use CONTROL_REG) for mythen3

* registers for Pavel

* change dac names Mythen3
2019-10-09 13:52:07 +02:00
b109ea8d7d jungfrau vref_prech, dac enum similar to mainenum 2019-10-08 18:00:22 +02:00
29a7e227a3 merge 2019-10-08 17:17:44 +02:00
cfd3680176 gotthard2 dacs 2019-10-08 17:10:36 +02:00
87aa5099f2 eiger python 2019-10-08 12:15:57 +02:00
030cfacc9b WIP 2019-10-08 10:57:07 +02:00
b318f8126d more python funcs 2019-10-07 17:24:28 +02:00
17295bf662 Update slsDetectorCommand.cpp
complete description of the Mythen3 DACs
2019-10-07 14:39:52 +02:00
58cadefa61 fixed enum 2019-10-07 14:30:16 +02:00
e0d10d0e01 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-10-07 14:18:06 +02:00
6964326c7f python 2019-10-07 14:17:54 +02:00
6cda61a612 Update slsDetectorCommand.cpp
help comments for the mythen3 dacs (not complete yet)
2019-10-07 13:44:41 +02:00
7a66dd08a3 help for dacs mythen3 2019-10-07 12:30:28 +02:00
5f94b5c246 Dac (#67)
* dac WIP

* dacs WIP

* DACs are working with names

* namechanges of vrfsh->vshaper, vrfshnpol->vshaperneg

* pattern for MY3, configure MAC for MY3
2019-10-07 12:13:25 +02:00
16f7b42533 python 2019-10-07 10:23:40 +02:00
1b06edac9b FixedCapacityContainer fix for clang 2019-10-04 16:54:53 +02:00
d597636c1e Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-10-01 17:35:03 +02:00
0f99dd141e gotthard 2 server test bus 2019-10-01 17:34:52 +02:00
da630a8e05 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-10-01 17:29:47 +02:00
cfb017f66a fixed order 2019-10-01 17:29:36 +02:00
b3ff825ce8 updated gotthard2 api etc 2019-10-01 16:26:42 +02:00
c6fd13e49c removed default case 2019-10-01 14:54:57 +02:00
e6472da5f1 error on missing return type 2019-10-01 14:35:25 +02:00
5de5884341 pass by reference 2019-10-01 14:31:00 +02:00
b4f3c0586f string to detector type 2019-10-01 13:56:35 +02:00
aaade64e0b ToString of runStatus 2019-10-01 12:34:03 +02:00
ffa9bbe8d2 fix for string to string conversion 2019-10-01 12:18:06 +02:00
3c6d7ca4a5 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-09-30 15:00:11 +02:00
7242a6901a python compiles 2019-09-30 15:00:03 +02:00
2a40c7f48e recompiled all servers 2019-09-30 14:54:31 +02:00
ca054626e6 Removeudpcache (#65)
* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* solved eiger 1-10g issue

* some fixes for remove udp cache to work

* bug fix virtual

* removed special handling of rx_udpip
2019-09-30 14:46:25 +02:00
6e6fcec698 MY3.0:read and write Registers, frames, cycles, delay (#64)
* MY3.0:read and write Registers, frames, cycles, delay

* write pattern seems to work

* done all corrections. added default clks: run_clk=125MHz, tick_clk=20MHz (fix), sampling_clk=80MHz (from Carlos)

* clk check for aquistition time

* clk check for aquistition time

* Update slsDetectorServer_defs.h

* Update slsDetectorFunctionList.c
2019-09-30 14:36:33 +02:00
3d52a2f169 minor chnages 2019-09-27 16:39:46 +02:00
8a4a6c7004 hvdac location change 2019-09-27 16:17:01 +02:00
288b59d292 gotthard2 changes for first firmware version 2019-09-26 14:10:11 +02:00
296518819e Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-09-25 12:14:41 +02:00
2a48f70320 Fixed all warning in moenchZmqProcess 2019-09-25 12:14:15 +02:00
07f71d3886 more funcs 2019-09-20 17:46:52 +02:00
dde24559f3 python bindings 2019-09-20 17:01:37 +02:00
b591a42ae7 add 2019-09-20 15:33:07 +02:00
032b4117dd auto generate py enums 2019-09-20 15:28:14 +02:00
af9c67539f more tests 2019-09-20 10:46:28 +02:00
27d223d199 testing 2019-09-19 12:12:25 +02:00
26bc737445 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-09-18 13:22:00 +02:00
61c495f218 multithreading fixed for gain map, common mode and ghosting 2019-09-18 13:21:47 +02:00
c3c3f78c59 removed roflags from python 2019-09-17 09:32:22 +02:00
400e69cef2 Added define for high z cluster finder and fixed gainmap (t.b.t.) 2019-09-10 16:34:29 +02:00
1cf5033c99 depreciated flags to romode, not readout 2019-09-03 12:53:22 +02:00
21ce0055b2 gotthard2: soft limit to list 2019-09-03 09:41:54 +02:00
4b987abf41 Niosmarie (#63)
* HV for Mythen3 server

* HV for mythen3 server

* corrected upstreams

* missing endif
2019-09-03 09:36:02 +02:00
40b62ef5a4 recompiled binaries 2019-09-02 19:31:36 +02:00
5bcde789ac Readoutflags (#61)
* WIP

* eiger binary back wih versioning

* fixed readout flag in ctbgui, added speedLevel enum

* ctbgui: fixed a print out error

* ctb readout bug fix

* WIP

* WIP

* WIP
2019-09-02 19:27:27 +02:00
221bb65c0e gotthard2: bfin instead of nios (not using registers yet) 2019-09-02 13:11:07 +02:00
02634abbbc gotthard2:virtual server fix, server recompile 2019-09-02 13:05:28 +02:00
bd95126da2 gotthard2:hv 2019-09-02 12:57:24 +02:00
4a112104ad gotthard2, removed .gdb, removed warnings 2019-08-30 18:08:16 +02:00
9bc6c44e51 hv for strip 2019-08-30 17:53:04 +02:00
8c15b52b87 nios 2019-08-30 17:28:18 +02:00
9e7a133422 gotthard2: nios server 2019-08-30 16:44:11 +02:00
cb8c7eea54 updated binaries 2019-08-30 11:26:23 +02:00
0d35b966ff Separate headers (#57)
* WIP, ctb

* WIP, eiger

* WIP, gotthard

* WIP, jungfrau

* WIP, gotthard2

* WIP, mythen3

* WIP, moench

* fixed gotthard apiversioning mismatch with gotthard2
2019-08-30 11:17:37 +02:00
49d47e633d gui: adc invert at any time 2019-08-29 11:52:03 +02:00
e23b3b0471 Ctbgui det (#58)
* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* defs added

* ctb gui: tengiga bug fix

* WIP

* WIP
2019-08-29 11:39:29 +02:00
4f0634fe62 adc invert for highz (#59) 2019-08-29 10:12:10 +02:00
1980a7d80c python fix 2019-08-28 14:19:54 +02:00
014b8cf9a6 fixed problem with dbitpipeline in ctb gui 2019-08-28 12:05:45 +02:00
f123a280bb added save pattern, printout of some of the pattern for command line 2019-08-27 16:41:38 +02:00
7abb18e5c8 added load paramaters to detector.h 2019-08-27 11:24:53 +02:00
fc0b25cfa7 gui bug fix: hostname print out and acquisition index 2019-08-27 09:25:10 +02:00
aafe049a9b Guidetector (#54)
* WIP

* dacWidget

* main WIP

* advanced WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* works

* updated gui to chrono

* review fixes

* unitque ptrs in gui
2019-08-26 19:14:22 +02:00
7a4c1161ab add default period for mythen3 (#56) 2019-08-26 12:03:20 +02:00
94013a7fad delay not implemented for mythen3 and gotthad2 2019-08-26 11:58:34 +02:00
aecf3bb7db gotthard udp fix 2019-08-26 11:47:28 +02:00
3497175b15 merge resovled 2019-08-26 10:55:44 +02:00
298e1dd1fe udp virtual of gotthard2 2019-08-26 10:54:01 +02:00
f981825172 virtual UDP for mythen3 (#55) 2019-08-26 10:53:17 +02:00
3b2feba3b2 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-08-26 09:59:52 +02:00
386b6601a8 initial version of gotthard2 2019-08-26 09:59:27 +02:00
9a48d9b832 Intcmd (#53)
* migrated more

* more
2019-08-23 17:39:41 +02:00
2c5ff0e9bf fixed output 2019-08-23 15:44:47 +02:00
e89b65002a minor 2019-08-23 15:11:57 +02:00
5866e330c1 fixed test 2019-08-23 14:43:58 +02:00
5c06549982 Cleanup of the CmdProxy and migrated some commands (#52)
* migrated rx_fifodepth

* Moved and cleand CmdProxy

* rx_slient

* new commands

* examples

* fixed result string print
2019-08-23 14:32:44 +02:00
975a5a4cab moench03T1ZmqData added 2019-08-23 12:05:19 +02:00
57ac5c0dab moved CmdLineParser to sls:: 2019-08-23 10:42:35 +02:00
6a20a780fe Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-08-23 10:28:57 +02:00
7afe0c510e multiSlsDetectorClient.cpp added .h cleaned 2019-08-23 10:28:50 +02:00
8ec0ac4eb3 client bug fix: was configuring mac even for a get of tengiga enable 2019-08-23 10:21:20 +02:00
322970ebed ctb gui option in cmk.sh enabled 2019-08-23 10:18:45 +02:00
9e40c06786 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-08-23 09:30:45 +02:00
caedfbebd5 removed two doxy.config 2019-08-23 09:30:38 +02:00
3ca52176b7 CMake support for CTB Gui (#51)
* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP builds...

* clean up

* root 6.18 support
2019-08-22 21:21:04 +02:00
867bce8b38 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-08-22 15:59:24 +02:00
170db19f48 initial functions for mythen3 2019-08-22 15:58:32 +02:00
4b7ab98135 initial functions for mythen3 2019-08-22 15:55:27 +02:00
72362b0334 first version of mythen3 2019-08-22 12:34:06 +02:00
794b6f8090 added detector type 2019-08-22 10:58:03 +02:00
7fd5d7c610 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-08-21 20:25:08 +02:00
199ecbce80 transmission delays 2019-08-21 20:24:59 +02:00
d4a2af1693 CTB fixed 10Gb data structures for the GUI (to be tested) 2019-08-21 17:31:25 +02:00
e247605b76 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-08-21 17:20:18 +02:00
0735f890a3 Modified waveform plots for 10Gb (to be tested) 2019-08-21 17:19:54 +02:00
3d78b7b6a7 updated al the binaries 2019-08-21 17:10:20 +02:00
1b5e939748 Added 10Gb data structures for moench04 (to be tested) 2019-08-21 16:57:54 +02:00
2ef9aa0ea0 fixed conflict 2019-08-21 16:28:45 +02:00
cadb4cff93 moench02 common mode moved to new structure 2019-08-21 16:27:14 +02:00
e04242c5fa ctb gui progress call back fix 2019-08-21 15:40:19 +02:00
434aa78a04 Merge branch 'developer' into apidhanya 2019-08-21 15:36:08 +02:00
cf045d8a1d ctb gui fix 2019-08-21 15:18:50 +02:00
a98271f0c2 merge resolved 2019-08-21 14:25:21 +02:00
5c393e6204 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-08-21 13:23:38 +02:00
5eaea5fb8d updated ctb server 2019-08-21 13:22:43 +02:00
f0ba8a06ce ctb 10g fix for old reciever 2019-08-21 13:21:35 +02:00
4b0fb5029f WIP 2019-08-21 12:45:08 +02:00
b4c207fc4e Less data race in slsReceiver (#50)
* removed some data races

* non needed mutex

* removed extra include
2019-08-21 12:02:06 +02:00
f77b6ab068 WIP 2019-08-21 11:32:45 +02:00
0daada9266 version 2019-08-21 11:15:10 +02:00
422a928be4 ctb rxr: changing to old header (like moench) 2019-08-21 11:13:17 +02:00
156ce0df00 ctb fix:fifo print between frames, pattern length change 2019-08-21 11:09:41 +02:00
62c4bfab64 WIP 2019-08-21 09:23:32 +02:00
28963e313b removed gotthard functions not used 2019-08-20 18:18:34 +02:00
11c1fb0e11 Added roi to master file 2019-08-20 13:42:26 +02:00
9ebff9c8a8 updated gui to have the timer/freq 2019-08-20 13:30:22 +02:00
ad907a43be Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-20 13:20:35 +02:00
ea5ac6ad03 WIP 2019-08-20 13:20:25 +02:00
d1ea74120d added string concat to ToString 2019-08-20 12:17:42 +02:00
0c4ae89cd9 WIP 2019-08-20 11:20:12 +02:00
38b7e23ac4 WIP 2019-08-20 10:55:55 +02:00
08ac9b4ce8 other detectors made to cmake 2019-08-20 09:12:32 +02:00
51a3f3fd4d changed logger.h to clogger.h for c files 2019-08-20 08:48:12 +02:00
29c788b9f7 WIP 2019-08-19 21:28:53 +02:00
0f37481972 WIP 2019-08-19 21:17:52 +02:00
0d787788ea WIP ctb 2019-08-19 21:14:45 +02:00
498a8bda9f WIP 2019-08-19 21:09:44 +02:00
3e874a3650 removed symlinks in jf server (#49) 2019-08-19 20:40:50 +02:00
3881e2cd21 WIP 2019-08-19 20:36:42 +02:00
ee4aa94bbe WIP 2019-08-19 18:03:19 +02:00
d2e8c3bebc WIP 2019-08-19 16:33:53 +02:00
0d2598bd77 WIP 2019-08-19 16:00:23 +02:00
eebd1552f2 WIP 2019-08-19 15:55:42 +02:00
26958e99ef WIP 2019-08-19 10:48:05 +02:00
7457c56533 slsmultireceiver copied to slsreceiver/src cmake 2019-08-19 09:08:10 +02:00
d10d9462a3 virtual servers using command virtual numdet port 2019-08-16 19:31:26 +02:00
c6dddaba97 allowed virtual servers 2019-08-16 18:49:08 +02:00
a0bdfcdae3 WIP 2019-08-16 17:38:41 +02:00
d3e60eba80 eiger binary 2019-08-16 17:08:11 +02:00
10ce82fc5f WIP 2019-08-16 17:07:30 +02:00
b59d69325e updated minor 10g ctb 2019-08-16 15:35:23 +02:00
336f8ceb50 WIP 2019-08-16 10:46:42 +02:00
947252c852 WIP 2019-08-16 09:45:49 +02:00
e635ff035c receiver master file includes quad, gap pixels enable, version updated for binary and hdf5, parallel, analog, digital, adc, dbitofset, dbitlist 2019-08-14 21:14:06 +02:00
8dae9243a5 t puMerge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-14 17:49:38 +02:00
ce14435c68 WIP 2019-08-14 17:49:32 +02:00
ba0c6ff286 eiger bug fix: quad gap pixels 2019-08-14 17:49:09 +02:00
d14fdc3a3f WIP 2019-08-14 17:40:30 +02:00
3a698cc306 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-08-14 16:57:10 +02:00
e225275520 Fixed mistake in addToPedestal with ghost summation 2019-08-14 16:56:43 +02:00
8e2b89d488 fixed python 2019-08-14 11:54:03 +02:00
5f0a3eaee4 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-14 10:36:27 +02:00
a23a3f4467 prepare private 2019-08-14 10:36:19 +02:00
7f5640dd4e updated multi shm 2019-08-14 10:32:56 +02:00
d191cee548 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-14 09:31:51 +02:00
97192c5342 removed prepare acq 2019-08-14 09:31:42 +02:00
f7893f7f79 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-14 09:21:01 +02:00
d4d8cbe9bc gotthard fixed roi only xmin and xmax.remove updateoffsets 2019-08-14 09:20:50 +02:00
7b1cb517c0 removed emplace_back test 2019-08-14 09:08:23 +02:00
17e3aea374 Eiger_short.tex 2019-08-13 16:28:50 +02:00
e3dedcd450 fixed sendheaderdata function in moench03ZmqProcess 2019-08-13 16:14:51 +02:00
846d270243 Implemenging common mode and ghost corrections for moench03 (and generalized) 2019-08-13 16:06:32 +02:00
2fe06c7163 WIP 2019-08-13 11:19:25 +02:00
6f6ee19906 WIP 2019-08-13 09:16:29 +02:00
c2f57f5ab0 WIP 2019-08-12 19:55:42 +02:00
160ce17a91 WIP 2019-08-12 19:54:44 +02:00
9686f78300 doesnt compile 2019-08-12 19:13:33 +02:00
25eccdffab WIP 2019-08-12 18:57:53 +02:00
f99ebc7f21 WIP 2019-08-12 18:38:56 +02:00
935f7bc960 WIP 2019-08-12 17:17:13 +02:00
b52a8d2d61 added missing const 2019-08-12 16:43:17 +02:00
4bff894782 merge fix 2019-08-12 16:38:16 +02:00
1008944a6a ROI workaroud 2019-08-12 16:34:59 +02:00
99dc9bd44d Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-12 15:58:04 +02:00
0a34192a8d WIP 2019-08-12 15:57:55 +02:00
09684518c5 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-12 14:23:21 +02:00
8e2494729b WIP 2019-08-12 14:23:12 +02:00
d9be3250ad Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-12 14:15:34 +02:00
95751766cd WIP 2019-08-12 14:15:25 +02:00
c36dfc3992 even more tests 2019-08-12 12:09:44 +02:00
f78a98797f more testing 2019-08-12 11:53:23 +02:00
151c3ee062 tests for Result 2019-08-12 11:29:38 +02:00
f982a59a7c minor 2019-08-09 18:02:12 +02:00
100d748154 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-09 17:19:19 +02:00
b2d39d4785 WIP done 2019-08-09 17:19:12 +02:00
c350b53b7f Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-09 16:35:33 +02:00
6a89e3e1a5 WIP 2019-08-09 16:35:26 +02:00
cac353748e Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-09 16:16:25 +02:00
4a97dd0eba WIP 2019-08-09 16:16:15 +02:00
dea402a7e7 WIP 2019-08-09 16:12:26 +02:00
206740efd6 WIP 2019-08-09 15:35:33 +02:00
56703c4886 WIP 2019-08-09 15:20:53 +02:00
1bd1d0d64d fixed merge 2019-08-09 14:48:01 +02:00
6b363a16fe WIP 2019-08-09 14:45:07 +02:00
6691680091 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-09 14:28:42 +02:00
2ac421365d WIP 2019-08-09 14:28:32 +02:00
9913194774 WIP 2019-08-09 14:28:18 +02:00
a084ea2d0f Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-09 14:08:29 +02:00
2f61764fd7 WIP 2019-08-09 14:08:21 +02:00
31d2250cba fixed callback args and return types, removed set online 2019-08-09 12:57:29 +02:00
1a60b59a48 size 2019-08-09 12:11:42 +02:00
e7af4d7518 removed measurments from ctb gui 2019-08-09 12:01:26 +02:00
a3c5c16417 WIP 2019-08-09 12:01:01 +02:00
8c40c02fc5 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-09 11:55:34 +02:00
bdfdd5dbda WIP 2019-08-09 11:55:27 +02:00
1f549d51fa fixed merge 2019-08-09 11:45:06 +02:00
fc78bb9384 Parallel returns Result 2019-08-09 11:40:57 +02:00
a6e8be2d67 merge resolved 2019-08-09 11:12:31 +02:00
5a483eaf29 WIP, new eiger serveR 2019-08-09 11:11:29 +02:00
dfbf7ab39a tsquash 2019-08-09 11:00:12 +02:00
5292075a0a WIP 2019-08-09 09:35:02 +02:00
0bd6563e45 WIP 2019-08-08 18:09:38 +02:00
b0f34f2d4b Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-08 18:08:41 +02:00
6080e90bbb WIP 2019-08-08 18:08:33 +02:00
e76900ca9a WIP 2019-08-08 17:40:35 +02:00
cc0f1d9fcd WIP 2019-08-08 17:34:25 +02:00
dc24cfb9c3 fixed merge2 2019-08-08 17:16:02 +02:00
869eee4d98 fixed merge 2019-08-08 17:14:54 +02:00
c34190f9f2 WIP 2019-08-08 17:13:25 +02:00
d1d730b779 WIP 2019-08-08 17:13:02 +02:00
b73b98ce3f Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-08 16:55:44 +02:00
ca2c284017 WIP 2019-08-08 16:55:37 +02:00
ce9f76d017 WIP 2019-08-08 16:48:03 +02:00
40bc498e9a WIP 2019-08-08 16:44:52 +02:00
eaf0d8668b WIP 2019-08-08 16:39:25 +02:00
dddd8eb849 merge resolved 2019-08-08 16:20:00 +02:00
a77964e1dd WIP 2019-08-08 16:18:04 +02:00
9d5cff3b34 WIP 2019-08-08 16:09:29 +02:00
23ea16f4b8 not compiling 2019-08-08 15:59:51 +02:00
ca4618d8f4 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-08 15:58:14 +02:00
ddfb66e999 not compiling 2019-08-08 15:58:00 +02:00
7721787748 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-08 15:51:29 +02:00
e6349d0312 WIP 2019-08-08 15:51:21 +02:00
373cfad645 Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya 2019-08-08 15:51:06 +02:00
d79447ed3a WIP 2019-08-08 15:50:56 +02:00
0b006b5080 WIP 2019-08-08 15:36:03 +02:00
6a780de22f WIP 2019-08-08 15:06:08 +02:00
d9ecec9bf7 merge resolved 2019-08-08 14:55:36 +02:00
8740e4f683 WIP 2019-08-08 14:49:13 +02:00
79d6ea614a WIP 2019-08-08 14:30:02 +02:00
f0e106f94f WIP 2019-08-08 13:49:28 +02:00
1bdff2b681 WIP 2019-08-08 12:02:36 +02:00
553b7d8568 WIP 2019-08-08 11:11:08 +02:00
e7e4bf13c3 WIP 2019-08-08 11:07:41 +02:00
095a7eac05 more ctb 2019-08-08 10:18:21 +02:00
bba6e1667b some ctb funcs 2019-08-07 18:00:25 +02:00
21046bcae0 multidet to multi shm 2019-08-07 16:32:12 +02:00
eec7b22582 compiles 2019-08-07 16:11:42 +02:00
e246a33269 Merge branch 'developer' into apidhanya 2019-08-07 15:54:17 +02:00
0a2a5933da WIP 2019-08-07 15:51:25 +02:00
704a26af70 WIP 2019-08-07 15:46:41 +02:00
6a0c108e96 added comments 2019-08-07 15:37:30 +02:00
65ebd0baf0 WIP 2019-08-07 15:36:27 +02:00
dc1e01b444 multidettype in one place 2019-08-07 15:33:55 +02:00
6a71e61c12 WIP 2019-08-07 15:23:58 +02:00
615835f03d WIP 2019-08-07 12:32:59 +02:00
dd6a95d041 first one 2019-08-07 12:02:59 +02:00
cff4d162c1 commenting headers already done, adding positions for filename and filepath, pos instead of Positions{} 2019-08-07 11:52:03 +02:00
4ceee97c03 Api (#48)
* WIP

* WIP

* WIP

* cleaned up multi

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* split up python module

* WIP

* WIP

* WIP

* WIP

* WIP

* ok

* fixed bugs from rebase

* WIP

* fixed broken test

* WIP

* fixed python

* WIP

* sphinx help

* including new commands

* docs

* WIP

* WIP

* more tests

* added missing public header

* WIP
2019-08-07 11:21:07 +02:00
98ddf154b2 Partialreadout (#47)
* eiger server, rxr: partial readout, also gui messages: up last command, down clear command

* added binaries and resolved conflict

* bugfix eiger server: interrupt subframe is bit 2 and not bit number 3

* brackets in defs
2019-08-07 09:08:58 +02:00
e20b5e6952 added const overloads for sendToDetector and sendToReceiver (#46) 2019-08-06 16:58:22 +02:00
d72b6c3659 eiger server: quad, interrupt subframe, reg left and right (#45)
* eiger server: quad, interrupt subframe, reg left and right

*  eiger server: beb can fail in setting up quad, quad and gap pixels
2019-08-06 10:12:34 +02:00
e17de0609c pedestal fixed really 2019-07-30 11:29:24 +02:00
31a0161f42 gui: fixed pedestal 2019-07-30 10:53:03 +02:00
63c2599328 insignificant print 2019-07-30 10:33:25 +02:00
facbc60907 jungfrau server: changes for old and new boards 2019-07-30 09:32:10 +02:00
64a8dd2def Stoppedflag (#44)
* removed stopped flag from multi and sls shm, since its removed from fixed pattern in sls, slsshmversion api also added to get hostname and type

* clang format
2019-07-29 11:35:21 +02:00
b524e0c95f removed online flags, apiversion in shm, ret for ok and fail, bind socket help in exception message (#43)
* removed online flag, removed rxronline flag, added useReceier flag that is set only when rxr hostname is set, removed setonline, setreceiveronline flag, removed ret for ok or fail, using exceptions for this, changed cannot bind socket printout

* fixed python
2019-07-26 16:33:39 +02:00
a487aabb6e ethtool and gating comments 2019-07-26 12:08:12 +02:00
fb2c015c5c Setonline (#42)
* setonline and setreceiveronline removed from command line

* removed multi shm rxr online flag

* setonine and setreceiveronline not needed in gui
2019-07-24 16:25:02 +02:00
c8d9503d5f jungfrau server: flow control 10g fixed 2019-07-24 15:19:01 +02:00
35aff6bf76 format on multi 2019-07-24 09:36:42 +02:00
e3db7099f1 removed non const getFileIndex in multi 2019-07-24 09:07:26 +02:00
9cc1ff43a9 removed non const getFileIndex 2019-07-24 09:05:04 +02:00
2c453fc1be Removed multiSlsDetector dependency from slsDetector (#41)
* WIP

* removed multiSlsDetector dependency from slsDetector

* removed comment

* review changes
2019-07-23 15:47:39 +02:00
b63ec9d84a jungfrau server: updated get starting fnum and frames from start addresses 2019-07-23 15:47:00 +02:00
025c67134a added test assertion for startingfnum 2019-07-23 15:29:01 +02:00
6e4e2c4524 Startingfnum (#40)
* starting fnum

* by default starting fnum disabled in gui

* insignificant change

* adding binary

* virtual eiger server working now

* test:: namespace
2019-07-23 14:15:08 +02:00
e3f151851c bug fix: internal hv used ofst instead of msk, insignificant bug though, would have worked 2019-07-23 14:13:41 +02:00
61b40d89c7 updated client api versioning 2019-07-23 11:56:02 +02:00
fc80618a35 insignificant: Messages tab name changed to Terminal 2019-07-22 16:47:48 +02:00
e7a76ccea1 Quad (#39)
* making quad work in developer branch

* binary added

* minor changes

* bug fix to set quad to 0 when more than 1 detector
2019-07-22 16:41:03 +02:00
0fa63f8be2 updated enums in old python 2019-07-22 16:09:35 +02:00
1a9755ad0b New filename structure (#38)
* WIP

* WIP

* linking names

* define for hdf5

* minor

* addressed comments
2019-07-22 15:52:21 +02:00
6b7d9445aa jungfrau highvoltage added to config file 2019-07-19 12:17:27 +02:00
078a2e9e6a jungfrau server: firmware version update for v2.0 2019-07-18 11:32:50 +02:00
058e16b872 gui: fixed gain plot size 2019-07-18 10:20:33 +02:00
3ef8b392db rx_hostname command line bug: should not setreceiveronline if connecting to a new receiver without clearing shm 2019-07-17 17:02:40 +02:00
8cdfe4194f gui works, including clone plots 2019-07-17 16:58:04 +02:00
d3879bb834 WIP 2019-07-15 15:47:05 +02:00
4f5b8c17b2 WIP 2019-07-15 15:46:38 +02:00
0f2641f9fa WIP 2019-07-12 18:24:23 +02:00
5e24591295 Merge branch 'developer' into gui 2019-07-12 10:36:54 +02:00
40c3c78024 client bug fix: framesl, cyclesl printed in float, fixed 2019-07-10 11:18:24 +02:00
cc769c5a96 WIP 2019-07-10 09:23:11 +02:00
d344365470 WIP 2019-07-08 13:46:54 +02:00
74bb7a3f1b WIP 2019-07-08 12:18:29 +02:00
4b10991429 WIP 2019-07-05 19:12:46 +02:00
0e0e5db7c5 WIP 2019-07-05 18:17:55 +02:00
8ac7d96ef3 WIP 2019-07-05 08:54:50 +02:00
c582ba15d5 WIP 2019-07-04 16:40:25 +02:00
6a60f7d222 WIP 2019-07-03 18:21:44 +02:00
659e19a856 WIP 2019-07-02 17:59:21 +02:00
4c23c0290d Merge branch 'developer' into gui 2019-07-02 17:50:51 +02:00
d2e4adf483 eiger server bug fix: get dacs conversion wrong 2019-07-02 17:50:39 +02:00
0954bdd2d3 Merge branch 'developer' into gui 2019-07-02 17:29:50 +02:00
f4fa19b559 bugfix rxr: checkonline prints error msg, call receiverversion instead 2019-07-02 17:29:38 +02:00
864db79a13 WIP 2019-07-02 17:11:03 +02:00
455252f2f3 WIP 2019-07-02 13:51:31 +02:00
5e6eb45f56 Merge branch 'gui' of github.com:slsdetectorgroup/slsDetectorPackage into gui 2019-07-02 13:51:03 +02:00
975076043f WIP 2019-07-02 13:50:20 +02:00
00eaad3416 cmake 2019-07-02 12:42:58 +02:00
cbe979b4b9 fixed merge 2019-07-02 12:16:05 +02:00
44aa3f655b cmath + cleaning 2019-07-02 12:11:45 +02:00
fc2cc7e00c WIP 2019-07-02 12:09:37 +02:00
547ab8a749 Merge branch 'developer' into gui 2019-07-02 10:54:29 +02:00
e16b857ba2 ctb server: hv select is actually internal hv select 2019-07-02 10:15:25 +02:00
e22d03a744 WIP 2019-07-02 09:13:47 +02:00
a373609b08 WIP 2019-06-28 18:16:32 +02:00
039a725c5c WIP. removed qServer 2019-06-28 11:57:37 +02:00
9f61104f0d WIP 2019-06-27 16:39:53 +02:00
06834617de WIP 2019-06-27 11:54:17 +02:00
61b937e2e0 WIP. catching exceptions using macros to ignore socket and shm error 2019-06-25 17:27:30 +02:00
3bb0daeefb moved libs (#36) 2019-06-25 11:20:31 +02:00
d3101baacb receiver create path (#35) 2019-06-25 11:14:04 +02:00
bd3e439d87 Merge branch 'developer' into gui 2019-06-25 10:51:17 +02:00
136e00d15e Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-06-25 10:51:00 +02:00
7c18ad3c53 removed Critical and Noncritical exceptions 2019-06-25 10:50:52 +02:00
3db09bc0cd Merge branch 'developer' into gui 2019-06-25 09:08:29 +02:00
33f5253831 QIP 2019-06-21 18:19:39 +02:00
c466623e86 fix 2019-06-21 17:38:49 +02:00
e80ce1b4c4 added -h --help option to display help 2019-06-21 17:27:47 +02:00
2d3f5a03ca syncclk for python 2019-06-19 17:31:49 +02:00
4b69c01357 ctb server: sync clk get added 2019-06-19 16:55:24 +02:00
f4bc255f2c WIP 2019-06-19 15:01:57 +02:00
d2280b4414 WIP 2019-06-19 15:01:18 +02:00
6c33f7de7b adding list command (#34) 2019-06-19 09:26:11 +02:00
332e83d43c WIP, except qdrawplot 2019-06-18 18:06:27 +02:00
3f4dda9d33 WIP 2019-06-18 17:53:07 +02:00
e4190285be WIP 2019-06-18 17:51:28 +02:00
71f26b2831 removed mystring typedef 2019-06-18 17:41:26 +02:00
7b456cb9c6 WIP 2019-06-18 16:27:44 +02:00
0acf97cc9a WIP 2019-06-18 16:24:59 +02:00
17b08b6e53 removed MySocketTCP and old ServerInterface 2019-06-18 15:54:22 +02:00
976b460e70 WIP 2019-06-17 17:54:12 +02:00
b6bba0b7bc Merge branch 'developer' into gui 2019-06-17 17:41:17 +02:00
5b8e4f6c72 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-06-17 17:29:05 +02:00
6e14a2efe2 ctb fix: reset pll reset also adc and dbit phase (fixed), also required adcs to be configured again(due to adc clock being stopped temporarily 2019-06-17 17:24:59 +02:00
f5b419c6d8 moench04 zmq data structure added 2019-06-17 17:24:20 +02:00
8c332e8ffd Separated plot for digital and analog values; deserializer still to be tested 2019-06-17 17:08:23 +02:00
326b14737f WIP 2019-06-17 15:51:17 +02:00
c96939cf94 neglible change 2019-06-17 11:45:56 +02:00
8dff4f4b03 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-06-14 16:44:06 +02:00
39be0770e3 ctb server fixed to have 180 adc output phase 2019-06-14 16:43:56 +02:00
4213a161fe WIP 2019-06-14 16:38:42 +02:00
c1435ea94f Renamed receiver commands to rx_ (#32)
* renamed receiver commands to rx_

* WIP

* more commands

* check

* overwrite

* foverwrite
2019-06-13 15:29:05 +02:00
ca9fca88c4 Merge branch 'developer' into gui 2019-06-13 09:37:54 +02:00
359970dfc2 bug fix from 4.0.2: powerchip multi should have delays, burst trigger added to users 2019-06-13 09:37:44 +02:00
5d2567005d WIP 2019-06-12 14:40:04 +02:00
e6361c73fc WIP 2019-06-12 11:24:05 +02:00
55229f77a3 python 2019-06-12 10:41:50 +02:00
afb6d6bf3a WIP 2019-06-12 10:40:56 +02:00
b922b79232 WIP 2019-06-11 16:36:02 +02:00
3c1df02414 merge resolved 2019-06-11 15:56:13 +02:00
d3467432a9 WIP 2019-06-11 15:43:24 +02:00
cb2c39c62f WIP 2019-06-11 15:38:04 +02:00
111c48e3fa WIP 2019-06-11 11:29:45 +02:00
d2d25cdd69 WIP 2019-06-11 11:19:07 +02:00
1bab010d0b WIP 2019-06-11 10:15:40 +02:00
f0872174cf WIP 2019-06-07 18:53:57 +02:00
1fed3553b9 cleaning up tcp 2019-06-07 16:13:34 +02:00
ca5a0b4cc8 WIP Settings 2019-06-07 10:58:47 +02:00
48dd0fb084 WIP 2019-06-06 18:41:31 +02:00
893805e6fd Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-06-06 18:17:12 +02:00
170aca0e1f zmqip now uint 2019-06-06 18:17:04 +02:00
0c6304bdf8 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-06-06 17:53:52 +02:00
2eaf7edd46 manual 2019-06-06 17:53:45 +02:00
c86a1e7d48 WIP 2019-06-06 17:00:05 +02:00
bb760f3210 WIP datatoutput 2019-06-06 15:04:05 +02:00
fc5306f7cc Merge branch 'sockettest' into developer 2019-06-06 10:37:11 +02:00
3cfeb74529 minor 2019-06-06 10:36:40 +02:00
5944957977 cleaning up socket 2019-06-06 10:34:57 +02:00
7a11c6c986 hash 2019-06-06 08:51:46 +02:00
2c7d78ff56 include 2019-06-06 08:46:11 +02:00
c4ea181811 test 2019-06-06 08:41:50 +02:00
45dc48721e server 2019-06-06 08:41:19 +02:00
72e0d7e168 clang format on receiver TCP and Implementation 2019-06-06 08:07:40 +02:00
e4546c6121 WIP 2019-06-05 17:54:56 +02:00
e46f3f9a2c WIP 2019-06-05 17:45:02 +02:00
6c64bdb04a fixing tests for gcc 4.8 2019-06-05 17:40:48 +02:00
03f8b389ad WIP 2019-06-05 17:30:21 +02:00
3d6404952a fix sending 2019-06-05 15:51:21 +02:00
b5e4d7d8fb fixed reading and double print in client 2019-06-05 15:40:28 +02:00
8cf94537c8 minor 2019-06-05 15:29:12 +02:00
1db7521cfa exceptions TCP (#31)
* WIP

* first test

* format

* test frames

* also 0:

* WIP

* WIP

* first test

* format

* test frames

* also 0:

* test and less local

* pass ret by value

* level

* WIP

* WIP

* cleaning up interface

* removed ref

* another

* updated api version

* cleanup

* cleanup

* WIP

* fixes

* fixed tests
2019-06-05 15:25:18 +02:00
862dc824ba WIP 2019-06-05 11:27:19 +02:00
ff3e5001e6 Merge branch 'developer' into gui 2019-06-04 18:12:41 +02:00
a6144f658e ctb client and server bug fix: dac didnt compute indices correctly and set dac was not printing in server 2019-06-04 18:11:31 +02:00
ffbc0a0fc3 Merge branch 'developer' into gui 2019-06-04 12:18:20 +02:00
3aea917175 updated binaries for the extsig api change 2019-06-04 12:18:06 +02:00
b74ce95b24 removed colon in commands. affects dac, adc and extsig 2019-06-04 12:10:26 +02:00
d076be8887 WIP 2019-06-04 10:27:23 +02:00
1a2e252665 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-06-04 08:48:58 +02:00
70ea143dcb Merge branch 'developer' into gui 2019-06-03 18:16:56 +02:00
7a9745e2da fixed typo in command, bsamples to dsamples 2019-06-03 18:14:23 +02:00
e8296da064 enableall ADC fixed 2019-06-03 18:01:57 +02:00
b7d81b1e87 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-06-03 17:42:57 +02:00
3baa4b8ab1 trying to fix ctbGui bugs 2019-06-03 17:42:43 +02:00
17f745b45d ctb server: simulator effects, increased fpga reset time from 1 to 2 seconds 2019-06-03 17:22:59 +02:00
e7c164fb24 Merge branch 'developer' into gui 2019-06-03 11:13:03 +02:00
29141ac1a6 set starting frame number of next acquisition for both jungfrau and e… (#27)
* set starting frame number of next acquisition for both jungfrau and eiger. firmware has not implemented a get, so workaround. tests included. frame number 0 not allowed due to Eiger. Eiger max frame is 48 bit, while jungfrau is 64 bit

* made argument of setstartingframenumber const
2019-06-03 11:07:53 +02:00
894cc1c9e0 Simulator (#28)
* WIP

* wip

* wip

* removed loop

* sending 1 frame

* send multiple frames

* c11 for server

* WIP

* WIP

* Add CMake for the simulators. Requires some refactoring to make slsDetectorServer a proper library.

* Working cmake for jungfrau

* Working cmake for eiger

* WIP

* WIP

* Add preliminary working eiger simulator and breaks the jungfrau simulator

* virtual servers connected

* changes to make it work for rhel7 and install binaries in bin

* removed some unnecessary prints

* removed binaries and virtual makefiles
2019-06-03 10:16:54 +02:00
073d06f143 removed unnecessary print that might have been used for debugging 2019-06-03 08:59:54 +02:00
4b1a9bea32 Integration tests for the command line (#26)
* WIP

* first test

* format

* test frames

* also 0:
2019-05-31 14:40:45 +02:00
0eec57f8a2 Corrected ctb Makefiles to work with bad bashrc 2019-05-29 16:44:02 +02:00
4a112d7889 Added deserializer and moench04 map to ctbGui 2019-05-29 15:48:22 +02:00
c90a7b0e8a Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2019-05-29 11:39:14 +02:00
25541b37f6 added patternGenerator and slsDteectorCalibration directory in order to compile the ctbGui 2019-05-29 11:38:43 +02:00
d935e78763 clang-format 2019-05-28 18:15:43 +02:00
0f869e1215 fixed acquire not working 2019-05-28 18:15:15 +02:00
788ad8d3b6 Command proxy (#25)
* added cmd proxy

* minor

* minor

* WIP

* clean up

* added comment
2019-05-28 18:01:26 +02:00
a008c2b2c8 added ctbGui 2019-05-28 17:15:59 +02:00
85d4dfc7c8 Merge branch 'socket' into developer 2019-05-28 17:11:29 +02:00
aa2bcfa308 fixed setup udp 2019-05-28 17:07:34 +02:00
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
7a9dbd8b76 WIP 2019-05-28 15:43:20 +02:00
daa82b91a9 removed comment 2019-05-28 14:44:46 +02:00
8c112efdb3 jungfrau bug fix: setting clkdivider also set adcphase: break inswitch 2019-05-28 14:14:08 +02:00
8f4009bfb6 WIP 2019-05-28 13:27:43 +02:00
e64f57ecac receiver 2019-05-28 13:12:43 +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
57170b1c80 pinned conda build 2019-05-28 12:12:05 +02:00
6a81e779c1 replaced server with receiver bug 2019-05-28 11:35:41 +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
e4367c9ab1 checking for nullptr 2019-05-27 14:20:40 +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
8ebc0f2644 uniqe ptr for receiver 2019-05-27 11:28:59 +02:00
0972b803dd Merge branch 'developer' into mysocket 2019-05-27 09:12:10 +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
a11fc31c49 merge 2019-05-16 15:18:14 +02:00
415567006f non used header 2019-05-16 15:16:11 +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
e6ad80e187 removed cout 2019-05-16 15:10:24 +02:00
c30c6bb883 fixed uninitialized pointer 2019-05-16 15:00:15 +02:00
615d1b1f33 refactor 2019-05-16 14:27:16 +02:00
9315768159 client bug fix: smaller ips convert to hex 2019-05-16 14:07:58 +02:00
1db1b0307c init 2019-05-16 11:50:35 +02:00
0d98bd0048 init 2019-05-16 11:43:12 +02:00
54983c5fd0 removing constexpr 2019-05-16 11:36:25 +02:00
9a8773d9a5 ip test 2019-05-16 11:25:18 +02:00
c6651df1b2 remove mySock 2019-05-16 11:14:03 +02:00
e252b8e0e9 receiver socket 2019-05-15 17:51:48 +02:00
40c2d9f760 try for accept 2019-05-15 12:17:32 +02:00
f1a1391866 Factored out time conversion (#23)
* time conversion

* with comment

* lround in slsDetectorCommand
2019-05-15 10:22:38 +02:00
c632badb55 Merge branch 'developer' into mysocket 2019-05-15 10:10:13 +02:00
8f8d565e4e work 2019-05-15 10:09:54 +02:00
f64facee0c Merge branch 'developer' into mysocket 2019-05-15 10:02:43 +02:00
877bdb8979 Using FixedCapacityContainer for rxDbitList (#22)
* fixed capacity container

* changed shm date
2019-05-15 09:16:18 +02:00
9d5848d0d6 inprogress 2019-05-15 09:12:14 +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
c30485a65b advanced down 2019-05-08 16:44:08 +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
6cb043b2d9 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-21 16:30:25 +01:00
fa34ad435b server: pll fix 2019-03-21 16:30:18 +01:00
c5178bc4de manual 2019-03-21 16:29:36 +01:00
c89fad45a9 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-21 15:09:19 +01:00
6c4fad01d4 manual 2019-03-21 15:09:10 +01:00
eb3dff3a6c eiger server 2019-03-21 14:15:52 +01:00
d9503bebf9 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-21 14:13:15 +01:00
b99606211b ctb server: altera pll odd division fix 2019-03-21 14:13:07 +01:00
039e658773 manual 2019-03-21 11:46:38 +01:00
92ca22fc09 manual 2019-03-20 18:34:44 +01:00
d4ac6fe160 gitinfo as public 2019-03-20 17:48:01 +01:00
8cb0f3a29c Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-20 17:41:57 +01:00
c16f9b8c30 specify detector or receiver in error 2019-03-20 17:41:46 +01:00
050854de36 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-20 17:34:37 +01:00
cb80cf5f09 receiver missing packets made to have signed for getting more packets than expected 2019-03-20 17:34:29 +01:00
83e43b1bcf format ColumnLimit changed to 100 2019-03-20 17:31:19 +01:00
2a01688683 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-20 17:07:29 +01:00
3ff01bf609 removed minor warnings for unused ret 2019-03-20 17:07:02 +01:00
4b2c6af4f5 reorganizing of slsDetectorSoftware 2019-03-20 17:07:02 +01:00
03402d0e9e Error handling with exceptions in slsDetector and multiSlsDetector (#14)
* less error mask

* removing error mask from slsDetector

* removed ErrorMask

* setonline, setreceiveornline bug fix
2019-03-20 16:23:41 +01:00
9d489dc962 servers, gitinfo script updated; ctb/moench server: delay uses sync clock, 2019-03-20 14:39:24 +01:00
44f0dfc3c0 ctbserver: updated firmware version and api 2019-03-19 18:58:42 +01:00
685fcc31b6 setonline, setreceiveronline was never really setting offline flag, so was never really updating detector first time 2019-03-19 18:42:45 +01:00
ce6289afda Merge pull request #13 from slsdetectorgroup/except
new socket overload
2019-03-19 18:01:09 +01:00
4e56107015 new socket overload 2019-03-19 17:49:20 +01:00
430e0e3fb5 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-19 17:32:17 +01:00
d8c0fb522a ctb/ moench server fix: usleep of 10 for reading from fifo removed 2019-03-19 17:32:07 +01:00
ce25c06b41 Merge pull request #12 from slsdetectorgroup/except
refactor getID
2019-03-19 16:58:43 +01:00
6759b2eeb8 refactor getID 2019-03-19 16:27:07 +01:00
38bf540c1a fixed segfault on loading trimbits 2019-03-18 18:10:50 +01:00
43012e4f28 more const more python 2019-03-18 17:38:44 +01:00
98655ee7e3 added missing py file 2019-03-18 12:20:48 +01:00
43d478076c Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-18 12:06:49 +01:00
4036e6af8d const qualified multi calls, python fixes 2019-03-18 12:06:39 +01:00
fad73a57aa minor 2019-03-18 09:19:04 +01:00
c0d5303b70 removed pycache 2019-03-15 17:59:36 +01:00
3356c2d3f6 all python version 2019-03-15 15:01:44 +01:00
3f45d39c8d deploy on all branches 2019-03-15 14:37:01 +01:00
4e94995142 conda build 2019-03-15 14:23:51 +01:00
c93b78c74f working 2019-03-15 13:50:50 +01:00
73af4a744f added pybind11 v2.2 as submodule 2019-03-15 11:05:12 +01:00
6ddde83c81 python 2019-03-15 11:01:36 +01:00
bb93147537 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-15 10:37:54 +01:00
1eff8485dd receiver listener bug fix from previous commit 2019-03-15 10:37:47 +01:00
c153be95d1 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-15 10:15:50 +01:00
4943983d10 det id const and ini shm in constructor 2019-03-15 10:15:42 +01:00
5fe7a86361 switching udpsocketbuffersize from uitn64_t to int64_t, printing socket exception into tcp error mess, changing an exception message 2019-03-15 10:00:22 +01:00
7522a655df removing warning in gcc 2019-03-14 17:38:40 +01:00
836eb8cde2 explicit override 2019-03-14 17:15:58 +01:00
9f724f0c0d using only sls exceptions 2019-03-14 17:09:44 +01:00
bad44f5bf4 moving SharedMemory into namespace sls 2019-03-14 16:51:38 +01:00
40d2f66146 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-14 16:37:46 +01:00
9639e480d9 new exceptions 2019-03-14 16:37:36 +01:00
8520492e4b lock server bug: sending lockstatus converts to littleendian for eiger, lastclient should have other as datatype for eiger 2019-03-14 14:14:14 +01:00
be33102164 checkonline, checkrecieveronline, retval has offline hostnames, online flag should be set no matter what the outcome 2019-03-14 13:18:42 +01:00
5235a87e93 Merge branch 'detshm' into refactor 2019-03-14 12:42:08 +01:00
cb687d805e merge conflict 2019-03-14 12:41:37 +01:00
327d08a016 removing comments, added one check for nullptr, updated current threshold when getting module, removing unsued function from header file (writesettingsfile) 2019-03-14 12:40:01 +01:00
1960460e43 upgraded catch to 2.7 2019-03-14 10:47:43 +01:00
e42e8f5bf6 option for sanitizers 2019-03-14 10:44:31 +01:00
c9422befff fixed loading trimbits 2019-03-14 10:21:18 +01:00
c56efdec8a Merge branch 'refactor' into detshm 2019-03-14 09:11:27 +01:00
14131f93f1 sanitizer compile fail 2019-03-14 09:06:44 +01:00
d21ceb0e75 only construct shared memory from a type with exact size 2019-03-13 17:43:48 +01:00
9a08c85b2a changed the shared memory of slsDetector 2019-03-13 17:38:27 +01:00
85134443de initial 2019-03-13 16:29:29 +01:00
7d3d2a8b31 ctb and moench server: pll vco clock changed from 400 to 800,ctb server: max adc clock from 40 to 65MHz 2019-03-13 16:03:11 +01:00
75ce111344 Merge branch 'shm' into refactor 2019-03-13 15:21:12 +01:00
f8aa0e3d6d removed minor commented lines 2019-03-13 15:19:32 +01:00
2dcef909ca Merge branch 'refactor' into shm 2019-03-13 14:22:26 +01:00
ec18db868f ctb, moench, jungfrau server: changing phase only changes one clock in one direction. ctb and moench phase shift connected to adc clk, instead of run clk 2019-03-13 08:37:45 +01:00
7e793539ca removed typedef for shared struct 2019-03-12 14:42:27 +01:00
d4e4fb8ffe move constructor deleted copy constructor 2019-03-12 14:37:06 +01:00
48e4cec56f minor 2019-03-12 11:52:13 +01:00
3b2c734efd adding tests 2019-03-12 11:43:28 +01:00
507a22ac05 default args 2019-03-12 10:14:24 +01:00
a01d68a61f initial changes 2019-03-12 08:22:07 +01:00
6765fd0dc8 ctb moench: bugfix for fifofull, should not read pattern, same as executing it 2019-03-08 16:59:44 +01:00
ae5938799f Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-08 16:16:53 +01:00
19b21dac88 Listener bug fix: switching to make_unique ptr side effects, the dummy socket still alive when destructor of listener called 2019-03-08 16:16:40 +01:00
b8f071dcf6 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-08 15:13:23 +01:00
182f65bc2f always compile commands 2019-03-08 15:13:11 +01:00
1103f56256 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-03-08 09:14:39 +01:00
0553755439 receiver bug fix: with refactor, the callbacks were getting reset upon initialization. fixed 2019-03-08 09:14:29 +01:00
65b8ab5b89 manual 2019-03-07 17:40:56 +01:00
658438df3b ctb moench server update: (fw update): det id changed, status reg looks at anyfifofull instead of somefifofull, datapresent looks at corresponding analog/digital fifo empty, usleep after read strobe to sync different clock 2019-03-07 17:36:35 +01:00
999a2f4d15 Merge pull request #8 from slsdetectorgroup/use-unique-ptr
In Listener, remove raw pointers allocations, use `unique_ptr` instead.
2019-03-06 17:48:28 +01:00
2532df37cc client: added basic fail handling where ommitted 2019-03-06 17:37:13 +01:00
ca817c6ae9 client: update roi on updatedetector, (ctb, moench)moved nchans and databyte calculated to updatenumberofchannels and called for any update in roi, readoutflag or #samples changed (get should not update). ctb,moench server: roi fixed, . gotthard server: bug fix waiting to finish, ad9252 spi call fix. receiver: updated for moench and 10g 2019-03-06 17:25:18 +01:00
0765b330f1 ctb and moench, exptime connects to set pattern wait time with level 0 2019-03-06 15:17:54 +01:00
abc7a9bd2f moench has only analog readout 2019-03-06 14:52:21 +01:00
2676e8b43d receiver: readout flag bug fix, clent:send roi for ctb and moench 2019-03-06 10:55:51 +01:00
d3c1193a71 ctb/moench server, fixed frequency configuring bug, readpattern sleep, detectormode command, jsonheader set even if rxr offline, set speed returnvalue is value not ok/fail, rxr printout missingpackets 64 bit 2019-03-06 10:25:16 +01:00
db232ad00d in Listener, remove raw pointers allocations, use unique_ptr instead.
Add an overload of sls::make_unique for array types.
2019-03-06 09:07:51 +01:00
ceb515d517 Merge pull request #7 from slsdetectorgroup/fix-sprintf-warnings
Fix sprintf warnings
2019-03-05 16:26:18 +01:00
0bb800cc8a manual 2019-03-05 15:48:20 +01:00
04c8a2871d Fix sprintf warnings 2019-03-05 14:34:01 +01:00
1803a5aecc Merge pull request #6 from slsdetectorgroup/fix-typos
Fix typos
2019-03-05 14:19:19 +01:00
c40db94474 Fix typos 2019-03-05 10:43:20 +01:00
c56561bc9f updated ctb and moench, moench not tested 2019-03-05 09:38:10 +01:00
08bd2378f4 slsReceiver bug fix affecting Jungfrau receivers as root (optlen size as int), but setting buffer size is uint32_t size. setting it to uint64_t 2019-03-04 09:41:20 +01:00
8939e23622 jungfrau feature:storagecell_delay added 2019-03-01 15:26:38 +01:00
93192c6e84 bugfix receiver: setImagesize only for ctb, moench 2019-03-01 15:22:39 +01:00
d2d50a56df eiger server/client bug fix: readout flag of -1 2019-03-01 14:08:28 +01:00
8c067437e6 ctb moench: added feature set pattern mask and set pattern bit mask, removed CTB prefix for all the patern functions 2019-03-01 12:28:11 +01:00
35b1ad39f7 ctb moench: feature to set digital io pin delay, changed print from unsuccessful to failed, maxpatternlength in server is inclusive 2019-03-01 10:45:01 +01:00
bb81613900 ctb, moench: implemented led enable feature 2019-03-01 09:00:04 +01:00
ebee9e308e ctb server: reserved not required, as the additional space in last packet can be calcualted 2019-02-28 16:14:45 +01:00
debf3a1b01 ctb readout works with receiver for digital readout, allocate ram in server only if 1g udp, free addr info only when setting new udp detals upon configuring ,brough readout flags to receiver 2019-02-28 16:07:47 +01:00
96584ce397 ctb: enable tengiga in server and moved everything to list implementation 2019-02-28 11:32:10 +01:00
7f2197fc4f slsReceiver & client: 10genable allowed for moench and ctb, ctb server: better way to divide to packets to send via udp 2019-02-28 10:09:54 +01:00
302d9f0633 ctb server: back to 10g def 2019-02-28 08:51:07 +01:00
f80483de6e ctb server: (bug fixes, udp sending feature instead of tcp, better debugging prints,
digital readout mode (fifoempty flag in status register is always up, so it is idle for this readout mode),
pattern loop bugs, max_pattern_length redefined in server side, do not update period for ctb and moench in setreceiver
2019-02-28 08:46:26 +01:00
1fe473e830 client: for set port functions, moved forceupdate outside to automatically close previous function call 2019-02-25 14:45:14 +01:00
966896b942 moench: get zmq goes to the receiver instead of shm, setand get threshold energey updates zmq and shm value, setand get roi anyways goes to the ddetector, so only updates zmq or gets it from rxr 2019-02-25 12:57:44 +01:00
4c7a9cd838 moench: set threshold energy and set roi sets jsonheader 2019-02-25 12:34:35 +01:00
c218e391bb client: rx_tcpport fixed 2019-02-25 11:43:10 +01:00
43ad8b69b3 client: stop and control port get fixed 2019-02-25 09:35:07 +01:00
4c35dd9b5b Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-02-25 09:16:27 +01:00
15fc55f914 client: must print detector or receiver returning error 2019-02-25 09:16:20 +01:00
eecfcae312 ctbserver: dac -1 check limit error 2019-02-25 08:58:35 +01:00
c723b29f9b address and undefined behaviour sanitizers on debug 2019-02-22 19:55:56 +01:00
9b81143c68 Merge branch 'ctbFixes' into refactor 2019-02-22 13:58:51 +01:00
20edf61e30 ctb server: removed unnecessary prints, resulting in a bug fix for slow adc temp 2019-02-22 13:53:59 +01:00
a1a6a5dbaa ctb server: slow adc temp fixed 2019-02-22 13:22:40 +01:00
a8121ae108 ctb server: vio should be off at start up 2019-02-22 09:03:30 +01:00
40d15264c5 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-02-21 16:25:07 +01:00
b2e6b78e20 Merge branch 'ctbBugFixes' into refactor 2019-02-21 16:24:56 +01:00
f5244faa02 moench: adding enums for zmq parameters, needs modification in naming 2019-02-21 16:01:24 +01:00
421dbdb9b5 ctb server: including moench as well for programfpga and other client ctb implementations 2019-02-21 16:00:40 +01:00
617f3d2600 ctb server: modified program fpag in case of errors 2019-02-21 15:56:51 +01:00
a4f1b7670f ctb server bug fixes:update client, get period left, getid(api and serial number), restrict setting vchip, allow write adc 2019-02-21 09:37:49 +01:00
09546a8632 ctb server:
- allowed flags resetfpga and programfpga for moench and ctb
- set a minimum voltage for vio as it powers the fpga (1200mV)
- changed the min and max for vchip and power regulators due to tolerance
- fixed pattern read function
- fixed minor bugs with input of ctb patterns(waittime) and mode other than 1
- fixed calibration current register for i2c for tolerance (/1.2268)
- fixed current readout of i2c
- added digital, analog and normal readouts for flags
2019-02-20 15:36:34 +01:00
29d4eb8b41 catch by ref 2019-02-20 10:29:15 +01:00
775bde76c9 ctb server: power regulator adjusted for precision 2019-02-20 09:34:55 +01:00
d876cb6da6 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-02-20 08:47:13 +01:00
69f361468e ctb: power regulators (set dac, get dac, get adc of voltage and current) works 2019-02-20 08:45:34 +01:00
b52c6b05b8 link and format 2019-02-16 16:46:09 +01:00
c93f88b7e5 ctb server: fixed dacs, power regulators and vchip 2019-02-15 17:08:49 +01:00
d0e1289c1b replaced sprintf on the same buffer with strcat 2019-02-15 15:39:13 +01:00
4a8a72c447 ctb server: vlimit not impl, adc in degrees 2019-02-14 18:28:32 +01:00
501c579f6b users: added json parameter for moench api 2019-02-14 18:03:49 +01:00
722883531d reverted json_emin, emax, framemode and detectormode. All json parameters for moench will go through rx_jsonpara using strings 2019-02-14 17:43:28 +01:00
d2ba206216 Merge branch 'findzmq' into refactor 2019-02-14 17:35:07 +01:00
6be47d936f conflicts resolved 2019-02-14 17:32:33 +01:00
9aaca14b01 CMakeLists.txt: reordering and removing those we dont use anymore, removed all the Makefiles (except the ones for the detector servers) 2019-02-14 16:15:43 +01:00
aaae6d854c changed remaining cmake options to have SLS_ prefix 2019-02-14 15:42:04 +01:00
c91c2c224a Merge branch 'add-cmake-packages' of https://github.com/esrf-bliss/slsDetectorPackage into esrf-bliss-add-cmake-packages 2019-02-14 10:36:41 +01:00
2fdfd33f97 gitignore: added .o files for the servers 2019-02-14 09:30:50 +01:00
230b26a680 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-02-13 20:19:16 +01:00
46aa7769cc client: added command line and for APIfor framemode and detectormode. Refactorinng required in the future 2019-02-13 20:19:08 +01:00
59f3f0c764 cleaner cmake 2019-02-13 15:59:42 +01:00
d46d96ecca fixed linking zmq 2019-02-13 15:35:40 +01:00
82584dd1a8 cmake 2019-02-13 15:13:21 +01:00
b65e0a1f01 include dirs 2019-02-13 15:12:33 +01:00
f9417a23e0 FindZeroMq 2019-02-13 14:53:23 +01:00
fd95550724 client: fix for json header values being integer 2019-02-13 12:43:56 +01:00
c064dc84ae Add generation and install of CMake packages 2019-02-13 10:45:01 +01:00
01e3cb8d5e Cherry pick commit from 4.0.1 about CMake packages 2019-02-13 09:44:45 +01:00
c6ac0f8ebc Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-02-13 09:37:45 +01:00
f9be8b89ac added functionality to set additional json header key value pairs for prototype ctb, server fixed for eiger compile from ctb integration 2019-02-13 09:37:31 +01:00
75a75b6cf6 Merge pull request #3 from esrf-bliss/add-slsReceiver-ctor-overload
merge for Add slsReceiver ctor overload and sls::make_unique
2019-02-13 09:10:33 +01:00
f125b94a7d Use sls::make_unique<> 2019-02-13 08:59:26 +01:00
b18391330e Add slsReceiverUsers(int tcpip_port_no) overload
Use std::unique_ptr<> instead of raw pointers
2019-02-12 17:01:46 +01:00
2bcf88e434 added receiverUsers as public header 2019-02-12 15:26:08 +01:00
031a11c4f7 removed all the warnings and errors from the merge, also removed added -wextra compiler flag, (yet to add additional commands for moench) 2019-02-12 11:09:19 +01:00
a64b34610a merge from developer (without the additional json header implementations) 2019-02-12 09:35:24 +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
985b2eba4d ctb registers updated 2019-02-07 18:05:15 +01:00
a5ee9fbdba ctb bug fixes: pattern generator, vchip, dacs 2019-02-07 16:51:18 +01:00
166541bd15 ctb adc phase get fix 2019-02-06 19:05:11 +01:00
140996fae6 ctb adc fix, update detector fix, acq error fix 2019-02-06 18:50:50 +01:00
3f43767d38 ctb client updated 2019-02-06 17:45:19 +01:00
a76cc90972 adc command line bug, ctb api added to client 2019-02-06 17:25:36 +01:00
0c1a3b7756 eiger bug fix: multi hv and eiger should not return -1 if different, ctb : dacs are 24 not 16 2019-02-06 17:07:13 +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
076faa62e0 ctb server: server starts up good. Need to debug each function in detail 2019-02-06 15:50:44 +01:00
bb37915419 stdexcept added to compile 2019-02-05 14:44:49 +01:00
6abfdcb2c8 manual 2019-02-04 10:48:42 +01:00
536c853d79 hack for receiver port 2019-01-25 19:41:33 +01:00
f1d055138c moved updateDetector/Receiver 2019-01-25 19:12:28 +01:00
82ce6b639c more cout 2019-01-25 16:53:19 +01:00
7d9417dffe fixed debug couts 2019-01-25 16:48:04 +01:00
89ee1d5bcf new socket for slsDetector 2019-01-25 16:44:29 +01:00
a1c0d28ddb changed constructor 2019-01-24 11:12:24 +01:00
c3472f295b split client and server interface 2019-01-23 12:07:44 +01:00
99a1c609f1 starting to add new Socket interface 2019-01-23 11:47:13 +01:00
3eca4c0535 typo 2019-01-21 14:44:06 +01:00
b200138730 data types and format 2019-01-21 14:43:24 +01:00
a4fec1e750 format and no check before delete 2019-01-21 12:10:00 +01:00
46036e5dde braces around statements 2019-01-21 11:41:19 +01:00
d2ed245d1d format and removed nullptr check before delete 2019-01-21 11:18:27 +01:00
b74aed91dc consistent naming between header and source file 2019-01-21 11:11:39 +01:00
e1ec60c9c1 cleaning up tests for command line parser 2019-01-21 10:45:43 +01:00
603b217b54 clang-tidy modernize 2019-01-18 15:15:39 +01:00
449e4da892 removed potential memory leak in readSettingsFile 2019-01-18 15:13:17 +01:00
1ec9d950d5 malloc to new 2019-01-18 15:00:52 +01:00
1b28cc88ff step one project reorganization 2019-01-18 14:41:04 +01:00
8d6ee6ff46 moved shm deleted .project 2019-01-18 11:40:10 +01:00
10539f8533 new getDetectorType functions 2019-01-18 10:53:49 +01:00
13d6d3f866 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-17 17:30:46 +01:00
eff17371a5 removed virtual 2019-01-17 17:30:36 +01:00
13f9b9929a slsreceiver: removed option to start receiver with config file, redundant as the only option is receiver tcp port 2019-01-17 15:17:08 +01:00
b07492be6f removing multiSlsDetectorCommand and using namespace std 2019-01-17 14:45:51 +01:00
c05829031f removed get from the users class and changed put 2019-01-17 14:20:03 +01:00
76da6a07aa using new CmdLineParser 2019-01-16 18:46:34 +01:00
db0807bf7b adding cmdline parser 2019-01-16 16:50:19 +01:00
b19b2a044c minor 2019-01-16 15:22:18 +01:00
1ebe0f5624 spelling 2019-01-16 15:18:49 +01:00
49f71ffca7 project wide nullptr fix 2019-01-16 15:15:29 +01:00
80a1a3d796 moved ClientInterface to src 2019-01-16 15:10:24 +01:00
683a859d4c cleanup 2019-01-16 14:56:01 +01:00
37ebeaed7b Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-16 14:27:21 +01:00
0f688bb249 unique_ptr in multiSlsDetectorClient 2019-01-16 14:27:08 +01:00
1ce8f3d092 udpSocket might still exist when error in creation, will conver to unique ptr later 2019-01-16 13:37:00 +01:00
10a34cce2d Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-16 13:29:11 +01:00
7fe9251a3b ctb server compiles 2019-01-16 13:28:50 +01:00
9e5ec6a57b only destroy sem if it was initialized 2019-01-16 11:54:01 +01:00
901785b818 only destroy sem if it was initialized 2019-01-16 11:51:50 +01:00
68545f2b26 removed pointer in multiSlsDetectorClient 2019-01-16 10:56:51 +01:00
fe09f6d062 cleaning up slsDetectorCommand 2019-01-16 10:29:10 +01:00
9d9251293d Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-15 20:06:19 +01:00
d240ab7a29 moench server compiles 2019-01-15 20:06:11 +01:00
dd93117b06 strcpy to sls::strcpy_safe 2019-01-15 17:36:21 +01:00
4b9e41e23b Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-15 17:16:19 +01:00
dd5bd60429 moench server: list.h fixed 2019-01-15 17:16:00 +01:00
5e032c2c3e added tests for compiler version 2019-01-15 17:03:04 +01:00
7303734b19 removing static libs and changing flags 2019-01-15 16:56:33 +01:00
8bc9fa54fc insignificant print 2019-01-15 13:18:40 +01:00
a9fb476543 changing signature from std::string to const std::string& for client receiver ip functions 2019-01-15 13:14:43 +01:00
f2669adda7 Merge branch 'refactor' into networkParameterFix 2019-01-15 12:12:53 +01:00
29c09ab381 bugfix udpport mixup for udpport2 in commands 2019-01-15 12:12:14 +01:00
8738700e8a insignificant 2019-01-15 11:58:59 +01:00
c1c302f740 removing networkPArameter function complete 2019-01-14 20:42:15 +01:00
bc9d5718c9 typo 2019-01-14 15:38:48 +01:00
991567ba1c strcpy and cleanup of configuremac 2019-01-14 15:33:35 +01:00
f0b29cfecc signatures fixed for setnetworkparameter 2019-01-14 15:26:58 +01:00
3c41ec4a7a in the process of splitting network parameter function 2019-01-14 10:03:40 +01:00
172c9218d1 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-11 16:56:43 +01:00
b7582e93d3 working on removing undefined beaviour in configureMAC 2019-01-11 16:56:31 +01:00
5ae31bc438 receiver bug fix: dataprocess gappixels enable check to create tempbuffer always true 2019-01-11 15:21:16 +01:00
1941e90697 moench basic tearing down 2019-01-11 15:19:08 +01:00
363f4f1da0 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-11 14:49:09 +01:00
1bbb352743 jungfrau server: pll moved out to remove redundancy 2019-01-11 14:48:58 +01:00
5ea5e83236 removing local variable in slsDetector::setTCPSocket and adding some const string& 2019-01-11 14:38:56 +01:00
b46fb5e9c4 deduce parallel call only on function signature and some const& 2019-01-11 12:33:11 +01:00
0841df98d4 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-11 11:27:52 +01:00
1bd0b33806 functions not overriding base and unitialized use 2019-01-11 11:27:48 +01:00
de2ebad2ed receiver: removed unused silentmode from DataStreamer 2019-01-11 11:19:16 +01:00
2a988c7ffa Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-11 11:11:56 +01:00
94979b5824 changes to moench 2019-01-11 11:11:50 +01:00
c6a597c3ec minor changes and removed W flag not found 2019-01-11 11:07:50 +01:00
288ef0a514 acquiringDone not used, removing 2019-01-10 17:35:06 +01:00
818be3bb85 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-10 16:38:50 +01:00
d01e8d24c2 const std::string& for filenames etc. 2019-01-10 16:38:37 +01:00
b38a41493b bug fix, clock divider hangs due to incorrect number of arguments 2019-01-10 16:27:23 +01:00
37c22dfeb2 range based loops and bool literals 2019-01-10 16:07:47 +01:00
15235ab4fc default initializer for slsDetector 2019-01-10 16:02:29 +01:00
230c335c29 using default initializer arguments for multiSlsDetector 2019-01-10 15:53:09 +01:00
0f50b9f161 clang-tidy nullptr 2019-01-10 15:28:43 +01:00
58f97d4f46 clang-tidy push_back -> emplace_back 2019-01-10 15:24:58 +01:00
42ed65076c jungfrau server works now, need to be tested with pedestals for dac 2019-01-10 12:22:43 +01:00
b5b5ce5c37 eiger server works 2019-01-10 11:03:31 +01:00
55c57e4c3f Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-10 10:35:58 +01:00
52785c6642 gotthard server works 2019-01-10 10:35:49 +01:00
f815e7ffb6 long -> int64_t 2019-01-10 09:33:59 +01:00
0a2c1d1406 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2019-01-09 17:41:19 +01:00
b1570bde9c updated max1932, modified ltc2620 2019-01-09 17:41:10 +01:00
93ec5f5ef7 minor 2019-01-09 16:22:14 +01:00
feaa276284 range based loops 2019-01-09 14:20:48 +01:00
26f8ca3221 clang-tidy fix from NULL 0 etc to nullptr 2019-01-09 12:02:49 +01:00
b7aac059c3 moved string stuff to string_utils.h/.cpp 2019-01-09 11:19:16 +01:00
81a49babda gotthard server fixed: also for revision 1 boards 2019-01-08 11:52:14 +01:00
553633651a insignificant 2019-01-08 07:52:24 +01:00
bf4ba9d08b some minor modifications 2019-01-08 06:57:04 +01:00
4b007b003a gotthard server works, fine tuning left 2019-01-08 06:52:28 +01:00
06a6d53a3f gotthard, cmakefiles language line removed 2019-01-04 16:34:34 +01:00
bfda07d262 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-12-19 17:16:54 +01:00
a013734af8 moench and lookinginto max1932 2018-12-19 17:16:41 +01:00
84a67870a0 slight cleanup of dumpDetectorSetup 2018-12-19 16:38:18 +01:00
f161d68efc fix in ltc, added moench, separated servers, left to do max1932, client side for moench and more detailed in ctb server side 2018-12-19 16:38:18 +01:00
1ca8bf204a added string_utils and strcpy_safe 2018-12-19 15:44:21 +01:00
89d9204e1c changed fd and some unused store 2018-12-19 12:24:02 +01:00
88b9a93b3e fixed 2018-12-19 11:51:42 +01:00
1af2d95462 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-12-19 11:45:24 +01:00
d07f53cd6f removed using namespace std in slsDetectorCommand.cpp 2018-12-19 11:31:49 +01:00
6533a474d1 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-12-18 18:07:27 +01:00
7a432befa3 removed gui from meta.yaml 2018-12-17 15:19:14 +01:00
f68321af43 disable GUI in conda build 2018-12-17 15:05:22 +01:00
2dd8093905 added project to CMakeLists and path for installing 2018-12-17 14:55:19 +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
659faa9aaa added it back 2018-12-12 16:31:36 +01:00
feeaebb7e4 removed branch condition 2018-12-12 16:28:58 +01:00
547efc48e3 added conda recipe 2018-12-12 16:27:35 +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
1c59c5c4f4 in between 2018-12-12 11:20:39 +01:00
79693a38f5 in between 2018-12-12 11:20:27 +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
87f7563035 gothard server bug fix: conf gain val instead of always dynamic gain 2018-12-05 10:35:57 +01:00
a4de4bb475 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-12-04 16:05:17 +01:00
b3393fc18b few gotthard bug fixes, including cs mask for adc 2018-12-04 16:02:24 +01:00
4e65a1d964 gotthard server: minor fixes 2018-12-04 14:12:11 +01:00
98b5e893b1 rd strobe fifo for only analog fifos 2018-12-03 14:33:32 +01:00
8f3f9caf2b almost done with ctb update, need to do slow adcs, split to moench and ctb 2018-11-30 10:39:26 +01:00
d0665ce075 tests for socket 2018-11-29 12:21:02 +01:00
284ce30a81 starting tests 2018-11-28 14:45:50 +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
c19c787904 adcreg command line print 2018-11-12 15:14:37 +01:00
e3a0c1373c created AD9252 for old gotthard modules in use, it runs in both roi and non roi for old and new modules, data needs to be checked by Jiaguo to confirm some parts of the code that has FIXME to be checked later 2018-11-12 13:51:51 +01:00
8942098a90 gotthard works, data to be authenticated when personnel available 2018-11-09 15:25:26 +01:00
2e83db7d45 changed cluster file format 2018-11-09 12:34:14 +01:00
89fa30ee4b client compiles 2018-11-08 18:10:03 +01:00
2e37eda9d9 gotthard compiles 2018-11-08 18:09:11 +01:00
a37be4b2e3 fixed eiger server compiler errors 2018-11-08 17:22:59 +01:00
7a99d4155a fixed jungfrau server compile errors 2018-11-08 17:20:41 +01:00
91dd176a0f gotthard server done editing 2018-11-08 17:15:48 +01:00
a99584a0da removed ndac from sls_detector_module and from the servers (not used), fixed setting module by eiger bug in sending number of channels 2018-11-02 17:08:25 +01:00
d1c8d0b01c jungfrau virtual server compiles 2018-11-02 14:52:27 +01:00
833f0c164c reciever hdf5 compiling error fixed 2018-11-02 14:31:36 +01:00
742d4e6cb7 bug fix for mac addr format check 2018-11-02 14:13:59 +01:00
d55c39ef08 minor print fixe 2018-11-02 14:09:40 +01:00
a47db85350 gappixels only for eiger in receiver 2018-11-02 13:56:59 +01:00
b43be57b6e jungfrau server works 2018-11-02 13:50:00 +01:00
817736fcd5 after merging with developer 2018-11-02 10:48:06 +01:00
92123069ce virtual eiger server compiled 2018-10-31 15:13:31 +01:00
17027962ea log fix for eiger server 2018-10-31 15:02:43 +01:00
e0cbbde01d log fix for servers. eiger server done 2018-10-31 14:57:22 +01:00
aec8c031de kept the same client interface:tb changed when fixing error codes/exceptions, modified multi print, fixed roi bug in indexing to sls 2018-10-31 14:30:30 +01:00
3d40d5d058 format 2018-10-30 14:57:30 +01:00
af550b4c70 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-30 14:46:19 +01:00
70a1b87603 merge conflict resolved 2018-10-30 14:31:20 +01:00
dfa8cf7381 runs, prints right in reciever 2018-10-30 13:35:20 +01:00
92fc837eb4 compiles, but doesnt run 2018-10-29 15:23:52 +01:00
33ac63d14a still updating slsdetector.cpp 2018-10-26 17:40:18 +02:00
cf87b6ca83 still updating slsdetector.cpp 2018-10-25 16:24:05 +02:00
660ed4c177 changed users set/getDetectorsize API to include a single ROI 2018-10-25 14:11:40 +02:00
261849d69c eiger server compiles, client side of interface to do 2018-10-23 16:20:40 +02:00
0d96272db5 manual 2018-10-23 11:29:27 +02:00
129e12fd97 moved test framework 2018-10-22 11:21:18 +02:00
ab2eb607c8 replced usleep with chrono and thread 2018-10-19 15:47:36 +02:00
5671f1c87b using split in add multiple detectors 2018-10-19 10:30:31 +02:00
ff440f1325 clang-format on multi detector 2018-10-19 10:23:06 +02:00
dfad145e14 still in the process of interfacing det and client 2018-10-18 18:08:34 +02:00
500304024d added base clang format 2018-10-18 17:06:43 +02:00
86fb843021 in the process of rewriting detector client interface 2018-10-18 10:58:48 +02:00
c95bc84458 formatting 2018-10-17 18:13:01 +02:00
058de39d40 const qualifying 2018-10-17 17:51:26 +02:00
b44039361d renamed joinThread getter setter 2018-10-17 17:47:19 +02:00
0070a79838 removed command threaded 2018-10-17 17:35:55 +02:00
1d14dc6ff4 void signature of processData 2018-10-17 16:58:09 +02:00
1d65063088 using std::mutex and std::thread in multi detector 2018-10-17 16:56:01 +02:00
5c2ff84c0e removed unused variable numberofJobs in receiver implementation 2018-10-17 11:39:27 +02:00
42c4e3e1a1 cleanup 2018-10-16 17:47:48 +02:00
014dfaa251 moved to vector of unique pointer in slsReceiverImplementation 2018-10-16 17:30:43 +02:00
38a6393dde fixed probelem with multiThreadedInterpolatingDetector 2018-10-16 17:17:24 +02:00
b50d359ee6 better name 2018-10-16 15:53:01 +02:00
b5a2c91873 removed printf with same source and dest 2018-10-16 15:50:51 +02:00
3c9b1884d3 removed conditional operator and moved to range for 2018-10-16 15:25:15 +02:00
66e79dc9a9 refactoring startReadout 2018-10-16 15:08:59 +02:00
5b8dfd7943 range based for loops for reset acq count 2018-10-16 14:34:34 +02:00
178b832223 funcs name only in c++, bug fix:slsdetectorusers not deleting multislsdetectorcommand object, bug fix: programfpga does not delete fpgasrc malloc if returning in failure 2018-10-12 17:37:39 +02:00
8df63b7767 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-12 17:03:28 +02:00
8382d0f5f9 receiver tcp interface updated 2018-10-12 17:03:19 +02:00
1e2ffae690 setNetworkParameter dont split strings 2018-10-12 11:56:47 +02:00
f6357a667f setSettingsDir works as the other functions 2018-10-12 11:39:11 +02:00
4cdd766a8e cleaning readConfigFile 2018-10-12 09:57:46 +02:00
c3289a973f cleaned up read config file slightly 2018-10-11 17:45:57 +02:00
e921dbb6a7 minor 2018-10-11 16:46:34 +02:00
1895ee1ebe minor 2018-10-11 16:19:44 +02:00
22e8c52bd8 more style 2018-10-11 16:08:02 +02:00
c31c851e88 moved communication, jungfrau 2018-10-11 15:58:49 +02:00
565739f6a2 eiger server, moved comunication_funcs 2018-10-11 15:55:08 +02:00
43c6cae25b Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-11 15:53:42 +02:00
d2c8c0a2eb gotthard server, moved communication_funcs to slsDetectorServer 2018-10-11 15:53:30 +02:00
d96cbe02a2 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-11 15:52:48 +02:00
795e147e7d stylistic cleanup 2018-10-11 15:52:39 +02:00
f806759af3 const string& 2018-10-11 15:25:29 +02:00
316ba01297 size of writeConfigFile 2018-10-11 15:19:26 +02:00
a28932bb6c Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-11 14:43:47 +02:00
4d69b6d3a1 added address sanitizer for debug mode 2018-10-11 14:43:32 +02:00
302f31678f updated gotthard binary, not run 2018-10-11 14:40:52 +02:00
32924def33 updated jungfrau server binary 2018-10-11 14:33:13 +02:00
ee20932392 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-11 14:20:58 +02:00
0ee7f67965 detector servers moved out of slsdetector software, eiger server compiles with new headers 2018-10-11 14:20:50 +02:00
c24a9b223c combined all the funcs into one, servers need to be recompiled 2018-10-11 13:57:47 +02:00
f7809bda3b Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-11 13:54:37 +02:00
5682466356 remove pointers and try block from get detector type 2018-10-11 13:54:25 +02:00
b82fca2c8e removed warnings 2018-10-11 13:32:24 +02:00
576de404d4 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-11 12:25:27 +02:00
5a356534e6 refactor receiver client interface, moved defs into one sls_detector_defs.h 2018-10-11 12:25:18 +02:00
f735c86b93 removing more pointers 2018-10-11 12:14:46 +02:00
6aa0029580 changing pointers to local variables 2018-10-11 12:08:07 +02:00
2216574d34 check empty instead of strcmp 2018-10-11 11:51:54 +02:00
4aa720eecb added data structure for moench03 rectangual pixels module 019 2018-10-11 09:32:47 +02:00
d0950ba001 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-10 18:11:23 +02:00
f69e9d0df4 refactored client interface (client ot receiveR) 2018-10-10 18:09:14 +02:00
8dc0d72028 minor formatting 2018-10-10 17:46:28 +02:00
5f6f276f70 moved initDetectorStructure into initSharedMemory 2018-10-10 17:41:13 +02:00
fd7060ef6c removed pointer to shared memory in some multi functions 2018-10-10 14:18:47 +02:00
e1d570e8ce client specifies index of receiver returned error, skeleton of including clientinterface in receiver 2018-10-10 13:15:16 +02:00
6d9530ee1d Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-10 12:24:20 +02:00
b981fe78ef connected command to execute command in receiver pc 2018-10-10 12:23:55 +02:00
2cd0841ea3 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-10 12:17:36 +02:00
74bd223fda minor cleanup 2018-10-10 12:17:28 +02:00
6147383677 commented out concatResultOrPos which seems not to be used 2018-10-10 12:01:30 +02:00
5e7e7d3c33 moved client interface to common folder as receiver wills tart using it as well 2018-10-10 12:00:47 +02:00
938dd5e06c Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-10 11:55:49 +02:00
d685cb8ff4 moved detectors and zmqSocket to unique pointers 2018-10-10 11:55:37 +02:00
78bfc9d0a5 insignificant, renamed recieverInterface to have a capital letter in class name 2018-10-10 11:43:35 +02:00
4b166b726e bug fix, start receiver fail does not return 2018-10-10 11:24:17 +02:00
9ca163dfc9 adding std::launch:async parameter to make it parallel by default for sl7 (seems default for fedora) 2018-10-10 10:51:32 +02:00
f2da42a305 overwrite enabled by default 2018-10-10 10:28:38 +02:00
64f4188a00 removed ms mutex , not used anyway 2018-10-10 10:16:41 +02:00
17a6322f7c receiver runs but does not overwrite due to wx, async doesnt seems parallel problem, acquire gets stuck 2018-10-10 10:12:58 +02:00
8151f1d5fe receiver compiles 2018-10-09 18:02:47 +02:00
7d5b24fe33 solved errors with client compile, rxr yet to do 2018-10-09 13:43:50 +02:00
4bcc24a59f some more changes, yet to do receiver 2018-10-09 12:31:12 +02:00
45b00c4e7d gotthard server updated, yet to run 2018-10-09 10:24:17 +02:00
923a7e8936 eiger and jungfrau server compiles, gotthard and receiver left to do 2018-10-08 14:38:35 +02:00
b9f97f42a6 recovered readme.md 2018-10-08 10:47:16 +02:00
f7a6938366 client moved everythign from common files to slsSupportLin/include 2018-10-08 10:45:56 +02:00
70f55ff788 removed MySocketTCP.cpp 2018-10-08 10:24:57 +02:00
7ffa72092f moved patterngenerator to slsDetectorServers, removed commitVersions 2018-10-08 10:12:28 +02:00
1c78400369 client compiles, more changes required 2018-10-08 09:34:08 +02:00
b5c35ddeac slsdetector and users updated to reflect new signatures, not yet compiled 2018-10-05 15:28:25 +02:00
d68c3b73a8 pdf manual 2018-10-05 14:30:54 +02:00
ab8b07f2ee client multi is updated with argument c++11 threading, need to update sls detector with arguments and removing imod 2018-10-04 17:24:37 +02:00
1c70f9ec65 mutli.cpp updated half (without masking multi error and no check on detectors boundaries for adding exceptions later. done upto savecalibrationfile 2018-10-03 17:56:04 +02:00
251a7c2446 Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-03 15:28:22 +02:00
cf37725e04 updated command.cpp to have all the indices including default ones 2018-10-03 15:28:08 +02:00
287cd118b0 example 2018-10-03 14:56:56 +02:00
21ca289ebf Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor 2018-10-03 14:51:44 +02:00
02acaf13c5 added example 2018-10-03 14:51:35 +02:00
c6d2902539 updating indices in slsdetectorcommand 2018-10-03 14:31:43 +02:00
2aa7e7d2ff added catch for unit testing 2018-10-03 14:04:40 +02:00
fefdf8e7d6 slsSupportLib and parallel call using variadic templates 2018-10-03 14:02:41 +02:00
6bfc212f19 client multi.cpp some more changes 2018-10-03 12:53:50 +02:00
a1b24a637b client multi.cpp modified common out of bounds error 2018-10-03 12:47:20 +02:00
40ae74bb99 client multi.cpp getid and checkversioncompatibility are examples of how it might look like 2018-10-03 12:31:00 +02:00
586c664a43 client multi.h comments and some signature updated 2018-10-03 11:57:18 +02:00
fdcd633769 client: multi added indices for detpos in function signature for required 2018-10-03 11:41:50 +02:00
70ea4b48c3 client: removed slsDetectorutils and postprocessing. yet to compile, yet to add detpos index for every multi sls detector command and call from command interface, removed multiple threading, yet to interface with eriks single template for multiple threading 2018-10-03 11:15:39 +02:00
dafbc970e3 client stage2 ongoing, utils removed but not compile ready; left to do imod for every multi, connect client to multi 2018-10-02 18:13:00 +02:00
100c1b81f8 moved all the common header files from receiverSoftware to commonFiles 2018-10-02 16:32:37 +02:00
757bc89d05 moved common files outside slsDetectorSoftware 2018-10-02 16:07:53 +02:00
97934e323c removed actions 2018-10-02 15:51:58 +02:00
f4cfafb2bb removed calibration folder 2018-10-02 15:17:41 +02:00
c248b12455 refactored ONLY THE CLIENT first stage, compiles 2018-10-02 15:15:35 +02:00
def79807f6 merge conflict resolved from 4.0.0 2018-09-28 16:28:21 +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
c52025dd7c manual 2018-09-21 12:04:33 +02:00
7b4910ee87 branch 2018-09-17 14:59:08 +02:00
021212372b root converter 2018-09-17 14:54:19 +02:00
e8612a481c receonstruction 2018-09-17 12:47:18 +02:00
8773de93e9 server first 2018-09-17 11:03:31 +02:00
ef20fa6f3c start documenting cbf converter 2018-09-14 18:05:28 +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
30e060b3b1 gap pixels basics 2018-09-04 11:16:31 +02:00
29ba9ae6f7 some updates for 4.0.0 2018-09-03 16:34:06 +02:00
2b2b53f598 update 2018-09-03 13:57:21 +02:00
1ebb07198a deadtimesubperiod 2018-08-31 21:36:38 +02:00
ed0b22b500 updated binaries 2018-08-24 13:18:51 +02:00
548036a602 selective merge from branch 4.0.0 conflict fix 2018-08-24 13:12:55 +02:00
1b55fdad86 merged selected patches from 4.0.0 branch 2018-08-24 13:10:16 +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
1920 changed files with 120666 additions and 207493 deletions

View File

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

View File

@ -1,7 +1,33 @@
---
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,
-modernize-use-trailing-return-type'
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 }
...

13
.gitignore vendored
View File

@ -6,6 +6,17 @@ bin/
*.log
*.out
*.toc
*.o
.*
build
docs/
RELEASE.txt
Testing/
ctbDict.cpp
ctbDict.h
*.pyc
*/__pycache__/*

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "python/pybind11"]
path = libs/pybind11
url = https://github.com/pybind/pybind11.git

View File

@ -2,10 +2,14 @@ sudo: false
language: cpp
os: linux
env:
matrix:
include:
- os: linux
env: CONDA_PY=3.6
- CONDA_PY=3.6
- CONDA_PY=3.7
- CONDA_PY=3.8
dist: trusty
@ -22,7 +26,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
@ -34,11 +40,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:
branch: 4.2.0
branch: developer

198
CMakeLists.txt Normal file → Executable file
View File

@ -1,6 +1,30 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.11)
project(slsDetectorPackage)
set(PROJECT_VERSION 5.0.0)
include(CheckIPOSupported)
cmake_policy(SET CMP0074 NEW)
include(cmake/project_version.cmake)
# Include additional modules that are used unconditionally
include(GNUInstallDirs)
# If conda build, always set lib dir to 'lib'
if($ENV{CONDA_BUILD})
set(CMAKE_INSTALL_LIBDIR "lib")
endif()
# Set lower / upper case project names
string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPER)
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
# Set targets export name (used by slsDetectorPackage and dependencies)
set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWER}-targets")
#set(namespace "${PROJECT_NAME}::")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set (CALIBRATE OFF)
# Check if project is being used directly or via add_subdirectory
set(SLS_MASTER_PROJECT OFF)
@ -9,68 +33,174 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
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_SIMULATOR "Simulator" OFF)
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)
option(SLS_USE_CTBGUI "ctb GUI" OFF)
option(SLS_BUILD_DOCS "docs" OFF)
option(SLS_BUILD_EXAMPLES "examples" 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()
#Flags to always be used
# -Wno-unused-parameter should eventually be removes
# -Wno-overloaded-virtual TODO! remove warnings in refactor
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-overloaded-virtual -Wno-unused-parameter -std=c++98")
#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
-Werror=return-type
)
#Testing for minimum version for compilers
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# clang does not support -Wno-misleading-indentation
# add any special clang flags
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()
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)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-misleading-indentation")
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()
find_package(Qt4)
find_package(Qwt 6)
find_package(CBF)
find_package(Doxygen)
# find_package(PNG REQUIRED)
if(SLS_USE_SANITIZER)
target_compile_options(slsProjectOptions INTERFACE -fsanitize=address,undefined -fno-omit-frame-pointer)
target_link_libraries(slsProjectOptions INTERFACE -fsanitize=address,undefined)
# target_compile_options(slsProjectOptions INTERFACE -fsanitize=thread)
# target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
endif()
if (SLS_USE_HDF5)
find_package(HDF5 1.10 COMPONENTS CXX)
endif (SLS_USE_HDF5)
#rapidjson
add_library(rapidjson INTERFACE)
target_include_directories(rapidjson INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libs/rapidjson>
)
# Install fake the libraries
install(TARGETS slsProjectOptions slsProjectWarnings rapidjson
EXPORT "${TARGETS_EXPORT_NAME}"
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)
# set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
find_package(ZeroMQ 4 REQUIRED)
if (SLS_USE_TESTS)
enable_testing()
add_subdirectory(tests)
endif(SLS_USE_TESTS)
# Common functionallity to detector and receiver
add_subdirectory(slsSupportLib)
if (SLS_USE_TEXTCLIENT)
add_subdirectory(slsDetectorSoftware)
endif (SLS_USE_TEXTCLIENT)
if (SLS_USE_RECEIVER)
if (SLS_USE_HDF5)
find_package(HDF5 1.10 COMPONENTS CXX REQUIRED)
endif (SLS_USE_HDF5)
add_subdirectory(slsReceiverSoftware)
add_subdirectory(manual/manual-api)
endif (SLS_USE_RECEIVER)
if (SLS_USE_GUI)
find_package(Qt4 REQUIRED)
find_package(Qwt 6 REQUIRED)
if (QT4_FOUND AND QWT_FOUND)
add_subdirectory(slsDetectorGui)
endif()
endif (SLS_USE_GUI)
if (SLS_MASTER_PROJECT)
# Set targets export name (otherwise set by upstream project)
set(TARGETS_EXPORT_NAME "slsdetector-targets")
endif (SLS_MASTER_PROJECT)
if (SLS_USE_SIMULATOR)
add_subdirectory(slsDetectorServers)
endif (SLS_USE_SIMULATOR)
if (CALIBRATE)
if (DEFINED ENV{ROOTSYS})
find_package(ROOT)
if (ROOT_FOUND)
add_subdirectory(calibrationWizards)
if (SLS_USE_INTEGRATION_TESTS)
add_subdirectory(integrationTests)
endif (SLS_USE_INTEGRATION_TESTS)
if (SLS_USE_PYTHON)
add_subdirectory(libs/pybind11)
add_subdirectory(python)
endif(SLS_USE_PYTHON)
if (SLS_USE_CTBGUI)
add_subdirectory(ctbGui)
endif(SLS_USE_CTBGUI)
configure_file( .clang-tidy
${CMAKE_BINARY_DIR}/.clang-tidy
)
if (SLS_BUILD_EXAMPLES)
add_subdirectory(sample)
endif(SLS_BUILD_EXAMPLES)
if(SLS_BUILD_DOCS)
add_subdirectory(docs)
endif(SLS_BUILD_DOCS)
if(SLS_MASTER_PROJECT)
# Set install dir CMake packages
set(CMAKE_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/cmake/sls)
# Set the list of exported targets
set(PROJECT_LIBRARIES slsSupportLib slsDetectorShared slsReceiverShared)
# Generate and install package config file and version
include(cmake/package_config.cmake)
endif()
endif()
endif(CALIBRATE)

235
Makefile
View File

@ -1,235 +0,0 @@
# do not change below this line#
# Include common definitions
include Makefile.include
INSTALLROOT ?= $(PWD)
BINDIR ?= $(INSTALLROOT)/bin
DOCDIR ?= $(INSTALLROOT)/manual/docs
LIBDIR ?= $(INSTALLROOT)/bin
INCDIR ?= $(INSTALLROOT)/include
DETAILDOC ?= $(INSTALLROOT)/docs
WD = $(shell pwd)
LIBRARYDIR = $(WD)/slsDetectorSoftware
LIBRARYRXRDIR = $(WD)/slsReceiverSoftware
CLIENTDIR = $(LIBRARYDIR)/slsDetectorClient
GUIDIR = $(WD)/slsDetectorGui
RECEIVERDIR = $(LIBRARYRXRDIR)
CALWIZDIR = $(WD)/calibrationWizards
MANDIR = $(WD)/manual
CALIBDIR = $(WD)/slsDetectorCalibration
MANAPIDIR = $(MANDIR)/manual-api
TABSPACE := "\t"
INCLUDES=-I. -I$(LIBRARYDIR)/commonFiles -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/slsDetectorUtils -I$(LIBRARYDIR)/slsDetectorCommand -I$(LIBRARYDIR)/slsDetectorAnalysis -I$(LIBRARYDIR)/slsReceiverInterface -I$(LIBRARYRXRDIR)/include -I$(LIBRARYDIR)/threadFiles -I$(LIBRARYDIR)/sharedMemory -I$(ASM)
INCLUDESRXR += -I. -I$(LIBRARYRXRDIR)/include -I$(CALIBDIR) -I$(ASM)
#LIBFLAGRXR +=
$(info )
$(info #######################################)
$(info # In slsDetectorsPackage Makefile #)
$(info #######################################)
$(info )
.PHONY: all nonstatic static lib libreceiver textclient receiver gui stextclient sreceiver
#all: lib textclient receiver gui
all: textclient receiver gui
nonstatic: lib libreceiver textclient receiver gui
static: lib libreceiver stextclient sreceiver gui
lib:
cd $(LIBRARYDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(LIBDIR)' LIBRARYDIR='$(LIBRARYDIR)' LIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)' LIBDIR='$(LIBDIR)'
libreceiver:
cd $(LIBRARYRXRDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(LIBDIR)' LIBS='$(LDFLAGRXR)' INCLUDES='$(INCLUDESRXR)' LIBDIR='$(LIBDIR)'
stextclient: slsDetectorClient_static
slsDetectorClient: textclient
slsDetectorClient_static: #lib
cd $(CLIENTDIR) && $(MAKE) static_clients FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBRARYDIR='$(LIBRARYDIR)' LIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)' LIBDIR='$(LIBDIR)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
textclient: #lib
cd $(CLIENTDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBRARYDIR='$(LIBRARYDIR)' LIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)' LIBDIR='$(LIBDIR)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
slsReceiver: receiver
slsReceiver_static: receiver
receiver: #libreceiver
# cd $(RECEIVERDIR) && $(MAKE) receiver FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBS='$(LDFLAGRXR)' INCLUDES='$(INCLUDESRXR)' LIBDIR='$(LIBDIR)'
cd $(RECEIVERDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBS='$(LDFLAGRXR)' INCLUDES='$(INCLUDESRXR)' LIBDIR='$(LIBDIR)'
cd $(MANAPIDIR) && $(MAKE) slsMultiReceiver
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
sreceiver: #libreceiver
cd $(RECEIVERDIR) && $(MAKE) static_receiver FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBS='$(LDFLAGRXR)' INCLUDES='$(INCLUDESRXR)' LIBDIR='$(LIBDIR)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
slsDetectorGUI: #lib
cd $(GUIDIR) && $(MAKE) DESTDIR='$(BINDIR)' LIBRARYDIR='$(LIBRARYDIR)' INCLUDES='$(INCLUDES)' LDFLAGDET='$(LDFLAGDETONLY)' LIBDIR='$(LIBDIR)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
calWiz:
cd $(CALWIZDIR) && $(MAKE) DESTDIR=$(BINDIR) #FLAGS=$(FLAGS) LDFLAGDET=$(LDFLAGDET) INCLUDES=$(INCLUDES)
gui: slsDetectorGUI
doc:
$(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR))
cd manual && make all DESTDIR=$(DOCDIR)
htmldoc:
make doc
$(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR))
cd manual && make html DESTDIR=$(DOCDIR)
detaildoc: createdocs docspdf docshtml removedocs
createdocs: $(LIBRARYDIR)/doxy.config
doxygen $(LIBRARYDIR)/doxy.config
docspdf:
cd slsDetectorPackageDocs/latex && make
$(shell test -d $(DETAILDOC) || mkdir -p $(DETAILDOC))
$(shell test -d $(DETAILDOC)/pdf || mkdir -p $(DETAILDOC)/pdf)
mv slsDetectorPackageDocs/latex/refman.pdf $(DETAILDOC)/pdf/slsDetectorPackageDocs.pdf
docshtml:
$(shell test -d $(DETAILDOC) || mkdir -p $(DETAILDOC))
$(shell test -d $(DETAILDOC)/html || mkdir -p $(DETAILDOC)/html)
$(shell test -d $(DETAILDOC)/html/slsDetectorPackageDocs && rm -r $(DETAILDOC)/html/slsDetectorPackageDocs)
mv slsDetectorPackageDocs/html $(DETAILDOC)/html/slsDetectorPackageDocs
removedocs:
rm -rf slsDetectorPackageDocs;
clean:
cd $(BINDIR) && rm -rf sls_detector_* slsDetectorGui slsReceiver angularCalibrationWizard energyCalibrationWizard
cd $(LIBDIR) && rm -rf libSlsDetector.so libSlsDetector.a libSlsReceiver.so libSlsReceiver.a
cd $(LIBRARYDIR) && $(MAKE) clean
cd $(LIBRARYRXRDIR) && $(MAKE) clean
cd $(CLIENTDIR) && $(MAKE) clean
cd $(GUIDIR) && $(MAKE) clean
cd $(CALWIZDIR) && $(MAKE) clean
cd manual && $(MAKE) clean
cd $(DOCDIR) && rm -rf *
rm -rf slsDetectorPackageDocs;
rm -rf $(DETAILDOC)
rm -rf $(MANAPIDIR)/slsMultiReceiver
#install_lib:
# cd $(LIBRARYDIR) && $(MAKE) install DESTDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
# cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR)
mythen_virtual:
cd $(LIBRARYDIR) && $(MAKE) mythenVirtualServer DESTDIR=$(BINDIR)
gotthard_virtual:
cd $(LIBRARYDIR) && $(MAKE) gotthardVirtualServer DESTDIR=$(BINDIR)
install_client: textclient slsReceiver
install_gui: gui
confinstall:
make conf;\
make install
install_lib:
make lib;\
make libreceiver; \
make textclient; \
make slsReceiver; \
make doc; \
make htmldoc; \
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR); \
cd $(LIBRARYRXRDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR);
install:
make install_lib; \
make gui; \
make calWiz; \
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR);\
cd $(LIBRARYRXRDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR);
conf:
set -e; \
. ./configure; \
@echo "INSTALLROOT is $(INSTALLROOT)"
@echo "BINDIR is $(BINDIR)"
@echo "LIBDIR is $(LIBDIR)"
@echo "INCDIR is $(INCDIR)"
@echo "DOCDIR is $(DOCDIR)"
help:
@echo "Targets:"
@echo "make all compile library, text clients, data reciever"
@echo "make lib compile library"
@echo "make libreceiver compile receiver library"
@echo "make textclient compile the slsDetectorClient dynamically linking the libraries"
@echo "make stextclient compile slsDetectorClient statically linking the libraries"
@echo "make receiver compile the slsReciever dynamically linking the libraries"
@echo "make sreceiver compile the slsReciever statically linking the libraries"
@echo "make gui compile slsDetectorGUI - requires a working Qt4 and Qwt installation"
@echo "make calWiz compile the calibration wizards - requires a working Root installation"
@echo "make doc compile pdf documentation"
@echo "make htmldoc compile html (and pdf) documentation"
@echo "make install_lib installs the libraries, the text clients, the documentation and the includes for the API"
@echo "make install installs all software, including the gui, the cal wizards and the includes for the API"
@echo "make confinstall installs all software, including the gui, the cal wizards and the includes for the API, prompting for the install paths"
@echo "make clean remove object files and executables"
@echo "make help lists possible targets"
@echo ""
@echo ""
@echo "Makefile variables"
@echo "DEBUG=1,2 set debug level to 1 (VERBOSE) or 2 (VERYVERBOSE)"
@echo ""
@echo ""
@echo "Variables - to change them run <source configure> :"
@echo "INSTALLROOT=<yourdir>: installation root di r, default $PWD"
@echo "BINDIR=<yourbin>: binary installation dir below INSTALLROOT, default bin"
@echo "LIBDIR=<yourlib>: library installation dir below INSTALLROOT, default lib"
@echo "INCDIR=<yourincludes>: header installation dir below INSTALLROOT, default include"
@echo "DOCDIR=<yourdoc>: documentation installation dir below INSTALLROOT, default doc"

View File

@ -1,58 +0,0 @@
##############################################################
# Generic
##############################################################
CC = g++
CXX = $(CC)
ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
LDFLAGDETONLY = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector
LDFLAGDET = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread
LDFLAGRXR = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread
FLAGS= -Wall -pthread #-DEIGER_DEBUG2
# -DVERBOSE
# Setting up the verbose flags
ifeq ($(DEBUG),1)
FLAGS = -Wall -DVERBOSE
endif
ifeq ($(DEBUG),2)
FLAGS = -Wall -DVERYVERBOSE
endif
##############################################################
# HDF5 specific. Set this to yes, if you want to compile
# HDF5 code: in this case, you need HDF5 libraries
##############################################################
HDF5 = no
HDF5_DIR = /opt/hdf5v1.10.0
ifeq ($(HDF5),yes)
LDFLAGRXR = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L$(HDF5_DIR)/lib -Wl,-rpath=$(HDF5_DIR)/lib -lhdf5 -lhdf5_cpp -lsz -lz -DHDF5C -L/usr/lib64/ -pthread
INCLUDESRXR = -I$(HDF5_DIR)/include
endif
##############################################################
# ROOTSLS specific. Set this to yes, if you want to compile
# ROOTSLS code: in this case, you need also root libraries
##############################################################
ROOTSLS = no
ROOTFLAGS = $(shell root-config --cflags --glibs) -DMYROOT1 #-DALLFILE_DEBUG #-DMYROOT1
ifeq ($(ROOTSLS),yes)
LDFLAGRXR = -L$(LIBDIR) -lSlsReceiver $(ROOTFLAGS) -DROOTSLS
endif
define colorecho
@tput setaf 6
@echo $1
@tput sgr0
endef

0
README.md Normal file → Executable file
View File

215
RELEASE.txt Normal file → Executable file
View File

@ -1,215 +0,0 @@
SLS Detector Package 4.2.0 released on 09.04.2020 (Minor Release)
===================================================================
This document describes the differences between 4.2.0 and 4.1.1 releases.
CONTENTS
--------
1. Topics Concerning
2. New Features
3. Resolved Issues
4. Firmware Requirements
5. Download, Documentation & Support
1. Topics Concerning
====================
- (Eiger) Additional status: Transmitting
- (Eiger) Default vcal dac value
- (Eiger) Default readout mode
- (Eiger) Dynamic range change effect on clock divider
- (Eiger) Deactivate a module
- (Eiger) Setting all trimbits argument check
- (Receiver) performance (memory allocation and alignment, file buffering)
- (Receiver) Eiger: Different rx_fifodepth defaults
- (Receiver) rx_fifodepth has a higher range
- (Receiver) subperiod in master file
- (Package) Removed warnings including memory overlap copy
- (Users) Added setflippeddatax to users class
- (Zmq) Client data streaming fix (Client data call back)
Compared to 4.1.1,
- no firmware update required for this release
- eiger on-board detector server update required for this release
2. New Features
===============
Receiver
--------
1. Memory in receiver is now byte aligned and write to every page
at memory allocation to ensure complete memory allocated right
from start. Removed file buffering when writing to file. Replaced
pausing on keepRunning variable with semaphore to reduce cpu
load.
2. (Eiger) Default rx_fifodepth for 32 bit mode is 100, but 1000
for other modes. Changing dynamic range will now change bit mode to
their defaults.
Client
------
1. Added setflippeddatax to users class.
Detector Server (Eiger)
-----------------------
1. Transmitting Status: After acquiring, if the detector is still
streaming out data, then the status is Trasnmitting
(command line: 'data'). Only after this process, will it become idle.
Previously, sls_detector_acquire waited for end of data streaming
before returning. It will continue to do so.
3. Resolved Issues
==================
Detector Server (Eiger)
-----------------------
1. Vcal dac set to 0 at on-board detector server start up to
reduce noise.
2. Default Readout mode set to Parallel instead of Non parallel.
3. Dynamic range 4, 8 or 16 changes the clock divider to full speed,
whereas dynamic range of 32 still changes the clock divider to
quarter speed. So, default is dynamic range of 16 and full speed
at detector server start up.
4. Setting activate to 0 sent to both control and stop server.
So, deactivate a module can be done even if FEB communication fails.
Restarting the server will activate the module again.
5. Verification included for input of setting all trimbits values.
Valid input is 0 - 63.
Receiver
--------
1. Earlier, setting rx_fifodepth to a high value would set to
a lower value, printing this low value to console,
but not giving an error. Memory allocated can now take in 64 bits.
2. Modifying subexptime now also updates subperiod in master file.
Also, the print for subperiod name to console is corrected.
Package
-------
1. Many warnings have been fixed, including those with overlapping
memory copies for source and destination.
Client
------
1. Each time client data streaming was enabled to receive, it
creates zmq sockets without checking if they were already created.
This is fixed now.
4. Firmware Requirements
========================
Gotthard
========
Minimum compatible version : 11.01.2013
Latest compatible version : 08.02.2018 (50um and 25um Master)
09.02.2018 (25 um Slave)
Eiger
=====
Minimum compatible version : 24
Latest compatible version : 24
Jungfrau
========
Minimum compatible version : 26.02.2018
Latest compatible version : 06.12.2018
Detector Upgrade
================
Gotthard Cannot be upgraded remotely. Requires programming via USB blaster
Eiger Can be upgraded remotely via bit files
Jungfrau Can be upgraded remotely using sls_detector_put programfpga <pof>
Instructions available at
https://slsdetectorgroup.github.io/slsDetectorPackage/docs/html/slsDetectorInstall/GOTTHARD_Firmware.html
https://slsdetectorgroup.github.io/slsDetectorPackage/docs/html/slsDetectorInstall/EIGER_Firmware.html
https://slsdetectorgroup.github.io/slsDetectorPackage/docs/html/slsDetectorInstall/JUNGFRAU_Firmware.html
Please refer to the link below for more details on the firmware versions.
https://www.psi.ch/en/detectors/firmware
5. Download, Documentation & Support
====================================
Download
--------
The Source Code (Default C++ API):
https://github.com/slsdetectorgroup/slsDetectorPackage
The Conda Lib Package:
https://github.com/slsdetectorgroup/sls_detector_lib
The Conda GUI Package:
https://github.com/slsdetectorgroup/sls_detector_gui
The Python Interface (including the package):
https://github.com/slsdetectorgroup/sls_detector
Documentation
-------------
Manual (HTML & PDF):
https://www.psi.ch/en/detectors/documentation
slsDetectorPackage/manual/docs/
Command Line Documentation:
https://slsdetectorgroup.github.io/slsDetectorPackage/docs/html/slsDetectorClientDocs/index.html
https://slsdetectorgroup.github.io/slsDetectorPackage/docs/pdf/slsDetectorClientDocs.pdf
manual/docs/html/slsDetectorClientDocs/index.html
manual/docs/pdf/slsDetectorClientDocs.pdf
C++ API Documentation:
https://slsdetectorgroup.github.io/slsDetectorPackage/docs/html/slsDetectorUsersDocs/index.html
https://slsdetectorgroup.github.io/slsDetectorPackage/docs/pdf/slsDetectorUsersDocs.pdf
manual/docs/html/slsDetectorUsersDocs/index.html
manual/docs/pdf/slsDetectorUsersDocs.pdf
C++ API Example:
https://slsdetectorgroup.github.io/slsDetectorPackage/exampleCode/slsDetectorUsersExample/index.html
manual/manual-api/mainClient.cpp
manual/manual-api/mainReceiver.cpp
Python API Documentation:
https://slsdetectorgroup.github.io/sls_detector/
TroubleShotting:
https://www.psi.ch/en/detectors/troubleshooting
Further Documentation:
https://www.psi.ch/en/detectors/users-support
Support
-------
dhanya.thattil@psi.ch
erik.frojdh@psi.ch
anna.bergamaschi@psi.ch

View File

@ -1 +0,0 @@
rm /dev/shm/slsDetectorPackage*;

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

11
cmake/FindSphinx.cmake Normal file
View File

@ -0,0 +1,11 @@
#Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Path to sphinx-build executable")
include(FindPackageHandleStandardArgs)
#Handle standard arguments to find_package like REQUIRED and QUIET
find_package_handle_standard_args(Sphinx
"Failed to find sphinx-build executable"
SPHINX_EXECUTABLE)

112
cmake/FindZeroMQ.cmake Executable file
View File

@ -0,0 +1,112 @@
# This file is originally from https://github.com/zeromq/azmq and distributed
# under Boost Software Lincese 1.0
# Boost Software License - Version 1.0 - August 17th, 2003
# Permission is hereby granted, free of charge, to any person or organization
# obtaining a copy of the software and accompanying documentation covered by
# this license (the "Software") to use, reproduce, display, distribute,
# execute, and transmit the Software, and to prepare derivative works of the
# Software, and to permit third-parties to whom the Software is furnished to
# do so, all subject to the following:
# The copyright notices in the Software and this entire statement, including
# the above license grant, this restriction and the following disclaimer,
# must be included in all copies of the Software, in whole or in part, and
# all derivative works of the Software, unless such copies or derivative
# works are solely in the form of machine-executable object code generated by
# a source language processor.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
# SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
# FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# --------------------------------------------------------------------------------
# Find ZeroMQ Headers/Libs
# Variables
# ZMQ_ROOT - set this to a location where ZeroMQ may be found
#
# ZeroMQ_FOUND - True of ZeroMQ found
# ZeroMQ_INCLUDE_DIRS - Location of ZeroMQ includes
# ZeroMQ_LIBRARIES - ZeroMQ libraries
include(FindPackageHandleStandardArgs)
if (NOT ZMQ_ROOT)
set(ZMQ_ROOT "$ENV{ZMQ_ROOT}")
endif()
if (NOT ZMQ_ROOT)
find_path(_ZeroMQ_ROOT NAMES include/zmq.h)
else()
set(_ZeroMQ_ROOT "${ZMQ_ROOT}")
endif()
find_path(ZeroMQ_INCLUDE_DIRS NAMES zmq.h HINTS ${_ZeroMQ_ROOT}/include)
if (ZeroMQ_INCLUDE_DIRS)
set(_ZeroMQ_H ${ZeroMQ_INCLUDE_DIRS}/zmq.h)
function(_zmqver_EXTRACT _ZeroMQ_VER_COMPONENT _ZeroMQ_VER_OUTPUT)
set(CMAKE_MATCH_1 "0")
set(_ZeroMQ_expr "^[ \\t]*#define[ \\t]+${_ZeroMQ_VER_COMPONENT}[ \\t]+([0-9]+)$")
file(STRINGS "${_ZeroMQ_H}" _ZeroMQ_ver REGEX "${_ZeroMQ_expr}")
string(REGEX MATCH "${_ZeroMQ_expr}" ZeroMQ_ver "${_ZeroMQ_ver}")
set(${_ZeroMQ_VER_OUTPUT} "${CMAKE_MATCH_1}" PARENT_SCOPE)
endfunction()
_zmqver_EXTRACT("ZMQ_VERSION_MAJOR" ZeroMQ_VERSION_MAJOR)
_zmqver_EXTRACT("ZMQ_VERSION_MINOR" ZeroMQ_VERSION_MINOR)
_zmqver_EXTRACT("ZMQ_VERSION_PATCH" ZeroMQ_VERSION_PATCH)
message(STATUS "ZeroMQ version: ${ZeroMQ_VERSION_MAJOR}.${ZeroMQ_VERSION_MINOR}.${ZeroMQ_VERSION_PATCH}")
# We should provide version to find_package_handle_standard_args in the same format as it was requested,
# otherwise it can't check whether version matches exactly.
if (ZeroMQ_FIND_VERSION_COUNT GREATER 2)
set(ZeroMQ_VERSION "${ZeroMQ_VERSION_MAJOR}.${ZeroMQ_VERSION_MINOR}.${ZeroMQ_VERSION_PATCH}")
else()
# User has requested ZeroMQ version without patch part => user is not interested in specific patch =>
# any patch should be an exact match.
set(ZeroMQ_VERSION "${ZeroMQ_VERSION_MAJOR}.${ZeroMQ_VERSION_MINOR}")
endif()
if (NOT ${CMAKE_CXX_PLATFORM_ID} STREQUAL "Windows")
find_library(ZeroMQ_LIBRARIES NAMES zmq HINTS ${_ZeroMQ_ROOT}/lib)
else()
find_library(
ZeroMQ_LIBRARY_RELEASE
NAMES
libzmq
"libzmq-${CMAKE_VS_PLATFORM_TOOLSET}-mt-${ZeroMQ_VERSION_MAJOR}_${ZeroMQ_VERSION_MINOR}_${ZeroMQ_VERSION_PATCH}"
HINTS
${_ZeroMQ_ROOT}/lib
)
find_library(
ZeroMQ_LIBRARY_DEBUG
NAMES
libzmq_d
"libzmq-${CMAKE_VS_PLATFORM_TOOLSET}-mt-gd-${ZeroMQ_VERSION_MAJOR}_${ZeroMQ_VERSION_MINOR}_${ZeroMQ_VERSION_PATCH}"
HINTS
${_ZeroMQ_ROOT}/lib)
# On Windows we have to use corresponding version (i.e. Release or Debug) of ZeroMQ because of `errno` CRT global variable
# See more at http://www.drdobbs.com/avoiding-the-visual-c-runtime-library/184416623
set(ZeroMQ_LIBRARIES optimized "${ZeroMQ_LIBRARY_RELEASE}" debug "${ZeroMQ_LIBRARY_DEBUG}")
endif()
endif()
find_package_handle_standard_args(ZeroMQ FOUND_VAR ZeroMQ_FOUND
REQUIRED_VARS ZeroMQ_INCLUDE_DIRS ZeroMQ_LIBRARIES
VERSION_VAR ZeroMQ_VERSION)
if (ZeroMQ_FOUND)
mark_as_advanced(ZeroMQ_INCLUDE_DIRS ZeroMQ_LIBRARIES ZeroMQ_VERSION
ZeroMQ_VERSION_MAJOR ZeroMQ_VERSION_MINOR ZeroMQ_VERSION_PATCH)
endif()

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()

31
cmake/package_config.cmake Executable file
View File

@ -0,0 +1,31 @@
# This cmake code creates the configuration that is found and used by
# find_package() of another cmake project
# get lower and upper case project name for the configuration files
# configure and install the configuration files
include(CMakePackageConfigHelpers)
configure_package_config_file(
"${CMAKE_SOURCE_DIR}/cmake/project-config.cmake.in"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER}
PATH_VARS CMAKE_INSTALL_DIR)
write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)
install(FILES
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
COMPONENT devel
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER})
if (PROJECT_LIBRARIES OR PROJECT_STATIC_LIBRARIES)
install(
EXPORT "${TARGETS_EXPORT_NAME}"
FILE ${PROJECT_NAME_LOWER}-targets.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER})
endif ()

24
cmake/project-config.cmake.in Executable file
View File

@ -0,0 +1,24 @@
# Config file for @PROJECT_NAME_LOWER@
#
# It defines the following variables:
#
# @PROJECT_NAME_UPPER@_INCLUDE_DIRS - include directory
# @PROJECT_NAME_UPPER@_LIBRARIES - all dynamic libraries
# @PROJECT_NAME_UPPER@_STATIC_LIBRARIES - all static libraries
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
set(SLS_USE_HDF5 "@SLS_USE_HDF5@")
# Add optional dependencies here
find_dependency(Threads)
if (SLS_USE_HDF5)
find_dependency(HDF5)
endif ()
set_and_check(@PROJECT_NAME_UPPER@_CMAKE_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_DIR@")
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")

14
cmake/project_version.cc.in Executable file
View File

@ -0,0 +1,14 @@
#include "project_version.h"
/// project version as major.minor.patch string
const char* @PROJECT_NAME@_runtime_project_version(){ return "@PROJECT_VERSION@"; }
/// package version as string, possibly with git commit: v1.2.3+4+g56789abc
const char* @PROJECT_NAME@_runtime_package_version(){ return "@PACKAGE_VERSION@"; }
/// project version as integer: major * 10000 + minor * 100 + patch
int @PROJECT_NAME@_runtime_version_int() { return @PROJECT_VERSION_INT@; }
/// project version as integer: major
int @PROJECT_NAME@_runtime_version_major(){ return @PACKAGE_VERSION_MAJOR@; }
/// project version as integer: minor
int @PROJECT_NAME@_runtime_version_minor(){ return @PACKAGE_VERSION_MINOR@; }
/// project version as integer: patch
int @PROJECT_NAME@_runtime_version_patch(){ return @PACKAGE_VERSION_PATCH@; }

154
cmake/project_version.cmake Executable file
View File

@ -0,0 +1,154 @@
#
# Sets PROJECT_VERSION and PACKAGE_VERSION
#
# Don't set PROJECT_VERSION to empty string when no VERSION is given to project() command.
#if(POLICY CMP0048)
# cmake_policy(SET CMP0048 OLD)
#endif()
# Split a version number into separate components
# version the version number to split
# major variable name to store the major version in
# minor variable name to store the minor version in
# patch variable name to store the patch version in
# extra variable name to store a version suffix in
function(version_split version major minor patch extra)
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)?" version_valid ${version})
if(version_valid)
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)?" "\\1;\\2;\\3;\\4" VERSION_MATCHES ${version})
list(GET VERSION_MATCHES 0 version_major)
set(${major} ${version_major} PARENT_SCOPE)
list(GET VERSION_MATCHES 1 version_minor)
set(${minor} ${version_minor} PARENT_SCOPE)
list(GET VERSION_MATCHES 2 version_patch)
set(${patch} ${version_patch} PARENT_SCOPE)
list(GET VERSION_MATCHES 3 version_extra)
set(${extra} ${version_extra} PARENT_SCOPE)
else(version_valid)
message(AUTHOR_WARNING "Bad version ${version}; falling back to 0 (have you made an initial release?)")
set(${major} "0" PARENT_SCOPE)
set(${minor} "0" PARENT_SCOPE)
set(${patch} "0" PARENT_SCOPE)
set(${extra} "" PARENT_SCOPE)
endif(version_valid)
endfunction(version_split)
##############################
# get PROJECT_VERSION from git
##############################
find_program(GIT_CMD git)
mark_as_advanced(GIT_CMD)
if (GIT_CMD)
execute_process(COMMAND ${GIT_CMD} rev-parse --show-toplevel
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_TOPLEVEL
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if (GIT_CMD AND NOT "${GIT_TOPLEVEL}" STREQUAL "")
execute_process(COMMAND ${GIT_CMD} rev-parse --short HEAD
WORKING_DIRECTORY ${GIT_TOPLEVEL}
OUTPUT_VARIABLE GIT_SHA1
OUTPUT_STRIP_TRAILING_WHITESPACE)
#message(STATUS "GIT_SHA1: " ${GIT_SHA1})
execute_process(COMMAND ${GIT_CMD} describe --match "*[0-9].[0-9]*" HEAD
WORKING_DIRECTORY ${GIT_TOPLEVEL}
OUTPUT_VARIABLE GIT_DESCRIBE
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})
# # 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
if (EXISTS "${PROJECT_SOURCE_DIR}/package.xml")
file(STRINGS "${PROJECT_SOURCE_DIR}/package.xml" PACKAGE_XML_VERSION_LINE REGEX <version>[0-9.]*</version>)
string(REGEX REPLACE .*<version>\([0-9.]*\)</version>.* \\1 PACKAGE_XML_VERSION "${PACKAGE_XML_VERSION_LINE}")
MESSAGE(STATUS "PACKAGE_XML_VERSION: " ${PACKAGE_XML_VERSION})
endif ()
# set version (if not already manually specified)
# check versions from different sources and set actually used version
if (NOT PROJECT_VERSION)
# set PROJECT_VERSION to MAJOR.MINOR.PATCH
# PACKAGE_VERSION can have extra info
if (GIT_VERSION)
set(PROJECT_VERSION ${GIT_VERSION})
set(PACKAGE_VERSION ${GIT_FULL_VERSION})
elseif (PACKAGE_XML_VERSION)
set(PROJECT_VERSION ${PACKAGE_XML_VERSION})
set(PACKAGE_VERSION ${PROJECT_VERSION})
else ()
message(WARNING "PROJECT_VERSION not set. Defaulting to 0.0.0")
set(PROJECT_VERSION "0.0.0")
endif ()
endif ()
# if (NOT PACKAGE_VERSION)
# message(WARNING "PACKAGE_VERSION not set! Falling back to (${PROJECT_VERSION})")
set(PACKAGE_VERSION ${PROJECT_VERSION})
# endif ()
# warn if versions don't match
if (GIT_VERSION AND NOT GIT_VERSION MATCHES ${PROJECT_VERSION})
message(WARNING "Version from git (${GIT_VERSION}) doesn't match PROJECT_VERSION (${PROJECT_VERSION})")
endif()
if (PACKAGE_XML_VERSION AND NOT PACKAGE_XML_VERSION MATCHES ${PROJECT_VERSION})
message(WARNING "Version from package.xml (${PACKAGE_XML_VERSION}) doesn't match PROJECT_VERSION (${PROJECT_VERSION})")
endif()
message(STATUS "PROJECT_VERSION: " ${PROJECT_VERSION})
message(STATUS "PACKAGE_VERSION: " ${PACKAGE_VERSION})
version_split(${PROJECT_VERSION} PACKAGE_VERSION_MAJOR PACKAGE_VERSION_MINOR PACKAGE_VERSION_PATCH extra)
#message(STATUS "PACKAGE_VERSION_MAJOR: " ${PACKAGE_VERSION_MAJOR})
#message(STATUS "PACKAGE_VERSION_MINOR: " ${PACKAGE_VERSION_MINOR})
#message(STATUS "PACKAGE_VERSION_PATCH: " ${PACKAGE_VERSION_PATCH})
# generate an integer version number: major * 10000 + minor * 100 + patch
math(EXPR PROJECT_VERSION_INT "${PACKAGE_VERSION_MAJOR} * 10000 + ${PACKAGE_VERSION_MINOR} * 100 + ${PACKAGE_VERSION_PATCH}")
# make PROJECT_VERSION available as define in the project source
#add_definitions(-DPROJECT_VERSION="${PROJECT_VERSION}")
#add_definitions(-DPROJECT_VERSION_INT=${PROJECT_VERSION_INT})
#add_definitions(-DPACKAGE_VERSION="${PACKAGE_VERSION}")
#add_definitions(-DPACKAGE_VERSION_MAJOR=${PACKAGE_VERSION_MAJOR})
#add_definitions(-DPACKAGE_VERSION_MINOR=${PACKAGE_VERSION_MINOR})
#add_definitions(-DPACKAGE_VERSION_PATCH=${PACKAGE_VERSION_PATCH})
# set ABI version to major.minor, which will be used for the SOVERSION
set(abiversion "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
# generate a version.h file in the binary output dir, don't forget to install it...
string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPER)
# These files provide compile-time and runtime version information about your project.
# To offer the version info to the users of your library, you need to
# adapt the following lines in your respective CMakeLists.txt:
# add_library(<yourlibraryname> SHARED <your code files> ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/project_version.cc)
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/project_version.h COMPONENT dev DESTINATION include/<your-include-dir>)
# To use it within your library or tests you need to add the include directory:
# > target_include_directories(yourtarget PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME})
configure_file(${CMAKE_CURRENT_LIST_DIR}/project_version.h.in ${PROJECT_NAME}/project_version.h @ONLY)
configure_file(${CMAKE_CURRENT_LIST_DIR}/project_version.cc.in ${PROJECT_NAME}/project_version.cc @ONLY)

34
cmake/project_version.h.in Executable file
View File

@ -0,0 +1,34 @@
#ifndef @PROJECT_NAME_UPPER@_VERSION_H_
#define @PROJECT_NAME_UPPER@_VERSION_H_
/// project version as major.minor.patch string
#define @PROJECT_NAME_UPPER@_VERSION "@PROJECT_VERSION@"
/// project version as integer: major * 10000 + minor * 100 + patch
#define @PROJECT_NAME_UPPER@_VERSION_INT @PROJECT_VERSION_INT@
#define @PROJECT_NAME_UPPER@_VERSION_MAJOR @PACKAGE_VERSION_MAJOR@
#define @PROJECT_NAME_UPPER@_VERSION_MINOR @PACKAGE_VERSION_MINOR@
#define @PROJECT_NAME_UPPER@_VERSION_PATCH @PACKAGE_VERSION_PATCH@
/// package version as string, possibly with git commit: v1.2.3+4+g56789abc
#define @PROJECT_NAME_UPPER@_PACKAGE_VERSION "@PACKAGE_VERSION@"
///runtime versions, where the above values are linked into a lib and therefore reflect the version
///of the library itself (not the version of the header at compile time of the user code)
const char* @PROJECT_NAME@_runtime_project_version();
const char* @PROJECT_NAME@_runtime_package_version();
int @PROJECT_NAME@_runtime_version_int();
int @PROJECT_NAME@_runtime_version_major();
int @PROJECT_NAME@_runtime_version_minor();
int @PROJECT_NAME@_runtime_version_patch();
///Check consistency of runtime vs compile-time version number. I.e. the header used
///for compilation was from the same version as the linked library.
inline bool @PROJECT_NAME@_check_version_consistency(bool major_minor_only)
{
return @PROJECT_NAME@_runtime_version_major() == @PROJECT_NAME_UPPER@_VERSION_MAJOR &&
@PROJECT_NAME@_runtime_version_minor() == @PROJECT_NAME_UPPER@_VERSION_MINOR &&
(major_minor_only ||
@PROJECT_NAME@_runtime_version_patch() == @PROJECT_NAME_UPPER@_VERSION_PATCH);
}
#endif

85
cmk.sh
View File

@ -7,6 +7,10 @@ TEXTCLIENT=0
RECEIVER=0
GUI=0
DEBUG=0
PYTHON=0
TESTS=0
SIMULATOR=0
CTBGUI=0
CLEAN=0
@ -15,17 +19,27 @@ 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] [s] [u] [i] [-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
-r: Build/Rebuilds only receiver
-g: Build/Rebuilds only gui
-s: Simulator
-u: Chip Test Gui
-j: Number of threads to compile through
-e: Debug mode
-i: Builds tests
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 +69,16 @@ For rebuilding only certain sections
" ; exit 1; }
while getopts ":bchd:j:trge" opt ; do
while getopts ":bpchd:j:trgeisu" opt ; do
case $opt in
b)
echo "Building of CMake files Required"
REBUILD=1
CLEAN=1
;;
p)
echo "Compiling Options: Python"
PYTHON=1
REBUILD=1
;;
c)
echo "Clean Required"
@ -70,7 +88,6 @@ while getopts ":bchd:j:trge" opt ; do
echo "Building of CMake files with HDF5 option Required"
HDF5=1
REBUILD=1
CLEAN=1
;;
d)
echo "New HDF5 directory: $OPTARG"
@ -84,24 +101,33 @@ while getopts ":bchd:j:trge" opt ; do
echo "Compiling Options: Text Client"
TEXTCLIENT=1
REBUILD=1
CLEAN=1
;;
r)
echo "Compiling Options: Receiver"
RECEIVER=1
REBUILD=1
CLEAN=1
;;
g)
echo "Compiling Options: GUI"
GUI=1
REBUILD=1
CLEAN=1
;;
e)
echo "Compiling Options: Debug"
DEBUG=1
;;
i)
echo "Compiling Options: Tests"
TESTS=1
;;
s)
echo "Compiling Options: Simulator"
SIMULATOR=1
;;
u)
echo "Compiling Options: Chip Test Gui"
CTBGUI=1
;;
\?)
echo "Invalid option: -$OPTARG"
usage
@ -116,26 +142,29 @@ 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 "
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"
CMAKE_POST+=" -DSLS_USE_TEXTCLIENT=ON -DSLS_USE_RECEIVER=OFF "
echo "Enabling Compile Option: TextClient"
fi
if [ $RECEIVER -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_RECEIVER=ON "
echo "Compile Option: Receiver"
echo "Enabling Compile Option: Receiver"
fi
if [ $GUI -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_GUI=ON "
echo "Compile Option: GUI"
echo "Enabling Compile Option: GUI"
fi
fi
@ -159,13 +188,33 @@ 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
#Simulator
if [ $SIMULATOR -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_SIMULATOR=ON "
echo "Simulator Option enabled"
fi
#Chip Test Gui
if [ $CTBGUI -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_CTBGUI=ON "
echo "CTB Gui Option enabled"
fi
#Tests
if [ $TESTS -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_TESTS=ON -DSLS_USE_INTEGRATION_TESTS=ON"
echo "Tests 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
@ -182,7 +231,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

View File

@ -1,15 +0,0 @@
sh updateSvnVersion.sh
cd slsDetectorGui
git commit -a -m "updating versions"
git push origin developer:developer
cd ../slsDetectorSoftware
git commit -a -m "updating versions"
git push origin developer:developer
cd ../slsReceiverSoftware
git commit -a -m "updating versions"
git push origin developer:developer
cd ..

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

@ -6,10 +6,14 @@ cmake .. \
-DCMAKE_INSTALL_PREFIX=install \
-DSLS_USE_TEXTCLIENT=ON \
-DSLS_USE_RECEIVER=ON \
-DSLS_USE_GUI=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
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
recipe/copy_gui.sh → conda-recepie/copy_gui.sh Normal file → Executable file
View File

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

@ -6,9 +6,8 @@ mkdir $PREFIX/include/slsDetectorPackage
#Shared and static libraries
cp build/bin/libSlsDetector.so $PREFIX/lib/.
# cp build/bin/libSlsDetector.a $PREFIX/lib/.
cp build/bin/libSlsReceiver.so $PREFIX/lib/.
# cp build/bin/libSlsReceiver.a $PREFIX/lib/.
cp build/bin/libSlsSupport.so $PREFIX/lib/.
#Binaries
cp build/bin/sls_detector_acquire $PREFIX/bin/.

120
conda-recepie/meta.yaml Executable file
View File

@ -0,0 +1,120 @@
package:
name: sls_detector_software
version: "developer"
source:
- path: ..
build:
number: 1
rpaths:
- lib/
requirements:
build:
- {{ compiler('c') }}
- {{compiler('cxx')}}
- cmake
# - qwt 6.* #require qt5 investigate befor activating gui
# - qt=4.8.7=7
- zeromq=4.2.5=hfc679d8_5
- pyzmq
- xorg-libx11
- xorg-libice
- xorg-libxext
- xorg-libsm
- xorg-libxau
- xorg-libxrender
- xorg-libxfixes
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
host:
- libstdcxx-ng
- libgcc-ng
- xorg-libx11
- xorg-libice
- xorg-libxext
- xorg-libsm
- xorg-libxau
- xorg-libxrender
- xorg-libxfixes
run:
- libstdcxx-ng
- libgcc-ng
outputs:
- name: sls_detector_lib
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.4
host:
- python
- pybind11 2.4
- pyzmq
- sls_detector_lib
- libstdcxx-ng
- libgcc-ng
run:
- python
- numpy
- sls_detector_lib=developer
- pyzmq
- libstdcxx-ng
- libgcc-ng
test:
imports:
- sls_detector
# requirements:
# build:
# - {{ compiler('c') }}
# - {{compiler('cxx')}}
# - name: sls_detector_gui
# version: "refactor"
# script: copy_gui.sh
# requirements:
# build:
# - {{ compiler('c') }}
# - {{compiler('cxx')}}
# - cmake
# - qwt 6.*
# - qt=4.8.7=7
# - zeromq=4.2.5=hfc679d8_5
# - pyzmq
# - xorg-libx11
# - xorg-libice
# - xorg-libxext
# - xorg-libsm
# - xorg-libxau
# - xorg-libxrender
# - xorg-libxfixes
# - {{ cdt('mesa-libgl-devel') }} # [linux]
# - {{ cdt('mesa-libegl-devel') }} # [linux]
# - {{ cdt('mesa-dri-drivers') }} # [linux]
# - {{ cdt('libselinux') }} # [linux]
# - {{ cdt('libxdamage') }} # [linux]
# - {{ cdt('libxxf86vm') }} # [linux]
# run:
# - sls_detector_lib=refactor
# - qwt 6.*
# - qt=4.8.7=7

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

83
ctbGui/CMakeLists.txt Normal file
View File

@ -0,0 +1,83 @@
find_package(ROOT CONFIG REQUIRED COMPONENTS Core Gui)
find_package(TIFF REQUIRED)
target_include_directories(ROOT::Core INTERFACE "${ROOT_INCLUDE_DIRS}")
add_library(ROOT::Flags_CXX IMPORTED INTERFACE)
separate_arguments(ROOT_CXX_FLAGS)
target_compile_options(ROOT::Flags_CXX INTERFACE ${ROOT_CXX_FLAGS})
separate_arguments(ROOT_DEFINITIONS)
target_compile_definitions(ROOT::Flags_CXX INTERFACE ${ROOT_DEFINITIONS})
# This fixes a bug in the linker flags
string(REPLACE "-L " "-L" ROOT_EXE_LINKER_FLAGS "${ROOT_EXE_LINKER_FLAGS}")
separate_arguments(ROOT_EXE_LINKER_FLAGS)
# Stuck into using old property method due to separate -L and -l arguments
# (A full path to -l is better!)
set_property(TARGET ROOT::Flags_CXX PROPERTY
INTERFACE_LINK_LIBRARIES ${ROOT_EXE_LINKER_FLAGS})
set_property(TARGET ROOT::Core PROPERTY
INTERFACE_INCLUDE_DIRECTORIES "${ROOT_INCLUDE_DIRS}")
add_executable(ctbGui
ctbGui.cpp
ctbMain.cpp
ctbDacs.cpp
ctbPowers.cpp
ctbSlowAdcs.cpp
ctbSignals.cpp
ctbAdcs.cpp
ctbPattern.cpp
ctbAcquisition.cpp
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/tiffIO.cpp
)
#TODO! Replace with target
target_include_directories(ctbGui PRIVATE
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/dataStructures
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/interpolations
${CMAKE_SOURCE_DIR}/slsDetectorCalibration/
)
# Headders needed for ROOT dictionary generation
set( HEADERS
ctbDefs.h
ctbMain.h
ctbDacs.h
ctbPattern.h
ctbSignals.h
ctbAdcs.h
ctbAcquisition.h
ctbPowers.h
ctbSlowAdcs.h
)
#set(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# ROOT dictionary generation
include("${ROOT_DIR}/modules/RootNewMacros.cmake")
root_generate_dictionary(ctbDict ${HEADERS} LINKDEF ctbLinkDef.h)
add_library(ctbRootLib SHARED ctbDict.cxx)
target_include_directories(ctbRootLib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(ctbRootLib PUBLIC
ROOT::Core
slsDetectorShared
slsSupportLib
${ROOT_LIBRARIES}
${ROOT_EXE_LINKER_FLAGS}
)
target_link_libraries(ctbGui PUBLIC
slsDetectorShared
slsSupportLib
ctbRootLib
${TIFF_LIBRARIES}
)
set_target_properties(ctbGui PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)

44
ctbGui/Makefile.root5 Normal file
View File

@ -0,0 +1,44 @@
INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h
SRC= $(INCS:.h=.cpp) ctbDict.cpp
LINKDEF=ctbLinkDef.h
ZMQLIB=../slsReceiverSoftware/include
LIBRARYCBF=$(CBFLIBDIR)/lib/*.o
INCDIR=-I../slsReceiverSoftware/include/ -I../slsDetectorSoftware/include/ -I../slsSupportLib/include/ -I../slsDetectorCalibration -I../slsDetectorCalibration/dataStructures -I$(CBFLIBDIR)/include -I../slsDetectorCalibration/interpolations
LDFLAG=-L../build/bin -lSlsDetector -lSlsSupport -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -L$(ZMQLIB) -L$(CBFLIBDIR)/lib/ -std=c++11
#
MAIN=ctbGui.cpp
DESTDIR?=../build/bin
OBJS = $(SRC:.cpp=.o) $(MAIN:.cpp=.o)
all: $(DESTDIR)/ctbGui
doc:
cd manual && make DESTDIR=$(DESTDIR)
htmldoc:
cd manual && make html DESTDIR=$(DESTDIR)
ctbDict.cpp: $(INCS) $(LINKDEF)
rootcint -f ctbDict.cpp -c $(INCS) $(LINKDEF)
%.o : %.cpp
echo $@
g++ -DMYROOT `root-config --cflags --glibs` -lMinuit -DCTB $(LDFLAG) -o $@ -c $< $(INCDIR)
#$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -lpthread #$(FLAGS)
$(DESTDIR)/ctbGui: $(OBJS) $(LINKDEF)
g++ -DMYROOT `root-config --cflags --glibs` -lMinuit -DCTB $(LDFLAG) -o ctbGui $(INCDIR) $(OBJS) ../slsDetectorCalibration/tiffIO.cpp
mv ctbGui $(DESTDIR)
clean:
rm -f $(DESTDIR)/ctbGui *.o ctbDict.* $(OBJS)

46
ctbGui/Makefile.root6 Normal file
View File

@ -0,0 +1,46 @@
INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h
SRC= $(INCS:.h=.cpp) ctbDict.cpp
LINKDEF=ctbLinkDef.h
#ctbActions.h
ZMQLIB=../slsReceiverSoftware/include
LIBRARYCBF=$(CBFLIBDIR)/lib/*.o
INCDIR=-I../slsReceiverSoftware/include/ -I../slsDetectorSoftware/include/ -I../slsSupportLib/include/ -I../slsDetectorCalibration -I../slsDetectorCalibration/dataStructures -I$(CBFLIBDIR)/include -I../slsDetectorCalibration/interpolations
LDFLAG=-L../build/bin -lSlsDetector -lSlsSupport -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -L$(ZMQLIB) -L$(CBFLIBDIR)/lib/ -std=c++11
#
MAIN=ctbGui.cpp
DESTDIR?=../build/bin
OBJS = $(SRC:.cpp=.o) $(MAIN:.cpp=.o)
all: $(DESTDIR)/ctbGui
doc:
cd manual && make DESTDIR=$(DESTDIR)
htmldoc:
cd manual && make html DESTDIR=$(DESTDIR)
ctbDict.cpp: $(INCS) $(LINKDEF)
rootcling -f ctbDict.cpp -c $(INCS) $(LINKDEF)
%.o : %.cpp
echo $@
g++ -DMYROOT `source root-config --cflags --glibs` -lMinuit -DCTB $(LDFLAG) -o $@ -c $< $(INCDIR)
#$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -lpthread #$(FLAGS)
$(DESTDIR)/ctbGui: $(OBJS) $(LINKDEF)
g++ -DMYROOT `source root-config --cflags --glibs` -lMinuit -DCTB $(LDFLAG) -o ctbGui $(INCDIR) $(OBJS) ../slsDetectorCalibration/tiffIO.cpp
mv ctbGui $(DESTDIR)
clean:
rm -f $(DESTDIR)/ctbGui *.o ctbDict.* $(OBJS)

2117
ctbGui/ctbAcquisition.cpp Executable file

File diff suppressed because it is too large Load Diff

242
ctbGui/ctbAcquisition.h Executable file
View File

@ -0,0 +1,242 @@
#ifndef CTBACQUISITION_H
#define CTBACQUISITION_H
#include <TGFrame.h>
#include "ctbAdcs.h"
#include "ctbSignals.h"
#include "ctbPattern.h"
class TGTextEntry;
class TGLabel;
class TGNumberEntry;
class TGCheckButton;
class TThread;
class TGraph;
class TMultiGraph;
class THStack;
class TGButtonGroup;
class TGRadioButton;
class TGComboBox;
class TTimer;
class TCanvas;
class TH2F;
class TH1F;
class TGLabel;
class TGTextButton;
namespace sls
{
class Detector;
};
class detectorData;
template <class dataType> class slsDetectorData;
class singlePhotonDetector;
//class singlePhotonDetector;
class commonModeSubtraction;
#include <string>
#include <stdint.h>
using namespace std;
class ctbAcquisition : public TGGroupFrame {
enum {DESERIALIZER, MOENCH04, MOENCH02, ADCSAR2, MYTHEN301, MYTHEN302};
private:
TGTextEntry *eOutdir;
TGTextEntry *eFname;
TGNumberEntry *eFindex;
TGCheckButton *cFileSave;
TGNumberEntry *eSerOff;
TGNumberEntry *eDynRange;
TGNumberEntry *eNumCount;
TGNumberEntry *eFitADC;
TGNumberEntry *eBitPlot;
TGNumberEntry *eMinRaw;
TGNumberEntry *eMaxRaw;
TGNumberEntry *eMinPedSub;
TGNumberEntry *eMaxPedSub;
TGCheckButton *cMinMaxRaw;
TGCheckButton *cMinMaxPedSub;
TGNumberEntry *eMeasurements;
TGTextButton *bStatus;
// TGTextButton
TGCheckButton *cCompile;
TGTextButton *cLoad;
// TGCheckButton *cRun;
TThread *acqThread;
THStack *adcStack;
THStack *bitStack;
THStack *countsStack;
TH1F *adcHisto[NADCS];
TH1F *countsHisto[NADCS];
TH1F *bitHisto[NSIGNALS];
float bitOffset[NSIGNALS];
// int enableFlag[NADCS+4];
int roMode;
int dBitOffset;
TH1F *adcFit;
TH1F *bitPlot;
TH1F *countsFit;
TH2F *h2DMapAn; // for 2D detectors
TH2F *h2DMapDig; // for 2D detectors
TH1F *h1DMap; //for 1D detectors
// TH2F *h2Scan; // for 2D detectors
// TMultiGraph *mgAdcs;
// TH1I *plotAdc[NADCS];
sls::Detector* myDet;
int plotFlag[NADCS];
int bitPlotFlag[NSIGNALS];
int ip;
// int nChannels;
// int chanEnable;
//int nADCs;
std::vector <int> dbitlist;
std::vector <int> adclist;
TGButtonGroup *bgPlot;// = new TGVButtonGroup(main_frame);
TGRadioButton *rbPlotOff;
TGRadioButton *rbWaveform;
TGRadioButton *rbDistribution;
TGRadioButton *rb2D;
// TGRadioButton *rbScan;
TGComboBox *cbDetType;
TGCheckButton *cbGetPedestal;
TGCheckButton *cbSubtractPedestal;
TGCheckButton *cbCommonMode;
TGTextButton *bResetPedestal;
TGLabel *lClickX;
TGLabel *lClickY;
TGLabel *lClickValue;
TCanvas *myCanvas;
TTimer *plotTimer;
char patternFile[10000];
char patternCompiler[10000];
int globalPlot;
int adcPlot;
int dbitPlot;
int tenG;
int nAnalogSamples, nDigitalSamples;
// int iScanStep;
slsDetectorData<uint16_t> *dataStructure;
singlePhotonDetector *photonFinder;
//singlePhotonDetector *photonFinder;
commonModeSubtraction *commonMode;
int cmSub;
int stop;
uint64_t dBitMask;
int deserializer;
public:
ctbAcquisition(TGVerticalFrame*, sls::Detector*);
void setOutdir();
void setFname();
void setMeasurements();
void setFsave(Bool_t);
void changePlot(Int_t);
void changeDetector(Int_t);
void changePlot();
void changeDetector();
void setFindex();
void Draw();
void setCanvas(TCanvas*);
void toggleAcquisition();
void loadPattern();
static void* ThreadHandle(void *arg);
void update();
void acquisitionFinished();
// string getParameters();
void setGraph (int i ,int en, Pixel_t col);
void setBitGraph (int i ,int en, Pixel_t col);
void startAcquisition();
static void progressCallback(double,void*);
static void dataCallback(detectorData*, long unsigned int, unsigned int, void*);
int StopFlag;
int plotData(detectorData*, int);
void setPatternFile(const char* t);
void setPatternCompiler(const char* t);
void setAnalogSamples(int);
void setDigitalSamples(int);
void setADCEnable(Int_t);
void setDbitEnable(Int_t);
void setReadoutMode(int);
void updateChans();
void resetPedestal();
void ToggleCommonMode(Bool_t);
void TogglePedSub(Bool_t);
void ChangeHistoLimitsPedSub(Long_t );
void ChangeHistoLimitsRaw(Long_t);
void ChangeHistoLimitsPedSub( );
void ChangeHistoLimitsRaw();
void ChangeHistoLimitsPedSub(Bool_t );
void ChangeHistoLimitsRaw(Bool_t);
void ChangeSerialOffset();
void ChangeSerialOffset(Long_t);
void ChangeNumberOfChannels();
void ChangeNumberOfChannels(Long_t);
void ChangeDynamicRange();
void ChangeDynamicRange(Long_t);
void canvasClicked();
void FitADC();
void plotBit();
ClassDef(ctbAcquisition,0)
};
#endif

614
ctbGui/ctbAdcs.cpp Executable file
View File

@ -0,0 +1,614 @@
#include <TApplication.h>
#include <TGClient.h>
#include <TCanvas.h>
#include <TF1.h>
#include <TRandom.h>
#include <TGButton.h>
#include <TRootEmbeddedCanvas.h>
#include <TGButtonGroup.h>
#include <TGNumberEntry.h>
#include <TGLabel.h>
#include <TList.h>
#include <TGFileDialog.h>
#include <TGComboBox.h>
#include <TH2F.h>
#include <TColor.h>
#include <TH1F.h>
#include <TGraphErrors.h>
#include <TGColorSelect.h>
#include <THStack.h>
#include <TGTab.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include "ctbAdcs.h"
#include "ctbDefs.h"
#include "Detector.h"
using namespace std;
ctbAdc::ctbAdc(TGVerticalFrame *page, int i, sls::Detector *det)
: TGHorizontalFrame(page, 800,800), id(i), myDet(det) {
TGHorizontalFrame *hframe=this;
char tit[100];
page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hframe->MapWindow();
sprintf(tit, "ADC%d", id);
sAdcLabel= new TGLabel(hframe, tit);
hframe->AddFrame(sAdcLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
sAdcLabel->MapWindow();
sAdcLabel->SetTextJustify(kTextLeft);
sAdcInvert= new TGCheckButton(hframe, "Inv");
hframe->AddFrame( sAdcInvert,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
sAdcInvert->MapWindow();
sAdcInvert->Connect("Toggled(Bool_t)","ctbAdc",this,"ToggledInvert(Bool_t)");
sAdcEnable= new TGCheckButton(hframe, "En");
hframe->AddFrame( sAdcEnable,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
sAdcEnable->MapWindow();
// sAdcEnable->SetOn(kTRUE);
// sAdcEnable->SetEnabled(kFALSE);
sAdcEnable->Connect("Toggled(Bool_t)","ctbAdc",this,"ToggledEnable(Bool_t)");
sAdcPlot= new TGCheckButton(hframe, "Plot");
hframe->AddFrame( sAdcPlot,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
sAdcPlot->MapWindow();
sAdcPlot->Connect("Toggled(Bool_t)","ctbAdc",this,"ToggledPlot(Bool_t)");
fColorSel = new TGColorSelect(hframe, id+1, 0);
fColorSel->Connect("ColorSelected(Pixel_t)","ctbAdc",this,"ColorChanged(Pixel_t)");
hframe->AddFrame(fColorSel, new TGLayoutHints(kLHintsTop |
kLHintsLeft, 2, 0, 2, 2));
fColorSel->SetColor(TColor::Number2Pixel(id+1));
// sprintf(tit,"adc%d",id);
// gADC=new TGraph();
// gADC->SetName(tit);
// gADC->SetLineColor(id+1);
// gADC->SetMarkerColor(id+1);
};
Pixel_t ctbAdc::getColor(){
return fColorSel->GetColor();
}
Bool_t ctbAdc::getEnabled(){
return getPlot();
}
Bool_t ctbAdc::getPlot(){
return sAdcPlot->IsOn();
}
Bool_t ctbAdc::getInverted(){
return sAdcInvert->IsOn();
}
Bool_t ctbAdc::getEnable(){
return sAdcEnable->IsOn();
}
void ctbAdc::setInverted(Bool_t b){
// cout << id << "set enabled " << b << endl;
if (b)
sAdcInvert->SetOn(kTRUE,kTRUE);
else
sAdcInvert->SetOn(kFALSE,kTRUE);
}
void ctbAdc::setEnable(Bool_t b){
// cout << id << "set enabled " << b << endl;
if (b)
sAdcEnable->SetOn(kTRUE,kFALSE);
else
sAdcEnable->SetOn(kFALSE,kFALSE);
}
void ctbAdc::setAdcAlias(char *tit, int plot, int color) {
if (tit)
sAdcLabel->SetText(tit);
if (plot>0)
sAdcPlot->SetOn(kTRUE,kTRUE);
else if (plot==0)
sAdcPlot->SetOn(kFALSE,kTRUE);
if (color>=0)
fColorSel->SetColor(color);
fColorSel->SetEnabled(sAdcPlot->IsOn());
}
string ctbAdc::getAdcAlias() {
char line[1000];
sprintf(line,"ADC%d %s %d %lx\n",id,sAdcLabel->GetText()->Data(),sAdcPlot->IsOn(),fColorSel->GetColor());
return string(line);
}
void ctbAdc::update() {
//Emit("ToggledAdcEnable(Int_t)", id);
}
void ctbAdc::ToggledPlot(Bool_t b){
// Long_t mask=b<<id;
// ToggledAdcPlot(mask);
cout << "Colsel " << id << " enable " << b << endl;
if (b)
fColorSel->SetEnabled(kTRUE);
else
fColorSel->SetEnabled(kFALSE);
// fColorSel->SetEnabled(sAdcPlot->IsOn());
Emit("ToggledAdcPlot(Int_t)", id);
}
void ctbAdc::ToggledInvert(Bool_t b){
// fColorSel->SetEnabled(sAdcPlot->IsOn());
Emit("ToggledAdcInvert(Int_t)", id);
}
void ctbAdc::ToggledEnable(Bool_t b){
fColorSel->SetEnabled(sAdcPlot->IsOn());
Emit("ToggledAdcEnable(Int_t)", id);
}
void ctbAdc::ColorChanged(Pixel_t) {
Emit("ToggledAdcPlot(Int_t)", id);
}
void ctbAdc::ToggledAdcPlot(Int_t b){
Emit("ToggledAdcPlot(Int_t)", id);
}
void ctbAdc::ToggledAdcInvert(Int_t b){
Emit("ToggledAdcInvert(Int_t)", id);
}
void ctbAdc::ToggledAdcEnable(Int_t b){
Emit("ToggledAdcEnable(Int_t)", id);
}
void ctbAdc::setEnabled(Bool_t b){
// cout << id << "set enabled " << b << endl;
if (b)
sAdcPlot->SetOn(kTRUE,kFALSE);
else
sAdcPlot->SetOn(kFALSE,kFALSE);
}
void ctbAdc::setPlot(Bool_t b){
// cout << id << "set enabled " << b << endl;
if (b)
sAdcPlot->SetOn(kTRUE,kTRUE);
else
sAdcPlot->SetOn(kFALSE,kTRUE);
}
ctbAdcs::ctbAdcs(TGVerticalFrame *page, sls::Detector *det)
: TGGroupFrame(page,"Adcs",kVerticalFrame), myDet(det) {
SetTitlePos(TGGroupFrame::kLeft);
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
MapWindow();
TGHorizontalFrame* hframe=new TGHorizontalFrame(this, 800,800);
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hframe->MapWindow();
int idac=0;
TGHorizontalFrame* hhframe=new TGHorizontalFrame(this, 800,800);
AddFrame(hhframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hhframe->MapWindow();
TGVerticalFrame *vframe;
for (idac=0; idac<NADCS; idac++) {
if (idac%16==0) {
vframe=new TGVerticalFrame(hhframe, 400,800);
hhframe->AddFrame(vframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
vframe->MapWindow();
}
sAdc[idac]=new ctbAdc(vframe,idac,myDet);
sAdc[idac]->Connect("ToggledAdcPlot(Int_t)","ctbAdcs",this,"ToggledAdcPlot(Int_t)");
sAdc[idac]->Connect("ToggledAdcInvert(Int_t)","ctbAdcs",this,"ToggledAdcInvert(Int_t)");
sAdc[idac]->Connect("ToggledAdcEnable(Int_t)","ctbAdcs",this,"ToggledAdcEnable(Int_t)");
}
hframe=new TGHorizontalFrame(this, 800,800);
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hframe->MapWindow();
bCheckHalf[0]=new TGTextButton(hframe, "All 0-15");
hframe->AddFrame(bCheckHalf[0],new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
bCheckHalf[0]->MapWindow();
bCheckHalf[0]->Connect("Clicked()","ctbAdcs",this,"CheckHalf0()");
bRemoveHalf[0]=new TGTextButton(hframe, "None 0-15");
hframe->AddFrame(bRemoveHalf[0],new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 5, 5, 5, 5));
bRemoveHalf[0]->MapWindow();
bRemoveHalf[0]->Connect("Clicked()","ctbAdcs",this,"RemoveHalf0()");
bCheckHalf[1]=new TGTextButton(hframe, "All 16-23");
hframe->AddFrame(bCheckHalf[1],new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
bCheckHalf[1]->MapWindow();
bCheckHalf[1]->Connect("Clicked()","ctbAdcs",this,"CheckHalf1()");
// bCheckAll->Connect("Clicked()","ctbAdcs",this,"CheckAll()");
bRemoveHalf[1]=new TGTextButton(hframe, "None 16-23");
hframe->AddFrame(bRemoveHalf[1],new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 5, 5, 5, 5));
bRemoveHalf[1]->MapWindow();
bRemoveHalf[1]->Connect("Clicked()","ctbAdcs",this,"RemoveHalf1()");
// bRemoveAll->Connect("Clicked()","ctbAdcs",this,"RemoveAll()");
hframe=new TGHorizontalFrame(this, 800,800);
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hframe->MapWindow();
bCheckAll=new TGTextButton(hframe, "All");
hframe->AddFrame(bCheckAll,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
bCheckAll->MapWindow();
bCheckAll->Connect("Clicked()","ctbAdcs",this,"CheckAll()");
bRemoveAll=new TGTextButton(hframe, "None");
hframe->AddFrame(bRemoveAll,new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 5, 5, 5, 5));
bRemoveAll->MapWindow();
bRemoveAll->Connect("Clicked()","ctbAdcs",this,"RemoveAll()");
hframe=new TGHorizontalFrame(this, 800,50);
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hframe->MapWindow();
TGLabel *label= new TGLabel(hframe, "Inversion mask: ");
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
label->MapWindow();
label->SetTextJustify(kTextLeft);
eInversionMask = new TGNumberEntry(hframe, 0, 16,999, TGNumberFormat::kNESHex,
TGNumberFormat::kNEANonNegative,
TGNumberFormat::kNELNoLimits);
hframe->AddFrame(eInversionMask,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
eInversionMask->MapWindow();
eInversionMask->Resize(150,30);
eInversionMask->SetState(kFALSE);
hframe=new TGHorizontalFrame(this, 800,50);
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hframe->MapWindow();
label= new TGLabel(hframe, "Enable mask: ");
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
label->MapWindow();
label->SetTextJustify(kTextLeft);
eEnableMask = new TGNumberEntry(hframe, 0, 16,999, TGNumberFormat::kNESHex,
TGNumberFormat::kNEANonNegative,
TGNumberFormat::kNELNoLimits);
hframe->AddFrame(eEnableMask,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
eEnableMask->MapWindow();
eEnableMask->Resize(150,30);
eEnableMask->SetState(kFALSE);
}
int ctbAdcs::setEnable(int reg) {
try {
if (reg > -1) {
myDet->setADCEnableMask(reg);
}
auto retval = myDet->getADCEnableMask().tsquash("Different values");
eEnableMask->SetHexNumber(retval);
return retval;
} CATCH_DISPLAY ("Could not set/get adc enablemask.", "ctbAdcs::setEnable")
return -1;
}
int ctbAdcs::setInvert(int reg) {
try {
if (reg > -1) {
myDet->setADCInvert(reg);
}
auto retval = myDet->getADCInvert().tsquash("Different values");
eInversionMask->SetHexNumber(retval);
return retval;
} CATCH_DISPLAY ("Could not set/get adc enablemask.", "ctbAdcs::setEnable")
return -1;
}
void ctbAdcs::update() {
Int_t invreg;
Int_t disreg;
disreg=setEnable();
invreg=setInvert();
for (int is=0; is<NADCS; is++) {
sAdc[is]->setAdcAlias(NULL,-1,-1);
if (invreg & (1<<is) )
sAdc[is]->setInverted(kTRUE);
else
sAdc[is]->setInverted(kFALSE);
if (disreg & (1<<is) )
sAdc[is]->setEnable(kTRUE);
else
sAdc[is]->setEnable(kFALSE);
}
Emit("AdcEnable(Int_t)", disreg);
}
string ctbAdcs::getAdcParameters() {
ostringstream line;
line << "reg "<< hex << setInvert() << "# ADC invert reg" << dec << endl;
line << "reg "<< hex << setEnable() << " # ADC enable reg"<< dec << endl;
return line.str();
}
void ctbAdcs::CheckAll() {
for (int is=0; is<NADCS; is++){
sAdc[is]->setPlot(kTRUE);
}
}
void ctbAdcs::RemoveAll() {
for (int is=0; is<NADCS; is++) {
sAdc[is]->setPlot(kFALSE);
}
}
void ctbAdcs::CheckHalf0() {
for (int is=0; is<NADCS/2; is++) {
sAdc[is]->setPlot(kTRUE);
}
}
void ctbAdcs::RemoveHalf0() {
for (int is=0; is<NADCS/2; is++){
sAdc[is]->setPlot(kFALSE);
}
}
void ctbAdcs::CheckHalf1() {
for (int is=NADCS/2; is<NADCS; is++){
sAdc[is]->setPlot(kTRUE);
}
}
void ctbAdcs::RemoveHalf1() {
for (int is=NADCS/2; is<NADCS; is++){
sAdc[is]->setPlot(kFALSE);
}
}
int ctbAdcs::setAdcAlias(string line) {
int is=-1, plot=0, color=-1;
char tit[100];
int narg=sscanf(line.c_str(),"ADC%d %s %d %x",&is,tit,&plot, &color);
if (narg<2)
return -1;
if (narg!=3)
color=-1;
if (is>=0 && is<NADCS) {
sAdc[is]->setAdcAlias(tit,plot,color);
}
return is;
}
string ctbAdcs::getAdcAlias() {
ostringstream line;
for (int is=0; is<NADCS; is++)
line << sAdc[is]->getAdcAlias();
return line.str();
}
void ctbAdcs::ToggledAdcPlot(Int_t b){
Emit("ToggledAdcPlot(Int_t)", b);
}
void ctbAdcs::AdcEnable(Int_t b){
Emit("AdcEnable(Int_t)", b);
}
void ctbAdcs::ToggledAdcEnable(Int_t b){
Int_t oreg=setEnable();
Int_t m=1<<b;
if (sAdc[b]->getEnable())
oreg|=m;
else
oreg&=~m;
setEnable(oreg);
Emit("AdcEnable(Int_t)", oreg);
}
void ctbAdcs::ToggledAdcInvert(Int_t b){
Int_t oreg=setInvert();
Int_t m=1<<b;
if (sAdc[b]->getInverted())
oreg|=m;
else
oreg&=~m;
setInvert(oreg);
}
Pixel_t ctbAdcs::getColor(int i){
if (i>=0 && i<NADCS)
return sAdc[i]->getColor();
return static_cast<Pixel_t>(-1);
}
Bool_t ctbAdcs::getEnabled(int i){
if (i>=0 && i<NADCS)
return sAdc[i]->getEnabled();
return static_cast<Bool_t>(-1);
}
Bool_t ctbAdcs::getEnable(int i){
if (i>=0 && i<NADCS)
return sAdc[i]->getEnable();
return static_cast<Bool_t>(-1);
}
Bool_t ctbAdcs::getPlot(int i){
if (i>=0 && i<NADCS)
return sAdc[i]->getPlot();
return static_cast<Bool_t>(-1);
}

155
ctbGui/ctbAdcs.h Executable file
View File

@ -0,0 +1,155 @@
#ifndef CTBADCS_H
#define CTBADCS_H
#include <TGFrame.h>
#define NADCS 32
class TRootEmbeddedCanvas;
class TGButtonGroup;
class TGVerticalFrame;
class TGHorizontalFrame;
class TGTextEntry;
class TGLabel;
class TGNumberEntry;
class TH2F;
class TGComboBox;
class TGCheckButton;
class TGColorSelect;
class TColor;
class THStack;
class TGraphErrors;
class TGTextButton;
class TGTab;
class TGraph;
namespace sls
{
class Detector;
};
#include <string>
using namespace std;
class ctbAdc : public TGHorizontalFrame {
private:
TGLabel *sAdcLabel;
TGCheckButton *sAdcEnable;
TGCheckButton *sAdcPlot;
TGCheckButton *sAdcInvert;
TGColorSelect *fColorSel;
// TGraph *gADC;
int id;
sls::Detector *myDet;
public:
ctbAdc(TGVerticalFrame *page, int i, sls::Detector *det);
void setAdcAlias(char *tit, int plot, int color);
string getAdcAlias();
void ToggledAdcPlot(Int_t b);
void ToggledAdcEnable(Int_t b);
void ToggledAdcInvert(Int_t b);
void ToggledPlot(Bool_t b);
void ToggledEnable(Bool_t b);
void ToggledInvert(Bool_t b);
void ColorChanged(Pixel_t);
void setEnabled(Bool_t b);
Bool_t getEnabled();
// TGraph *getGraph();
void update();
Pixel_t getColor();
Bool_t getEnable();
void setEnable(Bool_t);
void setPlot(Bool_t);
Bool_t getInverted();
Bool_t getPlot();
void setInverted(Bool_t);
ClassDef(ctbAdc,0)
};
class ctbAdcs : public TGGroupFrame {
private:
ctbAdc *sAdc[NADCS];
sls::Detector *myDet;
TGTextButton *bCheckAll;
TGTextButton *bRemoveAll;
TGTextButton *bCheckHalf[2];
TGTextButton *bRemoveHalf[2];
TGNumberEntry *eInversionMask;
TGNumberEntry *eEnableMask;
/* TGTextButton *bPlotSelected; */
/* TGNumberEntry *eMinX; */
/* TGNumberEntry *eMaxX; */
/* TGNumberEntry *eMinY; */
/* TGNumberEntry *eMaxY; */
/* TGTextButton *bGetPixel; */
/* TGNumberEntry *ePixelX; */
/* TGNumberEntry *ePixelY; */
/* TGLabel *lPixelValue; */
public:
ctbAdcs(TGVerticalFrame *page, sls::Detector *det);
int setAdcAlias(string line);
string getAdcAlias();
string getAdcParameters();
void ToggledAdcPlot(Int_t);
void ToggledAdcInvert(Int_t);
void ToggledAdcEnable(Int_t);
void AdcEnable(Int_t b);
// TGraph *getGraph(int i);
void CheckAll();
void RemoveAll();
void update();
int setInvert(int reg=-1);
int setEnable(int reg=-1);
Pixel_t getColor(int i);
Bool_t getEnabled(int i);
Bool_t getPlot(int i);
Bool_t getEnable(int i);
void CheckHalf0();
void RemoveHalf0();
void CheckHalf1();
void RemoveHalf1();
ClassDef(ctbAdcs,0)
};
#endif

214
ctbGui/ctbDacs.cpp Executable file
View File

@ -0,0 +1,214 @@
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <TGTextEntry.h>
#include <TGLabel.h>
#include <TGNumberEntry.h>
#include <TGButton.h>
#include "ctbDacs.h"
#include "ctbDefs.h"
#include "Detector.h"
#include "sls_detector_defs.h"
using namespace std;
ctbDac::ctbDac(TGGroupFrame *page, int idac, sls::Detector *det) : TGHorizontalFrame(page, 800,50) , id(idac), myDet(det) {
TGHorizontalFrame *hframe=this;
page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
MapWindow();
char tit[100];
sprintf(tit, "DAC %d:",idac);
dacsLabel= new TGCheckButton(hframe, tit);// new TGLabel(hframe, tit);
dacsLabel->SetOn(kTRUE, kTRUE);
dacsLabel->Connect("Toggled(Bool_t)","ctbDac",this,"setOn(Bool_t)");
hframe->AddFrame(dacsLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
dacsLabel->MapWindow();
dacsLabel->SetTextJustify(kTextLeft);
dacsEntry = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
TGNumberFormat::kNEANonNegative,
TGNumberFormat::kNELLimitMinMax,
0, 65535);
hframe->AddFrame(dacsEntry,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
dacsEntry->MapWindow();
dacsEntry->Resize(150,30);
dacsUnit= new TGCheckButton(hframe, "mV");
// if (idac!=slsDetectorDefs::ADC_VPP) {
hframe->AddFrame( dacsUnit,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
dacsUnit->MapWindow();
if (idac==slsDetectorDefs::ADC_VPP) {
dacsUnit->SetEnabled(kFALSE);
hframe->HideFrame(dacsUnit);
dacsUnit->MapWindow();
cout << "hiding!" << endl;
}
if (idac==slsDetectorDefs::HIGH_VOLTAGE) {
dacsUnit->SetText("V");
dacsUnit->SetOn(kTRUE,kTRUE);
dacsUnit->SetEnabled(kFALSE);
}
//}
sprintf(tit, "xxx");
dacsValue= new TGLabel(hframe, tit);
hframe->AddFrame( dacsValue,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
dacsValue->MapWindow();
dacsValue->SetTextJustify(kTextLeft);
TGTextEntry *e=dacsEntry->TGNumberEntry::GetNumberEntry();
e->Connect("ReturnPressed()","ctbDac",this,"setValue()");
// e->Connect("ValueSet(Long_t)","ctbDac",this,"setValue(Long_t)");
dacsEntry->Connect("ValueSet(Long_t)","ctbDac",this,"setValue(Long_t)");
// cout << "(((((((((((((((((((((((((((((((" << dacsEntry->GetListOfSignals()->At(0)->IsA() << endl;
}
int ctbDac::setLabel(char *tit, int mv) {
if(tit)
dacsLabel->SetText(tit);
if (mv==1)
dacsUnit->SetOn(kTRUE,kTRUE);
else if (mv==0)
dacsUnit->SetOn(kFALSE,kTRUE);
// else if (mv==2) {
// ;}
// else if (mv==3)
// ;
return id;
}
string ctbDac::getLabel() {
ostringstream line;
line << dacsLabel->GetText() << " " << dacsUnit->IsOn() << endl;
// line << "DAC" << dec << id << " " << dacsUnit->IsOn() << endl;
return line.str();
}
void ctbDac::setValue(Long_t a) {setValue();}
void ctbDac::setValue() {
cout << "setting dac! "<< id << " value " << dacsEntry->GetIntNumber() << " units " << dacsUnit->IsOn() << endl;
try {
myDet->setDAC(static_cast<slsDetectorDefs::dacIndex>(id), dacsEntry->GetIntNumber(), dacsUnit->IsOn());
} CATCH_DISPLAY ("Could not set dac " + to_string(id) + ".", "ctbDac::setValue")
getValue();
}
void ctbDac::setOn(Bool_t b) {
// cout << "setting dac! "<< id << endl;
if ( dacsLabel->IsOn()) {
setValue();
} else {
try {
myDet->setDAC(static_cast<slsDetectorDefs::dacIndex>(id), -100, false);
} CATCH_DISPLAY ("Could not power off dac " + to_string(id) + ".", "ctbDac::setOn")
}
getValue();
}
int ctbDac::getValue() {
try {
int val = myDet->getDAC(static_cast<slsDetectorDefs::dacIndex>(id), dacsUnit->IsOn()).tsquash("Different values");
cout << "dac " << id << " " << val << endl;
dacsValue->SetText(to_string(val).c_str());
if (val >= 0) {
dacsLabel->SetOn(kTRUE);
} else {
dacsLabel->SetOn(kFALSE);
}
return val;
} CATCH_DISPLAY ("Could not get dac " + to_string(id) + ".", "ctbDac::getValue")
return -1;
}
ctbDacs::ctbDacs(TGVerticalFrame *page, sls::Detector *det) : TGGroupFrame(page,"DACs",kVerticalFrame) , myDet(det){
SetTitlePos(TGGroupFrame::kLeft);
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
MapWindow();
// cout << "window mapped " << endl;
for (int idac=0; idac<NDACS; idac++) {
dacs[idac]=new ctbDac(this, idac, myDet);
}
dacs[NDACS]=new ctbDac(this, slsDetectorDefs::ADC_VPP, myDet);
dacs[NDACS+1]=new ctbDac(this, slsDetectorDefs::HIGH_VOLTAGE, myDet);
dacs[NDACS]->setLabel((char*)"ADC Vpp",2);
dacs[NDACS+1]->setLabel((char*)"High Voltage",3);
}
int ctbDacs::setDacAlias(string line) {
int is=-1, mv=0;
char tit[100];
int narg=sscanf(line.c_str(),"DAC%d %s %d",&is,tit,&mv);
if (narg<2)
return -1;
if (is>=0 && is<NDACS)
dacs[is]->setLabel(tit,mv);
return is;
}
string ctbDacs::getDacAlias() {
ostringstream line;
for (int i=0; i<NDACS; i++)
line << dacs[i]->getLabel() << endl;
return line.str();
}
string ctbDacs::getDacParameters() {
ostringstream line;
for (int i=0; i<NDACS; i++) {
//line << "dacs:" << i << " " << dacs[i]->getValue << endl;
line << "dac:" << i << " " << dacs[i]->getValue() << endl;
}
return line.str();
}
void ctbDacs::update() {
for (int idac=0; idac<NDACS+1; idac++) {
dacs[idac]->getValue();
}
}

77
ctbGui/ctbDacs.h Executable file
View File

@ -0,0 +1,77 @@
#ifndef CTBDACS_H
#define CTBDACS_H
#include <TGFrame.h>
#define NDACS 18
//#define NDACS 16
class TGTextEntry;
class TGLabel;
class TGNumberEntry;
class TGCheckButton;
namespace sls
{
class Detector;
};
#include <string>
using namespace std;
class ctbDac : public TGHorizontalFrame {
protected:
// TGLabel *dacsLabel;
TGNumberEntry *dacsEntry;
TGCheckButton *dacsUnit;
TGCheckButton *dacsLabel;
TGLabel *dacsValue;
int id;
sls::Detector* myDet;
public:
ctbDac(TGGroupFrame*, int , sls::Detector*);
void setValue();
void setValue(Long_t);
int getValue();
void setOn(Bool_t);
int setLabel(char *tit, int mv);
string getLabel();
ClassDef(ctbDac,0)
};
class ctbDacs : public TGGroupFrame {
private:
ctbDac *dacs[NDACS+2];
sls::Detector* myDet;
public:
ctbDacs(TGVerticalFrame *page, sls::Detector*);
int setDacAlias(string line);
// int setDacAlias(string line);
string getDacAlias();
string getDacParameters();
void update();
ClassDef(ctbDacs,0)
};
#endif

84
ctbGui/ctbDefs.h Executable file
View File

@ -0,0 +1,84 @@
#pragma once
#include <string>
#include <stdexcept>
#include <chrono>
//#include "sls_detector_exceptions.h"
//#include "ansi.h"
#define RED "\x1b[31m"
#define RESET "\x1b[0m"
#define BOLD "\x1b[1m"
#define cprintf(code, format, ...) printf(code format RESET, ##__VA_ARGS__)
#define CATCH_DISPLAY(m, s) catch(...) { ctbDefs::DisplayExceptions(m, s); }
#define CATCH_HANDLE(...) catch(...) { ctbDefs::HandleExceptions(__VA_ARGS__); }
class ctbDefs {
public:
/**
* Empty Constructor
*/
ctbDefs(){};
// convert double seconds to chrono ns
static std::chrono::nanoseconds ConvertDoubleStoChronoNS(double timeS) {
using std::chrono::duration;
using std::chrono::duration_cast;
using std::chrono::nanoseconds;
return duration_cast<nanoseconds>(duration<double>(timeS));
}
// convert chrono ns to doubel s
static double ConvertChronoNStoDoubleS(std::chrono::nanoseconds timeNs) {
using std::chrono::duration;
using std::chrono::duration_cast;
return duration_cast<duration<double>>(timeNs).count();
}
static void DisplayExceptions(std::string emsg, std::string src) {
try {
throw;
} /* catch (const sls::SocketError &e) {
throw;
} catch (const sls::SharedMemoryError &e) {
throw;
} */catch (const std::exception &e) {
ExceptionMessage(emsg, e.what(), src);
}
};
template <class CT> struct NonDeduced { using type = CT; };
template <class S, typename RT, typename... CT>
static void HandleExceptions(const std::string emsg, const std::string src, S* s,
RT (S::*somefunc)(CT...),
typename NonDeduced<CT>::type... Args) {
try {
throw;
} /*catch (const sls::SocketError &e) {
throw;
} catch (const sls::SharedMemoryError &e) {
throw;
} */catch (const std::exception &e) {
ExceptionMessage(emsg, e.what(), src);
(s->*somefunc)(Args...);
}
};
static void ExceptionMessage(std::string message,
std::string exceptionMessage,
std::string source) {
// because sls_detector_exceptions cannot be included
if (exceptionMessage.find("hared memory")) {
throw;
}
if (exceptionMessage.find("annot connect")) {
throw;
}
cprintf(RED, "Warning (%s): %s [Caught Exception: %s]\n", source.c_str(), message.c_str(), exceptionMessage.c_str());
//return Message(qDefs::WARNING, message + std::string("\nCaught exception:\n") + exceptionMessage, source);
};
};

157
ctbGui/ctbGui.cpp Executable file
View File

@ -0,0 +1,157 @@
#include <TApplication.h>
#include <TColor.h>
#include <TStyle.h>
#include <TROOT.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include "Detector.h"
#include "sls_detector_defs.h"
//#include "sls_receiver_defs.h"
#include "ctbMain.h"
#include "ctbDefs.h"
using namespace std;
int main(int argc, char **argv) {
string afname, cfname, pfname;
int id=0;
int af=0, cf=0, pf=0;
cout << " *** " << argc << endl;
for (int ia=0; ia<argc; ia++) {
if (strcmp(argv[ia],"-alias")==0) {
if (ia+1<argc) {
afname=argv[ia+1];
ia++;
af=1;
}
} else if (strcmp(argv[ia],"-config")==0) {
if (ia+1<argc) {
cfname=argv[ia+1];
ia++;
cf=1;
}
} else if (strcmp(argv[ia],"-par")==0) {
if (ia+1<argc) {
pfname=argv[ia+1];
ia++;
pf=1;
}
} else if (strcmp(argv[ia],"-id")==0) {
if (ia+1<argc) {
id=atoi(argv[ia+1]);
ia++;
}
}
}
cout << " *** " << endl;
sls::Detector *myDet = nullptr;
try {
/****** Create detector ****************/
myDet=new sls::Detector(id);
cout << "Created multi detector id " << id << endl;
if (cf) {
myDet->loadConfig(cfname);
cout << "Config file loaded successfully" << endl;
} else {
cout << "No config file specified" << endl;
}
cout << "hostname " << myDet->getHostname() << endl;
if (pf) {
myDet->loadParameters(pfname);
cout << "Loaded parameter file successfully" << endl;
} else{
cout << "No parameter file specified" << endl;
}
} CATCH_DISPLAY ("Could not create detector/ load config/parameters.", "ctbGui::main")
/***********Create GUI stuff *******************/
TApplication theApp("App",&argc,argv);
gStyle->SetDrawBorder(0);
gStyle->SetCanvasColor(kWhite);
gStyle->SetCanvasDefH(800);
gStyle->SetCanvasDefW(800);
gStyle->SetCanvasBorderMode(0);
gStyle->SetPadBorderMode(0);
gStyle->SetPaintTextFormat("5.2f");
gStyle->SetLineWidth(2);
gStyle->SetTextSize(1.1);
gStyle->SetLabelSize(0.04,"xy");
gStyle->SetTitleSize(0.05,"xy");
gStyle->SetTitleOffset(1.0,"x");
gStyle->SetTitleOffset(1.1,"y");
gStyle->SetPadTopMargin(0.15);
gStyle->SetPadRightMargin(0.15);
gStyle->SetPadBottomMargin(0.15);
gStyle->SetPadLeftMargin(0.15);
gStyle->SetLegendBorderSize(1);
gStyle->SetFrameBorderMode(0);
gStyle->SetFrameFillColor(kWhite);
// gStyle->SetLegendFillColor(kWhite);
gStyle->SetTitleFillColor(kWhite);
gStyle->SetFillColor(kWhite);
gStyle->SetStatFontSize(0.03);
gStyle->SetStatBorderSize(1);
gStyle->SetStatFormat("6.4g");
gStyle->SetStatX(0.95);
gStyle->SetStatY(0.95);
gStyle->SetStatW(0.2);
gStyle->SetStatH(0.2);
gStyle->SetTitleX(0.1);
gStyle->SetTitleY(0.95);
gStyle->SetTitleBorderSize(0);
gStyle->SetTitleFontSize(0.05);
gROOT->SetStyle("Default");
TColor::InitializeColors();
const Int_t NRGBs = 5;
const Int_t NCont = 90;
Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
gStyle->SetNumberContours(NCont);
gROOT->ForceStyle();
ctbMain *mf=new ctbMain(gClient->GetRoot(), myDet);
cout << " *** " << argc << endl;
for (int ia=0; ia<argc; ia++)
cout << argv[ia] << endl;
cout << " *** " << endl;
if (af)
mf->loadAlias(afname);
else
cout << "no alias specified" << endl;
theApp.Run();
return 0;
}

15
ctbGui/ctbLinkDef.h Executable file
View File

@ -0,0 +1,15 @@
#pragma link C++ class ctbMain;
#pragma link C++ class ctbDacs;
#pragma link C++ class ctbDac;
#pragma link C++ class ctbSignals;
#pragma link C++ class ctbSignal;
#pragma link C++ class ctbAdc;
#pragma link C++ class ctbAdcs;
#pragma link C++ class ctbLoop;
#pragma link C++ class ctbWait;
#pragma link C++ class ctbPattern;
#pragma link C++ class ctbAcquisition;
#pragma link C++ class ctbPower;
#pragma link C++ class ctbPowers;
#pragma link C++ class ctbSlowAdc;
#pragma link C++ class ctbSlowAdcs;

584
ctbGui/ctbMain.cpp Executable file
View File

@ -0,0 +1,584 @@
#include <TApplication.h>
#include <TGClient.h>
#include <TCanvas.h>
#include <TF1.h>
#include <TRandom.h>
#include <TGButton.h>
#include <TRootEmbeddedCanvas.h>
#include <TGButtonGroup.h>
#include <TGNumberEntry.h>
#include <TGLabel.h>
#include <TList.h>
#include <TGFileDialog.h>
#include <TGComboBox.h>
#include <TH2F.h>
#include <TColor.h>
#include <TH1F.h>
#include <TGraphErrors.h>
#include <THStack.h>
#include <TGTab.h>
#include <TApplication.h>
#include <TGCanvas.h>
#include <stdlib.h>
#include <TGMenu.h>
#include <TGDockableFrame.h>
//#include <TGMenuBar.h>
//#include <TGPopupMenu.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include "Detector.h"
#include "ctbDefs.h"
#include "ctbMain.h"
#include "ctbDacs.h"
#include "ctbSlowAdcs.h"
#include "ctbPowers.h"
#include "ctbSignals.h"
#include "ctbPattern.h"
#include "ctbAdcs.h"
#include "ctbAcquisition.h"
//#include "ctbActions.h"
using namespace std;
ctbMain::ctbMain(const TGWindow *p, sls::Detector *det)
: TGMainFrame(p,800,800), pwrs(NULL), senses(NULL) {
myDet=det;
Connect("CloseWindow()", "ctbMain", this, "CloseWindow()");
// fMenuDock = new TGDockableFrame(this);
// AddFrame(fMenuDock, new TGLayoutHints(kLHintsExpandX, 0, 0, 1, 0));
// fMenuDock->SetWindowName("GuiTest Menu");
fMenuBarLayout = new TGLayoutHints(kLHintsTop | kLHintsExpandX);
fMenuBarItemLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0);
fMenuBarHelpLayout = new TGLayoutHints(kLHintsTop | kLHintsRight);
fMenuFile = new TGPopupMenu(gClient->GetRoot());
int im=0;
fMenuFile->AddEntry("Open Alias", im++);
fMenuFile->AddEntry("Save Alias", im++);
fMenuFile->AddSeparator();
fMenuFile->AddEntry("Open Parameters", im++);
fMenuFile->AddEntry("Save Parameters", im++);
fMenuFile->AddSeparator();
fMenuFile->AddEntry("Open Configuration", im++);
fMenuFile->AddEntry("Save Configuration", im++);
fMenuFile->AddSeparator();
fMenuFile->AddEntry("Open Pattern", im++);
fMenuFile->AddEntry("Save Pattern", im++);
fMenuFile->AddSeparator();
fMenuFile->AddEntry("Exit", im++);
fMenuFile->Connect("Activated(Int_t)", "ctbMain", this,
"HandleMenu(Int_t)");
i_dacs=-1;
i_pwrs=-1;
i_senses=-1;
i_sig=-1;
i_adcs=-1;
i_pat=-1;
i_acq=-1;
int i_page=0;
TGVerticalFrame *vframe=new TGVerticalFrame(this, 800,1200); //main frame
fMenuBar = new TGMenuBar(vframe, 1, 1, kHorizontalFrame);
fMenuBar->AddPopup("&File", fMenuFile, fMenuBarItemLayout);
// fMenuBar->AddPopup("&Test", fMenuTest, fMenuBarItemLayout);
// fMenuBar->AddPopup("&View", fMenuView, fMenuBarItemLayout);
// fMenuBar->AddPopup("&Help", fMenuHelp, fMenuBarHelpLayout);
vframe->AddFrame(fMenuBar, fMenuBarLayout);
TGHorizontalFrame* hpage=new TGHorizontalFrame(vframe, 800,1200); //horizontal frame. Inside there should be the tab and the canvas
mtab=new TGTab(hpage, 1500, 1200); //tab!
// page=new TGVerticalFrame(mtab, 1500,1200);
cout << "DACS" << endl;
TGCompositeFrame *tf = mtab->AddTab("DACs");
TGVerticalFrame *page=new TGVerticalFrame(tf, 1500,1200);
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
dacs=new ctbDacs(page, myDet);
i_dacs=i_page++;
cout << "power " << endl;
tf = mtab->AddTab("Power Supplies");
page=new TGVerticalFrame(tf, 1500,1200);
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
pwrs=new ctbPowers(page, myDet);
i_pwrs=i_page++;
cout << "sense " << endl;
tf = mtab->AddTab("Sense");
page=new TGVerticalFrame(tf, 1500,1200);
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
senses=new ctbSlowAdcs(page, myDet);
i_senses=i_page++;
cout << "signals " << endl;
tf = mtab->AddTab("Signals");
page=new TGVerticalFrame(tf, 1500,1200);
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
sig=new ctbSignals(page, myDet);
sig->Connect("ToggledSignalPlot(Int_t)","ctbMain",this,"setSignalPlot(Int_t)");
i_sig=i_page++;
cout << "adcs " << endl;
tf = mtab->AddTab("ADCs");
page=new TGVerticalFrame(tf, 1500,1200);
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
adcs=new ctbAdcs(page, myDet);
adcs->Connect("ToggledAdcPlot(Int_t)","ctbMain",this,"setADCPlot(Int_t)");
adcs->Connect("AdcEnable(Int_t)","ctbMain",this,"setADCEnable(Int_t)");
i_adcs=i_page++;
cout << "pattern" << endl;
tf = mtab->AddTab("Pattern");
page=new TGVerticalFrame(tf, 1500,1200);
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
pat=new ctbPattern(page, myDet);
pat->Connect("patternFileChanged(const char*)","ctbMain",this,"setPatternFile(const char*)");
pat->Connect("patternCompilerChanged(const char*)","ctbMain",this,"setPatternCompiler(const char*)");
pat->Connect("analogSamplesChanged(const int)","ctbMain",this,"setAnalogSamples(int)");
pat->Connect("digitalSamplesChanged(const int)","ctbMain",this,"setDigitalSamples(int)");
pat->Connect("readoutModeChanged(int)","ctbMain",this,"setReadoutMode(int)");
i_pat=i_page++;
cout << "acquisition" << endl;
tf = mtab->AddTab("Acquisition");
page=new TGVerticalFrame(tf, 1500,1200);
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
acq=new ctbAcquisition(page, myDet);
i_acq=i_page++;
// cout << "actions" << endl;
// tf = mtab->AddTab("Actions");
// page=new TGVerticalFrame(tf, 1500,1200);
// tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
// actions=new ctbActions(page, myDet);
// i_actions=i_page++;
cout << "tabs finished" << endl;
hpage->AddFrame(mtab,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
vframe->AddFrame(hpage,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
AddFrame(vframe,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
vframe->MapWindow();
hpage->MapWindow();
mtab->MapWindow();
page->MapWindow();
// Sets window name and shows the main frame
cout << "dockabel" << endl;
TGDockableFrame *fdock=new TGDockableFrame(hpage);
hpage->AddFrame(fdock, new TGLayoutHints(kLHintsBottom | kLHintsCenterX | kLHintsExpandX | kLHintsExpandY, 10,10,10,10));
fdock->MapWindow();
cout << "canvas" << endl;
// // Creates widgets of the example
fEcanvas = new TRootEmbeddedCanvas ("Ecanvas",fdock,800,800);//hpage,800,800);
//fEcanvas = new TRootEmbeddedCanvas ("Ecanvas",this,800,800);//hpage,800,800);
// fEcanvas->Resize();
// fEcanvas->GetCanvas()->Update();
//AddFrame(fEcanvas, new TGLayoutHints(kLHintsBottom | kLHintsCenterX | kLHintsExpandX | kLHintsExpandY, 10,10,10,10));
// // hpage->
fdock->AddFrame(fEcanvas, new TGLayoutHints(kLHintsBottom | kLHintsCenterX | kLHintsExpandX | kLHintsExpandY, 10,10,10,10));
fEcanvas->MapWindow();
acq->setCanvas(getCanvas());
hpage->MapSubwindows();
mtab->Connect("Selected(Int_t)","ctbMain",this,"tabSelected(Int_t)");
cout << "connect mtab" << endl;
setReadoutMode(pat->getReadoutMode());
setADCEnable(adcs->setEnable());
setAnalogSamples(pat->getAnalogSamples());
setDigitalSamples(pat->getDigitalSamples());
tabSelected(0);
SetWindowName("CTB Gui");
MapSubwindows();
Resize(1500,1200);
MapWindow();
}
void ctbMain::CloseWindow() {
gApplication->Terminate();
}
TCanvas* ctbMain::getCanvas() {
return fEcanvas->GetCanvas();
}
void ctbMain::HandleMenu(Int_t id)
{
// Handle menu items.
switch (id) {
case 0: // fMenuFile->AddEntry("Open Alias", im++);
cout << "Open Alias" << endl;
{
static TString dir(".");
TGFileInfo fi;
//fi.fFileTypes = filetypes;
fi.fIniDir = StrDup(dir);
printf("fIniDir = %s\n", fi.fIniDir);
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
// dir = fi.fIniDir;
if (fi.fFilename)
loadAlias(fi.fFilename);
}
break;
case 1: // fMenuFile->AddEntry("Save Alias", im++);
cout << "Save Alias" << endl;
{
static TString dir(".");
TGFileInfo fi;
//fi.fFileTypes = filetypes;
fi.fIniDir = StrDup(dir);
printf("fIniDir = %s\n", fi.fIniDir);
new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi);
printf("Save file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
// dir = fi.fIniDir;
if (fi.fFilename)
saveAlias(fi.fFilename);
}
break;
case 2: //fMenuFile->AddEntry("Open Parameters", im++);
cout << "Open Parameters" << endl;
{
static TString dir(".");
TGFileInfo fi;
//fi.fFileTypes = filetypes;
fi.fIniDir = StrDup(dir);
printf("fIniDir = %s\n", fi.fIniDir);
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
// dir = fi.fIniDir;
if (fi.fFilename)
loadParameters(fi.fFilename);
}
break;
case 3: // fMenuFile->AddEntry("Open Configuration", im++);
cout << "Open configuration" << endl;
{
static TString dir(".");
TGFileInfo fi;
//fi.fFileTypes = filetypes;
fi.fIniDir = StrDup(dir);
printf("fIniDir = %s\n", fi.fIniDir);
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
// dir = fi.fIniDir;
if (fi.fFilename)
loadConfiguration(fi.fFilename);
}
break;
case 4: //fMenuFile->AddEntry("Open Pattern", im++);
cout << "Open pattern" << endl;
{
static TString dir(".");
TGFileInfo fi;
//fi.fFileTypes = filetypes;
fi.fIniDir = StrDup(dir);
printf("fIniDir = %s\n", fi.fIniDir);
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
// dir = fi.fIniDir;
if (fi.fFilename)
loadParameters(fi.fFilename);
}
break;
case 5: //fMenuFile->AddEntry("Save Pattern", im++);
cout << "Save pattern" << endl;
{
static TString dir(".");
TGFileInfo fi;
//fi.fFileTypes = filetypes;
fi.fIniDir = StrDup(dir);
printf("fIniDir = %s\n", fi.fIniDir);
new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi);
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
// dir = fi.fIniDir;
if (fi.fFilename)
savePattern(fi.fFilename);
}
break;
case 6: // fMenuFile->AddEntry("Exit", im++);
CloseWindow();
default:
printf("Menu item %d selected\n", id);
break;
}
}
int ctbMain::setADCPlot(Int_t i) {
// cout << "ADC " << i << " plot or color toggled" << endl;
// acq->setGraph(i,adcs->getGraph(i));
acq->setGraph(i,adcs->getEnabled(i),adcs->getColor(i));
return -1;
}
int ctbMain::setSignalPlot(Int_t i) {
// cout << "ADC " << i << " plot or color toggled" << endl;
// acq->setGraph(i,adcs->getGraph(i));
acq->setBitGraph(i,sig->getPlot(i),sig->getColor(i));
return -1;
}
void ctbMain::loadConfiguration(string fname) {
try{
myDet->loadConfig(fname);
} CATCH_DISPLAY ("Could not load config.", "ctbMain::loadConfiguration")
}
void ctbMain::loadParameters(string fname) {
try{
myDet->loadParameters(fname);
} CATCH_DISPLAY ("Could not load parameters.", "ctbMain::loadParameters")
}
void ctbMain::savePattern(string fname) {
try{
myDet->savePattern(fname);
} CATCH_DISPLAY ("Could not save pattern.", "ctbMain::savePattern")
}
int ctbMain::loadAlias(string fname) {
string line;
char aaaa[1000];
int i;
ifstream myfile (fname.c_str());
if (myfile.is_open())
{
while ( getline (myfile,line) )
{
// cout << line ;
if (sscanf(line.c_str(),"BIT%d",&i)>0) {
//cout << "*******" << line<< endl;
sig->setSignalAlias(line);
// cout << line ;
} else if (sscanf(line.c_str(),"DAC%d",&i)>0) {
dacs->setDacAlias(line);
// cout << "+++++++++" << line<< endl;
} else if (sscanf(line.c_str(),"ADC%d",&i)>0) {
adcs->setAdcAlias(line);
// cout << "---------" << line<< endl;
} // else
// cout << "<<<<<<<" << line << endl;
else if (sscanf(line.c_str(),"PAT%s",aaaa)>0) {
pat->setPatternAlias(line);
// cout << "---------" << line<< endl;
} else if (sscanf(line.c_str(),"V%s",aaaa)>0) {
if (pwrs) pwrs->setPwrAlias(line);
// cout << "+++++++++" << line<< endl;
} else if (sscanf(line.c_str(),"SENSE%d",&i)>0) {
if (senses) senses->setSlowAdcAlias(line);
// cout << "+++++++++" << line<< endl;
}
}
myfile.close();
}
else cout << "Unable to open file";
return 0;
}
int ctbMain::saveAlias(string fname) {
string line;
ofstream myfile (fname.c_str());
if (myfile.is_open())
{
//while ( getline (myfile,line) )
// {
// cout << line ;
//if (sscanf(line.c_str(),"BIT%d",&i)>0) {
//cout << "*******" << line<< endl;
myfile << sig->getSignalAlias();
// cout << line ;
// } else if (sscanf(line.c_str(),"DAC%d",&i)>0) {
myfile << dacs->getDacAlias();
if (pwrs) myfile << pwrs->getPwrAlias();
if (senses) myfile << senses->getSlowAdcAlias();
// cout << "+++++++++" << line<< endl;
// } else if (sscanf(line.c_str(),"ADC%d",&i)>0) {
myfile << adcs->getAdcAlias();
// cout << "---------" << line<< endl;
// } // else
// cout << "<<<<<<<" << line << endl;
myfile << pat->getPatternAlias();
//}
myfile.close();
}
else cout << "Unable to open file";
return 0;
}
void ctbMain::tabSelected(Int_t i) {
// cout << "Selected tab " << i << endl;
// cout << "Current tab is " << mtab->GetCurrent() << endl;
if (i==i_dacs) dacs->update();
else if (i==i_pwrs) pwrs->update();
else if (i==i_senses) ;//senses->update();
else if (i==i_sig) sig->update();
else if (i==i_adcs) adcs->update();
else if (i==i_pat) pat->update();
else if (i==i_acq) acq->update();
else if (i==i_acq) acq->update();
// else if (i==i_actions) actions->update();
else cout << "Unknown tab " << i << endl;
}
void ctbMain::setPatternFile(const char* t) {
acq->setPatternFile(t);
}
void ctbMain::setPatternCompiler(const char* t) {
acq->setPatternCompiler(t);
}
void ctbMain::setAnalogSamples(const int n) {
acq->setAnalogSamples(n);
}
void ctbMain::setDigitalSamples(const int n) {
acq->setDigitalSamples(n);
}
void ctbMain::setReadoutMode(int flags) {
acq->setReadoutMode(flags);
}
void ctbMain::setADCEnable(Int_t reg){
acq->setADCEnable(reg);
}

128
ctbGui/ctbMain.h Executable file
View File

@ -0,0 +1,128 @@
#ifndef CTBMAIN_H
#define CTBMAIN_H
#include <TGFrame.h>
class TRootEmbeddedCanvas;
class TGButtonGroup;
class TGVerticalFrame;
class TGHorizontalFrame;
class TGTextEntry;
class TGLabel;
class TGNumberEntry;
class TH2F;
class TGComboBox;
class TGCheckButton;
class THStack;
class TGraphErrors;
class TGTextButton;
class TGTab;
class TGMenuBar;
class TGPopupMenu;
class TGDockableFrame;
class TGLayoutHints;
class TGCanvas;
class TCanvas;
class ctbDacs;
class ctbSlowAdcs;
class ctbPowers;
class ctbSignals;
namespace sls
{
class Detector;
};
class ctbPattern;
class ctbAdcs;
class ctbAcquisition;
//class ctbActions;
#include <string>
using namespace std;
class ctbMain : public TGMainFrame {
private:
sls::Detector *myDet;
TRootEmbeddedCanvas *fEcanvas;
TRootEmbeddedCanvas *fModulecanvas;
TGButtonGroup *br;
TGTab *mtab;
ctbDacs *dacs;
int i_dacs;
ctbPowers *pwrs;
int i_pwrs;
ctbSlowAdcs *senses;
int i_senses;
ctbSignals *sig;
int i_sig;
ctbAdcs *adcs;
int i_adcs;
ctbPattern *pat;
int i_pat;
ctbAcquisition *acq;
int i_acq;
// ctbActions *actions;
int i_actions;
TGDockableFrame *fMenuDock;
TGMenuBar *fMenuBar;
TGPopupMenu *fMenuFile, *fMenuTest, *fMenuView, *fMenuHelp;
TGPopupMenu *fCascadeMenu, *fCascade1Menu, *fCascade2Menu;
TGPopupMenu *fMenuNew1, *fMenuNew2;
TGLayoutHints *fMenuBarLayout, *fMenuBarItemLayout, *fMenuBarHelpLayout;
TGCanvas *myCanvas;
public:
ctbMain(const TGWindow *p, sls::Detector *det);
int loadAlias(string fname);
int saveAlias(string fname);
void loadParameters(string fname);
void savePattern(string fname);
void loadConfiguration(string fname);
void tabSelected(Int_t);
int setADCPlot(Int_t);
int setSignalPlot(Int_t);
void CloseWindow();
void setPatternFile(const char* t);
void setPatternCompiler(const char* t);
void setAnalogSamples(const int);
void setDigitalSamples(const int);
void setReadoutMode(int);
void setADCEnable(Int_t);
void HandleMenu(Int_t);
TCanvas* getCanvas();
ClassDef(ctbMain,0)
};
#endif

1096
ctbGui/ctbPattern.cpp Executable file

File diff suppressed because it is too large Load Diff

179
ctbGui/ctbPattern.h Executable file
View File

@ -0,0 +1,179 @@
#ifndef CTBPATTERN_H
#define CTBPATTERN_H
#include <TGFrame.h>
#define NLOOPS 3
#define NWAITS 3
#define NADCS 32
#define PATLEN 1024
class TRootEmbeddedCanvas;
class TGButtonGroup;
class TGVerticalFrame;
class TGHorizontalFrame;
class TGTextEntry;
class TGLabel;
class TGNumberEntry;
class TH2F;
class TGComboBox;
class TGCheckButton;
class TGTextEntry;
class TGCheckButton;
class THStack;
class TGraphErrors;
class energyCalibration;
class TGTextButton;
class TGTab;
namespace sls
{
class Detector;
};
#include <string>
using namespace std;
class ctbLoop : public TGHorizontalFrame {
private:
TGNumberEntry *eLoopStartAddr;
TGNumberEntry *eLoopStopAddr;
TGNumberEntry *eLoopNumber;
int id;
sls::Detector *myDet;
public:
ctbLoop(TGGroupFrame *page, int i,sls::Detector *det);
void setNLoops();
void update();
ClassDef(ctbLoop,0)
};
class ctbWait : public TGHorizontalFrame {
private:
TGNumberEntry *eWaitAddr;
TGNumberEntry *eWaitTime;
int id;
sls::Detector *myDet;
public:
ctbWait(TGGroupFrame *page, int i,sls::Detector *det);
void setWaitTime();
void update();
ClassDef(ctbWait,0)
};
class ctbPattern : public TGGroupFrame {
private:
TGNumberEntry *eAdcClkFreq;
TGNumberEntry *eRunClkFreq;
TGNumberEntry *eDBitClkFreq;
TGNumberEntry *eAdcClkPhase;
TGNumberEntry *eDBitClkPhase;
//TGNumberEntry *eRunClkPhase;
TGNumberEntry *eStartAddr;
TGNumberEntry *eStopAddr;
TGNumberEntry *eFrames;
TGNumberEntry *ePeriod;
TGNumberEntry *eTriggers;
// TGNumberEntry *eMeasurements;
TGNumberEntry *eAdcPipeline;
TGNumberEntry *eDBitPipeline;
ctbLoop *eLoop[NLOOPS];
ctbWait *eWait[NWAITS];
TGTextEntry *patternCompiler;
TGTextEntry *patternFile;
TGTextButton *browseCompiler;
TGTextButton *browseFile;
TGNumberEntry *eAnalogSamples;
TGNumberEntry *eDigitalSamples;
TGCheckButton *cbAnalog;
TGCheckButton *cbDigital;
char pat[PATLEN*8];
sls::Detector *myDet;
public:
ctbPattern(TGVerticalFrame *page, sls::Detector *det);
void update();
void setAdcFreq();
void setRunFreq();
void setDBitFreq();
void setAdcPhase();
void setDBitPhase();
// void setRunPhase();
void setAdcPipeline();
void setDBitPipeline();
void setFrames();
void setTriggers();
// void setMeasurements();
void setPeriod();
void chooseCompiler();
void choosePattern();
string getCompiler();
string getPatternFile();
void setPatternAlias(string);
string getPatternAlias();
int getAnalogSamples();
void setAnalogSamples();
int getDigitalSamples();
void setDigitalSamples();
void setReadoutMode(Bool_t);
int getReadoutMode();
void setFile();
void setCompiler();
void patternFileChanged(const char*);
void patternCompilerChanged(const char*);
void analogSamplesChanged(const int t);
void digitalSamplesChanged(const int t);
void readoutModeChanged(int);
ClassDef(ctbPattern,0)
};
#endif

223
ctbGui/ctbPowers.cpp Normal file
View File

@ -0,0 +1,223 @@
#include <TGFrame.h>
#include <TGButtonGroup.h>
#include <TGNumberEntry.h>
#include <TGLabel.h>
#include <TList.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include "ctbDefs.h"
#include "ctbDacs.h"
#include "ctbPowers.h"
#include "Detector.h"
#include "sls_detector_defs.h"
using namespace std;
ctbPower::ctbPower(TGGroupFrame* f, int i, sls::Detector* d)
: ctbDac(f, i, d)
{
cout << "****************************************************************power " << i << endl;
dacsUnit->SetOn(kTRUE);
dacsUnit->SetEnabled(kFALSE);
switch(i) {
case slsDetectorDefs::V_POWER_IO:
dacsLabel->SetText("VIO");
break;
case slsDetectorDefs::V_POWER_A:
dacsLabel->SetText("VA");
break;
case slsDetectorDefs::V_POWER_B:
dacsLabel->SetText("VB");
break;
case slsDetectorDefs::V_POWER_C:
dacsLabel->SetText("VC");
break;
case slsDetectorDefs::V_POWER_D:
dacsLabel->SetText("VD");
break;
case slsDetectorDefs::V_POWER_CHIP:
dacsLabel->SetText("VCHIP");
dacsLabel->SetEnabled(kFALSE);
break;
default:
dacsLabel->SetText("Bad index");
break;
};
TGTextEntry *e=dacsEntry->TGNumberEntry::GetNumberEntry();
e->Disconnect ("ReturnPressed()");
e->Disconnect ("ValueSet(Long_t)");
e->Connect("ReturnPressed()","ctbPower",this,"setValue()");
dacsEntry->Connect("ValueSet(Long_t)","ctbPower",this,"setValue(Long_t)");
};
string ctbPower::getLabel() {
ostringstream line;
switch (id) {
case slsDetectorDefs::V_POWER_IO:
line << "VIO";
break;
case slsDetectorDefs::V_POWER_A:
line << "VA";
break;
case slsDetectorDefs::V_POWER_B:
line << "VB";
break;
case slsDetectorDefs::V_POWER_C:
line << "VC";
break;
case slsDetectorDefs::V_POWER_D:
line << "VD";
break;
case slsDetectorDefs::V_POWER_CHIP:
line << "VCHIP";
break;
default:
line << "VBAD";
break;
}
line << " " << dacsLabel->GetText() << endl;
return line.str();
}
void ctbPower::setValue(Long_t a) {ctbPower::setValue();}
void ctbPower::setValue() {
cout << "***************************Setting power " << dacsEntry->GetIntNumber() << " " << id << " " << 1 << endl;
try {
myDet->setVoltage(static_cast<slsDetectorDefs::dacIndex>(id), dacsEntry->GetIntNumber());
} CATCH_DISPLAY ("Could not set power " + to_string(id) + ".", "ctbPower::setValue")
getValue();
}
int ctbPower::getValue() {
try {
int val = myDet->getVoltage(static_cast<slsDetectorDefs::dacIndex>(id)).tsquash("Different values");
cout << "****************************Getting power " << val << " " << id << " " << 1 << endl;
dacsValue->SetText(to_string(val).c_str());
if (val > 0) {
if (id != static_cast<int>(slsDetectorDefs::V_POWER_CHIP))
dacsLabel->SetOn(kTRUE);
} else {
dacsLabel->SetOn(kFALSE);
}
return val;
} CATCH_DISPLAY ("Could not get power " + to_string(id) + ".", "ctbPower::getValue")
return -1;
}
ctbPowers::ctbPowers(TGVerticalFrame* page, sls::Detector* det) : TGGroupFrame(page,"Power Supplies",kVerticalFrame) , myDet(det){
SetTitlePos(TGGroupFrame::kLeft);
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
MapWindow();
// cout << "window mapped " << endl;
for (int idac=0; idac<NPOWERS; idac++) {
dacs[idac]=new ctbPower(this, slsDetectorDefs::V_POWER_A+idac, myDet);
}
}
int ctbPowers::setPwrAlias(string line) {
int is=-1;
char tit[100];
if (sscanf(line.c_str(),"VA %s",tit)) {
dacs[0]->setLabel(tit,1);
is=0;
}
if (sscanf(line.c_str(),"VB %s",tit)) {
dacs[1]->setLabel(tit,1);
is=1;
}
if (sscanf(line.c_str(),"VC %s",tit)) {
dacs[2]->setLabel(tit,1);
is=2;
}
if (sscanf(line.c_str(),"VD %s",tit)) {
dacs[3]->setLabel(tit,1);
is=3;
}
if (sscanf(line.c_str(),"VIO %s",tit)) {
dacs[4]->setLabel(tit,1);
is=4;
}
if (sscanf(line.c_str(),"VCHIP %s",tit)) {
dacs[5]->setLabel(tit,1);
is=5;
}
return is;
}
string ctbPowers::getPwrAlias() {
ostringstream line;
for (int i=0; i<NPOWERS; i++)
line << dacs[i]->getLabel() << endl;
return line.str();
}
string ctbPowers::getPwrParameters() {
ostringstream line;
line << "v_a" << " " << dacs[0]->getValue() << " mv" << endl;
line << "v_b" << " " << dacs[1]->getValue() << " mv" << endl;
line << "v_c" << " " << dacs[2]->getValue() << " mv" << endl;
line << "v_d" << " " << dacs[3]->getValue() << " mv" << endl;
line << "v_io" << " " << dacs[4]->getValue() << " mv" << endl;
line << "v_chip" << " " << dacs[5]->getValue() << " mv" << endl;
// for (int i=0; i<POWERS; i++) {
// //line << "dacs:" << i << " " << dacs[i]->getValue << endl;
// line << "dac:" << i << " " << dacs[i]->getValue() << endl;
// }
return line.str();
}
void ctbPowers::update() {
for (int idac=0; idac<NPOWERS; idac++) {
dacs[idac]->getValue();
}
}

67
ctbGui/ctbPowers.h Normal file
View File

@ -0,0 +1,67 @@
#ifndef CTBPOWERS_H
#define CTBPOWERS_H
#include <TGFrame.h>
#define NPOWERS 6
class TGTextEntry;
class TGLabel;
class TGNumberEntry;
class TGCheckButton;
namespace sls
{
class Detector;
};
#include <string>
using namespace std;
class ctbPower : public ctbDac {
public:
ctbPower(TGGroupFrame* f, int i, sls::Detector* d);
string getLabel();
int getValue();
void setValue();
void setValue(Long_t);
ClassDef(ctbPower,0)
};
class ctbPowers : public TGGroupFrame
{
private:
ctbPower *dacs[NPOWERS];
sls::Detector* myDet;
public:
//ctbPowers();
ctbPowers(TGVerticalFrame*, sls::Detector*);
int setPwrAlias(string);
string getPwrAlias();
string getPwrParameters();
void update();
ClassDef(ctbPowers,0)
};
#endif

531
ctbGui/ctbSignals.cpp Executable file
View File

@ -0,0 +1,531 @@
#include <TApplication.h>
#include <TGClient.h>
#include <TCanvas.h>
#include <TF1.h>
#include <TRandom.h>
#include <TGButton.h>
#include <TRootEmbeddedCanvas.h>
#include <TGButtonGroup.h>
#include <TGNumberEntry.h>
#include <TGLabel.h>
#include <TList.h>
#include <TGFileDialog.h>
#include <TGComboBox.h>
#include <TH2F.h>
#include <TColor.h>
#include <TH1F.h>
#include <TGraphErrors.h>
#include <THStack.h>
#include <TGTab.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <TGButton.h>
#include <TRootEmbeddedCanvas.h>
#include <TGButtonGroup.h>
#include <TGNumberEntry.h>
#include <TGLabel.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <TColor.h>
#include <TGColorSelect.h>
#include "ctbSignals.h"
#include "ctbDefs.h"
#include "Detector.h"
using namespace std;
//#define DEFAULTFN "run_0.encal"
ctbSignal::ctbSignal(TGFrame *page, int i, sls::Detector *det)
: TGHorizontalFrame(page, 800,50), myDet(det), id(i), hsig(NULL) {
TGHorizontalFrame *hframe=this;
char tit[100];
sprintf(tit, "BIT%d ",id);
sLabel= new TGLabel(hframe, tit);
hframe->AddFrame( sLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
sLabel->MapWindow();
sLabel->SetTextJustify(kTextLeft);
sOutput= new TGCheckButton(hframe, "Out");
hframe->AddFrame( sOutput,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
sOutput->MapWindow();
sOutput->Connect("Toggled(Bool_t)","ctbSignal",this,"ToggledOutput(Bool_t)");
sDbitList= new TGCheckButton(hframe, "DB List");
hframe->AddFrame( sDbitList,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
sDbitList->MapWindow();
sDbitList->Connect("Toggled(Bool_t)","ctbSignal",this,"ToggledDbitList(Bool_t)");
sPlot= new TGCheckButton(hframe, "Plot");
hframe->AddFrame( sPlot,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
sPlot->MapWindow();
sPlot->Connect("Toggled(Bool_t)","ctbSignal",this,"ToggledPlot(Bool_t)");
fColorSel = new TGColorSelect(hframe, id+1, 0);
fColorSel->Connect("ColorSelected(Pixel_t)","ctbSignal",this,"ColorChanged(Pixel_t)");
hframe->AddFrame(fColorSel, new TGLayoutHints(kLHintsTop |
kLHintsLeft, 2, 0, 2, 2));
fColorSel->SetColor(TColor::Number2Pixel(id+1));
ToggledOutput(kFALSE);
ToggledPlot(kFALSE);
// if (id==63) {
// sOutput->SetOn(kTRUE);
// sOutput->SetEnabled(kFALSE);
// }
// #ifdef CTB
// if (id==62) {
// sOutput->SetOn(kTRUE);
// sOutput->SetEnabled(kFALSE);
// }
// // if (id>=32 && id<48)
// // fixOutput(1);
// // else if (id>=48 && id<64)
// // fixOutput(0);
// #endif
}
int ctbSignal::setSignalAlias(char *tit, int plot, int col) {
if (tit)
sLabel->SetText(tit);
if (plot>0) {
sPlot->SetOn(kTRUE,kTRUE);
} else if (plot==0)
sPlot->SetOn(kFALSE,kTRUE);
if (col>=0)
fColorSel->SetColor(col);//TColor::Number2Pixel(col+1));
fColorSel->SetEnabled(sPlot->IsOn());
return 0;
}
string ctbSignal::getSignalAlias() {
ostringstream oss;
oss << "BIT" << dec << id << " " << sLabel->GetText()->Data() << " " << sPlot->IsOn() << hex << " " << fColorSel->GetColor() << endl;
return oss.str();
}
int ctbSignal::setOutput(Long64_t r) {
// cout << hex << r << dec <<endl;
Long64_t mask=((Long64_t)1<<id);
if (r&mask)
sOutput->SetOn(kTRUE,kTRUE);
else
sOutput->SetOn(kFALSE,kTRUE);
return sOutput->IsOn();
}
int ctbSignal::fixOutput(int i) {
if (i) {
sPlot->SetOn(kFALSE);
//sClock->SetOn(kFALSE,kTRUE);
sOutput->SetOn(kTRUE);
// sPlot->SetEnabled(kFALSE);
// sClock->SetEnabled(kTRUE);
} else {
sOutput->SetOn(kFALSE,kTRUE);
// sClock->SetOn(kFALSE);
// sClock->SetEnabled(kFALSE);
sPlot->SetEnabled(kTRUE);
}
sOutput->SetEnabled(kFALSE);
return 0;
}
int ctbSignal::setDbitList(Long64_t r) {
if (r)
sDbitList->SetOn(kTRUE,kFALSE);
else
sDbitList->SetOn(kFALSE,kFALSE);
return sDbitList->IsOn();
}
int ctbSignal::isDbitList() { return sDbitList->IsOn();}
int ctbSignal::isOutput() { return sOutput->IsOn();}
int ctbSignal::isPlot() { return sPlot->IsOn();}
Pixel_t ctbSignal::getColor(){return fColorSel->GetColor();}
void ctbSignal::ToggledOutput(Bool_t b) {
ToggledSignalOutput(id);
if (b) {
// sClock->SetEnabled(kTRUE);
sPlot->SetOn(kFALSE);
// sPlot->SetEnabled(kFALSE);
fColorSel->SetEnabled(kFALSE);
} else {
// sClock->SetEnabled(kFALSE);
// sClock->SetOn(kFALSE);
sPlot->SetEnabled(kTRUE);
if ( sPlot->IsOn())
fColorSel->SetEnabled(kFALSE);
else
fColorSel->SetEnabled(kTRUE);
}
}
void ctbSignal::ToggledDbitList(Bool_t b){
Long_t mask=id;
ToggledSignalDbitList(mask);
}
void ctbSignal::ToggledPlot(Bool_t b){
Long_t mask=b<<id;
ToggledSignalPlot(mask);
fColorSel->SetEnabled(b);
}
void ctbSignal::ColorChanged(Pixel_t p){
ToggledSignalPlot(id);
}
void ctbSignal::ToggledSignalOutput(Int_t b) {
cout << "Toggle signal " << id << " " << b << " " << sOutput->IsOn() <<endl;;
Emit("ToggledSignalOutput(Int_t)", id);
}
void ctbSignal::ToggledSignalDbitList(Int_t b){
cout << "Toggle dbitlist " << id << " " << b << endl;;
Emit("ToggledSignalDbitList(Int_t)", id);
}
void ctbSignal::ToggledSignalPlot(Int_t b){
Emit("ToggledSignalPlot(Int_t)", id);
}
ctbSignals::ctbSignals(TGVerticalFrame *page, sls::Detector *det)
: TGGroupFrame(page,"IO Signals",kVerticalFrame), myDet(det) {
SetTitlePos(TGGroupFrame::kLeft);
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
MapWindow();
TGHorizontalFrame *hframe;
TGHorizontalFrame* hhframe=new TGHorizontalFrame(this, 800,800);
AddFrame(hhframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hhframe->MapWindow();
TGVerticalFrame *vframe;
int idac=0;
for (idac=0; idac<NSIGNALS; idac++) {
if (idac%((NSIGNALS+2)/2)==0) {
vframe=new TGVerticalFrame(hhframe, 400,800);
hhframe->AddFrame(vframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
vframe->MapWindow();
}
signals[idac]=new ctbSignal(vframe,idac,myDet);
signals[idac]->Connect("ToggledSignalOutput(Int_t)","ctbSignals",this,"ToggledOutReg(Int_t)");
signals[idac]->Connect("ToggledSignalDbitList(Int_t)","ctbSignals",this,"ToggledDbitList(Int_t)");
signals[idac]->Connect("ToggledSignalPlot(Int_t)","ctbSignals",this,"ToggledPlot(Int_t)");
vframe->AddFrame(signals[idac],new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
signals[idac]->MapWindow();
}
hframe=new TGHorizontalFrame(vframe, 800,50);
vframe->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hframe->MapWindow();
TGLabel *label= new TGLabel(hframe, "IO Control Register: ");
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
label->MapWindow();
label->SetTextJustify(kTextLeft);
eIOCntrlRegister = new TGNumberEntry(hframe, 0, 16,999, TGNumberFormat::kNESHex,
TGNumberFormat::kNEANonNegative,
TGNumberFormat::kNELNoLimits);
hframe->AddFrame(eIOCntrlRegister,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
eIOCntrlRegister->MapWindow();
eIOCntrlRegister->Resize(150,30);
hframe=new TGHorizontalFrame(vframe, 800,50);
vframe->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
hframe->MapWindow();
label= new TGLabel(hframe, "DBit Offset: ");
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
label->MapWindow();
label->SetTextJustify(kTextLeft);
eDbitOffset = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
TGNumberFormat::kNEANonNegative,
TGNumberFormat::kNELNoLimits);
hframe->AddFrame(eDbitOffset,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
eDbitOffset->MapWindow();
eDbitOffset->Resize(150,30);
TGTextEntry *e= eDbitOffset->TGNumberEntry::GetNumberEntry();
e->Connect("ReturnPressed()","ctbSignals",this,"setDbitOffset()");
e->Connect("ValueSet(Long_t)","ctbSignals",this,"setDbitOffset(Long_t)");
}
int ctbSignals::setSignalAlias(string line) {
int is=-1, plot=0, col=-1;
char tit[100];
int narg=sscanf(line.c_str(),"BIT%d %s %d %d",&is,tit,&plot,&col);
if (narg<2)
return -1;
if (is>=0 && is<NIOSIGNALS) {
signals[is]->setSignalAlias(tit,plot,col);
}
return is;
}
string ctbSignals::getSignalAlias() {
ostringstream oss;
for (int is=0; is<NIOSIGNALS; is++)
oss << signals[is]->getSignalAlias() << endl;
return oss.str();
}
void ctbSignals::update() {
try {
Long64_t oreg = static_cast<Long64_t>(myDet->getPatternIOControl().tsquash("Different values"));
cout << hex << oreg << dec << endl;
for (int idac=0; idac<NIOSIGNALS; idac++) {
signals[idac]->setOutput(oreg);
}
} CATCH_DISPLAY ("Could not get patternIOcontrol.", "ctbSignals::update")
try {
auto dbitlist = myDet->getRxDbitList().tsquash("Different values");
// enable all
if (dbitlist.empty()) {
for (int is=0; is<64; is++) {
signals[is]->setDbitList(1);
}
}
else {
// disable all
for (int is=0; is<64; is++) {
signals[is]->setDbitList(0);
}
// enable selected
for (const auto &value : dbitlist) {
signals[value]->setDbitList(1);
}
}
} CATCH_DISPLAY ("Could not get receiver dbit list.", "ctbSignals::update")
try {
auto val = myDet->getRxDbitOffset().tsquash("Different values");
eDbitOffset->SetNumber(val);
} CATCH_DISPLAY ("Could not get receiver dbit offset.", "ctbSignals::update")
}
string ctbSignals::getSignalParameters() {
try {
auto val = myDet->getPatternIOControl().tsquash("Different values");
ostringstream line;
line << "patioctrl " << hex << val << dec << endl;
return line.str();
} CATCH_DISPLAY ("Could not get patternIOcontrol.", "ctbSignals::getSignalParameters")
return ("");
}
void ctbSignals::ToggledOutReg(Int_t mask) {
try {
Long64_t oreg = static_cast<Long64_t>(myDet->getPatternIOControl().tsquash("Different values"));
Long64_t m=((Long64_t)1)<<mask;
cout << dec << sizeof(Long64_t) << " " << mask << " " << hex << m << " ioreg " << oreg;
if (signals[mask]->isOutput()) {
cout << " or " << m ;
oreg|=m;
} else {
cout << " not " << ~m ;
oreg&=~m;
}
cout << " after " << oreg << endl;
myDet->setPatternIOControl(static_cast<uint64_t>(oreg));
oreg = static_cast<Long64_t>(myDet->getPatternIOControl().tsquash("Different values"));
cout << dec << sizeof(Long64_t) << " " << mask << " " << hex << m << " ioreg " << oreg << endl;
eIOCntrlRegister->SetText(to_string(oreg).c_str());
} CATCH_DISPLAY ("Could not get/set patternIOcontrol.", "ctbSignals::ToggledOutReg")
}
void ctbSignals::ToggledDbitList(Int_t mask){
try {
auto dbitlist = myDet->getRxDbitList().tsquash("Different values");
// anyway all enabled
if ((dbitlist.empty()) && (signals[mask]->isDbitList())) {
;
}
// set the dbitlist
else {
std::vector <int> new_dbitlist;
for (int is=0; is<64; is++) {
if (signals[is]->isDbitList()){
new_dbitlist.push_back(is);
cout << is << " " << new_dbitlist.size() - 1 << endl;
}
}
if (new_dbitlist.size() > 64)
new_dbitlist.clear();
myDet->setRxDbitList(new_dbitlist);
// get list again
dbitlist = myDet->getRxDbitList().tsquash("Different values");
}
// enable all
if (dbitlist.empty()) {
for (int is=0; is<64; is++) {
signals[is]->setDbitList(1);
}
}
else {
// disable all
for (int is=0; is<64; is++) {
signals[is]->setDbitList(0);
}
// enable selected
for (const auto &value : dbitlist) {
signals[value]->setDbitList(1);
}
}
} CATCH_DISPLAY ("Could not get/set receiver dbit list.", "ctbSignals::ToggledDbitList")
}
void ctbSignals::ToggledPlot(Int_t b) {
Emit("ToggledSignalPlot(Int_t)", b);
}
void ctbSignals::ToggledSignalPlot(Int_t b) {
Emit("ToggledSignalPlot(Int_t)", b);
}
Pixel_t ctbSignals::getColor(int i){
if (i>=0 && i<NSIGNALS)
return signals[i]->getColor();
return static_cast<Pixel_t>(-1);
}
int ctbSignals::getPlot(int i){
if (i>=0 && i<NSIGNALS)
return signals[i]->isPlot();
return -1;
};
void ctbSignals::setDbitOffset(Long_t) {
setDbitOffset();
}
void ctbSignals::setDbitOffset(){
try {
myDet->setRxDbitOffset(eDbitOffset->GetNumber());
} CATCH_DISPLAY ("Could not set receiver dbit offset.", "ctbSignals::setDbitOffset")
}

121
ctbGui/ctbSignals.h Executable file
View File

@ -0,0 +1,121 @@
#ifndef CTBSIGNALS_H
#define CTBSIGNALS_H
#include <TGFrame.h>
#define NSIGNALS 64
#define NIOSIGNALS 64 //for moench board was 52
#define ADCLATCH 63
#define DIGSIGLATCH 62
class TGTextEntry;
class TGLabel;
class TGNumberEntry;
class TGCheckButton;
class TH1I;
class TGTextButton;
class TGColorSelect;
class TGNumberEntry;
namespace sls
{
class Detector;
};
class ctbSignal;
#include <string>
using namespace std;
class ctbSignal : public TGHorizontalFrame {
// RQ_OBJECT("ctbSignal")
private:
TGLabel *sLabel;
TGCheckButton *sOutput;
TGCheckButton *sDbitList;
TGCheckButton *sPlot;
TGLabel *sValue;
TGNumberEntry *sEntry;
TGColorSelect *fColorSel;
sls::Detector *myDet;
Int_t id;
TH1I *hsig;
public:
ctbSignal(TGFrame *page, int i, sls::Detector *det);
int setSignalAlias(char *tit, int plot, int col);
string getSignalAlias();
TH1I *getPlot() {return hsig;};
int setOutput(Long64_t);
int fixOutput(int);
int setDbitList(Long64_t);
void ToggledOutput(Bool_t);
void ToggledDbitList(Bool_t);
void ToggledPlot(Bool_t);
void ColorChanged(Pixel_t);
int isDbitList();
int isOutput();
int isPlot();
Pixel_t getColor();
void ToggledSignalOutput(Int_t); //*SIGNAL*
void ToggledSignalDbitList(Int_t); //*SIGNAL*
void ToggledSignalPlot(Int_t); //*SIGNAL*
ClassDef(ctbSignal,0)
};
class ctbSignals : public TGGroupFrame {
private:
ctbSignal *signals[NSIGNALS];
TGNumberEntry *eIOCntrlRegister;
TGNumberEntry *eDbitOffset;
sls::Detector *myDet;
public:
ctbSignals(TGVerticalFrame *page, sls::Detector *det);
int setSignalAlias(string line);
string getSignalAlias();
int getPlot(int);
Pixel_t getColor(int);
void update();
// void saveParameters();
string getSignalParameters();
//void setDbitList(Int_t);
void setDbitOffset(Long_t);
void setDbitOffset();
void ToggledOutReg(Int_t);
void ToggledDbitList(Int_t);
void ToggledPlot(Int_t);
void ToggledSignalPlot(Int_t); //*SIGNAL*
ClassDef(ctbSignals,0)
};
#endif

182
ctbGui/ctbSlowAdcs.cpp Normal file
View File

@ -0,0 +1,182 @@
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <TGTextEntry.h>
#include <TGLabel.h>
#include <TGNumberEntry.h>
#include <TGButton.h>
#include "ctbSlowAdcs.h"
#include "ctbDefs.h"
#include "Detector.h"
#include "sls_detector_defs.h"
using namespace std;
ctbSlowAdc::ctbSlowAdc(TGGroupFrame *page, int idac, sls::Detector *det) : TGHorizontalFrame(page, 800,50) , id(idac), myDet(det) {
TGHorizontalFrame *hframe=this;
page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
MapWindow();
char tit[100];
sprintf(tit, "SENSE %d:",idac-1000);
dacsLabel= new TGLabel(hframe, tit);// new TGLabel(hframe, tit);
hframe->AddFrame(dacsLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
dacsLabel->MapWindow();
dacsLabel->SetTextJustify(kTextLeft);
sprintf(tit, "xxx");
dacsValue= new TGLabel(hframe, tit);
hframe->AddFrame( dacsValue,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
dacsValue->MapWindow();
dacsValue->SetTextJustify(kTextLeft);
TGTextButton *b= new TGTextButton(hframe, "Update");
hframe->AddFrame( b,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
b->MapWindow();
b->SetTextJustify(kTextLeft);
b->Connect("Clicked()","ctbSlowAdc",this,"getValue()");
}
int ctbSlowAdc::setLabel(char *tit) {
if(tit)
dacsLabel->SetText(tit);
return id;
}
string ctbSlowAdc::getLabel() {
ostringstream line;
line << dacsLabel->GetText() << endl;
// line << "DAC" << dec << id << " " << dacsUnit->IsOn() << endl;
return line.str();
}
int ctbSlowAdc::getValue() {
try {
std::string s;
// temp
if (id == static_cast<int>(slsDetectorDefs::SLOW_ADC_TEMP)) {
int val = myDet->getTemperature(static_cast<slsDetectorDefs::dacIndex>(id)).tsquash("Different values");
cout << "slow adc temp" << " " << val << endl;
s = to_string(val) + " " + to_string(0x00b0) + "C";//<2F>C
dacsValue->SetText(s.c_str());
return val;
}
// mv
else {
int val = myDet->getSlowADC(static_cast<slsDetectorDefs::dacIndex>(id)).tsquash("Different values");
cout << "slow adc " << id << " " << val << endl;
s = to_string(val) + " mV";
dacsValue->SetText(s.c_str());
return val;
}
} CATCH_DISPLAY ("Could not get slow dac " + to_string(id) + ".", "ctbSlowAdc::getValue")
return -1;
}
ctbSlowAdcs::ctbSlowAdcs(TGVerticalFrame *page, sls::Detector *det) : TGGroupFrame(page,"Sense",kVerticalFrame) , myDet(det){
SetTitlePos(TGGroupFrame::kLeft);
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
MapWindow();
// cout << "window mapped " << endl;
for (int idac=0; idac<NSLOWADCS + 1; idac++) {
adcs[idac]=new ctbSlowAdc(this, idac+1000, myDet);
}
adcs[NSLOWADCS]->setLabel((char*)"Temperature");
}
int ctbSlowAdcs::setSlowAdcAlias(string line) {
int is=-1, mv=0;
char tit[100];
int narg=sscanf(line.c_str(),"SENSE%d %s %d",&is,tit,&mv);
if (narg<2)
return -1;
if (is>=0 && is<NSLOWADCS)
adcs[is]->setLabel(tit);
return is;
}
string ctbSlowAdcs::getSlowAdcAlias() {
ostringstream line;
for (int i=0; i<NSLOWADCS; i++)
line << adcs[i]->getLabel() << endl;
return line.str();
}
string ctbSlowAdcs::getAdcParameters() {
ostringstream line;
for (int i=0; i<NSLOWADCS; i++) {
//line << "dacs:" << i << " " << dacs[i]->getValue << endl;
line << "adc:" << i << " " << adcs[i]->getValue() << endl;
}
line << "adc:-1" << adcs[NSLOWADCS]->getValue() << endl;
return line.str();
}
void ctbSlowAdcs::update() {
for (int idac=0; idac<NSLOWADCS+1; idac++) {
adcs[idac]->getValue();
}
}

78
ctbGui/ctbSlowAdcs.h Normal file
View File

@ -0,0 +1,78 @@
#ifndef CTBSLOWADCS_H
#define CTBSLOWADCS_H
#include <TGFrame.h>
//#define NDACS 16
#define NSLOWADCS 8
class TGTextEntry;
class TGLabel;
class TGNumberEntry;
class TGCheckButton;
class TGTextButton;
namespace sls
{
class Detector;
};
#include <string>
using namespace std;
class ctbSlowAdc : public TGHorizontalFrame {
protected:
// TGLabel *dacsLabel;
// TGNumberEntry *dacsEntry;
// TGCheckButton *dacsUnit;
TGLabel *dacsLabel;
TGLabel *dacsValue;
int id;
sls::Detector* myDet;
public:
ctbSlowAdc(TGGroupFrame*, int , sls::Detector*);
int getValue();
int setLabel(char *tit);
string getLabel();
ClassDef(ctbSlowAdc,0)
};
class ctbSlowAdcs : public TGGroupFrame {
private:
ctbSlowAdc *adcs[NSLOWADCS+1];
sls::Detector* myDet;
public:
ctbSlowAdcs(TGVerticalFrame *page, sls::Detector*);
int setSlowAdcAlias(string line);
// int setDacAlias(string line);
string getSlowAdcAlias();
string getAdcParameters();
void update();
ClassDef(ctbSlowAdcs,0)
};
#endif

View File

@ -0,0 +1,110 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/utsname.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <math.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
int iarg;
char fname[10000];
uint64_t word;
int val[64];
int bit[64];
FILE *fdin;
int nb=2;
int off=0;
int ioff=0;
int dr=24;
int idr=0;
int ib=0;
int iw=0;
bit[0]=19;
bit[1]=8;
// for (iarg=0; iarg<argc; iarg++) printf("%d %s\n",iarg, argv[iarg]);
if (argc<2) printf("Error: usage is %s fname [dr off b0 b1 bn]\n");
if (argc>2) dr=atoi(argv[2]);
if (argc>3) off=atoi(argv[3]);
if (argc>4) {
for (ib=0; ib<64; ib++) {
if (argc>4+ib) {
bit[ib]=atoi(argv[4+ib]);
nb++;
}
}
}
idr=0;
for (ib=0; ib<nb; ib++) {
val[ib]=0;
}
fdin=fopen(argv[1],"rb");
if (fdin==NULL) {
printf("Cannot open input file %s for reading\n",argv[1]);
return 200;
}
while (fread((void*)&word, 8, 1, fdin)) {
// printf("%llx\n",word);
if (ioff<off) ioff++;
else {
for (ib=0; ib<nb; ib++) {
if (word&(1<<bit[ib])) val[ib]|=(1<<idr);
}
idr++;
if (idr==dr) {
idr=0;
fprintf(stdout,"%d\t",iw++);
for (ib=0; ib<nb; ib++) {
#ifdef HEX
fprintf(stdout,"%08llx\t",val[ib]);
#else
fprintf(stdout,"%lld\t",val[ib]);
#endif
val[ib]=0;
}
fprintf(stdout,"\n");
}
}
}
if (idr!=0) {
fprintf(stdout,"%d\t",iw++);
for (ib=0; ib<nb; ib++) {
#ifdef HEX
fprintf(stdout,"%08llx\t",val[ib]);
#else
fprintf(stdout,"%lld\t",val[ib]);
#endif
val[ib]=0;
}
fprintf(stdout,"\n");
}
fclose(fdin);
return 0;
}

View File

@ -126,11 +126,26 @@ void setwaittime(int iloop, uint64_t t) {
void pw(){
if (iaddr<MAXWORDS)
PAT[iaddr]= pat;
fprintf(fd,"patword %04x %016llx\n",iaddr, pat);
fprintf(fd,"patword 0x%04x 0x%016llx\n",iaddr, pat);
iaddr++;
if (iaddr>=MAXWORDS) printf("ERROR: too many word in the pattern (%d instead of %d)!",iaddr, MAXWORDS);
}
int parseCommand(int clk, int cmdbit, int cmd, int length) {
int ibit;
clearbit(clk);
for (ibit=0; ibit<length; ibit++) {
if (cmd&(1>>ibit))
setbit(cmdbit);
else
clearbit(cmdbit);
pw();
/******/
setbit(clk);
pw();
/******/
}
};
@ -139,18 +154,18 @@ main(void) {
fd=fopen(OUTFILE,"w");
#include INFILE
fprintf(fd,"patioctrl %016llx\n",iopat);
fprintf(fd,"patclkctrl %016llx\n",clkpat);
fprintf(fd,"patlimits %04x %04x\n",start, stop);
fprintf(fd,"patioctrl 0x%016llx\n",iopat);
fprintf(fd,"patclkctrl 0x%016llx\n",clkpat);
fprintf(fd,"patlimits 0x%04x 0x%04x\n",start, stop);
for (iloop=0; iloop<MAXLOOPS; iloop++) {
fprintf(fd,"patloop%d %04x %04x\n",iloop, startloopaddr[iloop], stoploopaddr[iloop]);
fprintf(fd,"patloop%d 0x%04x 0x%04x\n",iloop, startloopaddr[iloop], stoploopaddr[iloop]);
if ( startloopaddr[iloop]<0 || stoploopaddr[iloop]<= startloopaddr[iloop]) nloop[iloop]=0;
fprintf(fd,"patnloop%d %d\n",iloop, nloop[iloop]);
}
for (iloop=0; iloop<MAXTIMERS; iloop++) {
fprintf(fd,"patwait%d %04x\n",iloop, waitaddr[iloop]);
fprintf(fd,"patwait%d 0x%04x\n",iloop, waitaddr[iloop]);
if (waitaddr[iloop]<0) waittime[iloop]=0;
fprintf(fd,"patwaittime%d %lld\n",iloop, waittime[iloop]);
}

69
docs/CMakeLists.txt Normal file
View File

@ -0,0 +1,69 @@
find_package(Doxygen)
find_package(Sphinx)
if (DOXYGEN_FOUND AND SPHINX_FOUND)
message(${CMAKE_PROJECT_SORURCE_DIR}/slsDetectorSoftware/src)
# Utility to generate command line documentation
add_executable(gendoc src/gendoc.cpp)
# This is a bit hacky, but better than exposing stuff?
target_include_directories(gendoc PRIVATE ${PROJECT_SOURCE_DIR}/slsDetectorSoftware/src)
target_link_libraries(gendoc PRIVATE
slsDetectorShared
)
set_target_properties(gendoc PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
#Doxygen
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
#Sphinx
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR})
set(SPHINX_SOURCE_FILES
src/commandline.rst
src/container_utils.rst
src/dependencies.rst
src/detector.rst
src/index.rst
src/installation.rst
src/pydetector.rst
src/pyenums.rst
src/pyexamples.rst
src/receiver.rst
src/result.rst
src/type_traits.rst
src/ToString.rst
)
foreach(filename ${SPHINX_SOURCE_FILES})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${filename}
"${SPHINX_BUILD}/${filename}")
endforeach(filename ${SPHINX_SOURCE_FILES})
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
"${SPHINX_BUILD}/conf.py"
@ONLY)
add_custom_target(docs
gendoc
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
COMMAND ${SPHINX_EXECUTABLE} -a -b html
-Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
-c "${SPHINX_BUILD}"
${SPHINX_BUILD}/src
${SPHINX_BUILD}/html
COMMENT "Generating documentation with Sphinx")
else (DOXYGEN_FOUND AND SPHINX_FOUND)
message("Doxygen and Sphinx are needed to build documentation")
endif (DOXYGEN_FOUND AND SPHINX_FOUND)

2482
docs/Doxyfile.in Normal file

File diff suppressed because it is too large Load Diff

62
docs/conf.py.in Normal file
View File

@ -0,0 +1,62 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
# sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../bin/'))
#sys.path.insert(0, '/home/l_frojdh/sls/build/bin')
#sys.path.insert(0, @CMAKE_CURRENT_BINARY_DIR@)
print(sys.path)
# -- Project information -----------------------------------------------------
project = 'slsDetectorPackage'
copyright = '2019, PSD Detector Group'
author = 'PSD Detector Group'
version = '@PROJECT_VERSION@'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['breathe',
'sphinx_rtd_theme',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]
breathe_default_project = "slsDetectorPackage"
napoleon_use_ivar = True
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']

6
docs/src/ToString.rst Normal file
View File

@ -0,0 +1,6 @@
ToString
==============
String conversion
.. doxygenfile:: ToString.h

16
docs/src/commandline.rst Normal file
View File

@ -0,0 +1,16 @@
Command line interface
==============================================
Usage
-------------
Commands can be uses either with sls_detector_get or sls_detector_put
.. code-block::
sls_detector_get vrf
Commands
-----------
.. include:: ../commands.rst

View File

@ -0,0 +1,14 @@
ContainerUtils
==================
Helper functions to handle standard container compliant
containers. Supports array, vector, sls::Result etc.
While not a part of the public API we aim not to change this
interface too much. However, we don't give the same strong
guarantees as for Detector etc.
Any reoccurring container operation should probably be added to
this file.
.. doxygenfile:: container_utils.h

53
docs/src/dependencies.rst Normal file
View File

@ -0,0 +1,53 @@
Dependencies
=========================
While we value few dependencies some libraries are required in
order to not have to reinvent the wheel. Due to the state of package
management in C++ we decided to bundle some of them with our source
code. These are found in the libs/ directory.
-----------------------
Core
-----------------------
To use the basic building blocks, meaning sls_detector_get/put and
the shared libraries these are needed:
* Linux, preferably recent kernel (currently no cross platform support)
* CMake > 3.9
* C++11 compatible compiler. (We test with gcc and clang)
* ZeroMQ version 4
-----------------------
GUI
-----------------------
The GUI is currently using Qt4 but watch out for an upgrade to 5.
* Qt 4.8
* Qwt 6
-----------------------
Python bindings
-----------------------
* Python > 3.6
* pybind11 (packaged in libs/)
-----------------------
Documentation
-----------------------
The documentation that you are reading now is built with
* Doxygen (to extract C++ classes etc.)
* Breathe (Sphinx plugin to handle doxygen xml)
* Sphinx
-----------------------
Packaged in libs/
-----------------------
* catch2 (unit testing)
* rapidjson (streaming from receiver)
* pybind11 (python bindings)

16
docs/src/detector.rst Normal file
View File

@ -0,0 +1,16 @@
Detector
==============================================
The sls::Detector is the new public API to control
detectors from C++. This API is also used internally
for the Python bindings and the command line interface.
If a receiver has been configured this is also controlled
through this class.
Most, if not all, functions are called in parallel
and the return value is a thin std::vector wrapper
containing results from all modules. (Result<T>)
.. doxygenclass:: sls::Detector
:members:
:undoc-members:

56
docs/src/gendoc.cpp Normal file
View File

@ -0,0 +1,56 @@
/**
* Utility program to generate input files for the command line
* documentation. Uses the string returned from sls_detector_help cmd
*
*/
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include "CmdProxy.h"
#include "Detector.h"
#include "sls_detector_defs.h"
std::string replace_all(const std::string &src, const std::string &from,
const std::string &to) {
std::string results;
std::string::const_iterator end = src.end();
std::string::const_iterator current = src.begin();
std::string::const_iterator next =
std::search(current, end, from.begin(), from.end());
while (next != end) {
results.append(current, next);
results.append(to);
current = next + from.size();
next = std::search(current, end, from.begin(), from.end());
}
results.append(current, next);
return results;
}
int main() {
std::cout << "Generating command line documentation!\n";
sls::CmdProxy proxy(nullptr);
auto commands = proxy.GetProxyCommands();
std::ofstream fs("commands.rst");
fs << ".. glossary::\n";
for (const auto &cmd : commands) {
std::ostringstream os;
proxy.Call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os);
auto tmp = os.str().erase(0, cmd.size());
auto usage = tmp.substr(0, tmp.find_first_of('\n'));
tmp.erase(0, usage.size());
auto help = replace_all(tmp, "\n\t", "\n\t\t");
fs << '\t' << cmd << usage << help << "\n";
}
}

50
docs/src/index.rst Normal file
View File

@ -0,0 +1,50 @@
.. slsDetectorPackage documentation master file, created by
sphinx-quickstart on Mon Jul 29 17:38:15 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to slsDetectorPackage's documentation!
==============================================
.. toctree::
:maxdepth: 1
:caption: Installation:
installation
dependencies
.. toctree::
:caption: C++ API
:maxdepth: 2
detector
result
receiver
.. toctree::
:caption: Python API
:maxdepth: 2
pydetector
pyenums
pyexamples
.. toctree::
:caption: Command line
:maxdepth: 2
commandline
.. toctree::
:caption: Developer
container_utils
type_traits
ToString
.. Indices and tables
.. ==================
.. * :ref:`genindex`
.. * :ref:`modindex`
.. * :ref:`search`

View File

@ -0,0 +1,5 @@
Installation
==============================================
get the source etc.

9
docs/src/pydetector.rst Normal file
View File

@ -0,0 +1,9 @@
Detector
=====================================================
.. py:currentmodule:: sls_detector
.. autoclass:: ExperimentalDetector
:members:
:undoc-members:
:show-inheritance:

12
docs/src/pyenums.rst Normal file
View File

@ -0,0 +1,12 @@
Enums
===========
These enums are defined in slsDetectorDefs in the C++ package and
exposed to Python through pybind11.
.. py:currentmodule:: sls_detector
.. autoclass:: runStatus
:members:
:undoc-members:
:show-inheritance:

143
docs/src/pyexamples.rst Executable file
View File

@ -0,0 +1,143 @@
Examples
================
Some short hints on how to use the detector
------------------------
Simple threshold scan
------------------------
Assuming you have set up your detector with exposure time, period, enabled
file writing etc.
.. code-block:: python
from sls_detector import Eiger
d = Eiger()
threshold = range(0, 2000, 200)
for th in threshold:
d.vthreshold = th
d.acquire()
If we want to control the shutter of for example, the big X-ray box we can add
this line in our code. It then opens the shutter just before the measurement
and closes is afterwards.
::
with xrf_shutter_open(box, 'Fe'):
for th in threshold:
d.vthreshold = th
d.acquire()
-----------------------
Reading temperatures
-----------------------
::
d.temp
>>
temp_fpga : 43.19°C, 51.83°C
temp_fpgaext : 38.50°C, 38.50°C
temp_10ge : 39.50°C, 39.50°C
temp_dcdc : 42.50°C, 42.50°C
temp_sodl : 39.50°C, 40.50°C
temp_sodr : 39.50°C, 40.50°C
temp_fpgafl : 40.87°C, 37.61°C
temp_fpgafr : 34.51°C, 35.63°C
d.temp.fpga
>> temp_fpga : 40.84°C, 39.31°C
t = d.temp.fpga[0]
t
>> 40.551
t = d.temp.fpga[:]
t
>> [40.566, 39.128]
-----------------------
Non blocking acquire
-----------------------
There are mainly two ways to achieve a non blocking acquire when calling from the Python API. One is to manually start
the detector and the second one is to launch the normal acquire from a different process. Depending on your measurement
it might also be better to run the other task in a seperate process and use acq in the main thread.
But lets start looking at the at the manual way:
::
import time
from sls_detector import Eiger
d = Eiger()
n = 10
t = 1
d.exposure_time = t
d.n_frames = n
d.reset_frames_caught()
#Start the measurement
t0 = time.time()
d.start_receiver()
d.start_detector()
#Wait for the detector to be ready or do other important stuff
time.sleep(t*n)
#check if the detector is ready otherwise wait a bit longer
while d.status != 'idle':
time.sleep(0.1)
#Stop the receiver after we got the frames
#Detector is already idle so we don't need to stop it
d.stop_receiver()
lost = d.frames_caught - n
print(f'{n} frames of {t}s took {time.time()-t0:{.3}}s with {lost} frames lost ')
#Reset to not interfere with a potential next measurement
d.reset_frames_caught()
Instead launching d.acq() from a different process is a bit easier since the control of receiver and detector
is handled in the acq call. However, you need to join the process used otherwise a lot of zombie processes would
hang around until the main process exits.
::
import time
from multiprocessing import Process
from sls_detector import Eiger
def acquire():
"""
Create a new Eiger object that still referes to the same actual detector
and same shared memory. Then launch acq.
"""
detector = Eiger()
detector.acq()
#This is the detector we use throughout the session
d = Eiger()
#Process to run acquire
p = Process(target=acquire)
#Start the thread and short sleep to allow the acq to start
p.start()
time.sleep(0.01)
#Do some other work
while d.busy is True:
print(d.busy)
time.sleep(0.1)
#Join the process
p.join()

6
docs/src/receiver.rst Normal file
View File

@ -0,0 +1,6 @@
Receiver
==============================================
.. doxygenclass:: slsReceiver
:members:
.. :undoc-members:

4
docs/src/result.rst Normal file
View File

@ -0,0 +1,4 @@
Result
==============================================
.. doxygenfile:: Result.h

7
docs/src/type_traits.rst Normal file
View File

@ -0,0 +1,7 @@
TypeTraits
==============
Template meta functions in the same spirit as type_traits
from the standard library.
.. doxygenfile:: TypeTraits.h

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

View File

@ -0,0 +1,132 @@
#G1 Energy #G2 Energy
300 7000
#G0 pedestal G1 pedestal G2 pedestal G0 gain G1 gain G2 gain (for every channel) ADU
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1

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

@ -8,7 +8,7 @@ period 0.000024984
delay 0.999999968
gates 1
frames 300000.000000000
cycles 1.000000000
triggers 1.000000000
timing auto
fineoff 0.000000
startscript none

57
examples/gotthard_two.config Executable file
View File

@ -0,0 +1,57 @@
detsizechan 2560 1
hostname bchip074+bchip075+
0:extsig:0 trigger_in_rising_edge
0:rx_tcpport 1954
0:rx_udpport 50001
0:vhighvoltage 0
1:extsig:0 trigger_in_rising_edge
1:rx_tcpport 1955
1:rx_udpport 50002
1:vhighvoltage 0
##############################################################################
#########
######### Uncomment this part to use the gotthard25umZmq process
#########
##############################################################################
# #replace my_receiver_hostname with the hostname of IP of the machine where the receiver runs
#0:rx_zmqip my_receiver_hostname
#0:rx_zmqport 30003
# #replace my_client_hostname with the hostname of IP of the machine where the client/GUI or softIOC runs
#0:zmqip my_client_hostname
#0:zmqport 40003
# #replace my_receiver_hostname with the hostname of IP of the machine where the receiver runs
#1:rx_zmqip my_receiver_hostname
#1:rx_zmqport 30004
# #replace my_client_hostname with the hostname of IP of the machine where the client/GUI or softIOC runs
#1:zmqip my_client_hostname
#1:zmqport 40004
##############################################################################
#########
######### until here
#########
##############################################################################
r_readfreq 1
rx_datastream 1
#replace my_receiver_hostname with the hostname of 1Gb IP of the machine where the receiver runs
rx_hostname my_receiver_hostname
rx_datastream 1
outdir /tmp/
settings veryhighgain
exptime 0.000005
period 0.0001
vhighvoltage 90

View File

@ -0,0 +1,13 @@
Turn on the two receivers:
slsReceiver -t1954 &
slsReceiver -t1955 &
Switch on the photon conversion on the receiver machine (replace my_receiver_hostname):
gotthard25umZmq my_receiver_hostname 30003 my_receiver_hostname 40003 &
Run the configuration file:
sls_detector_put config bchip2modules.config
Start your measurements using the command line, the slsDetectorGui or the EPICS driver

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

@ -1,15 +1,16 @@
hostname bchip038+
hostname localhost
0:rx_udpport 50004
0:rx_udpip 10.1.1.100
0:detectorip 10.1.1.10
rx_hostname pcmoench01
0:rx_udpip 172.24.8.84
0:detectorip 172.24.8.254
rx_hostname localhost
powerchip 1
#powerchip 1
#vhighvoltage 200
#extsig:0 trigger_in_rising_edge
#timing trigger
outdir /external_pool/jungfrau_data/softwaretest
outdir /tmp/slsdetector

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

@ -17,6 +17,7 @@ hostname bchip048+bchip052+
rx_hostname pcmoench01
powerchip 1
vhighvoltage 200
#extsig:0 trigger_in_rising_edge
#timing trigger

491
examples/moench01_T1_lab.config Executable file
View File

@ -0,0 +1,491 @@
hostname bchip085+
patword 0000 0000000000000000
patword 0001 0000000000000000
patword 0002 0008000900080000
patword 0003 0008000900080000
patword 0004 0008000900080000
patword 0005 0008000900080000
patword 0006 0008000900080000
patword 0007 0008000900080000
patword 0008 0008000900080000
patword 0009 0008000900080000
patword 000a 0008000900080000
patword 000b 0008000900080000
patword 000c 0008000900080000
patword 000d 0008000900080000
patword 000e 0008000900080000
patword 000f 0008000900080000
patword 0010 0008000900080000
patword 0011 0008000900080000
patword 0012 0008000900080000
patword 0013 0008000900080000
patword 0014 0008000900080000
patword 0015 0008000900080000
patword 0016 0008400900080020
patword 0017 0008400900080020
patword 0018 0008599f0418503a
patword 0019 0008599f0418503a
patword 001a 0108599f0418503a
patword 001b 0108599f0418503a
patword 001c 0108599f0418503a
patword 001d 0108599f0418503a
patword 001e 0108599f0418503a
patword 001f 0108599f0418503a
patword 0020 0108599f0418503a
patword 0021 0108599f0418503a
patword 0022 0108599f0418503a
patword 0023 0108599f0418503a
patword 0024 0108599f0418503a
patword 0025 0108599f0418503a
patword 0026 0108599f0418503a
patword 0027 0108599f0418503a
patword 0028 0108599f0418503a
patword 0029 0108599f0418503a
patword 002a 0108599f0418503a
patword 002b 0108599f0418503a
patword 002c 0108599f0418503a
patword 002d 0108599f0418503a
patword 002e 0108599f0418503a
patword 002f 0108599f0418503a
patword 0030 0108599f0418503a
patword 0031 0108599f0418503a
patword 0032 0108599f0418503a
patword 0033 0108599f0418503a
patword 0034 0108599f0418503a
patword 0035 0108599f0418503a
patword 0036 0108599f0418503a
patword 0037 0108599f0418503a
patword 0038 0108599f0418503a
patword 0039 0108599f0418503a
patword 003a 0108599f0418503a
patword 003b 0108599f0418503a
patword 003c 0108599f0418503a
patword 003d 0108599f0418503a
patword 003e 0108599f0418503a
patword 003f 0108599f0418503a
patword 0040 0108599f0418503a
patword 0041 0108599f0418503a
patword 0042 0108599f0418503a
patword 0043 0108599f0418503a
patword 0044 0108599f0418503a
patword 0045 0108599f0418503a
patword 0046 0108599f0418503a
patword 0047 0108599f0418503a
patword 0048 0108599f0418503a
patword 0049 0108599f0418503a
patword 004a 0108599f0418503a
patword 004b 0108599f0418503a
patword 004c 0108599f0418503a
patword 004d 0108599f0418503a
patword 004e 0108599f0418503a
patword 004f 0108599f0418503a
patword 0050 0108599f0418503a
patword 0051 0108599f0418503a
patword 0052 0108599f0418503a
patword 0053 0108599f0418503a
patword 0054 0108599f0418503a
patword 0055 0108599f0418503a
patword 0056 0108599f0418503a
patword 0057 0108599f0418503a
patword 0058 0108599f0418503a
patword 0059 0108599f0418503a
patword 005a 0108599f0418503a
patword 005b 0108599f0418503a
patword 005c 0108599f0418503a
patword 005d 0108599f0418503a
patword 005e 0108599f0418503a
patword 005f 0108599f0418503a
patword 0060 0108599f0418503a
patword 0061 0108599f0418503a
patword 0062 0108599f0418503a
patword 0063 0108599f0418503a
patword 0064 0108599f0418503a
patword 0065 0108599f0418503a
patword 0066 0108599f0418503a
patword 0067 0108599f0418503a
patword 0068 0108599f0418503a
patword 0069 0108599f0418503a
patword 006a 0108599f0418503a
patword 006b 0108599f0418503a
patword 006c 0108599f0418503a
patword 006d 0108599f0418503a
patword 006e 0108599f0418503a
patword 006f 0108599f0418503a
patword 0070 0108599f0418503a
patword 0071 0108599f0418503a
patword 0072 0108599f0418503a
patword 0073 0108599f0418503a
patword 0074 0108599f0418503a
patword 0075 0108599f0418503a
patword 0076 0108599f0418503a
patword 0077 0108599f0418503a
patword 0078 0108599f0418503a
patword 0079 0108599f0418503a
patword 007a 0108599f0418503a
patword 007b 0108599f0418503a
patword 007c 0108599f0418503a
patword 007d 0108599f0418503a
patword 007e 010859960418503a
patword 007f 010859960418503a
patword 0080 010859960418503a
patword 0081 010859960418503a
patword 0082 010859960418503a
patword 0083 010859960418503a
patword 0084 010859960418503a
patword 0085 010859960418503a
patword 0086 010859960418503a
patword 0087 010859960418503a
patword 0088 010859960418503a
patword 0089 010859960418503a
patword 008a 010859960418503a
patword 008b 010859960418503a
patword 008c 010859960418503a
patword 008d 010859960418503a
patword 008e 010859960418503a
patword 008f 010859960418503a
patword 0090 010859960418503a
patword 0091 010859960418503a
patword 0092 010819960418501a
patword 0093 010819960418501a
patword 0094 010819960418501a
patword 0095 010819960418501a
patword 0096 030819960418501a
patword 0097 030819960418501a
patword 0098 030819960418501a
patword 0099 030819960418501a
patword 009a 030819960418501a
patword 009b 030819960418501a
patword 009c 030819960418501a
patword 009d 030819960418501a
patword 009e 030819960418501a
patword 009f 030819960418501a
patword 00a0 030819960418501a
patword 00a1 030819960418501a
patword 00a2 030819960418501a
patword 00a3 030819960418501a
patword 00a4 030819960418501a
patword 00a5 030819960418501a
patword 00a6 030819960418501a
patword 00a7 030819960418501a
patword 00a8 030819960418501a
patword 00a9 030819960418501a
patword 00aa 030819960418501a
patword 00ab 030819960418501a
patword 00ac 030819960008501a
patword 00ad 030819960008501a
patword 00ae 030819960008501a
patword 00af 030819960008501a
patword 00b0 030819960008501a
patword 00b1 030819960008501a
patword 00b2 030819960008501a
patword 00b3 030819960008501a
patword 00b4 030819960008501a
patword 00b5 030819960008501a
patword 00b6 030819960008501a
patword 00b7 030819960008501a
patword 00b8 030819960008501a
patword 00b9 030819960008501a
patword 00ba 030819960008501a
patword 00bb 030819960008501a
patword 00bc 030819960008501a
patword 00bd 030819960008501a
patword 00be 030819960008501a
patword 00bf 030819960008501a
patword 00c0 0308199f0008501a
patword 00c1 0308199f0008501a
patword 00c2 0308199f0008501a
patword 00c3 0308199f0008501a
patword 00c4 0308199f0008501a
patword 00c5 0308199f0008501a
patword 00c6 0308199f0008501a
patword 00c7 0308199f0008501a
patword 00c8 0308199f0008501a
patword 00c9 0308199f0008501a
patword 00ca 0308199f0008501a
patword 00cb 0308199f0008501a
patword 00cc 0308199f0008501a
patword 00cd 0308199f0008501a
patword 00ce 0308199f0008501a
patword 00cf 0308199f0008501a
patword 00d0 0308199f0008501a
patword 00d1 0308199f0008501a
patword 00d2 0308199f0008501a
patword 00d3 0308199f0008501a
patword 00d4 0308599f0008503a
patword 00d5 0308599f0008503a
patword 00d6 030c599f000850ba
patword 00d7 030c599f000850ba
patword 00d8 030c599f000850ba
patword 00d9 030c599f000850ba
patword 00da 030c599f000850ba
patword 00db 030c599f000850ba
patword 00dc 030c599f000850ba
patword 00dd 030c599f000850ba
patword 00de 030c599f000850ba
patword 00df 030c599f000850ba
patword 00e0 030c599f000850ba
patword 00e1 030c599f000850ba
patword 00e2 030c599f000850ba
patword 00e3 030c599f000850ba
patword 00e4 030c599f000850ba
patword 00e5 030c599f000850ba
patword 00e6 030c599f000850ba
patword 00e7 030c599f000850ba
patword 00e8 030c599f000850ba
patword 00e9 030c599f000850ba
patword 00ea 030c799f010858ba
patword 00eb 030c799f010858ba
patword 00ec 030c599f000850ba
patword 00ed 030c599f000850ba
patword 00ee 030c599f000850ba
patword 00ef 030c599f000850ba
patword 00f0 030c599f000850ba
patword 00f1 030c599f000850ba
patword 00f2 030c599f000850ba
patword 00f3 030c599f000850ba
patword 00f4 030c599f000850ba
patword 00f5 030c599f000850ba
patword 00f6 030c599f000850ba
patword 00f7 030c599f000850ba
patword 00f8 030c599f000850ba
patword 00f9 030c599f000850ba
patword 00fa 030c599f000850ba
patword 00fb 030c599f000850ba
patword 00fc 030c599f000850ba
patword 00fd 030c599f000850ba
patword 00fe 030c599f000850ba
patword 00ff 030c599f000850ba
patword 0100 030c599f000850ba
patword 0101 030c599f000850ba
patword 0102 030c599f400850ba
patword 0103 030c599f400850ba
patword 0104 030c599f600850ba
patword 0105 030c599f400850ba
patword 0106 030c599f400850ba
patword 0107 030c599f400850ba
patword 0108 870c599f682e50ba
patword 0109 870c599f482850ba
patword 010a 870c599f000e50ba
patword 010b 870c599f000850ba
patword 010c 870c599f000e50ba
patword 010d 870c599f000850ba
patword 010e 870c599f000e50ba
patword 010f 870c599f000850ba
patword 0110 870c599f000e50ba
patword 0111 870c599f000850ba
patword 0112 870c599f000e50ba
patword 0113 870c599f000850ba
patword 0114 870c599f000e50ba
patword 0115 870c599f000850ba
patword 0116 870c599f000e50ba
patword 0117 870c599f000850ba
patword 0118 870c599f000e50ba
patword 0119 870c599f000850ba
patword 011a 870c599f000e50ba
patword 011b 870c599f000850ba
patword 011c 870c599f000e50ba
patword 011d 870c599f000850ba
patword 011e 870c599f000e50ba
patword 011f 870c599f000850ba
patword 0120 870c599f000e50ba
patword 0121 870c599f000850ba
patword 0122 870c599f200e50ba
patword 0123 870c599f000850ba
patword 0124 870c599f000e50ba
patword 0125 870c599f000850ba
patword 0126 870c599f000e50ba
patword 0127 870c599f000850ba
patword 0128 870c599f000e50ba
patword 0129 870c599f000850ba
patword 012a 870c599f000e50ba
patword 012b 870c599f000850ba
patword 012c 870c599f000e50ba
patword 012d 870c599f000850ba
patword 012e 870c599f000e50ba
patword 012f 870c599f000850ba
patword 0130 870c599f000e50ba
patword 0131 870c599f000850ba
patword 0132 870c599f000e50ba
patword 0133 870c599f000850ba
patword 0134 870c599f000e50ba
patword 0135 870c599f000850ba
patword 0136 870c599f000e50ba
patword 0137 870c599f000850ba
patword 0138 870c599f000e50ba
patword 0139 870c599f000850ba
patword 013a 870c599f282e50ba
patword 013b 870c599f082850ba
patword 013c 870c599f000e50ba
patword 013d 870c599f000850ba
patword 013e 870c599f000e50ba
patword 013f 870c599f000850ba
patword 0140 870c599f000e50ba
patword 0141 870c599f000850ba
patword 0142 870c599f000e50ba
patword 0143 870c599f000850ba
patword 0144 870c599f000e50ba
patword 0145 870c599f000850ba
patword 0146 870c599f000e50ba
patword 0147 870c599f000850ba
patword 0148 870c599f000e50ba
patword 0149 870c599f000850ba
patword 014a 870c599f000e50ba
patword 014b 870c599f000850ba
patword 014c 870c599f000e50ba
patword 014d 870c599f000850ba
patword 014e 870c599f000e50ba
patword 014f 870c599f000850ba
patword 0150 870c599f000e50ba
patword 0151 870c599f000850ba
patword 0152 870c599f000e50ba
patword 0153 870c599f000850ba
patword 0154 870c599f200e50ba
patword 0155 870c599f000850ba
patword 0156 870c599f000e50ba
patword 0157 870c599f000850ba
patword 0158 870c599f000e50ba
patword 0159 870c599f000850ba
patword 015a 870c599f000e50ba
patword 015b 870c599f000850ba
patword 015c 870c599f000e50ba
patword 015d 870c599f000850ba
patword 015e 870c599f000e50ba
patword 015f 870c599f000850ba
patword 0160 870c599f000e50ba
patword 0161 870c599f000850ba
patword 0162 870c599f000e50ba
patword 0163 870c599f000850ba
patword 0164 870c599f000e50ba
patword 0165 870c599f000850ba
patword 0166 870c599f000e50ba
patword 0167 870c599f000850ba
patword 0168 870c599f000e50ba
patword 0169 870c599f000850ba
patword 016a 870c599f000e50ba
patword 016b 870c599f000850ba
patword 016c 070c599f000850ba
patword 016d 070c599f000850ba
patword 016e 000c599f000850ba
patword 016f 000c599f000850ba
patword 0170 0008599f200e503a
patword 0171 0008599f0008503a
patword 0172 0008599f200e503a
patword 0173 0008599f0008503a
patword 0174 0008599f0008503a
patword 0175 0008599f0008503a
patword 0176 0008599f0008503a
patword 0177 0008599f0008503a
patword 0178 0008599f0008503a
patword 0179 0008599f0008503a
patword 017a 0008599f0008503a
patword 017b 0008599f0008503a
patword 017c 0008599f0008503a
patword 017d 0008599f0008503a
patword 017e 0008599f0008503a
patword 017f 0008599f0008503a
patword 0180 0008599f0008503a
patword 0181 0008599f0008503a
patword 0182 0008599f0008503a
patword 0183 0008599f0008503a
patword 0184 0008599f0008503a
patword 0185 0008599f0008503a
patword 0186 0008599f0008503a
patword 0187 0008599f0008503a
patword 0188 0008599f0008503a
patword 0189 0008599f0008503a
patword 018a 0008599f0008503a
patword 018b 0008599f0008503a
patword 018c 0008599f0008503a
patword 018d 0008599f0008503a
patioctrl 8f0effff6dbffdbf
patclkctrl 0000000000000000
patlimits 0000 018c
patloop0 013a 016b
patnloop0 199
patloop1 0400 0400
patnloop1 0
patloop2 0400 0400
patnloop2 0
patwait0 00aa
patwaittime0 40000
patwait1 0400
patwaittime1 0
patwait2 0400
patwaittime2 0
####mcp2011
#0:rx_udpip 10.1.1.102
#0:detectorip 10.1.1.19
#0:rx_udpport 32410
####gui listening to
#zmqip 129.129.202.131
#zmqport 30001
####data streaming out of
#rx_zmqip 10.1.2.103
#rx_zmqport 30003
#0:rx_hostname mpc2011
####mx-test-1
0:rx_udpip 10.1.1.100
0:detectorip 10.1.1.19
0:rx_udpport 32410
####gui listening to (on receiver pc)
zmqip 129.129.202.92
zmqport 30001
####data streaming out of
rx_zmqip 10.1.1.100
rx_zmqport 30003
0:rx_hostname pcmoench01
#turn on datastream from commandline
rx_datastream 1
r_readfreq 1
#0:configuremac -1
rx_datastream 1
r_readfreq 1
dac:6 800
dac:0 1300
dac:4 1428
dac:1 1000
dac:7 900
dac:3 680
dac:2 1400
dac:5 1200
adcinvert 4a342593
samples 5000
adcphase 90
adcpipeline 15
adcreg 14 40
powerchip 1
vhighvoltage 90
period 0.005
frames 100
period 0.1
outdir /scratch/
enablefwrite 0

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

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
}

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