Compare commits

..

123 Commits

Author SHA1 Message Date
eb429cf014 Test documentation upload
Some checks failed
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m56s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m58s
Build Packages / build:rpm (rocky8) (push) Successful in 10m37s
Build Packages / Generate python client (push) Successful in 32s
Build Packages / GPU test (push) Successful in 11s
Build Packages / Build documentation (push) Failing after 56s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m37s
Build Packages / build:rpm (rocky9) (push) Successful in 11m16s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m39s
Build Packages / Unit tests (push) Has been cancelled
2025-09-18 19:16:06 +02:00
6cd2ad4f9e Run CI on tags
Some checks failed
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m8s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m2s
Build Packages / GPU test (push) Successful in 5s
Build Packages / Build documentation (push) Successful in 50s
Build Packages / build:rpm (rocky8) (push) Successful in 9m52s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m5s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m30s
Build Packages / build:rpm (rocky9) (push) Successful in 10m56s
Build Packages / Unit tests (push) Successful in 1h9m27s
Build Packages / Generate python client (push) Failing after 20s
2025-09-18 18:39:41 +02:00
e046384d78 tag
Some checks failed
Build Packages / Generate python client (push) Successful in 49s
Build Packages / GPU test (push) Successful in 7s
Build Packages / Build documentation (push) Successful in 1m32s
Build Packages / build:rpm (rocky8_sls9) (push) Has been cancelled
Build Packages / build:rpm (rocky8) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2404) (push) Has been cancelled
Build Packages / Unit tests (push) Has been cancelled
Build Packages / build:rpm (rocky8_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky9) (push) Has been cancelled
2025-09-18 18:34:07 +02:00
030412f244 Test tagging
Some checks failed
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 4s
Build Packages / GPU test (push) Successful in 5s
Build Packages / Generate python client (push) Successful in 1m3s
Build Packages / Build documentation (push) Successful in 1m46s
Build Packages / build:rpm (ubuntu2404) (push) Has been cancelled
Build Packages / build:rpm (rocky9) (push) Has been cancelled
Build Packages / build:rpm (rocky8) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204) (push) Has been cancelled
Build Packages / Unit tests (push) Has been cancelled
Build Packages / build:rpm (rocky8_nocuda) (push) Has been cancelled
2025-09-18 18:29:48 +02:00
8589092216 Docker updates (rocky8: build OpenSSL from source + include more python tools for documentation; all: build and install EIGEN)
Some checks failed
Build Packages / GPU test (push) Successful in 3m14s
Build Packages / Generate python client (push) Successful in 4m22s
Build Packages / Build documentation (push) Successful in 4m54s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m54s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 13m21s
Build Packages / build:rpm (rocky9) (push) Successful in 14m49s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m24s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m28s
Build Packages / build:rpm (rocky8) (push) Successful in 10m38s
Build Packages / Unit tests (push) Has been cancelled
2025-09-18 16:42:13 +02:00
799e5c55ff CI: Fixes
Some checks failed
Build Packages / GPU test (push) Successful in 3m16s
Build Packages / Build documentation (push) Successful in 4m39s
Build Packages / Generate python client (push) Successful in 3m34s
Build Packages / build:rpm (rocky8_nocuda) (push) Failing after 8m15s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 14m18s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 16m3s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 16m35s
Build Packages / build:rpm (rocky8) (push) Successful in 16m44s
Build Packages / build:rpm (rocky9) (push) Successful in 11m22s
Build Packages / Unit tests (push) Successful in 1h2m47s
2025-09-17 21:22:42 +02:00
1831e65c6c CI: Fixes
Some checks failed
Build Packages / Build documentation (push) Failing after 3m14s
Build Packages / GPU test (push) Successful in 3m14s
Build Packages / Unit tests (push) Has been cancelled
Build Packages / build:rpm (rocky8_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky8_sls9) (push) Has been cancelled
Build Packages / build:rpm (rocky9) (push) Has been cancelled
Build Packages / build:rpm (rocky8) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2404) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204) (push) Has been cancelled
Build Packages / Generate python client (push) Has been cancelled
2025-09-17 21:21:30 +02:00
d7c8336958 Add documentation + noCUDA + python client; remove artifact upload 2025-09-17 21:18:24 +02:00
1d4df8d2ec Update CI and docker
Some checks failed
Build Packages / GPU test (push) Successful in 3m13s
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 14m59s
Build Packages / build:rpm (rocky8) (push) Failing after 16m37s
Build Packages / build:rpm (rocky9) (push) Failing after 17m17s
Build Packages / Unit tests (push) Successful in 1h1m42s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 12m58s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 13m28s
2025-09-17 09:56:32 +02:00
048416898e Fixes (WIP... very much in progress)
Some checks failed
Build Packages / build:rpm (ubuntu2204) (push) Failing after 16m25s
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 16m36s
Build Packages / build:rpm (rocky9) (push) Failing after 17m25s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 17m56s
Build Packages / build:rpm (rocky8) (push) Failing after 19m9s
Build Packages / Unit tests (push) Failing after 1h3m26s
2025-09-16 21:18:52 +02:00
d79e4969ac CI: Try upload-artifact@v3
Some checks failed
Build Packages / build:rpm (ubuntu2404) (push) Failing after 16m37s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 17m13s
Build Packages / build:rpm (rocky9) (push) Failing after 17m29s
Build Packages / build:rpm (rocky8) (push) Failing after 17m58s
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 18m5s
Build Packages / Unit tests (push) Has been skipped
2025-09-16 20:58:13 +02:00
5244e8066a CI: Fix to copying package files
Some checks failed
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 13m58s
Build Packages / build:rpm (rocky8) (push) Failing after 15m30s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 15m50s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 16m9s
Build Packages / build:rpm (rocky9) (push) Failing after 16m43s
Build Packages / Unit tests (push) Has been skipped
2025-09-16 20:39:10 +02:00
1d859a0923 Docker: Update Dockerfile's
Some checks failed
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 14m33s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 15m48s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 16m20s
Build Packages / build:rpm (rocky8) (push) Failing after 16m29s
Build Packages / build:rpm (rocky9) (push) Failing after 17m17s
Build Packages / Unit tests (push) Has been skipped
2025-09-16 20:23:14 +02:00
331948b95a CMake: Build both .deb and .rpm packages (depending on host OS) 2025-09-16 20:21:47 +02:00
7db0e0dc9e Gitea: Update pipeline 2025-09-16 20:21:09 +02:00
e9b7417a21 Gitea: Update pipeline
Some checks failed
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 13m27s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 14m53s
Build Packages / build:rpm (rocky8) (push) Failing after 16m14s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 14m56s
Build Packages / build:rpm (rocky9) (push) Failing after 15m44s
Build Packages / Unit tests (push) Has been skipped
2025-09-16 20:06:08 +02:00
f1eba28dc1 Gitea: Add RPM C/I
Some checks failed
Build RPMs / build:rocky8:rpm (push) Failing after 17m44s
Build RPMs / build:rocky9:rpm (push) Failing after 20m3s
2025-09-16 19:24:05 +02:00
839b1c755d Dockerfile: WIP 2025-09-16 19:24:05 +02:00
07b032719d Dockerfile: WIP 2025-09-16 19:24:05 +02:00
3ded4cd3ce Merge branch '2509-plot-nan' into 'main'
v1.0.0-rc.80

See merge request jungfraujoch/nextgendcu!168
2025-09-16 10:40:33 +02:00
7106bd80e9 v1.0.0-rc.80 2025-09-16 10:40:32 +02:00
e8cc528714 Merge branch '2509-nxmx-fix' into 'main'
v1.0.0-rc.79

See merge request jungfraujoch/nextgendcu!167
2025-09-15 21:38:58 +02:00
caf2a9de4f v1.0.0-rc.79 2025-09-15 21:38:58 +02:00
0e31023da0 Merge branch '2509-viewer-performance' into 'main'
v1.0.0-rc.78

See merge request jungfraujoch/nextgendcu!166
2025-09-14 15:59:58 +02:00
418d4957cf v1.0.0-rc.78 2025-09-14 15:59:58 +02:00
39367f7080 Merge branch '2509-integration-development' into 'main'
2509 integration development

See merge request jungfraujoch/nextgendcu!165
2025-09-12 15:21:38 +02:00
3c17ce3b0b 2509 integration development 2025-09-12 15:21:38 +02:00
8c8be007ce Merge branch '2509-viewer-fixes' into 'main'
v1.0.0-rc.76

See merge request jungfraujoch/nextgendcu!164
2025-09-11 14:37:16 +02:00
20cd8dc4ac v1.0.0-rc.76 2025-09-11 14:37:16 +02:00
a7c92923ec Bugfix to rc.75 2025-09-11 09:58:03 +02:00
ea1a9bc68a VERSION: 1.0.0-rc.75 2025-09-11 09:02:36 +02:00
e7a89e1209 DectrisSimplonClient: EIGER2 missing min threshold 2025-09-11 09:00:29 +02:00
a19531ba70 Merge branch '2509-eiger-fix' into 'main'
v1.0.0-rc.74

See merge request jungfraujoch/nextgendcu!163
2025-09-10 12:33:39 +02:00
c936e9bab7 v1.0.0-rc.74 2025-09-10 12:33:39 +02:00
7e6f1933d2 Merge branch '2509-rc.73' into 'main'
v1.0.0-rc.73

See merge request jungfraujoch/nextgendcu!162
2025-09-09 11:24:20 +02:00
a0fee8aec0 v1.0.0-rc.73 2025-09-09 11:24:19 +02:00
e36bac7589 Merge branch '2509-refinement' into 'main'
v1.0.0-rc.72

See merge request jungfraujoch/nextgendcu!161
2025-09-08 20:28:59 +02:00
c67337cfe1 v1.0.0-rc.72 2025-09-08 20:28:59 +02:00
6c88c6902e Merge branch '2508-viewer' into 'main'
v1.0.0-rc.71

See merge request jungfraujoch/nextgendcu!160
2025-08-28 07:07:01 +02:00
dba807fadd v1.0.0-rc.71 2025-08-28 07:07:01 +02:00
4e3b54f0b0 Merge branch '2508-1.0.0-rc.70' into 'main'
v1.0.0-rc.70

See merge request jungfraujoch/nextgendcu!159
2025-08-27 06:21:10 +02:00
bb32f27635 v1.0.0-rc.70 2025-08-27 06:21:10 +02:00
06978efe6b Merge branch '2508-calibration' into 'main'
v1.0.0-rc.69

See merge request jungfraujoch/nextgendcu!158
2025-08-17 21:21:20 +02:00
fa95858008 v1.0.0-rc.69 2025-08-17 21:21:20 +02:00
f98402043b Merge branch '2508-det-settings' into 'main'
v1.0.0-rc.68

See merge request jungfraujoch/nextgendcu!157
2025-08-16 19:59:27 +02:00
20973792e4 v1.0.0-rc.68 2025-08-16 19:59:27 +02:00
764ca111e2 Merge branch '2507-ssl-2' into 'main'
v1.0.0-rc.67

See merge request jungfraujoch/nextgendcu!156
2025-08-11 11:14:00 +02:00
a32cec3404 v1.0.0-rc.67 2025-08-11 11:13:59 +02:00
4189fa3e3c Merge branch '2507-indexer-thread-pool-2' into 'main'
1.0.0-rc.66

See merge request jungfraujoch/nextgendcu!155
2025-07-18 11:42:39 +02:00
51cbef4c84 1.0.0-rc.66 2025-07-18 11:42:39 +02:00
d42c606e5d Merge branch '2507-remove-excessive-print' into 'main'
Fix to jfjoch_viewer excessive printing

See merge request jungfraujoch/nextgendcu!154
2025-07-17 10:49:31 +02:00
3955ddb257 Fix to jfjoch_viewer excessive printing 2025-07-17 10:49:31 +02:00
54264a435a Merge branch '2507-live-viewer' into 'main'
1.0.0-rc.65

See merge request jungfraujoch/nextgendcu!153
2025-07-16 20:19:48 +02:00
06c5b9cf7f 1.0.0-rc.65 2025-07-16 20:19:48 +02:00
5a6227230a Merge branch '2507-lite-perf' into 'main'
v1.0.0-rc.64

See merge request jungfraujoch/nextgendcu!152
2025-07-15 09:55:19 +02:00
be6d8ad0f5 v1.0.0-rc.64 2025-07-15 09:55:19 +02:00
c56d9bc1db Merge branch '2507-1.0.0-rc.63' into 'main'
Fix to 1.0.0-rc.63

See merge request jungfraujoch/nextgendcu!151
2025-07-09 16:06:22 +02:00
6966461da7 Fix to 1.0.0-rc.63 2025-07-09 16:06:22 +02:00
1ba456308d Merge branch '2507-1.0.0-rc.63' into 'main'
Fix to 1.0.0-rc.63

See merge request jungfraujoch/nextgendcu!150
2025-07-09 15:57:50 +02:00
0aac045d3d Fix to 1.0.0-rc.63 2025-07-09 15:57:50 +02:00
2980badaeb Merge branch '2507-analysis-time' into 'main'
v1.0.0-rc.63

See merge request jungfraujoch/nextgendcu!149
2025-07-09 14:55:28 +02:00
4da526c51b v1.0.0-rc.63 2025-07-09 14:55:28 +02:00
b8a252adaa Merge branch '2507-zmq-test' into 'main'
v1.0.0-rc.62

See merge request jungfraujoch/nextgendcu!148
2025-07-08 20:19:59 +02:00
0b5f28f50d v1.0.0-rc.62 2025-07-08 20:19:59 +02:00
02039b9f1c Merge branch '2507-indexing-issues' into 'main'
v1.0.0-rc.61

See merge request jungfraujoch/nextgendcu!147
2025-07-08 07:16:59 +02:00
e4ec9fb38f v1.0.0-rc.61 2025-07-08 07:16:59 +02:00
3c67b5a900 Merge branch '2507-1.0.0-rc.60' into 'main'
v1.0.0-rc.60

See merge request jungfraujoch/nextgendcu!146
2025-07-05 18:52:42 +02:00
fbaf15aa07 v1.0.0-rc.60 2025-07-05 18:52:42 +02:00
016e86cbc5 Merge branch '2506-1.0.0-rc.59' into 'main'
v1.0.0-rc.59

See merge request jungfraujoch/nextgendcu!145
2025-07-03 22:32:07 +02:00
f5ef540ca0 v1.0.0-rc.59 2025-07-03 22:32:07 +02:00
5f8b1d7de7 Merge branch '2506-1.0.0-rc.58' into 'main'
v1.0.0-rc.58

See merge request jungfraujoch/nextgendcu!144
2025-07-03 15:10:05 +02:00
7ad4a3337b v1.0.0-rc.58 2025-07-03 15:10:04 +02:00
1fb9919a00 Merge branch '2506-1.0.0-rc.57' into 'main'
v1.0.0-rc.57

See merge request jungfraujoch/nextgendcu!143
2025-07-02 20:04:35 +02:00
8fa8b612bb v1.0.0-rc.57 2025-07-02 20:04:35 +02:00
81c72bcf3d Merge branch '1.0.0-rc.56' into 'main'
v1.0.0-rc.56

See merge request jungfraujoch/nextgendcu!142
2025-07-02 12:40:46 +02:00
05e162ea5d v1.0.0-rc.56 2025-07-02 12:40:45 +02:00
776065c636 Merge branch '2506-1.0.0-rc.55' into 'main'
v1.0.0-rc.55

See merge request jungfraujoch/nextgendcu!141
2025-07-01 10:03:22 +02:00
9592e4ab92 NeuralNetInferenceClient: Fix wrong HTTP address 2025-07-01 09:18:44 +02:00
58d68ec4bc CHANGELOG: Update 2025-06-30 21:30:49 +02:00
92288c60d7 NeuralNetInferenceClient: Accept PixelMask 2025-06-30 21:29:48 +02:00
dba2544c48 VERSION: 1.0.0-rc.55 2025-06-30 21:06:53 +02:00
d6dbe53955 NeuralNetInferenceClient: Handle case of unsigned data 2025-06-29 13:07:40 +02:00
39faa49d86 DiffractionExperiment: Remove potential bug with control reaching function without returning value 2025-06-29 13:05:03 +02:00
7d7dbbcf79 Merge branch '2506-1.0.0-rc.54' into 'main'
1.0.0-rc.54

See merge request jungfraujoch/nextgendcu!140
2025-06-29 10:56:38 +02:00
99de57fe6f 1.0.0-rc.54 2025-06-29 10:56:38 +02:00
c5b41c7830 Merge branch '2506-1.0.0-rc.53' into 'main'
v1.0.0-rc.53

See merge request jungfraujoch/nextgendcu!139
2025-06-24 16:43:47 +02:00
c41858f80d v1.0.0-rc.53 2025-06-24 16:43:47 +02:00
a322689b2a Merge branch '2506-viewer-fixes' into 'main'
v1.0.0-rc.52

See merge request jungfraujoch/nextgendcu!138
2025-06-23 20:57:00 +02:00
1d256b2cf5 v1.0.0-rc.52 2025-06-23 20:57:00 +02:00
a59b6a0c37 Merge branch '2506-bug-in-plots' into 'main'
Bug fix for plotting

See merge request jungfraujoch/nextgendcu!137
2025-06-22 19:45:55 +02:00
f40d178545 Bug fix for plotting 2025-06-22 17:24:37 +02:00
7184fa5b5a Merge branch '2506-spot-filters' into 'main'
v1.0.0-rc.51

See merge request jungfraujoch/nextgendcu!136
2025-06-22 13:15:10 +02:00
50eaaaaf29 v1.0.0-rc.51 2025-06-22 13:15:10 +02:00
aa13b1cd0b Merge branch '2506-test-bug' into 'main'
v1.0.0-rc.50

See merge request jungfraujoch/nextgendcu!135
2025-06-20 09:52:26 +02:00
0d1b388f4d v1.0.0-rc.50 2025-06-20 09:52:26 +02:00
2bd9f4a424 Merge branch '2506-ring-current' into 'main'
v1.0.0-rc49

See merge request jungfraujoch/nextgendcu!134
2025-06-18 15:19:18 +02:00
fb87f376c8 v1.0.0-rc49 2025-06-18 15:19:18 +02:00
c464c00906 Merge branch '2506-uc-bug' into 'main'
VERSION to 1.0.0-rc.48

See merge request jungfraujoch/nextgendcu!133
2025-06-17 19:29:44 +02:00
259e17e483 VERSION to 1.0.0-rc.48 2025-06-17 17:20:43 +02:00
42c2edc2e5 Merge branch '2506-minor-fixes' into 'main'
v1.0.0-rc.47

See merge request jungfraujoch/nextgendcu!132
2025-06-17 16:28:28 +02:00
8e449fc581 v1.0.0-rc.47 2025-06-17 16:28:28 +02:00
29a3dde4df Merge branch '2506-viewer-dependencies' into 'main'
v1.0.0-rc.46

See merge request jungfraujoch/nextgendcu!131
2025-06-17 14:56:48 +02:00
9b8f7a7f88 v1.0.0-rc.46 2025-06-17 14:56:48 +02:00
7d0f783767 Merge branch '2506-missing-commit' into 'main'
v1.0.0-rc.45: missing commits

See merge request jungfraujoch/nextgendcu!130
2025-06-16 14:10:37 +02:00
07b78f846c v1.0.0-rc.45: missing commits 2025-06-16 14:10:36 +02:00
e018e5a9a1 Merge branch '2506-pixel-size-det' into 'main'
v1.0.0-rc.45

See merge request jungfraujoch/nextgendcu!129
2025-06-16 12:48:17 +02:00
ab5f502c8e v1.0.0-rc.45 2025-06-16 12:48:17 +02:00
da4d8868b3 Merge branch '2506-grid-scan-result' into 'main'
v1.0.0-rc.44

See merge request jungfraujoch/nextgendcu!128
2025-06-15 17:46:46 +02:00
b59a03ff02 v1.0.0-rc.44 2025-06-15 17:46:46 +02:00
50fd15c678 Merge branch '2506-raster-scan-result' into 'main'
v1.0.0-rc.43

See merge request jungfraujoch/nextgendcu!127
2025-06-13 16:00:50 +02:00
80251cc5b8 v1.0.0-rc.43 2025-06-13 16:00:50 +02:00
32c9e6926e Merge branch '2506-Isigma' into 'main'
v1.0.0-rc.42

See merge request jungfraujoch/nextgendcu!126
2025-06-11 19:53:33 +02:00
a9c7d23b9e v1.0.0-rc.42 2025-06-11 19:53:33 +02:00
dc90b05512 Merge branch '2506-Bragg-prediction' into 'main'
v1.0.0-rc.41

See merge request jungfraujoch/nextgendcu!125
2025-06-10 18:14:04 +02:00
41a3e671f4 v1.0.0-rc.41 2025-06-10 18:14:04 +02:00
72cdbd04a5 Merge branch '2405-grid-scan' into 'main'
v1.0.0-rc.40

See merge request jungfraujoch/nextgendcu!124
2025-05-28 18:49:27 +02:00
53c90ee5d8 v1.0.0-rc.40 2025-05-28 18:49:27 +02:00
aaae74e70b Merge branch '2505-fpga-sum-analysis' into 'main'
v1.0.0-rc.39

See merge request jungfraujoch/nextgendcu!123
2025-05-14 23:28:10 +02:00
18b50e9472 v1.0.0-rc.39 2025-05-14 23:28:10 +02:00
01877ffe60 Merge branch '2505-resonet-python' into 'main'
v1.0.0-rc.38

See merge request jungfraujoch/nextgendcu!122
2025-05-12 14:17:24 +02:00
b245967df3 v1.0.0-rc.38 2025-05-12 14:17:24 +02:00
19d6f22136 Merge branch '2405-eiger-mask' into 'main'
patch to 1.0.0-rc.36

See merge request jungfraujoch/nextgendcu!121
2025-05-07 16:24:35 +02:00
29ecd3515a patch to 1.0.0-rc.36 2025-05-07 16:24:35 +02:00
578 changed files with 32243 additions and 10857 deletions

View File

@@ -0,0 +1,124 @@
name: Build Packages
on:
push:
branches:
- '**'
tags:
- '**'
pull_request:
workflow_dispatch:
jobs:
build-rpm:
name: build:rpm (${{ matrix.distro }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: jfjoch_rocky8
distro: rocky8
cmake_flags: -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON
- runner: jfjoch_rocky8
distro: rocky8_sls9
cmake_flags: -DJFJOCH_INSTALL_DRIVER_SOURCE=OFF -DJFJOCH_VIEWER_BUILD=OFF -DSLS9=ON
- runner: jfjoch_rocky9
distro: rocky9
cmake_flags: -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON
- runner: jfjoch_ubuntu2204
distro: ubuntu2204
cmake_flags: -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON
- runner: jfjoch_ubuntu2404
distro: ubuntu2404
cmake_flags: -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON
- runner: jfjoch_rocky8
distro: rocky8_nocuda
cmake_flags: -DJFJOCH_INSTALL_DRIVER_SOURCE=OFF -DJFJOCH_VIEWER_BUILD=OFF -DJFJOCH_USE_CUDA=OFF
steps:
- uses: actions/checkout@v4
- name: Build packages
shell: bash
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_flags }} ..
ninja frontend
ninja -j16 package
shopt -s nullglob
files=( *.rpm *.deb )
if (( ${#files[@]} )); then
mv "${files[@]}" ..
else
echo "No packages found to move"
fi
python-client:
name: Generate python client
runs-on: jfjoch_rocky8
steps:
- uses: actions/checkout@v4
- name: Build python client
shell: bash
run: bash gen_python_client.sh
documentation:
name: Build documentation
runs-on: jfjoch_rocky8
steps:
- uses: actions/checkout@v4
- name: Build documentation
shell: bash
run: bash make_doc.sh
- name: Upload documentation
if: github.ref_type == 'tag'
shell: bash
run: |
git checkout --orphan gitea-pages
git reset --hard
# Remove everything except .git and public
git clean -fdx -e public -e .git
# Move public contents to root and remove the now-empty public dir
shopt -s dotglob nullglob
mv public/* .
rm -rf public
git add .
git commit -m "Deploy site"
git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages
gpu-test:
name: GPU test
runs-on: jfjoch_rocky8
container:
image: gitea.psi.ch/leonarski_f/jfjoch_rocky8:2509
options: --gpus all
steps:
- name: List GPUs
shell: bash
run: nvidia-smi
unit-tests:
name: Unit tests
runs-on: jfjoch_rocky8
container:
image: gitea.psi.ch/leonarski_f/jfjoch_rocky8:2509
options: --gpus all
timeout-minutes: 90
env:
CTEST_OUTPUT_ON_FAILURE: '1'
steps:
- uses: actions/checkout@v4
- name: Build tests
shell: bash
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
ninja -j48 jfjoch_test jfjoch_hdf5_test
- name: Run unit tests
shell: bash
run: |
cd build/tests
./jfjoch_test
- name: Run hdf5 test
shell: bash
run: |
cd build/tools
./jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5

View File

@@ -5,7 +5,7 @@ stages:
- release
variables:
CMAKE_PREFIX_PATH: /opt/qt6
CMAKE_PREFIX_PATH: /opt/qt6:/opt/eigen-3.4
build:x86:gcc-11:
stage: build
@@ -148,6 +148,24 @@ build:x86:rpm:
- "*.rpm"
expire_in: 1 week
build:x86:sls9:rpm:
stage: build
tags:
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=OFF -DJFJOCH_VIEWER_BUILD=OFF -DSLS9=ON ..
- make frontend
- make -j48 package
- mv *.rpm ..
artifacts:
paths:
- "*.rpm"
expire_in: 1 week
test:x86:gcc:
stage: test
timeout: 90m
@@ -322,6 +340,7 @@ synthesis:100g:
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
- if: $CI_COMMIT_MESSAGE =~ /^100G/
tags:
- vivado
artifacts:
@@ -348,6 +367,7 @@ synthesis:8x10g:
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
- if: $CI_COMMIT_MESSAGE =~ /^8x10G/
tags:
- vivado
artifacts:
@@ -375,20 +395,7 @@ release:
dependencies:
- build:x86:frontend
- build:x86:rpm
- build:x86:sls9:rpm
- build:x86:python_client
script:
- bash gitlab_upload_release.sh
deploy-pages:
stage: release
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
script:
bash make_doc.sh
artifacts:
paths:
- public/
tags:
- x86
- python

View File

@@ -15,13 +15,8 @@ SET(JFJOCH_WRITER_ONLY OFF CACHE BOOL "Compile HDF5 writer only")
SET(JFJOCH_INSTALL_DRIVER_SOURCE OFF CACHE BOOL "Install kernel driver source (ignored if building writer only; necessary for RPM building)")
SET(JFJOCH_USE_CUDA ON CACHE BOOL "Compile Jungfraujoch with CUDA")
SET(JFJOCH_VIEWER_BUILD OFF CACHE BOOL "Compile Jungfraujoch viewer")
SET(JFJOCH_USE_TORCH OFF CACHE BOOL "Compile ML support")
#This is to supress error in TORCH
IF ((NOT EXISTS /usr/bin/python) AND (EXISTS /usr/bin/python3))
SET(PYTHON_EXECUTABLE /usr/bin/python3)
ENDIF()
OPTION(SLS9 "Build with sls_detector_package v9.2.0" OFF)
SET(BUILD_SHARED_LIBS OFF)
SET(BUILD_TESTING OFF)
@@ -45,16 +40,23 @@ SET(HDF5_BUILD_CPP_LIB OFF)
SET(HDF5_ENABLE_Z_LIB_SUPPORT OFF)
SET(HDF5_EXTERNALLY_CONFIGURED 1)
# TIFF
SET(jbig OFF)
SET(zstd OFF)
SET(lzma OFF)
SET(jpeg OFF)
SET(old-jpeg OFF)
# PNG
set(PNG_SHARED OFF)
set(PNG_STATIC ON)
set(PNG_EXECUTABLES OFF)
set(PNG_TESTS OFF)
INCLUDE(CheckLanguage)
CHECK_LANGUAGE(CUDA)
SET(CMAKE_CUDA_ARCHITECTURES 70 75 80 86 89) # V100, T4, A100, RTX A4000, L4
SET(CMAKE_CUDA_ARCHITECTURES 75 80 86 89) # T4, A100, RTX A4000, L4
SET(CMAKE_CUDA_STANDARD 17)
SET(CMAKE_CUDA_FLAGS_RELEASE "-O3")
@@ -63,6 +65,8 @@ SET(JFJOCH_CUDA_AVAILABLE OFF)
IF (CMAKE_CUDA_COMPILER)
IF (JFJOCH_USE_CUDA)
ENABLE_LANGUAGE(CUDA)
FIND_PACKAGE(CUDAToolkit REQUIRED)
SET(CMAKE_CUDA_RUNTIME_LIBRARY Static)
MESSAGE(STATUS "CUDA VERSION: ${CMAKE_CUDA_COMPILER_VERSION}")
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_CUDA)
FIND_LIBRARY(CUDART_LIBRARY cudart_static PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} REQUIRED)
@@ -72,14 +76,6 @@ IF (CMAKE_CUDA_COMPILER)
ENDIF()
ENDIF()
IF(JFJOCH_USE_TORCH)
FIND_PACKAGE(Protobuf REQUIRED)
FIND_PACKAGE(Torch HINTS /home/jungfrau/torch/lib/python3.11/site-packages/torch REQUIRED)
IF (${TORCH_FOUND})
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_TORCH)
ENDIF()
ENDIF()
INCLUDE_DIRECTORIES(include)
INCLUDE(CheckIncludeFile)
@@ -94,6 +90,13 @@ FetchContent_Declare(tiff
GIT_TAG v4.6.0
EXCLUDE_FROM_ALL)
FetchContent_Declare(
png
GIT_REPOSITORY https://github.com/pnggroup/libpng
GIT_TAG v1.6.49
EXCLUDE_FROM_ALL
)
FetchContent_Declare(hdf5
GIT_REPOSITORY https://github.com/HDFGroup/hdf5/
GIT_TAG hdf5_1.14.5
@@ -102,6 +105,7 @@ FetchContent_Declare(hdf5
SET(PISTACHE_USE_CONTENT_ENCODING_DEFLATE ON)
SET(PISTACHE_BUILD_TESTS OFF)
SET(PISTACHE_USE_SSL ON)
FetchContent_Declare(
pistache_http
@@ -118,10 +122,15 @@ FetchContent_Declare(
EXCLUDE_FROM_ALL
)
SET(SLS_DETECTOR_GIT_TAG "8.0.2")
IF(SLS9)
SET(SLS_DETECTOR_GIT_TAG "9.2.0")
ENDIF()
FetchContent_Declare(
sls_detector_package
GIT_REPOSITORY https://github.com/slsdetectorgroup/slsDetectorPackage
GIT_TAG 8.0.2
GIT_TAG ${SLS_DETECTOR_GIT_TAG}
)
FetchContent_Declare(
@@ -131,7 +140,7 @@ FetchContent_Declare(
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(pistache_http zstd sls_detector_package catch2 hdf5 tiff)
FetchContent_MakeAvailable(pistache_http zstd sls_detector_package catch2 hdf5 tiff png)
ADD_SUBDIRECTORY(jungfrau)
ADD_SUBDIRECTORY(compression)
@@ -142,6 +151,7 @@ ADD_SUBDIRECTORY(reader)
ADD_SUBDIRECTORY(detector_control)
ADD_SUBDIRECTORY(image_puller)
ADD_SUBDIRECTORY(preview)
ADD_SUBDIRECTORY(symmetry)
IF (JFJOCH_WRITER_ONLY)
MESSAGE(STATUS "Compiling HDF5 writer only")
@@ -188,43 +198,99 @@ IF (NOT JFJOCH_WRITER_ONLY)
ENDIF()
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX /opt/jfjoch CACHE PATH "Default directory" FORCE)
SET(CMAKE_INSTALL_PREFIX /opt/jfjoch CACHE PATH "Default directory" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# Set Package Name
# Initialize CPACK_COMPONENTS_ALL with common components
SET(CPACK_COMPONENTS_ALL jfjoch writer)
SET(CPACK_PACKAGE_NAME "jfjoch")
IF (JFJOCH_INSTALL_DRIVER_SOURCE)
LIST(APPEND CPACK_COMPONENTS_ALL driver-dkms)
SET(CPACK_RPM_DRIVER-DKMS_PACKAGE_REQUIRES "dkms, gcc, bash, sed")
SET(CPACK_RPM_DRIVER-DKMS_PACKAGE_ARCHITECTURE "noarch")
SET(CPACK_RPM_DRIVER-DKMS_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/postinstall.sh)
SET(CPACK_RPM_DRIVER-DKMS_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/preuninstall.sh)
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /usr/src)
ELSE()
SET(CPACK_COMPONENTS_ALL jfjoch writer)
ENDIF()
set(CPACK_COMPONENTS_ALL jfjoch writer)
if (SLS9)
set(CPACK_PACKAGE_NAME "jfjoch-slsdet9")
else()
set(CPACK_PACKAGE_NAME "jfjoch")
endif()
IF (JFJOCH_VIEWER_BUILD)
LIST(APPEND CPACK_COMPONENTS_ALL viewer)
ENDIF()
# Add optional components
if (JFJOCH_INSTALL_DRIVER_SOURCE)
list(APPEND CPACK_COMPONENTS_ALL driver-dkms)
else()
set(CPACK_COMPONENTS_ALL jfjoch writer)
endif()
SET(CPACK_GENERATOR RPM)
SET(CPACK_RPM_COMPONENT_INSTALL ON)
SET(CPACK_RPM_MAIN_COMPONENT jfjoch)
SET(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
SET(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
SET(CPACK_RPM_PACKAGE_VERSION ${JFJOCH_VERSION})
SET(CPACK_RPM_PACKAGE_RELEASE 1)
SET(CPACK_RPM_PACKAGE_SUMMARY "Jungfraujoch data acquisition system")
SET(CPACK_RPM_PACKAGE_DESCRIPTION "Jungfraujoch")
if (JFJOCH_VIEWER_BUILD)
list(APPEND CPACK_COMPONENTS_ALL viewer)
endif()
SET(CPACK_PACKAGE_CONTACT "Filip Leonarski <filip.leonarski@psi.ch>")
# Set The Vendor Name
SET(CPACK_PACKAGE_VENDOR "Paul Scherrer Institut")
# Common metadata
set(CPACK_PACKAGE_CONTACT "Filip Leonarski <filip.leonarski@psi.ch>")
set(CPACK_PACKAGE_VENDOR "Paul Scherrer Institut")
set(CPACK_PACKAGE_VERSION ${JFJOCH_VERSION})
# OS-aware packaging: DEB on Debian/Ubuntu, RPM on RHEL/Rocky
if (EXISTS "/etc/debian_version")
set(CPACK_PACKAGE_LICENSE "GPL-3.0-only")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
# Debian/Ubuntu: .deb with components
set(CPACK_GENERATOR "DEB")
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_MAIN_COMPONENT jfjoch)
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
# Enable automatic shlib dependency discovery
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# Optional DEB metadata (tune as needed)
set(CPACK_DEBIAN_PACKAGE_SECTION "science")
# set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://example.org/jfjoch")
# DKMS component (maps from RPM settings)
if (JFJOCH_INSTALL_DRIVER_SOURCE)
# Dependencies and arch for the DKMS component
# Note: component name "driver-dkms" maps to variable suffix "DRIVER_DKMS"
set(CPACK_DEBIAN_DRIVER_DKMS_PACKAGE_DEPENDS "dkms, gcc, bash, sed")
set(CPACK_DEBIAN_DRIVER_DKMS_PACKAGE_ARCHITECTURE "all")
# Provide Debian control scripts (postinst/prerm).
# We rename existing scripts to Debian control names at configure time.
set(_dkms_ctrl_dir "${CMAKE_CURRENT_BINARY_DIR}/cpack-debian-driver-dkms")
file(MAKE_DIRECTORY "${_dkms_ctrl_dir}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/postinstall.sh
${_dkms_ctrl_dir}/postinst COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/preuninstall.sh
${_dkms_ctrl_dir}/prerm COPYONLY)
set(CPACK_DEBIAN_DRIVER_DKMS_PACKAGE_CONTROL_EXTRA
"${_dkms_ctrl_dir}/postinst;${_dkms_ctrl_dir}/prerm")
endif()
elseif (EXISTS "/etc/redhat-release")
# RHEL/Rocky: .rpm with components (original behavior)
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_RPM_MAIN_COMPONENT jfjoch)
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
set(CPACK_RPM_PACKAGE_VERSION ${JFJOCH_VERSION})
set(CPACK_RPM_PACKAGE_RELEASE 1)
set(CPACK_RPM_PACKAGE_SUMMARY "Jungfraujoch data acquisition system")
set(CPACK_RPM_PACKAGE_DESCRIPTION "Jungfraujoch")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
/usr/src /usr/share /usr/share/dbus-1 /usr/share/dbus-1/services)
# DKMS component scripts and requirements for RPM
if (JFJOCH_INSTALL_DRIVER_SOURCE)
set(CPACK_RPM_DRIVER-DKMS_PACKAGE_REQUIRES "dkms, gcc, bash, sed")
set(CPACK_RPM_DRIVER-DKMS_PACKAGE_ARCHITECTURE "noarch")
set(CPACK_RPM_DRIVER-DKMS_POST_INSTALL_SCRIPT_FILE
${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/postinstall.sh)
set(CPACK_RPM_DRIVER-DKMS_PRE_UNINSTALL_SCRIPT_FILE
${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/preuninstall.sh)
endif()
else()
# Fallback if OS is unknown
set(CPACK_GENERATOR "TGZ")
endif()
# Set The License Information
SET(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
INCLUDE(CPack)

View File

@@ -1 +1 @@
1.0.0-rc.36
1.0.0-rc.80

View File

@@ -323,6 +323,7 @@ void AcquisitionDevice::RunInternalGenerator(const DiffractionExperiment &experi
FrameGeneratorConfig config{};
config.frames = experiment.GetFrameNum() + DELAY_FRAMES_STOP_AND_QUIT + 1;
config.modules = experiment.GetModulesNum(data_stream);
config.data_stream = data_stream;
config.pulse_id = INT_PKT_GEN_BUNCHID;
config.exptime = INT_PKT_GEN_EXPTTIME;
config.debug = INT_PKT_GEN_DEBUG;

View File

@@ -225,6 +225,7 @@ void FPGAAcquisitionDevice::FillActionRegister(const DiffractionExperiment& x, D
job.nstorage_cells = x.GetStorageCellNumber() - 1;
job.mode = data_collection_id << 16;
job.nsummation = x.GetFPGASummation() - 1;
job.data_stream = data_stream;
expected_descriptors_per_module = DMA_DESCRIPTORS_PER_MODULE;

View File

@@ -10,12 +10,8 @@ HLSSimulatedDevice::HLSSimulatedDevice(uint16_t data_stream, size_t in_frame_buf
max_modules = MAX_MODULES_FPGA;
if (data_stream != 0)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"HLS simulation can only work with 1 data_stream, due to use of static variables");
MapBuffersStandard(in_frame_buffer_size_modules, numa_node);
device = std::make_unique<HLSDevice>(buffer_device);
}

View File

@@ -10,13 +10,13 @@
#include "../preview/JFJochTIFF.h"
JFJochBrokerHttp::JFJochBrokerHttp(const DiffractionExperiment &experiment, std::shared_ptr<Pistache::Rest::Router> &rtr)
: DefaultApi(rtr) {
: DefaultApi(rtr),
state_machine(experiment, services, logger) {
Pistache::Rest::Routes::Get(*rtr, "/", Pistache::Rest::Routes::bind(&JFJochBrokerHttp::GetStaticFile, this));
Pistache::Rest::Routes::Get(*rtr, "/frontend", Pistache::Rest::Routes::bind(&JFJochBrokerHttp::GetStaticFile, this));
Pistache::Rest::Routes::Get(*rtr, "/frontend/*", Pistache::Rest::Routes::bind(&JFJochBrokerHttp::GetStaticFile, this));
Pistache::Rest::Routes::Get(*rtr, "/frontend/assets/*", Pistache::Rest::Routes::bind(&JFJochBrokerHttp::GetStaticFile, this));
state_machine.NotThreadSafe_Experiment() = experiment;
init();
}
@@ -140,11 +140,6 @@ void JFJochBrokerHttp::config_spot_finding_put(
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::plot_azim_int_get(const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::AzInt, 0, compression, response);
}
void JFJochBrokerHttp::statistics_calibration_get(Pistache::Http::ResponseWriter &response) {
nlohmann::json j;
for (const auto &d: Convert(state_machine.GetCalibrationStatistics()))
@@ -297,117 +292,6 @@ void JFJochBrokerHttp::preview_pedestal_tiff_get(const std::optional<int32_t> &g
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::GenericPlot(PlotType plot_type, const std::optional<int32_t> &binning,
const std::optional<bool>& in_compression,
Pistache::Http::ResponseWriter &response) {
bool compression = !in_compression.has_value() || in_compression.value();
PlotRequest req{.type = plot_type, .binning = 0};
if (binning) {
if (binning.value() < 0)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Binning must be positive number or zero");
req.binning = binning.value();
}
auto plot = state_machine.GetPlots(req);
ProcessOutput(Convert(plot), response, compression);
}
void JFJochBrokerHttp::plot_bkg_estimate_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::BkgEstimate, binning, compression, response);
}
void JFJochBrokerHttp::plot_resolution_estimate_get(const std::optional<int32_t> &binning,
const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ResolutionEstimate, binning, compression, response);
}
void JFJochBrokerHttp::plot_error_pixel_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ErrorPixels, binning, compression, response);
}
void JFJochBrokerHttp::plot_image_collection_efficiency_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ImageCollectionEfficiency, binning, compression, response);
}
void JFJochBrokerHttp::plot_indexing_rate_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::IndexingRate, binning, compression, response);
}
void JFJochBrokerHttp::plot_indexing_unit_cell_get(const std::optional<int32_t> &binning,
const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::IndexingUnitCellLength, binning, compression, response);
}
void JFJochBrokerHttp::plot_indexing_unit_cell_angle_get(const std::optional<int32_t> &binning,
const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::IndexingUnitCellAngle, binning, compression, response);
}
void JFJochBrokerHttp::plot_packets_received_get(const std::optional<int32_t> &binning,
const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::PacketsReceived, binning, compression, response);
}
void JFJochBrokerHttp::plot_receiver_delay_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ReceiverDelay, binning, compression, response);
}
void JFJochBrokerHttp::plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ReceiverFreeSendBuf, binning, compression, response);
}
void JFJochBrokerHttp::plot_roi_max_count_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROIMaxCount, binning, compression, response);
}
void JFJochBrokerHttp::plot_roi_sum_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROISum, binning, compression, response);
}
void JFJochBrokerHttp::plot_roi_valid_pixels_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROIPixels, binning, compression, response);
}
void JFJochBrokerHttp::plot_spot_count_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::SpotCount, binning, compression, response);
}
void JFJochBrokerHttp::plot_strong_pixel_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::StrongPixels, binning, compression, response);
}
void JFJochBrokerHttp::plot_max_value_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::MaxValue, binning, compression, response);
}
void JFJochBrokerHttp::config_mask_tiff_get(Pistache::Http::ResponseWriter &response) {
auto s = state_machine.GetFullPixelMaskTIFF();
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/tiff"));
@@ -527,6 +411,7 @@ void JFJochBrokerHttp::statistics_get(const std::optional<bool> &compression, Pi
statistics.setFileWriterSettings(Convert(state_machine.GetFileWriterSettings()));
statistics.setAzInt(Convert(state_machine.GetRadialIntegrationSettings()));
statistics.setBuffer(Convert(state_machine.GetImageBufferStatus()));
statistics.setIndexing(Convert(state_machine.GetIndexingSettings()));
auto zeromq_prev = state_machine.GetPreviewSocketSettings();
if (!zeromq_prev.address.empty())
@@ -587,13 +472,14 @@ void JFJochBrokerHttp::image_buffer_image_jpeg_get(const std::optional<int64_t>
const std::optional<bool> &showUserMask,
const std::optional<bool> &showRoi,
const std::optional<bool> &showSpots,
const std::optional<int64_t> &saturation,
const std::optional<bool> &showBeamCenter,
const std::optional<float> &saturation,
const std::optional<int64_t> &jpegQuality,
const std::optional<float> &showResRing,
const std::optional<std::string> &color,
Pistache::Http::ResponseWriter &response) {
int64_t image_id = id.value_or(ImageBuffer::MaxImage);
PreviewJPEGSettings settings{};
PreviewImageSettings settings{};
settings.show_user_mask = showUserMask.value_or(true);
settings.show_roi = showRoi.value_or(false);
@@ -601,15 +487,38 @@ void JFJochBrokerHttp::image_buffer_image_jpeg_get(const std::optional<int64_t>
settings.saturation_value = saturation.value_or(10);
settings.jpeg_quality = jpegQuality.value_or(100);
settings.resolution_ring = showResRing;
settings.scale = ColorScaleEnum::Indigo;
settings.scale = ConvertColorScale(color);
settings.show_beam_center = showBeamCenter.value_or(true);
settings.format = PreviewImageFormat::JPEG;
std::string s = state_machine.GetPreviewJPEG(settings, image_id);
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/jpeg"));
else
response.send(Pistache::Http::Code::Not_Found);
}
if (color == "viridis")
settings.scale = ColorScaleEnum::Viridis;
else if (color == "bw")
settings.scale = ColorScaleEnum::BW;
else if (color == "heat")
settings.scale = ColorScaleEnum::Heat;
void JFJochBrokerHttp::image_buffer_image_png_get(const std::optional<int64_t> &id,
const std::optional<bool> &showUserMask,
const std::optional<bool> &showRoi,
const std::optional<bool> &showSpots,
const std::optional<bool> &showBeamCenter,
const std::optional<float> &saturation,
const std::optional<int64_t> &jpegQuality,
const std::optional<float> &showResRing,
const std::optional<std::string> &color,
Pistache::Http::ResponseWriter &response) {
int64_t image_id = id.value_or(ImageBuffer::MaxImage);
PreviewImageSettings settings{};
settings.show_user_mask = showUserMask.value_or(true);
settings.show_roi = showRoi.value_or(false);
settings.show_spots = showSpots.value_or(true);
settings.saturation_value = saturation.value_or(10);
settings.jpeg_quality = jpegQuality.value_or(100);
settings.resolution_ring = showResRing;
settings.scale = ConvertColorScale(color);
settings.show_beam_center = showBeamCenter.value_or(true);
settings.format = PreviewImageFormat::PNG;
std::string s = state_machine.GetPreviewJPEG(settings, image_id);
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/jpeg"));
@@ -657,17 +566,52 @@ void JFJochBrokerHttp::config_file_writer_put(
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::plot_roi_mean_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROIMean, binning, compression, response);
void JFJochBrokerHttp::preview_plot_get(const std::optional<std::string> &type, const std::optional<int32_t> &binning,
const std::optional<bool> &compression, const std::optional<float> &fill,
const std::optional<bool> &experimentalCoord,
const std::optional<std::string> &azintUnit, Pistache::Http::ResponseWriter &response) {
PlotAzintUnit unit = PlotAzintUnit::Q_recipA;
if (azintUnit.has_value()) {
if (azintUnit == "Q_recipA" || azintUnit == "q_recipa")
unit = PlotAzintUnit::Q_recipA;
else if (azintUnit == "d_A" || azintUnit == "d_a")
unit = PlotAzintUnit::D_A;
else if (azintUnit == "two_theta_deg")
unit = PlotAzintUnit::TwoTheta_deg;
}
PlotRequest req{
.type = ConvertPlotType(type),
.binning = 0,
.experimental_coord = experimentalCoord.value_or(false),
.azint_unit = unit,
.fill_value = fill
};
if (binning) {
if (binning.value() < 0)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Binning must be positive number or zero");
req.binning = binning.value();
}
auto plot = state_machine.GetPlots(req);
ProcessOutput(Convert(plot), response, compression.value_or(false));
}
void JFJochBrokerHttp::plot_roi_x_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROIWeightedX, binning, compression, response);
void JFJochBrokerHttp::config_indexing_get(Pistache::Http::ResponseWriter &response) {
ProcessOutput(Convert(state_machine.GetIndexingSettings()), response);
}
void JFJochBrokerHttp::plot_roi_y_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROIWeightedY, binning, compression, response);
void JFJochBrokerHttp::config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings,
Pistache::Http::ResponseWriter &response) {
state_machine.SetIndexingSettings(Convert(indexingSettings));
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::result_scan_get(Pistache::Http::ResponseWriter &response) {
auto ret = state_machine.GetScanResult();
if (ret.has_value())
ProcessOutput(Convert(ret.value()), response, true);
else
response.send(Pistache::Http::Code::Not_Found);
}

View File

@@ -26,7 +26,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void fpga_status_get(Pistache::Http::ResponseWriter &response) override;
JFJochStateMachine state_machine {services, logger};
JFJochStateMachine state_machine;
std::string frontend_directory;
void config_detector_get(Pistache::Http::ResponseWriter &response) override;
@@ -37,7 +37,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void config_azim_int_get(Pistache::Http::ResponseWriter &response) override;
void config_azim_int_put(const org::openapitools::server::model::Azim_int_settings &radIntSettings,
Pistache::Http::ResponseWriter &response) override;
Pistache::Http::ResponseWriter &response) override;
void config_select_detector_get(Pistache::Http::ResponseWriter &response) override;
@@ -51,39 +51,6 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void config_spot_finding_put(const org::openapitools::server::model::Spot_finding_settings &spotFindingSettings,
Pistache::Http::ResponseWriter &response) override;
void GenericPlot(PlotType plot_type,
const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response);
void plot_bkg_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_resolution_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) override;
void plot_error_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_indexing_rate_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_receiver_delay_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_roi_max_count_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_roi_sum_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_spot_count_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_strong_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_max_value_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) override;
void plot_azim_int_get(const std::optional<bool>& compression, Pistache::Http::ResponseWriter &response) override;
void statistics_calibration_get(Pistache::Http::ResponseWriter &response) override;
void statistics_data_collection_get(Pistache::Http::ResponseWriter &response) override;
@@ -109,7 +76,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void config_roi_get(Pistache::Http::ResponseWriter &response) override;
void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions,
Pistache::Http::ResponseWriter &response) override;
Pistache::Http::ResponseWriter &response) override;
void config_internal_generator_image_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) override;
@@ -122,7 +89,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void config_user_mask_tiff_get(Pistache::Http::ResponseWriter &response) override;
void config_user_mask_tiff_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) override;
Pistache::Http::ResponseWriter &response) override;
void config_internal_generator_image_tiff_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) override;
@@ -166,47 +133,57 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void config_zeromq_metadata_get(Pistache::Http::ResponseWriter &response) override;
void config_zeromq_metadata_put(
const org::openapitools::server::model::Zeromq_metadata_settings &zeromqMetadataSettings,
Pistache::Http::ResponseWriter &response) override;
const org::openapitools::server::model::Zeromq_metadata_settings &zeromqMetadataSettings,
Pistache::Http::ResponseWriter &response) override;
void config_mask_get(Pistache::Http::ResponseWriter &response) override;
void config_user_mask_get(Pistache::Http::ResponseWriter &response) override;
void config_user_mask_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) override;
void plot_indexing_unit_cell_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) override;
void plot_indexing_unit_cell_angle_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) override;
void plot_packets_received_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression,
Pistache::Http::ResponseWriter &response) override;
Pistache::Http::ResponseWriter &response) override;
void image_buffer_clear_post(Pistache::Http::ResponseWriter &response) override;
void image_buffer_image_cbor_get(const std::optional<int64_t> &id,
Pistache::Http::ResponseWriter &response) override;
void image_buffer_image_jpeg_get(const std::optional<int64_t> &id,
const std::optional<bool> &showUserMask,
const std::optional<bool> &showRoi,
const std::optional<bool> &showSpots,
const std::optional<int64_t> &saturation,
const std::optional<bool> &showBeamCenter,
const std::optional<float> &saturation,
const std::optional<int64_t> &jpegQuality,
const std::optional<float> &showResRing,
const std::optional<std::string> &color,
Pistache::Http::ResponseWriter &response) override;
void image_buffer_image_png_get(const std::optional<int64_t> &id,
const std::optional<bool> &showUserMask,
const std::optional<bool> &showRoi,
const std::optional<bool> &showSpots,
const std::optional<bool> &showBeamCenter,
const std::optional<float> &saturation,
const std::optional<int64_t> &jpegQuality,
const std::optional<float> &showResRing,
const std::optional<std::string> &color,
Pistache::Http::ResponseWriter &response) override;
void image_buffer_image_tiff_get(const std::optional<int64_t> &id, Pistache::Http::ResponseWriter &response) override;
void image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) override;
void image_buffer_status_get(Pistache::Http::ResponseWriter &response) override;
void plot_roi_mean_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) override;
void plot_roi_x_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) override;
void plot_roi_y_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) override;
void preview_plot_get(const std::optional<std::string> &type, const std::optional<int32_t> &binning,
const std::optional<bool> &compression, const std::optional<float> &fill,
const std::optional<bool> &experimentalCoord, const std::optional<std::string> &azintUnit,
Pistache::Http::ResponseWriter &response) override;
void config_indexing_get(Pistache::Http::ResponseWriter &response) override;
void config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings,
Pistache::Http::ResponseWriter &response) override;
void result_scan_get(Pistache::Http::ResponseWriter &response) override;
public:
JFJochBrokerHttp(const DiffractionExperiment& experiment, std::shared_ptr<Pistache::Rest::Router> &rtr);
void AddDetectorSetup(const DetectorSetup &setup);

View File

@@ -139,6 +139,12 @@ DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detecto
if (d.minimumFrameTimeUsIsSet())
setup.MinFrameTime(std::chrono::microseconds(d.getMinimumFrameTimeUs()));
if (d.defaultSettingsIsSet())
setup.DefaultSettings(Convert(d.getDefaultSettings()));
if (d.tempThresoldDegCIsSet())
setup.TempThreshold_degC(d.getTempThresoldDegC());
return setup;
}
@@ -157,6 +163,9 @@ void ParseFacilityConfiguration(const org::openapitools::server::model::Jfjoch_s
if (j.imageFormatIsSet())
experiment.ImportImageFormatSettings(Convert(j.getImageFormat()));
if (j.indexingIsSet())
experiment.ImportIndexingSettings(Convert(j.getIndexing()));
}
std::unique_ptr<ImagePusher> ParseZMQImagePusher(const org::openapitools::server::model::Jfjoch_settings &j) {

View File

@@ -151,12 +151,7 @@ std::optional<float> JFJochServices::GetReceiverProgress() const {
MultiLinePlot JFJochServices::GetPlots(const PlotRequest &request) {
if (receiver == nullptr)
return {};
try {
return receiver->GetDataProcessingPlot(request);
} catch (...) {
return {};
}
return receiver->GetDataProcessingPlot(request);
}
void JFJochServices::SetSpotFindingSettings(const SpotFindingSettings &settings) {
@@ -176,7 +171,7 @@ std::optional<DetectorStatus> JFJochServices::GetDetectorStatus() const {
return {};
}
std::string JFJochServices::GetPreviewJPEG(const PreviewJPEGSettings &settings, int64_t image_number) const {
std::string JFJochServices::GetPreviewJPEG(const PreviewImageSettings &settings, int64_t image_number) const {
if (receiver != nullptr)
return receiver->GetJPEGFromBuffer(settings, image_number);
else
@@ -262,3 +257,13 @@ void JFJochServices::ClearImageBuffer() const {
if (receiver)
receiver->ClearImageBuffer();
}
void JFJochServices::LoadDetectorPixelMask(PixelMask &mask) {
if (detector)
detector->LoadPixelMask(mask);
}
void JFJochServices::SetupIndexing(const IndexingSettings &input) {
if (receiver)
receiver->Indexing(input);
}

View File

@@ -44,7 +44,7 @@ public:
std::optional<DetectorStatus> GetDetectorStatus() const;
std::string GetPreviewJPEG(const PreviewJPEGSettings &settings, int64_t image_number) const;
std::string GetPreviewJPEG(const PreviewImageSettings &settings, int64_t image_number) const;
std::string GetPreviewTIFF(int64_t image_number) const;
void GetXFELPulseID(std::vector<uint64_t> &v) const;
@@ -62,6 +62,10 @@ public:
bool GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number = -1);
ImageBufferStatus GetImageBufferStatus() const;
void ClearImageBuffer() const;
void LoadDetectorPixelMask(PixelMask &mask);
void SetupIndexing(const IndexingSettings& input);
};

View File

@@ -8,24 +8,21 @@
#include "pistache/net.h"
#include "../common/CUDAWrapper.h"
JFJochStateMachine::JFJochStateMachine(JFJochServices &in_services, Logger &in_logger)
: logger(in_logger),
services(in_services),
pixel_mask(experiment),
current_detector_setup(0),
data_processing_settings(DiffractionExperiment::DefaultDataProcessingSettings()),
pixel_mask_statistics({0, 0, 0}) {
JFJochStateMachine::JFJochStateMachine(const DiffractionExperiment& in_experiment,
JFJochServices &in_services,
Logger &in_logger)
: experiment(in_experiment),
logger(in_logger),
services(in_services),
pixel_mask(experiment),
current_detector_setup(0),
data_processing_settings(DiffractionExperiment::DefaultDataProcessingSettings()),
pixel_mask_statistics({0, 0, 0}),
gpu_count(get_gpu_count()) {
indexing_possible = (get_gpu_count() >= 0);
#ifdef JFJOCH_USE_TORCH
resolution_estimate_possible = true;
#else
resolution_estimate_possible = false;
#endif
if (!indexing_possible)
data_processing_settings.indexing = false;
if (!resolution_estimate_possible)
data_processing_settings.resolution_estimate = false;
SupressTIFFErrors();
}
@@ -65,6 +62,7 @@ bool JFJochStateMachine::ImportPedestalG1G2(const JFJochReceiverOutput &receiver
void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &ul) {
if (experiment.GetDetectorSetup().GetDetectorType() != DetectorType::JUNGFRAU) {
try {
calibration.reset();
logger.Info("EIGER configuration");
services.ConfigureDetector(experiment);
logger.Info(" ... done ");
@@ -101,8 +99,8 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &u
}
}
SetState(JFJochState::Idle,
"Pedestal sequence done",
BrokerStatus::MessageSeverity::Success);
"Pedestal sequence done",
BrokerStatus::MessageSeverity::Success);
services.ConfigureDetector(experiment);
pixel_mask.LoadDetectorBadPixelMask(experiment, calibration.get());
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
@@ -254,9 +252,18 @@ void JFJochStateMachine::Initialize() {
ResetError(); // Clear error, we don't care what was it
logger.Info("Initialize");
try {
services.SetupIndexing(experiment.GetIndexingSettings());
} catch (const JFJochException &e) {
SetState(JFJochState::Error,
e.what(),
BrokerStatus::MessageSeverity::Error);
throw;
}
SetState(JFJochState::Busy, "Configuring detector", BrokerStatus::MessageSeverity::Info);
scan_result = {}; // Clear scan result
measurement = std::async(std::launch::async, &JFJochStateMachine::InitializeThread, this, std::move(ul));
}
@@ -280,6 +287,8 @@ void JFJochStateMachine::InitializeThread(std::unique_lock<std::mutex> ul) {
services.On(experiment);
detector_setup[current_detector_setup] = experiment.GetDetectorSetup();
pixel_mask = PixelMask(experiment);
services.LoadDetectorPixelMask(pixel_mask);
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
} catch (const std::exception &e) {
logger.Error("Initialize error {}", e.what());
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
@@ -289,9 +298,7 @@ void JFJochStateMachine::InitializeThread(std::unique_lock<std::mutex> ul) {
}
void JFJochStateMachine::Trigger() {
std::unique_lock ul(m);
if (state == JFJochState::Measuring)
services.Trigger();
services.Trigger();
}
void JFJochStateMachine::Start(const DatasetSettings &settings) {
@@ -342,6 +349,7 @@ void JFJochStateMachine::MeasurementThread() {
auto tmp_output = services.Stop();
{
std::unique_lock ul(m);
scan_result = tmp_output.receiver_output.scan_result;
if (tmp_output.receiver_output.writer_queue_full_warning)
SetState(JFJochState::Idle,
@@ -355,6 +363,10 @@ void JFJochStateMachine::MeasurementThread() {
SetState(JFJochState::Idle,
"Missing packets in data collection; reduce frame rate",
BrokerStatus::MessageSeverity::Error);
else if (!tmp_output.receiver_output.writer_err.empty())
SetState(JFJochState::Idle,
tmp_output.receiver_output.writer_err,
BrokerStatus::MessageSeverity::Error);
else
SetState(JFJochState::Idle,
"Data collection without problems",
@@ -452,9 +464,14 @@ DetectorSettings JFJochStateMachine::GetDetectorSettings() const {
return experiment.GetDetectorSettings();
}
void JFJochStateMachine::ImportDetectorSettings(const DetectorSettings &input) {
bool JFJochStateMachine::ImportDetectorSettings(const DetectorSettings &input) {
std::unique_lock ul(experiment_detector_settings_mutex);
// For JUNGFRAU detector, if detector settings changes key parameters
// need to recalibrate the detector
bool recalib = input.NeedsJUNGFRAURecalibration(experiment.GetDetectorSettings())
&& experiment.GetDetectorType() == DetectorType::JUNGFRAU;
experiment.ImportDetectorSettings(input);
return recalib;
}
void JFJochStateMachine::LoadDetectorSettings(const DetectorSettings &settings) {
@@ -465,9 +482,19 @@ void JFJochStateMachine::LoadDetectorSettings(const DetectorSettings &settings)
ImportDetectorSettings(settings);
break;
case JFJochState::Idle:
SetState(JFJochState::Busy, "Loading settings", BrokerStatus::MessageSeverity::Info);
ImportDetectorSettings(settings);
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
if (ImportDetectorSettings(settings)) {
SetState(JFJochState::Busy, "Loading settings", BrokerStatus::MessageSeverity::Info);
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
} else {
try {
SetState(JFJochState::Busy, "Configure detector", BrokerStatus::MessageSeverity::Info);
services.ConfigureDetector(experiment);
SetState(JFJochState::Idle, "Detector configured", BrokerStatus::MessageSeverity::Info);
} catch (const std::exception &e) {
logger.Error("Detector configuration error {}", e.what());
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
}
}
break;
case JFJochState::Measuring:
case JFJochState::Busy:
@@ -476,7 +503,7 @@ void JFJochStateMachine::LoadDetectorSettings(const DetectorSettings &settings)
}
}
DiffractionExperiment &JFJochStateMachine::NotThreadSafe_Experiment() {
DiffractionExperiment JFJochStateMachine::Experiment() {
return experiment;
}
@@ -484,6 +511,7 @@ BrokerStatus JFJochStateMachine::GetStatus() const {
std::unique_lock ul(broker_status_mutex);
BrokerStatus ret = broker_status;
ret.progress = services.GetReceiverProgress();
ret.gpu_count = gpu_count;
return ret;
}
@@ -493,9 +521,9 @@ void JFJochStateMachine::SetState(JFJochState curr_state,
std::unique_lock ul(broker_status_mutex);
state = curr_state;
broker_status = BrokerStatus{
.state = curr_state,
.message = message,
.message_severity = message_severity
.state = curr_state,
.message = message,
.message_severity = message_severity
};
}
@@ -507,13 +535,11 @@ void JFJochStateMachine::SetSpotFindingSettings(const SpotFindingSettings &setti
std::unique_lock ul(data_processing_settings_mutex);
DiffractionExperiment::CheckDataProcessingSettings(settings);
data_processing_settings = settings;
// If there is no capability to use the features, make sure these are disabled
if (!indexing_possible)
data_processing_settings.indexing = false;
if (!resolution_estimate_possible)
data_processing_settings.resolution_estimate = false;
data_processing_settings = settings;
services.SetSpotFindingSettings(data_processing_settings);
}
@@ -552,6 +578,7 @@ DetectorList JFJochStateMachine::GetDetectorsList() const {
tmp.min_count_time = i.GetMinCountTime();
tmp.readout_time = i.GetReadOutTime();
tmp.detector_type = i.GetDetectorType();
tmp.pixel_size_mm = i.GetPixelSize_mm();
ret.detector.emplace_back(std::move(tmp));
}
ret.current_id = current_detector_setup;
@@ -591,7 +618,7 @@ void JFJochStateMachine::SetRadialIntegrationSettings(const AzimuthalIntegration
if (IsRunning())
throw WrongDAQStateException("Cannot change radial integration settings during data collection");
{
std::unique_lock ul(experiment_azimuthal_integration_settings_mutex);
std::unique_lock ul2(experiment_azimuthal_integration_settings_mutex);
experiment.ImportAzimuthalIntegrationSettings(settings);
}
}
@@ -640,7 +667,7 @@ void JFJochStateMachine::ResetError() noexcept {
}
}
std::string JFJochStateMachine::GetPreviewJPEG(const PreviewJPEGSettings &settings, int64_t image_number) const {
std::string JFJochStateMachine::GetPreviewJPEG(const PreviewImageSettings &settings, int64_t image_number) const {
return services.GetPreviewJPEG(settings, image_number);
}
@@ -656,8 +683,8 @@ std::string JFJochStateMachine::GetPedestalTIFF(size_t gain_level, size_t sc) co
if ((experiment.GetDetectorSetup().GetDetectorType() == DetectorType::JUNGFRAU) && calibration) {
auto tmp = calibration->GetPedestal(gain_level, sc);
return WriteTIFFToString(tmp.data(), RAW_MODULE_COLS, RAW_MODULE_LINES * experiment.GetModulesNum(),
sizeof(uint16_t), false);
CompressedImage image(tmp, RAW_MODULE_COLS, RAW_MODULE_LINES * experiment.GetModulesNum());
return WriteTIFFToString(image);
} else
return {};
}
@@ -737,8 +764,8 @@ std::string JFJochStateMachine::GetFullPixelMaskTIFF() const {
return {};
std::vector v = pixel_mask.GetMask(experiment);
return WriteTIFFToString(v.data(), experiment.GetXPixelsNum(), experiment.GetYPixelsNum(),
sizeof(uint32_t), false);
CompressedImage mask_image(v, experiment.GetXPixelsNum(), experiment.GetYPixelsNum());
return WriteTIFFToString(mask_image);
}
std::string JFJochStateMachine::GetUserPixelMaskTIFF() const {
@@ -748,8 +775,8 @@ std::string JFJochStateMachine::GetUserPixelMaskTIFF() const {
return {};
std::vector v = pixel_mask.GetUserMask(experiment);
return WriteTIFFToString(v.data(), experiment.GetXPixelsNum(), experiment.GetYPixelsNum(),
sizeof(uint32_t), false);
CompressedImage mask_image(v, experiment.GetXPixelsNum(), experiment.GetYPixelsNum());
return WriteTIFFToString(mask_image);
}
std::vector<uint32_t> JFJochStateMachine::GetFullPixelMask() const {
@@ -784,7 +811,7 @@ void JFJochStateMachine::SetUserPixelMask(const std::vector<uint32_t> &v) {
}
InstrumentMetadata JFJochStateMachine::GetInstrumentMetadata() const {
std::unique_lock ul(m);
std::unique_lock ul(experiment_instrument_metadata_mutex);
return experiment.GetInstrumentMetadata();
}
@@ -793,12 +820,14 @@ void JFJochStateMachine::LoadInstrumentMetadata(const InstrumentMetadata &settin
if (IsRunning())
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
experiment.ImportInstrumentMetadata(settings);
{
std::unique_lock ul2(experiment_instrument_metadata_mutex);
experiment.ImportInstrumentMetadata(settings);
}
}
ImageFormatSettings JFJochStateMachine::GetImageFormatSettings() const {
std::unique_lock ul(m);
std::unique_lock ul(experiment_image_format_settings_mutex);
return experiment.GetImageFormatSettings();
}
@@ -810,7 +839,10 @@ void JFJochStateMachine::LoadImageFormatSettings(const ImageFormatSettings &sett
bool recalc_mask = (experiment.GetPedestalG0RMSLimit() != settings.GetPedestalG0RMSLimit());
experiment.ImportImageFormatSettings(settings);
{
std::unique_lock ul2(experiment_image_format_settings_mutex);
experiment.ImportImageFormatSettings(settings);
}
if (recalc_mask)
pixel_mask.LoadDetectorBadPixelMask(experiment, calibration.get());
@@ -880,7 +912,7 @@ void JFJochStateMachine::ClearImageBuffer() const {
}
FileWriterSettings JFJochStateMachine::GetFileWriterSettings() const {
std::unique_lock ul(m);
std::unique_lock ul(experiment_file_writer_settings_mutex);
return experiment.GetFileWriterSettings();
}
@@ -889,6 +921,40 @@ void JFJochStateMachine::LoadFileWriterSettings(const FileWriterSettings &settin
if (IsRunning())
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
experiment.ImportFileWriterSettings(settings);
{
std::unique_lock ul2(experiment_file_writer_settings_mutex);
experiment.ImportFileWriterSettings(settings);
}
}
IndexingSettings JFJochStateMachine::GetIndexingSettings() const {
std::unique_lock ul(experiment_indexing_settings_mutex);
return experiment.GetIndexingSettings();
}
void JFJochStateMachine::SetIndexingSettings(const IndexingSettings &input) {
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
{
std::unique_lock ul2(experiment_indexing_settings_mutex);
experiment.ImportIndexingSettings(input);
try {
services.SetupIndexing(input);
} catch (const JFJochException &e) {
logger.ErrorException(e);
SetState(JFJochState::Error,
e.what(),
BrokerStatus::MessageSeverity::Error);
throw;
}
}
}
std::optional<ScanResult> JFJochStateMachine::GetScanResult() const {
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException("Cannot check scan result, when running");
return scan_result;
}

View File

@@ -23,6 +23,7 @@ struct BrokerStatus {
std::optional<float> progress;
std::optional<std::string> message;
enum class MessageSeverity {Error, Info, Warning, Success} message_severity = MessageSeverity::Error;
int64_t gpu_count;
};
struct DetectorListElement {
@@ -37,6 +38,7 @@ struct DetectorListElement {
std::chrono::microseconds min_frame_time;
std::chrono::microseconds min_count_time;
DetectorType detector_type;
float pixel_size_mm;
};
struct DetectorList {
@@ -89,6 +91,10 @@ class JFJochStateMachine {
mutable std::mutex experiment_detector_settings_mutex;
mutable std::mutex experiment_azimuthal_integration_settings_mutex;
mutable std::mutex experiment_instrument_metadata_mutex;
mutable std::mutex experiment_image_format_settings_mutex;
mutable std::mutex experiment_file_writer_settings_mutex;
mutable std::mutex experiment_indexing_settings_mutex;
DiffractionExperiment experiment;
// mutex m is protecting:
@@ -99,6 +105,7 @@ class JFJochStateMachine {
std::unique_ptr<JFCalibration> calibration;
PixelMask pixel_mask;
int64_t current_detector_setup; // Lock only on change
std::optional<ScanResult> scan_result;
mutable std::mutex calibration_statistics_mutex;
std::vector<JFCalibrationModuleStatistics> calibration_statistics;
@@ -118,6 +125,8 @@ class JFJochStateMachine {
bool indexing_possible;
bool resolution_estimate_possible;
const int32_t gpu_count;
void UpdatePixelMaskStatistics(const PixelMaskStatistics &input);
// Private functions assume that lock m is acquired
@@ -135,10 +144,12 @@ class JFJochStateMachine {
void TakePedestalInternalG0(std::unique_lock<std::mutex> &ul);
void TakePedestalInternalG1(std::unique_lock<std::mutex> &ul, int32_t storage_cell = 0);
void TakePedestalInternalG2(std::unique_lock<std::mutex> &ul, int32_t storage_cell = 0);
void ImportDetectorSettings(const DetectorSettings& input);
bool ImportDetectorSettings(const DetectorSettings& input);
void UpdateROIDefinition();
public:
JFJochStateMachine(JFJochServices &in_services, Logger &logger);
JFJochStateMachine(const DiffractionExperiment& experiment,
JFJochServices &in_services,
Logger &logger);
~JFJochStateMachine();
void Initialize();
@@ -184,7 +195,7 @@ public:
void SetRadialIntegrationSettings(const AzimuthalIntegrationSettings& settings);
AzimuthalIntegrationSettings GetRadialIntegrationSettings() const;
std::string GetPreviewJPEG(const PreviewJPEGSettings& settings, int64_t image_number) const;
std::string GetPreviewJPEG(const PreviewImageSettings& settings, int64_t image_number) const;
std::string GetPreviewTIFF(int64_t image_number) const;
std::string GetPedestalTIFF(size_t gain_level, size_t sc) const;
@@ -192,7 +203,7 @@ public:
void LoadInternalGeneratorImageTIFF(const std::string &s, uint64_t image_number);
// Not thread safe - only for configuration in serial context
DiffractionExperiment& NotThreadSafe_Experiment();
DiffractionExperiment Experiment();
// Function for debug only - UNSAFE for real operation
void DebugOnly_SetState(JFJochState state,
@@ -220,6 +231,8 @@ public:
void SetMetadataSocketSettings(const ZMQMetadataSettings &input);
ZMQMetadataSettings GetMetadataSocketSettings();
void SetIndexingSettings(const IndexingSettings &input);
IndexingSettings GetIndexingSettings() const;
PixelMaskStatistics GetPixelMaskStatistics() const;
void GetStartMessageFromBuffer(std::vector<uint8_t> &v);
@@ -227,6 +240,8 @@ public:
ImageBufferStatus GetImageBufferStatus() const;
void ClearImageBuffer() const;
void AddDetectorSetup(const DetectorSetup& setup); // Not thread safe, only during setup
std::optional<ScanResult> GetScanResult() const;
};

View File

@@ -19,12 +19,9 @@ SpotFindingSettings Convert(const org::openapitools::server::model::Spot_finding
ret.low_resolution_limit = input.getLowResolutionLimit();
ret.enable = input.isEnable();
ret.indexing = input.isIndexing();
ret.resolution_estimate = input.isResolutionEstimate();
ret.indexing_tolerance = input.getIndexingTolerance();
if (input.filterPowderRingsIsSet())
ret.filter_spots_powder_ring = input.isFilterPowderRings();
if (input.minSpotCountPowderRingIsSet())
ret.min_spot_count_powder_ring = input.getMinSpotCountPowderRing();
ret.quick_integration = input.isQuickIntegration();
ret.cutoff_spot_count_low_res = input.getHighResolutionLimitForSpotCountLowRes();
return ret;
}
@@ -38,10 +35,8 @@ org::openapitools::server::model::Spot_finding_settings Convert(const SpotFindin
ret.setLowResolutionLimit(input.low_resolution_limit);
ret.setEnable(input.enable);
ret.setIndexing(input.indexing);
ret.setIndexingTolerance(input.indexing_tolerance);
ret.setFilterPowderRings(input.filter_spots_powder_ring);
ret.setMinSpotCountPowderRing(input.min_spot_count_powder_ring);
ret.setResolutionEstimate(input.resolution_estimate);
ret.setHighResolutionLimitForSpotCountLowRes(input.cutoff_spot_count_low_res);
ret.setQuickIntegration(input.quick_integration);
return ret;
}
@@ -240,6 +235,7 @@ org::openapitools::server::model::Broker_status Convert(const BrokerStatus& inpu
if (input.progress.has_value())
ret.setProgress(input.progress.value());
ret.setGpuCount(input.gpu_count);
return ret;
}
@@ -371,6 +367,7 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu
d.setMinFrameTimeUs(input.detector[i].min_frame_time.count());
d.setMinCountTimeUs(input.detector[i].min_count_time.count());
d.setReadoutTimeUs(input.detector[i].readout_time.count());
d.setPixelSizeMm(input.detector[i].pixel_size_mm);
d.setType(Convert(input.detector[i].detector_type));
dets.emplace_back(std::move(d));
}
@@ -380,36 +377,69 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu
}
org::openapitools::server::model::Plots Convert(const MultiLinePlot& input) {
std::vector<org::openapitools::server::model::Plot> tmp(input.size());
for (int i = 0; i < input.size(); i++) {
tmp[i].setTitle(input[i].title);
tmp[i].setX(input[i].x);
tmp[i].setY(input[i].y);
std::vector<org::openapitools::server::model::Plot> tmp(input.GetPlots().size());
for (int i = 0; i < input.GetPlots().size(); i++) {
tmp[i].setTitle(input.GetPlots()[i].title);
tmp[i].setX(input.GetPlots()[i].x);
tmp[i].setY(input.GetPlots()[i].y);
tmp[i].setZ(input.GetPlots()[i].z);
}
org::openapitools::server::model::Plots output;
output.setPlot(tmp);
org::openapitools::server::model::Plot_unit_x unit;
switch (input.GetUnits()) {
case MultiLinePlotUnits::ImageNumber:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::IMAGE_NUMBER);
break;
case MultiLinePlotUnits::Angle_deg:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::ANGLE_DEG);
break;
case MultiLinePlotUnits::Q_recipA:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::Q_RECIPA);
break;
case MultiLinePlotUnits::ADU:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::ADU);
break;
case MultiLinePlotUnits::d_A:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::D_A);
break;
case MultiLinePlotUnits::Grid_um:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::GRID_UM);
break;
default:
break;
}
output.setUnitX(unit);
if (input.GetSizeX().has_value())
output.setSizeX(input.GetSizeX().value());
if (input.GetSizeY().has_value())
output.setSizeY(input.GetSizeY().value());
return output;
}
AzimuthalIntegrationSettings Convert(const org::openapitools::server::model::Azim_int_settings& input) {
AzimuthalIntegrationSettings ret{};
ret.SolidAngleCorrection(input.isSolidAngleCorr());
if (input.polarizationFactorIsSet())
ret.PolarizationFactor(input.getPolarizationFactor());
ret.PolarizationCorrection(input.isPolarizationCorr());
ret.QSpacing_recipA(input.getQSpacing());
ret.QRange_recipA(input.getLowQRecipA(), input.getHighQRecipA());
ret.AzimuthalBinCount(input.getAzimuthalBins());
return ret;
}
org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalIntegrationSettings& settings) {
org::openapitools::server::model::Azim_int_settings ret{};
ret.setSolidAngleCorr(settings.IsSolidAngleCorrection());
if (settings.GetPolarizationFactor().has_value())
ret.setPolarizationFactor(settings.GetPolarizationFactor().value());
ret.setPolarizationCorr(settings.IsPolarizationCorrection());
ret.setHighQRecipA(settings.GetHighQ_recipA());
ret.setLowQRecipA(settings.GetLowQ_recipA());
ret.setQSpacing(settings.GetQSpacing_recipA());
ret.setAzimuthalBins(settings.GetAzimuthalBinCount());
return ret;
}
@@ -517,6 +547,28 @@ org::openapitools::server::model::Image_format_settings Convert(const ImageForma
return ret;
}
Coord ConvertOpenAPI(const std::vector<float> &input) {
if (input.size() != 3)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Wrong size of Coord array");
return {input[0], input[1], input[2]};
}
GoniometerAxis Convert(const org::openapitools::server::model::Rotation_axis& input) {
std::optional<Coord> helical;
if (input.helicalStepUmIsSet())
helical = ConvertOpenAPI(input.getHelicalStepUm());
GoniometerAxis axis{input.getName(), input.getStart(), input.getStep(),
ConvertOpenAPI(input.getVector()), helical};
if (input.screeningWedgeDegIsSet())
axis.ScreeningWedge(input.getScreeningWedgeDeg());
return axis;
}
GridScanSettings Convert(const org::openapitools::server::model::Grid_scan& input) {
return {input.getNFast(), input.getStepXUm(), input.getStepYUm(), input.isSnake(), input.isVertical()};
}
DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings& input) {
DatasetSettings ret;
@@ -571,19 +623,11 @@ DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings
ret.TotalFlux(input.getTotalFlux());
if (input.transmissionIsSet())
ret.AttenuatorTransmission(input.getTransmission());
if (input.goniometerIsSet())
ret.Goniometer(Convert(input.getGoniometer()));
else if (input.gridScanIsSet())
ret.GridScan(Convert(input.getGridScan()));
if (input.goniometerIsSet()) {
ret.Goniometer(GoniometerAxis{
.name = input.getGoniometer().getName(),
.increment = input.getGoniometer().getStep(),
.start = input.getGoniometer().getStart()
});
if (input.getGoniometer().getVector().size() == 3) {
auto v = input.getGoniometer().getVector();
ret.RotationAxis(Coord(v[0], v[1], v[2]));
} else
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Rotation axis must be provided");
}
if (input.spaceGroupNumberIsSet())
ret.SpaceGroupNumber(input.getSpaceGroupNumber());
ret.SampleName(input.getSampleName());
@@ -602,6 +646,21 @@ DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings
ret.WriteNXmxHDF5Master(input.isWriteNxmxHdf5Master());
if (input.polarizationFactorIsSet())
ret.PolarizationFactor(input.getPolarizationFactor());
ret.PoniRot1_rad(input.getPoniRot1Rad());
ret.PoniRot2_rad(input.getPoniRot2Rad());
ret.PoniRot3_rad(input.getPoniRot3Rad());
if (input.ringCurrentMAIsSet())
ret.RingCurrent_mA(input.getRingCurrentMA());
if (input.sampleTemperatureKIsSet())
ret.SampleTemperature_K(input.getSampleTemperatureK());
ret.SpotFindingEnable(input.isSpotFinding());
ret.MaxSpotCount(input.getMaxSpotCount());
return ret;
}
@@ -741,3 +800,205 @@ FileWriterFormat Convert(const org::openapitools::server::model::File_writer_for
}
}
PlotType ConvertPlotType(const std::optional<std::string>& input) {
if (!input.has_value())
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Plot type is compulsory paramater");
if (input == "bkg_estimate") return PlotType::BkgEstimate;
if (input == "azint") return PlotType::AzInt;
if (input == "azint_1d") return PlotType::AzInt1D;
if (input == "spot_count") return PlotType::SpotCount;
if (input == "spot_count_low_res") return PlotType::SpotCountLowRes;
if (input == "spot_count_indexed") return PlotType::SpotCountIndexed;
if (input == "spot_count_ice") return PlotType::SpotCountIceRing;
if (input == "indexing_rate") return PlotType::IndexingRate;
if (input == "indexing_unit_cell_length") return PlotType::IndexingUnitCellLength;
if (input == "profile_radius") return PlotType::ProfileRadius;
if (input == "b_factor") return PlotType::BFactor;
if (input == "indexing_unit_cell_angle") return PlotType::IndexingUnitCellAngle;
if (input == "error_pixels") return PlotType::ErrorPixels;
if (input == "strong_pixels") return PlotType::StrongPixels;
if (input == "saturated_pixels") return PlotType::SaturatedPixels;
if (input == "image_collection_efficiency") return PlotType::ImageCollectionEfficiency;
if (input == "receiver_delay") return PlotType::ReceiverDelay;
if (input == "receiver_free_send_buf") return PlotType::ReceiverFreeSendBuf;
if (input == "roi_sum") return PlotType::ROISum;
if (input == "roi_mean") return PlotType::ROIMean;
if (input == "roi_max_count") return PlotType::ROIMaxCount;
if (input == "roi_pixels") return PlotType::ROIPixels;
if (input == "roi_weighted_x") return PlotType::ROIWeightedX;
if (input == "roi_weighted_y") return PlotType::ROIWeightedY;
if (input == "packets_received") return PlotType::PacketsReceived;
if (input == "max_pixel_value") return PlotType::MaxValue;
if (input == "resolution_estimate") return PlotType::ResolutionEstimate;
if (input == "indexing_time") return PlotType::IndexingTime;
if (input == "pixel_sum") return PlotType::PixelSum;
if (input == "processing_time") return PlotType::ImageProcessingTime;
if (input == "beam_center_x") return PlotType::RefinementBeamX;
if (input == "beam_center_y") return PlotType::RefinementBeamY;
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Plot type not recognized");
}
ColorScaleEnum ConvertColorScale(const std::optional<std::string>& input) {
std::string color = input.value_or("indigo");
if (color == "viridis")
return ColorScaleEnum::Viridis;
else if (color == "bw")
return ColorScaleEnum::BW;
else if (color == "heat")
return ColorScaleEnum::Heat;
else if (color == "indigo")
return ColorScaleEnum::Indigo;
else
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Color scale unknown");
}
IndexingSettings Convert(const org::openapitools::server::model::Indexing_settings &input) {
IndexingSettings ret;
switch (input.getAlgorithm().getValue()) {
case org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::FFT:
ret.Algorithm(IndexingAlgorithmEnum::FFT);
break;
case org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::NONE:
ret.Algorithm(IndexingAlgorithmEnum::None);
break;
case org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::FFBIDX:
ret.Algorithm(IndexingAlgorithmEnum::FFBIDX);
break;
case org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::AUTO:
ret.Algorithm(IndexingAlgorithmEnum::Auto);
break;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Unknown indexing algorithm");
}
switch (input.getGeomRefinementAlgorithm().getValue()) {
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::INVALID_VALUE_OPENAPI_GENERATED:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Unknown refinement algorithm");
break;
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::BeamCenter);
break;
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTERSYMMETRY:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::BeamCenterSymmetry);
break;
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::None);
break;
}
ret.FFT_HighResolution_A(input.getFftHighResolutionA());
ret.FFT_MaxUnitCell_A(input.getFftMaxUnitCellA());
ret.FFT_MinUnitCell_A(input.getFftMinUnitCellA());
ret.FFT_NumVectors(input.getFftNumVectors());
ret.Tolerance(input.getTolerance());
ret.IndexingThreads(input.getThreadCount());
ret.UnitCellDistTolerance(input.getUnitCellDistTolerance());
return ret;
}
org::openapitools::server::model::Indexing_settings Convert(const IndexingSettings &input) {
org::openapitools::server::model::Indexing_settings ret;
ret.setFftHighResolutionA(input.GetFFT_HighResolution_A());
ret.setFftMinUnitCellA(input.GetFFT_MinUnitCell_A());
ret.setFftMaxUnitCellA(input.GetFFT_MaxUnitCell_A());
ret.setFftNumVectors(input.GetFFT_NumVectors());
ret.setTolerance(input.GetTolerance());
ret.setThreadCount(input.GetIndexingThreads());
ret.setUnitCellDistTolerance(input.GetUnitCellDistTolerance());
org::openapitools::server::model::Geom_refinement_algorithm refinement;
switch (input.GetGeomRefinementAlgorithm()) {
case GeomRefinementAlgorithmEnum::None:
refinement.setValue(org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE);
break;
case GeomRefinementAlgorithmEnum::BeamCenter:
refinement.setValue(org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER);
break;
case GeomRefinementAlgorithmEnum::BeamCenterSymmetry:
refinement.setValue(org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTERSYMMETRY);
break;
}
ret.setGeomRefinementAlgorithm(refinement);
org::openapitools::server::model::Indexing_algorithm tmp;
switch (input.GetAlgorithm()) {
case IndexingAlgorithmEnum::Auto:
tmp.setValue(org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::AUTO);
break;
case IndexingAlgorithmEnum::FFBIDX:
tmp.setValue(org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::FFBIDX);
break;
case IndexingAlgorithmEnum::FFT:
tmp.setValue(org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::FFT);
break;
case IndexingAlgorithmEnum::None:
tmp.setValue(org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::NONE);
break;
}
ret.setAlgorithm(tmp);
return ret;
}
org::openapitools::server::model::Scan_result Convert(const ScanResult& input) {
org::openapitools::server::model::Scan_result ret;
ret.setFilePrefix(input.file_prefix);
std::vector<org::openapitools::server::model::Scan_result_images_inner> v;
for (const auto &i : input.images) {
org::openapitools::server::model::Scan_result_images_inner tmp;
tmp.setEfficiency(i.collection_efficiency);
tmp.setNumber(i.number);
if (i.x.has_value())
tmp.setNx(i.x.value());
if (i.y.has_value())
tmp.setNy(i.y.value());
if (i.bkg.has_value())
tmp.setBkg(i.bkg.value());
std::optional<uint64_t> pixel_sum;
if (i.pixel_sum.has_value())
tmp.setPixelSum(i.pixel_sum.value());
if (i.max_viable_pixel.has_value())
tmp.setMax(i.max_viable_pixel.value());
if (i.sat_pixels.has_value())
tmp.setSat(i.sat_pixels.value());
if (i.spot_count.has_value())
tmp.setSpots(i.spot_count.value());
if (i.spot_count_ice.has_value())
tmp.setSpotsIce(i.spot_count_ice.value());
if (i.spot_count_low_res.has_value())
tmp.setSpotsLowRes(i.spot_count_low_res.value());
if (i.spot_count_indexed.has_value())
tmp.setSpotsIndexed(i.spot_count_indexed.value());
if (i.indexing_solution.has_value())
tmp.setIndex(i.indexing_solution.value());
if (i.profile_radius.has_value())
tmp.setPr(i.profile_radius.value());
if (i.b_factor.has_value())
tmp.setB(i.b_factor.value());
if (i.uc.has_value()) {
org::openapitools::server::model::Unit_cell uc;
uc.setA(i.uc->a);
uc.setB(i.uc->b);
uc.setC(i.uc->c);
uc.setAlpha(i.uc->alpha);
uc.setBeta(i.uc->beta);
uc.setGamma(i.uc->gamma);
tmp.setUc(uc);
}
if (i.xfel_pulse_id.has_value())
tmp.setXfelPulseid(i.xfel_pulse_id.value());
if (i.res.has_value())
tmp.setRes(i.res.value());
v.emplace_back(std::move(tmp));
}
ret.setImages(v);
return ret;
}

View File

@@ -24,19 +24,27 @@
#include "gen/model/Zeromq_metadata_settings.h"
#include "gen/model/File_writer_settings.h"
#include "gen/model/Image_buffer_status.h"
#include "gen/model/Rotation_axis.h"
#include "gen/model/Grid_scan.h"
#include "gen/model/Indexing_settings.h"
#include "gen/model/Scan_result.h"
#include "../frame_serialize/JFJochMessages.h"
#include "../common/JFJochMessages.h"
#include "../common/DatasetSettings.h"
#include "../common/ImageFormatSettings.h"
#include "../image_analysis/SpotFindingSettings.h"
#include "../image_analysis/spot_finding/SpotFindingSettings.h"
#include "JFJochStateMachine.h"
#include "../common/DetectorSettings.h"
#include "../jungfrau/JFCalibration.h"
#include "../common/InstrumentMetadata.h"
#include "../common/ScanResult.h"
SpotFindingSettings Convert(const org::openapitools::server::model::Spot_finding_settings &input);
org::openapitools::server::model::Spot_finding_settings Convert(const SpotFindingSettings &input);
IndexingSettings Convert(const org::openapitools::server::model::Indexing_settings &input);
org::openapitools::server::model::Indexing_settings Convert(const IndexingSettings &input);
org::openapitools::server::model::Measurement_statistics Convert(const MeasurementStatistics &input);
DetectorSettings Convert(const org::openapitools::server::model::Detector_settings &input);
@@ -60,6 +68,8 @@ ROIDefinition Convert(const org::openapitools::server::model::Roi_definitions& i
org::openapitools::server::model::Roi_definitions Convert(const ROIDefinition &input);
ImageFormatSettings Convert(const org::openapitools::server::model::Image_format_settings& input);
org::openapitools::server::model::Image_format_settings Convert(const ImageFormatSettings& input);
GoniometerAxis Convert(const org::openapitools::server::model::Rotation_axis& input);
GridScanSettings Convert(const org::openapitools::server::model::Grid_scan& input);
DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings& input);
std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const std::vector<DeviceStatus> &input);
org::openapitools::server::model::Pixel_mask_statistics Convert(const PixelMaskStatistics& input);
@@ -72,4 +82,10 @@ ZMQMetadataSettings Convert(const org::openapitools::server::model::Zeromq_metad
org::openapitools::server::model::File_writer_format Convert(FileWriterFormat input);
FileWriterFormat Convert(const org::openapitools::server::model::File_writer_format& input);
PlotType ConvertPlotType(const std::optional<std::string>& input);
ColorScaleEnum ConvertColorScale(const std::optional<std::string>& input);
org::openapitools::server::model::Scan_result Convert(const ScanResult& input);
#endif //JFJOCH_OPENAPICONVERT_H

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -41,11 +41,13 @@
#include "Fpga_status_inner.h"
#include "Image_buffer_status.h"
#include "Image_format_settings.h"
#include "Indexing_settings.h"
#include "Instrument_metadata.h"
#include "Jfjoch_statistics.h"
#include "Measurement_statistics.h"
#include "Plots.h"
#include "Roi_definitions.h"
#include "Scan_result.h"
#include "Spot_finding_settings.h"
#include "Zeromq_metadata_settings.h"
#include "Zeromq_preview_settings.h"
@@ -77,6 +79,8 @@ private:
void config_image_format_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_image_format_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_image_format_raw_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_indexing_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_indexing_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_instrument_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_instrument_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_internal_generator_image_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
@@ -103,32 +107,15 @@ private:
void image_buffer_clear_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_image_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_image_jpeg_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_image_png_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_image_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_start_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void initialize_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void pedestal_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_azim_int_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_bkg_estimate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_error_pixel_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_image_collection_efficiency_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_indexing_rate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_indexing_unit_cell_angle_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_indexing_unit_cell_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_max_value_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_packets_received_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_receiver_delay_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_receiver_free_send_buffers_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_resolution_estimate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_max_count_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_mean_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_sum_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_valid_pixels_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_x_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_y_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_spot_count_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_strong_pixel_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void preview_pedestal_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void preview_plot_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void result_scan_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void statistics_calibration_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void statistics_data_collection_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
@@ -177,14 +164,14 @@ private:
/// </remarks>
virtual void cancel_post(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get radial integration configuration
/// Get azimuthal integration configuration
/// </summary>
/// <remarks>
/// Can be done anytime
/// </remarks>
virtual void config_azim_int_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Configure radial integration
/// Configure azimuthal integration
/// </summary>
/// <remarks>
/// Can be done when detector is Inactive or Idle
@@ -251,6 +238,21 @@ private:
/// </remarks>
virtual void config_image_format_raw_post(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get indexing configuration
/// </summary>
/// <remarks>
/// Can be done anytime
/// </remarks>
virtual void config_indexing_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Change indexing algorithm settings
/// </summary>
/// <remarks>
/// This can only be done when detector is &#x60;Idle&#x60;, &#x60;Error&#x60; or &#x60;Inactive&#x60; states.
/// </remarks>
/// <param name="indexingSettings"> (optional)</param>
virtual void config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get instrument metadata
/// </summary>
/// <remarks>
@@ -283,14 +285,14 @@ private:
/// Get mask of the detector (binary)
/// </summary>
/// <remarks>
/// Get full pixel mask of the detector See NXmx standard for meaning of pixel values
/// Detector must be Initialized. Get full pixel mask of the detector. See NXmx standard for meaning of pixel values.
/// </remarks>
virtual void config_mask_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get mask of the detector (TIFF)
/// </summary>
/// <remarks>
/// Get full pixel mask of the detector See NXmx standard for meaning of pixel values
/// Should be in &#x60;Idle&#x60; state. Get full pixel mask of the detector See NXmx standard for meaning of pixel values
/// </remarks>
virtual void config_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
@@ -339,7 +341,7 @@ private:
/// <param name="spotFindingSettings"> (optional)</param>
virtual void config_spot_finding_put(const org::openapitools::server::model::Spot_finding_settings &spotFindingSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get user mask of the detector (binary)
/// Detector must be Initialized. Get user mask of the detector (binary)
/// </summary>
/// <remarks>
/// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked
@@ -353,7 +355,7 @@ private:
/// </remarks>
virtual void config_user_mask_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get user mask of the detector (TIFF)
/// Detector must be Initialized. Get user mask of the detector (TIFF)
/// </summary>
/// <remarks>
/// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked
@@ -442,11 +444,28 @@ private:
/// <param name="showUserMask">Show user mask (optional, default to false)</param>
/// <param name="showRoi">Show ROI areas on the image (optional, default to false)</param>
/// <param name="showSpots">Show spot finding results on the image (optional, default to true)</param>
/// <param name="saturation">Saturation value to set contrast in the preview image (optional, default to 0L)</param>
/// <param name="showBeamCenter">Show beam center on the image (optional, default to true)</param>
/// <param name="saturation">Saturation value to set contrast in the preview image (optional, default to 10.0f)</param>
/// <param name="jpegQuality">Quality of JPEG image (100 - highest; 0 - lowest) (optional, default to 100L)</param>
/// <param name="showResRing">Show resolution ring, provided in Angstrom (optional, default to 0.1f)</param>
/// <param name="color">Color scale for preview image: 0 - indigo, 1 - viridis, 2 - B/W, 3 - heat (optional, default to &quot;indigo&quot;)</param>
virtual void image_buffer_image_jpeg_get(const std::optional<int64_t> &id, const std::optional<bool> &showUserMask, const std::optional<bool> &showRoi, const std::optional<bool> &showSpots, const std::optional<int64_t> &saturation, const std::optional<int64_t> &jpegQuality, const std::optional<float> &showResRing, const std::optional<std::string> &color, Pistache::Http::ResponseWriter &response) = 0;
virtual void image_buffer_image_jpeg_get(const std::optional<int64_t> &id, const std::optional<bool> &showUserMask, const std::optional<bool> &showRoi, const std::optional<bool> &showSpots, const std::optional<bool> &showBeamCenter, const std::optional<float> &saturation, const std::optional<int64_t> &jpegQuality, const std::optional<float> &showResRing, const std::optional<std::string> &color, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get preview image in PNG format using custom settings
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="id">Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L)</param>
/// <param name="showUserMask">Show user mask (optional, default to false)</param>
/// <param name="showRoi">Show ROI areas on the image (optional, default to false)</param>
/// <param name="showSpots">Show spot finding results on the image (optional, default to true)</param>
/// <param name="showBeamCenter">Show beam center on the image (optional, default to true)</param>
/// <param name="saturation">Saturation value to set contrast in the preview image (optional, default to 10.0f)</param>
/// <param name="jpegQuality">Quality of JPEG image (100 - highest; 0 - lowest) (optional, default to 100L)</param>
/// <param name="showResRing">Show resolution ring, provided in Angstrom (optional, default to 0.1f)</param>
/// <param name="color">Color scale for preview image: 0 - indigo, 1 - viridis, 2 - B/W, 3 - heat (optional, default to &quot;indigo&quot;)</param>
virtual void image_buffer_image_png_get(const std::optional<int64_t> &id, const std::optional<bool> &showUserMask, const std::optional<bool> &showRoi, const std::optional<bool> &showSpots, const std::optional<bool> &showBeamCenter, const std::optional<float> &saturation, const std::optional<int64_t> &jpegQuality, const std::optional<float> &showResRing, const std::optional<std::string> &color, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get preview image in TIFF format
/// </summary>
@@ -484,185 +503,6 @@ private:
/// </remarks>
virtual void pedestal_post(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate radial integration profile
/// </summary>
/// <remarks>
/// Generate average radial integration profile
/// </remarks>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_azim_int_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate background estimate plot
/// </summary>
/// <remarks>
/// Mean intensity for d &#x3D; 3 - 5 A per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_bkg_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate error pixels plot
/// </summary>
/// <remarks>
/// Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_error_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate image collection efficiency plot
/// </summary>
/// <remarks>
/// Ratio of collected and expected packets per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate indexing rate plot
/// </summary>
/// <remarks>
/// Image indexing rate; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_indexing_rate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate indexing unit cell angle plot
/// </summary>
/// <remarks>
/// Crystal unit cell based on indexing results; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_indexing_unit_cell_angle_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate indexing unit cell length plots
/// </summary>
/// <remarks>
/// Crystal unit cell based on indexing results; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_indexing_unit_cell_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate maximum pixel value plot
/// </summary>
/// <remarks>
/// Provides maximum viable pixel value (excluding overloads and error pixels); binning is configurable and maximum of a bin is returned
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_max_value_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate plot with number of received packets per image
/// </summary>
/// <remarks>
/// Number of collected packets per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_packets_received_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate receiver delay plot
/// </summary>
/// <remarks>
/// Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_receiver_delay_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate receiver free send buffer plot
/// </summary>
/// <remarks>
/// Amount of send buffers available during frame processing - used for internal debugging; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate resolution estimate plot
/// </summary>
/// <remarks>
/// Diffraction resolution, as estimated by SSRL ML model; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_resolution_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate plot of ROI max count
/// </summary>
/// <remarks>
/// Max count of ROI per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_max_count_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate plot of ROI mean value
/// </summary>
/// <remarks>
/// Mean of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; binning is configurable; number will be wrong if multipixels are included!
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_mean_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate ROI sum plot
/// </summary>
/// <remarks>
/// Sum of ROI rectangle per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_sum_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate plot of ROI valid pixels
/// </summary>
/// <remarks>
/// Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate plot of ROI weighted X-coordinate
/// </summary>
/// <remarks>
/// Pixel X weighted by measured counts; pixels with special values (overload, bad pixel) are excluded; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_x_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate plot of ROI weighted Y-coordinate
/// </summary>
/// <remarks>
/// Pixel Y weighted by measured counts; pixels with special values (overload, bad pixel) are excluded; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_y_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate spot count plot
/// </summary>
/// <remarks>
/// Number of spots per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_spot_count_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate strong pixels plot
/// </summary>
/// <remarks>
/// Count of strong pixels per image (from spot finding); binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_strong_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get pedestal in TIFF format
/// </summary>
/// <remarks>
@@ -672,6 +512,26 @@ private:
/// <param name="sc">Storage cell number (optional, default to 0)</param>
virtual void preview_pedestal_tiff_get(const std::optional<int32_t> &gainLevel, const std::optional<int32_t> &sc, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate 1D plot from Jungfraujoch
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="type">Type of requested plot</param>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to false)</param>
/// <param name="fill">Fill value for elements that were missed during data collection (optional, default to 0.0f)</param>
/// <param name="experimentalCoord">If measurement has goniometer axis defined, plot X-axis will represent rotation angle If measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value For still measurement the number is ignored (optional, default to false)</param>
/// <param name="azintUnit">Unit used for azim int. (optional, default to &quot;Q_recipA&quot;)</param>
virtual void preview_plot_get(const std::optional<std::string> &type, const std::optional<int32_t> &binning, const std::optional<bool> &compression, const std::optional<float> &fill, const std::optional<bool> &experimentalCoord, const std::optional<std::string> &azintUnit, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get full scan result
/// </summary>
/// <remarks>
///
/// </remarks>
virtual void result_scan_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Start detector
/// </summary>
/// <remarks>
@@ -699,7 +559,7 @@ private:
/// <remarks>
///
/// </remarks>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to false)</param>
virtual void statistics_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get Jungfraujoch status

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,12 +21,13 @@ namespace org::openapitools::server::model
Azim_int_settings::Azim_int_settings()
{
m_Polarization_factor = 0.0f;
m_Polarization_factorIsSet = false;
m_Polarization_corr = true;
m_Solid_angle_corr = true;
m_High_q_recipA = 0.0f;
m_Low_q_recipA = 0.0f;
m_Q_spacing = 0.0f;
m_Azimuthal_bins = 1L;
m_Azimuthal_binsIsSet = false;
}
@@ -49,26 +50,26 @@ bool Azim_int_settings::validate(std::stringstream& msg, const std::string& path
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Azim_int_settings" : pathPrefix;
if (polarizationFactorIsSet())
if (azimuthalBinsIsSet())
{
const float& value = m_Polarization_factor;
const std::string currentValuePath = _pathPrefix + ".polarizationFactor";
const int64_t& value = m_Azimuthal_bins;
const std::string currentValuePath = _pathPrefix + ".azimuthalBins";
if (value < static_cast<float>(-1.0))
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -1.0;";
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > static_cast<float>(1.0))
if (value > 256ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 1.0;";
msg << currentValuePath << ": must be less than or equal to 256;";
}
}
return success;
}
@@ -77,8 +78,8 @@ bool Azim_int_settings::operator==(const Azim_int_settings& rhs) const
return
((!polarizationFactorIsSet() && !rhs.polarizationFactorIsSet()) || (polarizationFactorIsSet() && rhs.polarizationFactorIsSet() && getPolarizationFactor() == rhs.getPolarizationFactor())) &&
(isPolarizationCorr() == rhs.isPolarizationCorr())
&&
(isSolidAngleCorr() == rhs.isSolidAngleCorr())
&&
@@ -90,8 +91,11 @@ bool Azim_int_settings::operator==(const Azim_int_settings& rhs) const
&&
(getQSpacing() == rhs.getQSpacing())
&&
((!azimuthalBinsIsSet() && !rhs.azimuthalBinsIsSet()) || (azimuthalBinsIsSet() && rhs.azimuthalBinsIsSet() && getAzimuthalBins() == rhs.getAzimuthalBins()))
;
}
@@ -103,45 +107,38 @@ bool Azim_int_settings::operator!=(const Azim_int_settings& rhs) const
void to_json(nlohmann::json& j, const Azim_int_settings& o)
{
j = nlohmann::json::object();
if(o.polarizationFactorIsSet())
j["polarization_factor"] = o.m_Polarization_factor;
j["polarization_corr"] = o.m_Polarization_corr;
j["solid_angle_corr"] = o.m_Solid_angle_corr;
j["high_q_recipA"] = o.m_High_q_recipA;
j["low_q_recipA"] = o.m_Low_q_recipA;
j["q_spacing"] = o.m_Q_spacing;
if(o.azimuthalBinsIsSet())
j["azimuthal_bins"] = o.m_Azimuthal_bins;
}
void from_json(const nlohmann::json& j, Azim_int_settings& o)
{
if(j.find("polarization_factor") != j.end())
{
j.at("polarization_factor").get_to(o.m_Polarization_factor);
o.m_Polarization_factorIsSet = true;
}
j.at("polarization_corr").get_to(o.m_Polarization_corr);
j.at("solid_angle_corr").get_to(o.m_Solid_angle_corr);
j.at("high_q_recipA").get_to(o.m_High_q_recipA);
j.at("low_q_recipA").get_to(o.m_Low_q_recipA);
j.at("q_spacing").get_to(o.m_Q_spacing);
if(j.find("azimuthal_bins") != j.end())
{
j.at("azimuthal_bins").get_to(o.m_Azimuthal_bins);
o.m_Azimuthal_binsIsSet = true;
}
}
float Azim_int_settings::getPolarizationFactor() const
bool Azim_int_settings::isPolarizationCorr() const
{
return m_Polarization_factor;
return m_Polarization_corr;
}
void Azim_int_settings::setPolarizationFactor(float const value)
void Azim_int_settings::setPolarizationCorr(bool const value)
{
m_Polarization_factor = value;
m_Polarization_factorIsSet = true;
}
bool Azim_int_settings::polarizationFactorIsSet() const
{
return m_Polarization_factorIsSet;
}
void Azim_int_settings::unsetPolarization_factor()
{
m_Polarization_factorIsSet = false;
m_Polarization_corr = value;
}
bool Azim_int_settings::isSolidAngleCorr() const
{
@@ -175,6 +172,23 @@ void Azim_int_settings::setQSpacing(float const value)
{
m_Q_spacing = value;
}
int64_t Azim_int_settings::getAzimuthalBins() const
{
return m_Azimuthal_bins;
}
void Azim_int_settings::setAzimuthalBins(int64_t const value)
{
m_Azimuthal_bins = value;
m_Azimuthal_binsIsSet = true;
}
bool Azim_int_settings::azimuthalBinsIsSet() const
{
return m_Azimuthal_binsIsSet;
}
void Azim_int_settings::unsetAzimuthal_bins()
{
m_Azimuthal_binsIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -58,14 +58,12 @@ public:
/// Azim_int_settings members
/// <summary>
/// If polarization factor is provided, than polarization correction is enabled.
/// Apply polarization correction for azimuthal integration (polarization factor must be configured in dataset settings)
/// </summary>
float getPolarizationFactor() const;
void setPolarizationFactor(float const value);
bool polarizationFactorIsSet() const;
void unsetPolarization_factor();
bool isPolarizationCorr() const;
void setPolarizationCorr(bool const value);
/// <summary>
/// Apply solid angle correction for radial integration
/// Apply solid angle correction for azimuthal integration
/// </summary>
bool isSolidAngleCorr() const;
void setSolidAngleCorr(bool const value);
@@ -84,12 +82,19 @@ public:
/// </summary>
float getQSpacing() const;
void setQSpacing(float const value);
/// <summary>
/// Numer of azimuthal (phi) bins; 1 &#x3D; standard 1D azimuthal integration
/// </summary>
int64_t getAzimuthalBins() const;
void setAzimuthalBins(int64_t const value);
bool azimuthalBinsIsSet() const;
void unsetAzimuthal_bins();
friend void to_json(nlohmann::json& j, const Azim_int_settings& o);
friend void from_json(const nlohmann::json& j, Azim_int_settings& o);
protected:
float m_Polarization_factor;
bool m_Polarization_factorIsSet;
bool m_Polarization_corr;
bool m_Solid_angle_corr;
float m_High_q_recipA;
@@ -98,6 +103,8 @@ protected:
float m_Q_spacing;
int64_t m_Azimuthal_bins;
bool m_Azimuthal_binsIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,6 +28,8 @@ Broker_status::Broker_status()
m_MessageIsSet = false;
m_Message_severity = "error";
m_Message_severityIsSet = false;
m_Gpu_count = 0;
m_Gpu_countIsSet = false;
}
@@ -69,7 +71,7 @@ bool Broker_status::validate(std::stringstream& msg, const std::string& pathPref
}
}
return success;
}
@@ -88,7 +90,10 @@ bool Broker_status::operator==(const Broker_status& rhs) const
((!messageIsSet() && !rhs.messageIsSet()) || (messageIsSet() && rhs.messageIsSet() && getMessage() == rhs.getMessage())) &&
((!messageSeverityIsSet() && !rhs.messageSeverityIsSet()) || (messageSeverityIsSet() && rhs.messageSeverityIsSet() && getMessageSeverity() == rhs.getMessageSeverity()))
((!messageSeverityIsSet() && !rhs.messageSeverityIsSet()) || (messageSeverityIsSet() && rhs.messageSeverityIsSet() && getMessageSeverity() == rhs.getMessageSeverity())) &&
((!gpuCountIsSet() && !rhs.gpuCountIsSet()) || (gpuCountIsSet() && rhs.gpuCountIsSet() && getGpuCount() == rhs.getGpuCount()))
;
}
@@ -108,6 +113,8 @@ void to_json(nlohmann::json& j, const Broker_status& o)
j["message"] = o.m_Message;
if(o.messageSeverityIsSet())
j["message_severity"] = o.m_Message_severity;
if(o.gpuCountIsSet())
j["gpu_count"] = o.m_Gpu_count;
}
@@ -129,6 +136,11 @@ void from_json(const nlohmann::json& j, Broker_status& o)
j.at("message_severity").get_to(o.m_Message_severity);
o.m_Message_severityIsSet = true;
}
if(j.find("gpu_count") != j.end())
{
j.at("gpu_count").get_to(o.m_Gpu_count);
o.m_Gpu_countIsSet = true;
}
}
@@ -191,6 +203,23 @@ void Broker_status::unsetMessage_severity()
{
m_Message_severityIsSet = false;
}
int32_t Broker_status::getGpuCount() const
{
return m_Gpu_count;
}
void Broker_status::setGpuCount(int32_t const value)
{
m_Gpu_count = value;
m_Gpu_countIsSet = true;
}
bool Broker_status::gpuCountIsSet() const
{
return m_Gpu_countIsSet;
}
void Broker_status::unsetGpu_count()
{
m_Gpu_countIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -84,6 +84,13 @@ public:
void setMessageSeverity(std::string const& value);
bool messageSeverityIsSet() const;
void unsetMessage_severity();
/// <summary>
/// Number of installed GPUs
/// </summary>
int32_t getGpuCount() const;
void setGpuCount(int32_t const value);
bool gpuCountIsSet() const;
void unsetGpu_count();
friend void to_json(nlohmann::json& j, const Broker_status& o);
friend void from_json(const nlohmann::json& j, Broker_status& o);
@@ -96,6 +103,8 @@ protected:
bool m_MessageIsSet;
std::string m_Message_severity;
bool m_Message_severityIsSet;
int32_t m_Gpu_count;
bool m_Gpu_countIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -46,6 +46,7 @@ Dataset_settings::Dataset_settings()
m_Transmission = 0.0f;
m_TransmissionIsSet = false;
m_GoniometerIsSet = false;
m_Grid_scanIsSet = false;
m_Header_appendixIsSet = false;
m_Image_appendixIsSet = false;
m_Data_reduction_factor_serialmx = 1.0f;
@@ -64,7 +65,23 @@ Dataset_settings::Dataset_settings()
m_Write_nxmx_hdf5_masterIsSet = false;
m_Save_calibration = false;
m_Save_calibrationIsSet = false;
m_Polarization_factor = 0.0f;
m_Polarization_factorIsSet = false;
m_Ring_current_mA = 0.0f;
m_Ring_current_mAIsSet = false;
m_Sample_temperature_K = 0.0f;
m_Sample_temperature_KIsSet = false;
m_Poni_rot1_rad = 0.0f;
m_Poni_rot1_radIsSet = false;
m_Poni_rot2_rad = 0.0f;
m_Poni_rot2_radIsSet = false;
m_Poni_rot3_rad = 0.0f;
m_Poni_rot3_radIsSet = false;
m_Unit_cellIsSet = false;
m_Spot_finding = true;
m_Spot_findingIsSet = false;
m_Max_spot_count = 250;
m_Max_spot_countIsSet = false;
}
@@ -183,10 +200,10 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP
const std::string currentValuePath = _pathPrefix + ".spaceGroupNumber";
if (value < 0ll)
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > 194ll)
{
@@ -214,7 +231,7 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP
}
}
if (dataReductionFactorSerialmxIsSet())
{
const float& value = m_Data_reduction_factor_serialmx;
@@ -280,7 +297,130 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP
}
}
if (polarizationFactorIsSet())
{
const float& value = m_Polarization_factor;
const std::string currentValuePath = _pathPrefix + ".polarizationFactor";
if (value < static_cast<float>(-1.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -1.0;";
}
if (value > static_cast<float>(1.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 1.0;";
}
}
if (ringCurrentMAIsSet())
{
const float& value = m_Ring_current_mA;
const std::string currentValuePath = _pathPrefix + ".ringCurrentMA";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
}
if (sampleTemperatureKIsSet())
{
const float& value = m_Sample_temperature_K;
const std::string currentValuePath = _pathPrefix + ".sampleTemperatureK";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
}
if (poniRot1RadIsSet())
{
const float& value = m_Poni_rot1_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot1Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
if (poniRot2RadIsSet())
{
const float& value = m_Poni_rot2_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot2Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
if (poniRot3RadIsSet())
{
const float& value = m_Poni_rot3_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot3Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
if (maxSpotCountIsSet())
{
const int32_t& value = m_Max_spot_count;
const std::string currentValuePath = _pathPrefix + ".maxSpotCount";
if (value < 10)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 10;";
}
if (value > 2000)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 2000;";
}
}
return success;
}
@@ -335,6 +475,9 @@ bool Dataset_settings::operator==(const Dataset_settings& rhs) const
((!goniometerIsSet() && !rhs.goniometerIsSet()) || (goniometerIsSet() && rhs.goniometerIsSet() && getGoniometer() == rhs.getGoniometer())) &&
((!gridScanIsSet() && !rhs.gridScanIsSet()) || (gridScanIsSet() && rhs.gridScanIsSet() && getGridScan() == rhs.getGridScan())) &&
((!headerAppendixIsSet() && !rhs.headerAppendixIsSet()) || (headerAppendixIsSet() && rhs.headerAppendixIsSet() && getHeaderAppendix() == rhs.getHeaderAppendix())) &&
@@ -365,7 +508,31 @@ bool Dataset_settings::operator==(const Dataset_settings& rhs) const
((!saveCalibrationIsSet() && !rhs.saveCalibrationIsSet()) || (saveCalibrationIsSet() && rhs.saveCalibrationIsSet() && isSaveCalibration() == rhs.isSaveCalibration())) &&
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell()))
((!polarizationFactorIsSet() && !rhs.polarizationFactorIsSet()) || (polarizationFactorIsSet() && rhs.polarizationFactorIsSet() && getPolarizationFactor() == rhs.getPolarizationFactor())) &&
((!ringCurrentMAIsSet() && !rhs.ringCurrentMAIsSet()) || (ringCurrentMAIsSet() && rhs.ringCurrentMAIsSet() && getRingCurrentMA() == rhs.getRingCurrentMA())) &&
((!sampleTemperatureKIsSet() && !rhs.sampleTemperatureKIsSet()) || (sampleTemperatureKIsSet() && rhs.sampleTemperatureKIsSet() && getSampleTemperatureK() == rhs.getSampleTemperatureK())) &&
((!poniRot1RadIsSet() && !rhs.poniRot1RadIsSet()) || (poniRot1RadIsSet() && rhs.poniRot1RadIsSet() && getPoniRot1Rad() == rhs.getPoniRot1Rad())) &&
((!poniRot2RadIsSet() && !rhs.poniRot2RadIsSet()) || (poniRot2RadIsSet() && rhs.poniRot2RadIsSet() && getPoniRot2Rad() == rhs.getPoniRot2Rad())) &&
((!poniRot3RadIsSet() && !rhs.poniRot3RadIsSet()) || (poniRot3RadIsSet() && rhs.poniRot3RadIsSet() && getPoniRot3Rad() == rhs.getPoniRot3Rad())) &&
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell())) &&
((!spotFindingIsSet() && !rhs.spotFindingIsSet()) || (spotFindingIsSet() && rhs.spotFindingIsSet() && isSpotFinding() == rhs.isSpotFinding())) &&
((!maxSpotCountIsSet() && !rhs.maxSpotCountIsSet()) || (maxSpotCountIsSet() && rhs.maxSpotCountIsSet() && getMaxSpotCount() == rhs.getMaxSpotCount()))
;
}
@@ -404,6 +571,8 @@ void to_json(nlohmann::json& j, const Dataset_settings& o)
j["transmission"] = o.m_Transmission;
if(o.goniometerIsSet())
j["goniometer"] = o.m_Goniometer;
if(o.gridScanIsSet())
j["grid_scan"] = o.m_Grid_scan;
if(o.headerAppendixIsSet())
j["header_appendix"] = o.m_Header_appendix;
if(o.imageAppendixIsSet())
@@ -424,8 +593,24 @@ void to_json(nlohmann::json& j, const Dataset_settings& o)
j["write_nxmx_hdf5_master"] = o.m_Write_nxmx_hdf5_master;
if(o.saveCalibrationIsSet())
j["save_calibration"] = o.m_Save_calibration;
if(o.polarizationFactorIsSet())
j["polarization_factor"] = o.m_Polarization_factor;
if(o.ringCurrentMAIsSet())
j["ring_current_mA"] = o.m_Ring_current_mA;
if(o.sampleTemperatureKIsSet())
j["sample_temperature_K"] = o.m_Sample_temperature_K;
if(o.poniRot1RadIsSet())
j["poni_rot1_rad"] = o.m_Poni_rot1_rad;
if(o.poniRot2RadIsSet())
j["poni_rot2_rad"] = o.m_Poni_rot2_rad;
if(o.poniRot3RadIsSet())
j["poni_rot3_rad"] = o.m_Poni_rot3_rad;
if(o.unitCellIsSet())
j["unit_cell"] = o.m_Unit_cell;
if(o.spotFindingIsSet())
j["spot_finding"] = o.m_Spot_finding;
if(o.maxSpotCountIsSet())
j["max_spot_count"] = o.m_Max_spot_count;
}
@@ -490,6 +675,11 @@ void from_json(const nlohmann::json& j, Dataset_settings& o)
j.at("goniometer").get_to(o.m_Goniometer);
o.m_GoniometerIsSet = true;
}
if(j.find("grid_scan") != j.end())
{
j.at("grid_scan").get_to(o.m_Grid_scan);
o.m_Grid_scanIsSet = true;
}
if(j.find("header_appendix") != j.end())
{
j.at("header_appendix").get_to(o.m_Header_appendix);
@@ -540,11 +730,51 @@ void from_json(const nlohmann::json& j, Dataset_settings& o)
j.at("save_calibration").get_to(o.m_Save_calibration);
o.m_Save_calibrationIsSet = true;
}
if(j.find("polarization_factor") != j.end())
{
j.at("polarization_factor").get_to(o.m_Polarization_factor);
o.m_Polarization_factorIsSet = true;
}
if(j.find("ring_current_mA") != j.end())
{
j.at("ring_current_mA").get_to(o.m_Ring_current_mA);
o.m_Ring_current_mAIsSet = true;
}
if(j.find("sample_temperature_K") != j.end())
{
j.at("sample_temperature_K").get_to(o.m_Sample_temperature_K);
o.m_Sample_temperature_KIsSet = true;
}
if(j.find("poni_rot1_rad") != j.end())
{
j.at("poni_rot1_rad").get_to(o.m_Poni_rot1_rad);
o.m_Poni_rot1_radIsSet = true;
}
if(j.find("poni_rot2_rad") != j.end())
{
j.at("poni_rot2_rad").get_to(o.m_Poni_rot2_rad);
o.m_Poni_rot2_radIsSet = true;
}
if(j.find("poni_rot3_rad") != j.end())
{
j.at("poni_rot3_rad").get_to(o.m_Poni_rot3_rad);
o.m_Poni_rot3_radIsSet = true;
}
if(j.find("unit_cell") != j.end())
{
j.at("unit_cell").get_to(o.m_Unit_cell);
o.m_Unit_cellIsSet = true;
}
if(j.find("spot_finding") != j.end())
{
j.at("spot_finding").get_to(o.m_Spot_finding);
o.m_Spot_findingIsSet = true;
}
if(j.find("max_spot_count") != j.end())
{
j.at("max_spot_count").get_to(o.m_Max_spot_count);
o.m_Max_spot_countIsSet = true;
}
}
@@ -767,6 +997,23 @@ void Dataset_settings::unsetGoniometer()
{
m_GoniometerIsSet = false;
}
org::openapitools::server::model::Grid_scan Dataset_settings::getGridScan() const
{
return m_Grid_scan;
}
void Dataset_settings::setGridScan(org::openapitools::server::model::Grid_scan const& value)
{
m_Grid_scan = value;
m_Grid_scanIsSet = true;
}
bool Dataset_settings::gridScanIsSet() const
{
return m_Grid_scanIsSet;
}
void Dataset_settings::unsetGrid_scan()
{
m_Grid_scanIsSet = false;
}
nlohmann::json Dataset_settings::getHeaderAppendix() const
{
return m_Header_appendix;
@@ -937,11 +1184,113 @@ void Dataset_settings::unsetSave_calibration()
{
m_Save_calibrationIsSet = false;
}
org::openapitools::server::model::Dataset_settings_unit_cell Dataset_settings::getUnitCell() const
float Dataset_settings::getPolarizationFactor() const
{
return m_Polarization_factor;
}
void Dataset_settings::setPolarizationFactor(float const value)
{
m_Polarization_factor = value;
m_Polarization_factorIsSet = true;
}
bool Dataset_settings::polarizationFactorIsSet() const
{
return m_Polarization_factorIsSet;
}
void Dataset_settings::unsetPolarization_factor()
{
m_Polarization_factorIsSet = false;
}
float Dataset_settings::getRingCurrentMA() const
{
return m_Ring_current_mA;
}
void Dataset_settings::setRingCurrentMA(float const value)
{
m_Ring_current_mA = value;
m_Ring_current_mAIsSet = true;
}
bool Dataset_settings::ringCurrentMAIsSet() const
{
return m_Ring_current_mAIsSet;
}
void Dataset_settings::unsetRing_current_mA()
{
m_Ring_current_mAIsSet = false;
}
float Dataset_settings::getSampleTemperatureK() const
{
return m_Sample_temperature_K;
}
void Dataset_settings::setSampleTemperatureK(float const value)
{
m_Sample_temperature_K = value;
m_Sample_temperature_KIsSet = true;
}
bool Dataset_settings::sampleTemperatureKIsSet() const
{
return m_Sample_temperature_KIsSet;
}
void Dataset_settings::unsetSample_temperature_K()
{
m_Sample_temperature_KIsSet = false;
}
float Dataset_settings::getPoniRot1Rad() const
{
return m_Poni_rot1_rad;
}
void Dataset_settings::setPoniRot1Rad(float const value)
{
m_Poni_rot1_rad = value;
m_Poni_rot1_radIsSet = true;
}
bool Dataset_settings::poniRot1RadIsSet() const
{
return m_Poni_rot1_radIsSet;
}
void Dataset_settings::unsetPoni_rot1_rad()
{
m_Poni_rot1_radIsSet = false;
}
float Dataset_settings::getPoniRot2Rad() const
{
return m_Poni_rot2_rad;
}
void Dataset_settings::setPoniRot2Rad(float const value)
{
m_Poni_rot2_rad = value;
m_Poni_rot2_radIsSet = true;
}
bool Dataset_settings::poniRot2RadIsSet() const
{
return m_Poni_rot2_radIsSet;
}
void Dataset_settings::unsetPoni_rot2_rad()
{
m_Poni_rot2_radIsSet = false;
}
float Dataset_settings::getPoniRot3Rad() const
{
return m_Poni_rot3_rad;
}
void Dataset_settings::setPoniRot3Rad(float const value)
{
m_Poni_rot3_rad = value;
m_Poni_rot3_radIsSet = true;
}
bool Dataset_settings::poniRot3RadIsSet() const
{
return m_Poni_rot3_radIsSet;
}
void Dataset_settings::unsetPoni_rot3_rad()
{
m_Poni_rot3_radIsSet = false;
}
org::openapitools::server::model::Unit_cell Dataset_settings::getUnitCell() const
{
return m_Unit_cell;
}
void Dataset_settings::setUnitCell(org::openapitools::server::model::Dataset_settings_unit_cell const& value)
void Dataset_settings::setUnitCell(org::openapitools::server::model::Unit_cell const& value)
{
m_Unit_cell = value;
m_Unit_cellIsSet = true;
@@ -954,6 +1303,40 @@ void Dataset_settings::unsetUnit_cell()
{
m_Unit_cellIsSet = false;
}
bool Dataset_settings::isSpotFinding() const
{
return m_Spot_finding;
}
void Dataset_settings::setSpotFinding(bool const value)
{
m_Spot_finding = value;
m_Spot_findingIsSet = true;
}
bool Dataset_settings::spotFindingIsSet() const
{
return m_Spot_findingIsSet;
}
void Dataset_settings::unsetSpot_finding()
{
m_Spot_findingIsSet = false;
}
int32_t Dataset_settings::getMaxSpotCount() const
{
return m_Max_spot_count;
}
void Dataset_settings::setMaxSpotCount(int32_t const value)
{
m_Max_spot_count = value;
m_Max_spot_countIsSet = true;
}
bool Dataset_settings::maxSpotCountIsSet() const
{
return m_Max_spot_countIsSet;
}
void Dataset_settings::unsetMax_spot_count()
{
m_Max_spot_countIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,10 +19,11 @@
#define Dataset_settings_H_
#include "Grid_scan.h"
#include <nlohmann/json.hpp>
#include "Rotation_axis.h"
#include "Unit_cell.h"
#include <string>
#include "Dataset_settings_unit_cell.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
@@ -76,7 +77,7 @@ public:
bool ntriggerIsSet() const;
void unsetNtrigger();
/// <summary>
/// Image time. If not provided (or zero value) the frame time is assumed as default. Image time must be multiple of frame time; max value is 256 * frame_time. In XFEL mode: summation happens for frames collected with multiple triggers. Ignored for storage cells and if raw data are saved.
/// Image time. If not provided (or zero value) the frame time is assumed as default. For JUNGFRAU image time must be multiple of frame time and max value is 256 * frame_time. In XFEL mode: summation happens for frames collected with multiple triggers. Ignored for storage cells and if raw data are saved.
/// </summary>
int64_t getImageTimeUs() const;
void setImageTimeUs(int64_t const value);
@@ -159,6 +160,13 @@ public:
bool goniometerIsSet() const;
void unsetGoniometer();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Grid_scan getGridScan() const;
void setGridScan(org::openapitools::server::model::Grid_scan const& value);
bool gridScanIsSet() const;
void unsetGrid_scan();
/// <summary>
/// Header appendix, added as user_data/user to start ZeroMQ message (can be any valid JSON) In general, it is not saved in HDF5 file. However, if values are placed in \&quot;hdf5\&quot; object, &#x60;jfjoch_writer&#x60; will write them in /entry/data of the HDF5 file. This applies solely to string and number (double floating-point). No arrays/sub-objects is allowed. For example {\&quot;hdf5\&quot;: {\&quot;val1\&quot;:1, \&quot;val2\&quot;:\&quot;xyz\&quot;}}, will write /entry/user/val1 and /entry/user/val2.
/// </summary>
nlohmann::json getHeaderAppendix() const;
@@ -229,12 +237,68 @@ public:
bool saveCalibrationIsSet() const;
void unsetSave_calibration();
/// <summary>
/// Polarization factor for integration; 1.0 is horizontal polarization; -1.0 is vertical polarization
/// </summary>
float getPolarizationFactor() const;
void setPolarizationFactor(float const value);
bool polarizationFactorIsSet() const;
void unsetPolarization_factor();
/// <summary>
/// Ring current at the beginning of the data collection
/// </summary>
float getRingCurrentMA() const;
void setRingCurrentMA(float const value);
bool ringCurrentMAIsSet() const;
void unsetRing_current_mA();
/// <summary>
/// Sample temperature in Kelvin
/// </summary>
float getSampleTemperatureK() const;
void setSampleTemperatureK(float const value);
bool sampleTemperatureKIsSet() const;
void unsetSample_temperature_K();
/// <summary>
/// PONI angle rot1 (see PyFAI documentation for details) in radians
/// </summary>
float getPoniRot1Rad() const;
void setPoniRot1Rad(float const value);
bool poniRot1RadIsSet() const;
void unsetPoni_rot1_rad();
/// <summary>
/// PONI angle rot2 (see PyFAI documentation for details) in radians
/// </summary>
float getPoniRot2Rad() const;
void setPoniRot2Rad(float const value);
bool poniRot2RadIsSet() const;
void unsetPoni_rot2_rad();
/// <summary>
/// PONI angle rot3 (see PyFAI documentation for details) in radians
/// </summary>
float getPoniRot3Rad() const;
void setPoniRot3Rad(float const value);
bool poniRot3RadIsSet() const;
void unsetPoni_rot3_rad();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Dataset_settings_unit_cell getUnitCell() const;
void setUnitCell(org::openapitools::server::model::Dataset_settings_unit_cell const& value);
org::openapitools::server::model::Unit_cell getUnitCell() const;
void setUnitCell(org::openapitools::server::model::Unit_cell const& value);
bool unitCellIsSet() const;
void unsetUnit_cell();
/// <summary>
/// Enable spot finding and save spots
/// </summary>
bool isSpotFinding() const;
void setSpotFinding(bool const value);
bool spotFindingIsSet() const;
void unsetSpot_finding();
/// <summary>
/// Maximum number of spots that are saved/used for indexing; spots with highest intensity are selected
/// </summary>
int32_t getMaxSpotCount() const;
void setMaxSpotCount(int32_t const value);
bool maxSpotCountIsSet() const;
void unsetMax_spot_count();
friend void to_json(nlohmann::json& j, const Dataset_settings& o);
friend void from_json(const nlohmann::json& j, Dataset_settings& o);
@@ -269,6 +333,8 @@ protected:
bool m_TransmissionIsSet;
org::openapitools::server::model::Rotation_axis m_Goniometer;
bool m_GoniometerIsSet;
org::openapitools::server::model::Grid_scan m_Grid_scan;
bool m_Grid_scanIsSet;
nlohmann::json m_Header_appendix;
bool m_Header_appendixIsSet;
nlohmann::json m_Image_appendix;
@@ -289,8 +355,24 @@ protected:
bool m_Write_nxmx_hdf5_masterIsSet;
bool m_Save_calibration;
bool m_Save_calibrationIsSet;
org::openapitools::server::model::Dataset_settings_unit_cell m_Unit_cell;
float m_Polarization_factor;
bool m_Polarization_factorIsSet;
float m_Ring_current_mA;
bool m_Ring_current_mAIsSet;
float m_Sample_temperature_K;
bool m_Sample_temperature_KIsSet;
float m_Poni_rot1_rad;
bool m_Poni_rot1_radIsSet;
float m_Poni_rot2_rad;
bool m_Poni_rot2_radIsSet;
float m_Poni_rot3_rad;
bool m_Poni_rot3_radIsSet;
org::openapitools::server::model::Unit_cell m_Unit_cell;
bool m_Unit_cellIsSet;
bool m_Spot_finding;
bool m_Spot_findingIsSet;
int32_t m_Max_spot_count;
bool m_Max_spot_countIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -52,6 +52,9 @@ Detector::Detector()
m_Roi_modeIsSet = false;
m_Mirror_y = true;
m_Mirror_yIsSet = false;
m_Temp_thresold_degC = 55L;
m_Temp_thresold_degCIsSet = false;
m_Default_settingsIsSet = false;
}
@@ -280,7 +283,26 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
}
}
if (tempThresoldDegCIsSet())
{
const int64_t& value = m_Temp_thresold_degC;
const std::string currentValuePath = _pathPrefix + ".tempThresoldDegC";
if (value < 40ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 40;";
}
if (value > 70ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 70;";
}
}
return success;
}
@@ -344,7 +366,13 @@ bool Detector::operator==(const Detector& rhs) const
((!roiModeIsSet() && !rhs.roiModeIsSet()) || (roiModeIsSet() && rhs.roiModeIsSet() && getRoiMode() == rhs.getRoiMode())) &&
((!mirrorYIsSet() && !rhs.mirrorYIsSet()) || (mirrorYIsSet() && rhs.mirrorYIsSet() && isMirrorY() == rhs.isMirrorY()))
((!mirrorYIsSet() && !rhs.mirrorYIsSet()) || (mirrorYIsSet() && rhs.mirrorYIsSet() && isMirrorY() == rhs.isMirrorY())) &&
((!tempThresoldDegCIsSet() && !rhs.tempThresoldDegCIsSet()) || (tempThresoldDegCIsSet() && rhs.tempThresoldDegCIsSet() && getTempThresoldDegC() == rhs.getTempThresoldDegC())) &&
((!defaultSettingsIsSet() && !rhs.defaultSettingsIsSet()) || (defaultSettingsIsSet() && rhs.defaultSettingsIsSet() && getDefaultSettings() == rhs.getDefaultSettings()))
;
}
@@ -394,6 +422,10 @@ void to_json(nlohmann::json& j, const Detector& o)
j["roi_mode"] = o.m_Roi_mode;
if(o.mirrorYIsSet())
j["mirror_y"] = o.m_Mirror_y;
if(o.tempThresoldDegCIsSet())
j["temp_thresold_degC"] = o.m_Temp_thresold_degC;
if(o.defaultSettingsIsSet())
j["default_settings"] = o.m_Default_settings;
}
@@ -490,6 +522,16 @@ void from_json(const nlohmann::json& j, Detector& o)
j.at("mirror_y").get_to(o.m_Mirror_y);
o.m_Mirror_yIsSet = true;
}
if(j.find("temp_thresold_degC") != j.end())
{
j.at("temp_thresold_degC").get_to(o.m_Temp_thresold_degC);
o.m_Temp_thresold_degCIsSet = true;
}
if(j.find("default_settings") != j.end())
{
j.at("default_settings").get_to(o.m_Default_settings);
o.m_Default_settingsIsSet = true;
}
}
@@ -807,6 +849,40 @@ void Detector::unsetMirror_y()
{
m_Mirror_yIsSet = false;
}
int64_t Detector::getTempThresoldDegC() const
{
return m_Temp_thresold_degC;
}
void Detector::setTempThresoldDegC(int64_t const value)
{
m_Temp_thresold_degC = value;
m_Temp_thresold_degCIsSet = true;
}
bool Detector::tempThresoldDegCIsSet() const
{
return m_Temp_thresold_degCIsSet;
}
void Detector::unsetTemp_thresold_degC()
{
m_Temp_thresold_degCIsSet = false;
}
org::openapitools::server::model::Detector_settings Detector::getDefaultSettings() const
{
return m_Default_settings;
}
void Detector::setDefaultSettings(org::openapitools::server::model::Detector_settings const& value)
{
m_Default_settings = value;
m_Default_settingsIsSet = true;
}
bool Detector::defaultSettingsIsSet() const
{
return m_Default_settingsIsSet;
}
void Detector::unsetDefault_settings()
{
m_Default_settingsIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,6 +21,7 @@
#include "Detector_type.h"
#include <string>
#include "Detector_settings.h"
#include <vector>
#include "Standard_detector_geometry.h"
#include "Detector_module.h"
@@ -193,6 +194,20 @@ public:
void setMirrorY(bool const value);
bool mirrorYIsSet() const;
void unsetMirror_y();
/// <summary>
/// Temperature threshold for JUNGFRAU detector modules
/// </summary>
int64_t getTempThresoldDegC() const;
void setTempThresoldDegC(int64_t const value);
bool tempThresoldDegCIsSet() const;
void unsetTemp_thresold_degC();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Detector_settings getDefaultSettings() const;
void setDefaultSettings(org::openapitools::server::model::Detector_settings const& value);
bool defaultSettingsIsSet() const;
void unsetDefault_settings();
friend void to_json(nlohmann::json& j, const Detector& o);
friend void from_json(const nlohmann::json& j, Detector& o);
@@ -235,6 +250,10 @@ protected:
bool m_Roi_modeIsSet;
bool m_Mirror_y;
bool m_Mirror_yIsSet;
int64_t m_Temp_thresold_degC;
bool m_Temp_thresold_degCIsSet;
org::openapitools::server::model::Detector_settings m_Default_settings;
bool m_Default_settingsIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -29,6 +29,8 @@ Detector_list_element::Detector_list_element()
m_Nmodules = 0L;
m_Width = 0L;
m_Height = 0L;
m_Pixel_size_mm = 0.0f;
m_Pixel_size_mmIsSet = false;
m_Readout_time_us = 0L;
m_Min_frame_time_us = 0L;
m_Min_count_time_us = 0L;
@@ -69,7 +71,7 @@ bool Detector_list_element::validate(std::stringstream& msg, const std::string&
}
}
return success;
}
@@ -102,6 +104,9 @@ bool Detector_list_element::operator==(const Detector_list_element& rhs) const
(getHeight() == rhs.getHeight())
&&
((!pixelSizeMmIsSet() && !rhs.pixelSizeMmIsSet()) || (pixelSizeMmIsSet() && rhs.pixelSizeMmIsSet() && getPixelSizeMm() == rhs.getPixelSizeMm())) &&
(getReadoutTimeUs() == rhs.getReadoutTimeUs())
&&
@@ -133,6 +138,8 @@ void to_json(nlohmann::json& j, const Detector_list_element& o)
j["nmodules"] = o.m_Nmodules;
j["width"] = o.m_Width;
j["height"] = o.m_Height;
if(o.pixelSizeMmIsSet())
j["pixel_size_mm"] = o.m_Pixel_size_mm;
j["readout_time_us"] = o.m_Readout_time_us;
j["min_frame_time_us"] = o.m_Min_frame_time_us;
j["min_count_time_us"] = o.m_Min_count_time_us;
@@ -151,6 +158,11 @@ void from_json(const nlohmann::json& j, Detector_list_element& o)
j.at("nmodules").get_to(o.m_Nmodules);
j.at("width").get_to(o.m_Width);
j.at("height").get_to(o.m_Height);
if(j.find("pixel_size_mm") != j.end())
{
j.at("pixel_size_mm").get_to(o.m_Pixel_size_mm);
o.m_Pixel_size_mmIsSet = true;
}
j.at("readout_time_us").get_to(o.m_Readout_time_us);
j.at("min_frame_time_us").get_to(o.m_Min_frame_time_us);
j.at("min_count_time_us").get_to(o.m_Min_count_time_us);
@@ -226,6 +238,23 @@ void Detector_list_element::setHeight(int64_t const value)
{
m_Height = value;
}
float Detector_list_element::getPixelSizeMm() const
{
return m_Pixel_size_mm;
}
void Detector_list_element::setPixelSizeMm(float const value)
{
m_Pixel_size_mm = value;
m_Pixel_size_mmIsSet = true;
}
bool Detector_list_element::pixelSizeMmIsSet() const
{
return m_Pixel_size_mmIsSet;
}
void Detector_list_element::unsetPixel_size_mm()
{
m_Pixel_size_mmIsSet = false;
}
int64_t Detector_list_element::getReadoutTimeUs() const
{
return m_Readout_time_us;

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -102,6 +102,13 @@ public:
/// <summary>
///
/// </summary>
float getPixelSizeMm() const;
void setPixelSizeMm(float const value);
bool pixelSizeMmIsSet() const;
void unsetPixel_size_mm();
/// <summary>
///
/// </summary>
int64_t getReadoutTimeUs() const;
void setReadoutTimeUs(int64_t const value);
/// <summary>
@@ -141,6 +148,8 @@ protected:
int64_t m_Height;
float m_Pixel_size_mm;
bool m_Pixel_size_mmIsSet;
int64_t m_Readout_time_us;
int64_t m_Min_frame_time_us;

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -0,0 +1,122 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Geom_refinement_algorithm.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace org::openapitools::server::model
{
Geom_refinement_algorithm::Geom_refinement_algorithm()
{
}
void Geom_refinement_algorithm::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Geom_refinement_algorithm::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Geom_refinement_algorithm::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Geom_refinement_algorithm" : pathPrefix;
if (m_value == Geom_refinement_algorithm::eGeom_refinement_algorithm::INVALID_VALUE_OPENAPI_GENERATED)
{
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool Geom_refinement_algorithm::operator==(const Geom_refinement_algorithm& rhs) const
{
return
getValue() == rhs.getValue()
;
}
bool Geom_refinement_algorithm::operator!=(const Geom_refinement_algorithm& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Geom_refinement_algorithm& o)
{
j = nlohmann::json::object();
switch (o.getValue())
{
case Geom_refinement_algorithm::eGeom_refinement_algorithm::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER:
j = "BeamCenter";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTERSYMMETRY:
j = "BeamCenterSymmetry";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE:
j = "None";
break;
}
}
void from_json(const nlohmann::json& j, Geom_refinement_algorithm& o)
{
auto s = j.get<std::string>();
if (s == "BeamCenter") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER);
}
else if (s == "BeamCenterSymmetry") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTERSYMMETRY);
}
else if (s == "None") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " Geom_refinement_algorithm::eGeom_refinement_algorithm";
throw std::invalid_argument(ss.str());
}
}
Geom_refinement_algorithm::eGeom_refinement_algorithm Geom_refinement_algorithm::getValue() const
{
return m_value;
}
void Geom_refinement_algorithm::setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm value)
{
m_value = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,80 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Geom_refinement_algorithm.h
*
* Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. This option is using non-linear least squares optimization to find unit cell and beam center. BeamCenterSymmetry is adding constraints for high-symmetry space groups: orthorhombic, tetragonal, cubic, and hexagonal. For the moment we recommend to use BeamCenterSymmetry only if unit cell is provided, given that the algorithm is not guessing centering properly at the moment.
*/
#ifndef Geom_refinement_algorithm_H_
#define Geom_refinement_algorithm_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. This option is using non-linear least squares optimization to find unit cell and beam center. BeamCenterSymmetry is adding constraints for high-symmetry space groups: orthorhombic, tetragonal, cubic, and hexagonal. For the moment we recommend to use BeamCenterSymmetry only if unit cell is provided, given that the algorithm is not guessing centering properly at the moment.
/// </summary>
class Geom_refinement_algorithm
{
public:
Geom_refinement_algorithm();
virtual ~Geom_refinement_algorithm() = default;
enum class eGeom_refinement_algorithm {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
BEAMCENTER,
BEAMCENTERSYMMETRY,
NONE
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Geom_refinement_algorithm& rhs) const;
bool operator!=(const Geom_refinement_algorithm& rhs) const;
/////////////////////////////////////////////
/// Geom_refinement_algorithm members
Geom_refinement_algorithm::eGeom_refinement_algorithm getValue() const;
void setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm value);
friend void to_json(nlohmann::json& j, const Geom_refinement_algorithm& o);
friend void from_json(const nlohmann::json& j, Geom_refinement_algorithm& o);
protected:
Geom_refinement_algorithm::eGeom_refinement_algorithm m_value = Geom_refinement_algorithm::eGeom_refinement_algorithm::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace org::openapitools::server::model
#endif /* Geom_refinement_algorithm_H_ */

View File

@@ -0,0 +1,191 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Grid_scan.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Grid_scan::Grid_scan()
{
m_N_fast = 0L;
m_Step_x_um = 0.0f;
m_Step_y_um = 0.0f;
m_Vertical = false;
m_VerticalIsSet = false;
m_Snake = false;
m_SnakeIsSet = false;
}
void Grid_scan::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Grid_scan::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Grid_scan::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Grid_scan" : pathPrefix;
/* N_fast */ {
const int64_t& value = m_N_fast;
const std::string currentValuePath = _pathPrefix + ".nFast";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
}
return success;
}
bool Grid_scan::operator==(const Grid_scan& rhs) const
{
return
(getNFast() == rhs.getNFast())
&&
(getStepXUm() == rhs.getStepXUm())
&&
(getStepYUm() == rhs.getStepYUm())
&&
((!verticalIsSet() && !rhs.verticalIsSet()) || (verticalIsSet() && rhs.verticalIsSet() && isVertical() == rhs.isVertical())) &&
((!snakeIsSet() && !rhs.snakeIsSet()) || (snakeIsSet() && rhs.snakeIsSet() && isSnake() == rhs.isSnake()))
;
}
bool Grid_scan::operator!=(const Grid_scan& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Grid_scan& o)
{
j = nlohmann::json::object();
j["n_fast"] = o.m_N_fast;
j["step_x_um"] = o.m_Step_x_um;
j["step_y_um"] = o.m_Step_y_um;
if(o.verticalIsSet())
j["vertical"] = o.m_Vertical;
if(o.snakeIsSet())
j["snake"] = o.m_Snake;
}
void from_json(const nlohmann::json& j, Grid_scan& o)
{
j.at("n_fast").get_to(o.m_N_fast);
j.at("step_x_um").get_to(o.m_Step_x_um);
j.at("step_y_um").get_to(o.m_Step_y_um);
if(j.find("vertical") != j.end())
{
j.at("vertical").get_to(o.m_Vertical);
o.m_VerticalIsSet = true;
}
if(j.find("snake") != j.end())
{
j.at("snake").get_to(o.m_Snake);
o.m_SnakeIsSet = true;
}
}
int64_t Grid_scan::getNFast() const
{
return m_N_fast;
}
void Grid_scan::setNFast(int64_t const value)
{
m_N_fast = value;
}
float Grid_scan::getStepXUm() const
{
return m_Step_x_um;
}
void Grid_scan::setStepXUm(float const value)
{
m_Step_x_um = value;
}
float Grid_scan::getStepYUm() const
{
return m_Step_y_um;
}
void Grid_scan::setStepYUm(float const value)
{
m_Step_y_um = value;
}
bool Grid_scan::isVertical() const
{
return m_Vertical;
}
void Grid_scan::setVertical(bool const value)
{
m_Vertical = value;
m_VerticalIsSet = true;
}
bool Grid_scan::verticalIsSet() const
{
return m_VerticalIsSet;
}
void Grid_scan::unsetVertical()
{
m_VerticalIsSet = false;
}
bool Grid_scan::isSnake() const
{
return m_Snake;
}
void Grid_scan::setSnake(bool const value)
{
m_Snake = value;
m_SnakeIsSet = true;
}
bool Grid_scan::snakeIsSet() const
{
return m_SnakeIsSet;
}
void Grid_scan::unsetSnake()
{
m_SnakeIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,108 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Grid_scan.h
*
* Definition of a grid scan (mutually exclusive with &#x60;rotation_axis&#x60;)
*/
#ifndef Grid_scan_H_
#define Grid_scan_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Definition of a grid scan (mutually exclusive with &#x60;rotation_axis&#x60;)
/// </summary>
class Grid_scan
{
public:
Grid_scan();
virtual ~Grid_scan() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Grid_scan& rhs) const;
bool operator!=(const Grid_scan& rhs) const;
/////////////////////////////////////////////
/// Grid_scan members
/// <summary>
/// Number of elements in the fast direction
/// </summary>
int64_t getNFast() const;
void setNFast(int64_t const value);
/// <summary>
/// Step in grid along the fast direction. Can be negative. Positive number: left to right Negative number: right to left
/// </summary>
float getStepXUm() const;
void setStepXUm(float const value);
/// <summary>
/// Step in grid along the slow direction. Can be negative. Positive number: top to bottom Negative number: bottom to top
/// </summary>
float getStepYUm() const;
void setStepYUm(float const value);
/// <summary>
/// If disabled: fast direction &#x3D; X, slow direction &#x3D; Y If enabled: fast direction &#x3D; Y, slow direction &#x3D; X
/// </summary>
bool isVertical() const;
void setVertical(bool const value);
bool verticalIsSet() const;
void unsetVertical();
/// <summary>
/// Flip fast direction for every second row
/// </summary>
bool isSnake() const;
void setSnake(bool const value);
bool snakeIsSet() const;
void unsetSnake();
friend void to_json(nlohmann::json& j, const Grid_scan& o);
friend void from_json(const nlohmann::json& j, Grid_scan& o);
protected:
int64_t m_N_fast;
float m_Step_x_um;
float m_Step_y_um;
bool m_Vertical;
bool m_VerticalIsSet;
bool m_Snake;
bool m_SnakeIsSet;
};
} // namespace org::openapitools::server::model
#endif /* Grid_scan_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -0,0 +1,128 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Indexing_algorithm.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace org::openapitools::server::model
{
Indexing_algorithm::Indexing_algorithm()
{
}
void Indexing_algorithm::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Indexing_algorithm::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Indexing_algorithm::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Indexing_algorithm" : pathPrefix;
if (m_value == Indexing_algorithm::eIndexing_algorithm::INVALID_VALUE_OPENAPI_GENERATED)
{
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool Indexing_algorithm::operator==(const Indexing_algorithm& rhs) const
{
return
getValue() == rhs.getValue()
;
}
bool Indexing_algorithm::operator!=(const Indexing_algorithm& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Indexing_algorithm& o)
{
j = nlohmann::json::object();
switch (o.getValue())
{
case Indexing_algorithm::eIndexing_algorithm::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case Indexing_algorithm::eIndexing_algorithm::FFBIDX:
j = "FFBIDX";
break;
case Indexing_algorithm::eIndexing_algorithm::FFT:
j = "FFT";
break;
case Indexing_algorithm::eIndexing_algorithm::AUTO:
j = "Auto";
break;
case Indexing_algorithm::eIndexing_algorithm::NONE:
j = "None";
break;
}
}
void from_json(const nlohmann::json& j, Indexing_algorithm& o)
{
auto s = j.get<std::string>();
if (s == "FFBIDX") {
o.setValue(Indexing_algorithm::eIndexing_algorithm::FFBIDX);
}
else if (s == "FFT") {
o.setValue(Indexing_algorithm::eIndexing_algorithm::FFT);
}
else if (s == "Auto") {
o.setValue(Indexing_algorithm::eIndexing_algorithm::AUTO);
}
else if (s == "None") {
o.setValue(Indexing_algorithm::eIndexing_algorithm::NONE);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " Indexing_algorithm::eIndexing_algorithm";
throw std::invalid_argument(ss.str());
}
}
Indexing_algorithm::eIndexing_algorithm Indexing_algorithm::getValue() const
{
return m_value;
}
void Indexing_algorithm::setValue(Indexing_algorithm::eIndexing_algorithm value)
{
m_value = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,81 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Indexing_algorithm.h
*
* Selection of an indexing algorithm used by Jungfraujoch
*/
#ifndef Indexing_algorithm_H_
#define Indexing_algorithm_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Selection of an indexing algorithm used by Jungfraujoch
/// </summary>
class Indexing_algorithm
{
public:
Indexing_algorithm();
virtual ~Indexing_algorithm() = default;
enum class eIndexing_algorithm {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
FFBIDX,
FFT,
AUTO,
NONE
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Indexing_algorithm& rhs) const;
bool operator!=(const Indexing_algorithm& rhs) const;
/////////////////////////////////////////////
/// Indexing_algorithm members
Indexing_algorithm::eIndexing_algorithm getValue() const;
void setValue(Indexing_algorithm::eIndexing_algorithm value);
friend void to_json(nlohmann::json& j, const Indexing_algorithm& o);
friend void from_json(const nlohmann::json& j, Indexing_algorithm& o);
protected:
Indexing_algorithm::eIndexing_algorithm m_value = Indexing_algorithm::eIndexing_algorithm::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace org::openapitools::server::model
#endif /* Indexing_algorithm_H_ */

View File

@@ -0,0 +1,329 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Indexing_settings.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Indexing_settings::Indexing_settings()
{
m_Fft_max_unit_cell_A = 250.0f;
m_Fft_min_unit_cell_A = 10.0f;
m_Fft_high_resolution_A = 2.0f;
m_Fft_num_vectors = 16384L;
m_Tolerance = 0.0f;
m_Thread_count = 0L;
m_Unit_cell_dist_tolerance = 0.05f;
}
void Indexing_settings::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Indexing_settings::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Indexing_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Indexing_settings" : pathPrefix;
/* Fft_max_unit_cell_A */ {
const float& value = m_Fft_max_unit_cell_A;
const std::string currentValuePath = _pathPrefix + ".fftMaxUnitCellA";
if (value < static_cast<float>(50))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 50;";
}
if (value > static_cast<float>(500))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 500;";
}
}
/* Fft_min_unit_cell_A */ {
const float& value = m_Fft_min_unit_cell_A;
const std::string currentValuePath = _pathPrefix + ".fftMinUnitCellA";
if (value < static_cast<float>(5))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 5;";
}
if (value > static_cast<float>(40))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 40;";
}
}
/* Fft_high_resolution_A */ {
const float& value = m_Fft_high_resolution_A;
const std::string currentValuePath = _pathPrefix + ".fftHighResolutionA";
if (value < static_cast<float>(0.5))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.5;";
}
if (value > static_cast<float>(6.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.0;";
}
}
/* Fft_num_vectors */ {
const int64_t& value = m_Fft_num_vectors;
const std::string currentValuePath = _pathPrefix + ".fftNumVectors";
if (value < 128ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 128;";
}
}
/* Tolerance */ {
const float& value = m_Tolerance;
const std::string currentValuePath = _pathPrefix + ".tolerance";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
if (value > static_cast<float>(0.5))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 0.5;";
}
}
/* Thread_count */ {
const int64_t& value = m_Thread_count;
const std::string currentValuePath = _pathPrefix + ".threadCount";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > 64ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 64;";
}
}
/* Unit_cell_dist_tolerance */ {
const float& value = m_Unit_cell_dist_tolerance;
const std::string currentValuePath = _pathPrefix + ".unitCellDistTolerance";
if (value < static_cast<float>(0.00010))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.00010;";
}
if (value > static_cast<float>(0.2001))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 0.2001;";
}
}
return success;
}
bool Indexing_settings::operator==(const Indexing_settings& rhs) const
{
return
(getAlgorithm() == rhs.getAlgorithm())
&&
(getFftMaxUnitCellA() == rhs.getFftMaxUnitCellA())
&&
(getFftMinUnitCellA() == rhs.getFftMinUnitCellA())
&&
(getFftHighResolutionA() == rhs.getFftHighResolutionA())
&&
(getFftNumVectors() == rhs.getFftNumVectors())
&&
(getTolerance() == rhs.getTolerance())
&&
(getThreadCount() == rhs.getThreadCount())
&&
(getGeomRefinementAlgorithm() == rhs.getGeomRefinementAlgorithm())
&&
(getUnitCellDistTolerance() == rhs.getUnitCellDistTolerance())
;
}
bool Indexing_settings::operator!=(const Indexing_settings& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Indexing_settings& o)
{
j = nlohmann::json::object();
j["algorithm"] = o.m_Algorithm;
j["fft_max_unit_cell_A"] = o.m_Fft_max_unit_cell_A;
j["fft_min_unit_cell_A"] = o.m_Fft_min_unit_cell_A;
j["fft_high_resolution_A"] = o.m_Fft_high_resolution_A;
j["fft_num_vectors"] = o.m_Fft_num_vectors;
j["tolerance"] = o.m_Tolerance;
j["thread_count"] = o.m_Thread_count;
j["geom_refinement_algorithm"] = o.m_Geom_refinement_algorithm;
j["unit_cell_dist_tolerance"] = o.m_Unit_cell_dist_tolerance;
}
void from_json(const nlohmann::json& j, Indexing_settings& o)
{
j.at("algorithm").get_to(o.m_Algorithm);
j.at("fft_max_unit_cell_A").get_to(o.m_Fft_max_unit_cell_A);
j.at("fft_min_unit_cell_A").get_to(o.m_Fft_min_unit_cell_A);
j.at("fft_high_resolution_A").get_to(o.m_Fft_high_resolution_A);
j.at("fft_num_vectors").get_to(o.m_Fft_num_vectors);
j.at("tolerance").get_to(o.m_Tolerance);
j.at("thread_count").get_to(o.m_Thread_count);
j.at("geom_refinement_algorithm").get_to(o.m_Geom_refinement_algorithm);
j.at("unit_cell_dist_tolerance").get_to(o.m_Unit_cell_dist_tolerance);
}
org::openapitools::server::model::Indexing_algorithm Indexing_settings::getAlgorithm() const
{
return m_Algorithm;
}
void Indexing_settings::setAlgorithm(org::openapitools::server::model::Indexing_algorithm const& value)
{
m_Algorithm = value;
}
float Indexing_settings::getFftMaxUnitCellA() const
{
return m_Fft_max_unit_cell_A;
}
void Indexing_settings::setFftMaxUnitCellA(float const value)
{
m_Fft_max_unit_cell_A = value;
}
float Indexing_settings::getFftMinUnitCellA() const
{
return m_Fft_min_unit_cell_A;
}
void Indexing_settings::setFftMinUnitCellA(float const value)
{
m_Fft_min_unit_cell_A = value;
}
float Indexing_settings::getFftHighResolutionA() const
{
return m_Fft_high_resolution_A;
}
void Indexing_settings::setFftHighResolutionA(float const value)
{
m_Fft_high_resolution_A = value;
}
int64_t Indexing_settings::getFftNumVectors() const
{
return m_Fft_num_vectors;
}
void Indexing_settings::setFftNumVectors(int64_t const value)
{
m_Fft_num_vectors = value;
}
float Indexing_settings::getTolerance() const
{
return m_Tolerance;
}
void Indexing_settings::setTolerance(float const value)
{
m_Tolerance = value;
}
int64_t Indexing_settings::getThreadCount() const
{
return m_Thread_count;
}
void Indexing_settings::setThreadCount(int64_t const value)
{
m_Thread_count = value;
}
org::openapitools::server::model::Geom_refinement_algorithm Indexing_settings::getGeomRefinementAlgorithm() const
{
return m_Geom_refinement_algorithm;
}
void Indexing_settings::setGeomRefinementAlgorithm(org::openapitools::server::model::Geom_refinement_algorithm const& value)
{
m_Geom_refinement_algorithm = value;
}
float Indexing_settings::getUnitCellDistTolerance() const
{
return m_Unit_cell_dist_tolerance;
}
void Indexing_settings::setUnitCellDistTolerance(float const value)
{
m_Unit_cell_dist_tolerance = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,134 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Indexing_settings.h
*
* Settings for crystallography indexing
*/
#ifndef Indexing_settings_H_
#define Indexing_settings_H_
#include "Indexing_algorithm.h"
#include "Geom_refinement_algorithm.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Settings for crystallography indexing
/// </summary>
class Indexing_settings
{
public:
Indexing_settings();
virtual ~Indexing_settings() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Indexing_settings& rhs) const;
bool operator!=(const Indexing_settings& rhs) const;
/////////////////////////////////////////////
/// Indexing_settings members
/// <summary>
///
/// </summary>
org::openapitools::server::model::Indexing_algorithm getAlgorithm() const;
void setAlgorithm(org::openapitools::server::model::Indexing_algorithm const& value);
/// <summary>
/// Largest unit cell to be indexed by FFT algorithm; parameter value affects execution time of FFT
/// </summary>
float getFftMaxUnitCellA() const;
void setFftMaxUnitCellA(float const value);
/// <summary>
/// Smallest unit cell to be indexed by FFT algorithm; parameter value affects execution time of FFT
/// </summary>
float getFftMinUnitCellA() const;
void setFftMinUnitCellA(float const value);
/// <summary>
/// Highest resolution of spots used for FFT algorithm; parameter value affects execution time of FFT. There is also correlation between smallest unit cell and max resolution, which need to be checked for very small systems.
/// </summary>
float getFftHighResolutionA() const;
void setFftHighResolutionA(float const value);
/// <summary>
/// Number of search directions for the FFT algorithm; parameter value affects execution time of FFT.
/// </summary>
int64_t getFftNumVectors() const;
void setFftNumVectors(int64_t const value);
/// <summary>
/// Acceptance tolerance for spots after the indexing run - the larger the number, the more spots will be accepted
/// </summary>
float getTolerance() const;
void setTolerance(float const value);
/// <summary>
/// Thread count for indexing algorithm
/// </summary>
int64_t getThreadCount() const;
void setThreadCount(int64_t const value);
/// <summary>
///
/// </summary>
org::openapitools::server::model::Geom_refinement_algorithm getGeomRefinementAlgorithm() const;
void setGeomRefinementAlgorithm(org::openapitools::server::model::Geom_refinement_algorithm const& value);
/// <summary>
/// Relative distance tolerance for unit cell vs. reference; Lattices outside given tolerance will be ignored
/// </summary>
float getUnitCellDistTolerance() const;
void setUnitCellDistTolerance(float const value);
friend void to_json(nlohmann::json& j, const Indexing_settings& o);
friend void from_json(const nlohmann::json& j, Indexing_settings& o);
protected:
org::openapitools::server::model::Indexing_algorithm m_Algorithm;
float m_Fft_max_unit_cell_A;
float m_Fft_min_unit_cell_A;
float m_Fft_high_resolution_A;
int64_t m_Fft_num_vectors;
float m_Tolerance;
int64_t m_Thread_count;
org::openapitools::server::model::Geom_refinement_algorithm m_Geom_refinement_algorithm;
float m_Unit_cell_dist_tolerance;
};
} // namespace org::openapitools::server::model
#endif /* Indexing_settings_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -25,18 +25,20 @@ Jfjoch_settings::Jfjoch_settings()
m_ZeromqIsSet = false;
m_InstrumentIsSet = false;
m_File_writerIsSet = false;
m_IndexingIsSet = false;
m_Detector_settingsIsSet = false;
m_Azim_intIsSet = false;
m_Image_formatIsSet = false;
m_Image_buffer_MiB = 2048;
m_Image_buffer_MiBIsSet = false;
m_Verbose = false;
m_VerboseIsSet = false;
m_Receiver_threads = 64;
m_Receiver_threadsIsSet = false;
m_Numa_policy = "";
m_Numa_policyIsSet = false;
m_Frontend_directory = "";
m_Resonet_model = "";
m_Resonet_modelIsSet = false;
m_SslIsSet = false;
m_Zeromq_previewIsSet = false;
m_Zeromq_metadataIsSet = false;
@@ -103,7 +105,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
}
}
if (imageBufferMiBIsSet())
{
const int32_t& value = m_Image_buffer_MiB;
@@ -117,7 +119,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
}
}
if (receiverThreadsIsSet())
{
const int32_t& value = m_Receiver_threads;
@@ -161,6 +163,9 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const
&&
((!indexingIsSet() && !rhs.indexingIsSet()) || (indexingIsSet() && rhs.indexingIsSet() && getIndexing() == rhs.getIndexing())) &&
((!detectorSettingsIsSet() && !rhs.detectorSettingsIsSet()) || (detectorSettingsIsSet() && rhs.detectorSettingsIsSet() && getDetectorSettings() == rhs.getDetectorSettings())) &&
@@ -173,6 +178,9 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const
((!imageBufferMiBIsSet() && !rhs.imageBufferMiBIsSet()) || (imageBufferMiBIsSet() && rhs.imageBufferMiBIsSet() && getImageBufferMiB() == rhs.getImageBufferMiB())) &&
((!verboseIsSet() && !rhs.verboseIsSet()) || (verboseIsSet() && rhs.verboseIsSet() && isVerbose() == rhs.isVerbose())) &&
((!receiverThreadsIsSet() && !rhs.receiverThreadsIsSet()) || (receiverThreadsIsSet() && rhs.receiverThreadsIsSet() && getReceiverThreads() == rhs.getReceiverThreads())) &&
@@ -182,7 +190,7 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const
&&
((!resonetModelIsSet() && !rhs.resonetModelIsSet()) || (resonetModelIsSet() && rhs.resonetModelIsSet() && getResonetModel() == rhs.getResonetModel())) &&
((!sslIsSet() && !rhs.sslIsSet()) || (sslIsSet() && rhs.sslIsSet() && getSsl() == rhs.getSsl())) &&
(getImagePusher() == rhs.getImagePusher())
&&
@@ -213,6 +221,8 @@ void to_json(nlohmann::json& j, const Jfjoch_settings& o)
if(o.fileWriterIsSet())
j["file_writer"] = o.m_File_writer;
j["detector"] = o.m_Detector;
if(o.indexingIsSet())
j["indexing"] = o.m_Indexing;
if(o.detectorSettingsIsSet())
j["detector_settings"] = o.m_Detector_settings;
if(o.azimIntIsSet())
@@ -221,13 +231,15 @@ void to_json(nlohmann::json& j, const Jfjoch_settings& o)
j["image_format"] = o.m_Image_format;
if(o.imageBufferMiBIsSet())
j["image_buffer_MiB"] = o.m_Image_buffer_MiB;
if(o.verboseIsSet())
j["verbose"] = o.m_Verbose;
if(o.receiverThreadsIsSet())
j["receiver_threads"] = o.m_Receiver_threads;
if(o.numaPolicyIsSet())
j["numa_policy"] = o.m_Numa_policy;
j["frontend_directory"] = o.m_Frontend_directory;
if(o.resonetModelIsSet())
j["resonet_model"] = o.m_Resonet_model;
if(o.sslIsSet())
j["ssl"] = o.m_Ssl;
j["image_pusher"] = o.m_Image_pusher;
if(o.zeromqPreviewIsSet())
j["zeromq_preview"] = o.m_Zeromq_preview;
@@ -259,6 +271,11 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o)
o.m_File_writerIsSet = true;
}
j.at("detector").get_to(o.m_Detector);
if(j.find("indexing") != j.end())
{
j.at("indexing").get_to(o.m_Indexing);
o.m_IndexingIsSet = true;
}
if(j.find("detector_settings") != j.end())
{
j.at("detector_settings").get_to(o.m_Detector_settings);
@@ -279,6 +296,11 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o)
j.at("image_buffer_MiB").get_to(o.m_Image_buffer_MiB);
o.m_Image_buffer_MiBIsSet = true;
}
if(j.find("verbose") != j.end())
{
j.at("verbose").get_to(o.m_Verbose);
o.m_VerboseIsSet = true;
}
if(j.find("receiver_threads") != j.end())
{
j.at("receiver_threads").get_to(o.m_Receiver_threads);
@@ -290,10 +312,10 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o)
o.m_Numa_policyIsSet = true;
}
j.at("frontend_directory").get_to(o.m_Frontend_directory);
if(j.find("resonet_model") != j.end())
if(j.find("ssl") != j.end())
{
j.at("resonet_model").get_to(o.m_Resonet_model);
o.m_Resonet_modelIsSet = true;
j.at("ssl").get_to(o.m_Ssl);
o.m_SslIsSet = true;
}
j.at("image_pusher").get_to(o.m_Image_pusher);
if(j.find("zeromq_preview") != j.end())
@@ -385,6 +407,23 @@ void Jfjoch_settings::setDetector(std::vector<org::openapitools::server::model::
{
m_Detector = value;
}
org::openapitools::server::model::Indexing_settings Jfjoch_settings::getIndexing() const
{
return m_Indexing;
}
void Jfjoch_settings::setIndexing(org::openapitools::server::model::Indexing_settings const& value)
{
m_Indexing = value;
m_IndexingIsSet = true;
}
bool Jfjoch_settings::indexingIsSet() const
{
return m_IndexingIsSet;
}
void Jfjoch_settings::unsetIndexing()
{
m_IndexingIsSet = false;
}
org::openapitools::server::model::Detector_settings Jfjoch_settings::getDetectorSettings() const
{
return m_Detector_settings;
@@ -453,6 +492,23 @@ void Jfjoch_settings::unsetImage_buffer_MiB()
{
m_Image_buffer_MiBIsSet = false;
}
bool Jfjoch_settings::isVerbose() const
{
return m_Verbose;
}
void Jfjoch_settings::setVerbose(bool const value)
{
m_Verbose = value;
m_VerboseIsSet = true;
}
bool Jfjoch_settings::verboseIsSet() const
{
return m_VerboseIsSet;
}
void Jfjoch_settings::unsetVerbose()
{
m_VerboseIsSet = false;
}
int32_t Jfjoch_settings::getReceiverThreads() const
{
return m_Receiver_threads;
@@ -495,22 +551,22 @@ void Jfjoch_settings::setFrontendDirectory(std::string const& value)
{
m_Frontend_directory = value;
}
std::string Jfjoch_settings::getResonetModel() const
org::openapitools::server::model::Jfjoch_settings_ssl Jfjoch_settings::getSsl() const
{
return m_Resonet_model;
return m_Ssl;
}
void Jfjoch_settings::setResonetModel(std::string const& value)
void Jfjoch_settings::setSsl(org::openapitools::server::model::Jfjoch_settings_ssl const& value)
{
m_Resonet_model = value;
m_Resonet_modelIsSet = true;
m_Ssl = value;
m_SslIsSet = true;
}
bool Jfjoch_settings::resonetModelIsSet() const
bool Jfjoch_settings::sslIsSet() const
{
return m_Resonet_modelIsSet;
return m_SslIsSet;
}
void Jfjoch_settings::unsetResonet_model()
void Jfjoch_settings::unsetSsl()
{
m_Resonet_modelIsSet = false;
m_SslIsSet = false;
}
org::openapitools::server::model::Image_pusher_type Jfjoch_settings::getImagePusher() const
{

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,10 +28,12 @@
#include "Zeromq_metadata_settings.h"
#include "Detector_settings.h"
#include <vector>
#include "Indexing_settings.h"
#include "Detector.h"
#include "Image_pusher_type.h"
#include "Zeromq_settings.h"
#include "Instrument_metadata.h"
#include "Jfjoch_settings_ssl.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
@@ -106,6 +108,13 @@ public:
/// <summary>
///
/// </summary>
org::openapitools::server::model::Indexing_settings getIndexing() const;
void setIndexing(org::openapitools::server::model::Indexing_settings const& value);
bool indexingIsSet() const;
void unsetIndexing();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Detector_settings getDetectorSettings() const;
void setDetectorSettings(org::openapitools::server::model::Detector_settings const& value);
bool detectorSettingsIsSet() const;
@@ -132,6 +141,13 @@ public:
bool imageBufferMiBIsSet() const;
void unsetImage_buffer_MiB();
/// <summary>
/// Print extra debug information
/// </summary>
bool isVerbose() const;
void setVerbose(bool const value);
bool verboseIsSet() const;
void unsetVerbose();
/// <summary>
/// Number of threads used by the receiver
/// </summary>
int32_t getReceiverThreads() const;
@@ -151,12 +167,12 @@ public:
std::string getFrontendDirectory() const;
void setFrontendDirectory(std::string const& value);
/// <summary>
/// Path to Resonet model
///
/// </summary>
std::string getResonetModel() const;
void setResonetModel(std::string const& value);
bool resonetModelIsSet() const;
void unsetResonet_model();
org::openapitools::server::model::Jfjoch_settings_ssl getSsl() const;
void setSsl(org::openapitools::server::model::Jfjoch_settings_ssl const& value);
bool sslIsSet() const;
void unsetSsl();
/// <summary>
///
/// </summary>
@@ -190,6 +206,8 @@ protected:
bool m_File_writerIsSet;
std::vector<org::openapitools::server::model::Detector> m_Detector;
org::openapitools::server::model::Indexing_settings m_Indexing;
bool m_IndexingIsSet;
org::openapitools::server::model::Detector_settings m_Detector_settings;
bool m_Detector_settingsIsSet;
org::openapitools::server::model::Azim_int_settings m_Azim_int;
@@ -198,14 +216,16 @@ protected:
bool m_Image_formatIsSet;
int32_t m_Image_buffer_MiB;
bool m_Image_buffer_MiBIsSet;
bool m_Verbose;
bool m_VerboseIsSet;
int32_t m_Receiver_threads;
bool m_Receiver_threadsIsSet;
std::string m_Numa_policy;
bool m_Numa_policyIsSet;
std::string m_Frontend_directory;
std::string m_Resonet_model;
bool m_Resonet_modelIsSet;
org::openapitools::server::model::Jfjoch_settings_ssl m_Ssl;
bool m_SslIsSet;
org::openapitools::server::model::Image_pusher_type m_Image_pusher;
org::openapitools::server::model::Zeromq_preview_settings m_Zeromq_preview;

View File

@@ -0,0 +1,133 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Jfjoch_settings_ssl.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Jfjoch_settings_ssl::Jfjoch_settings_ssl()
{
m_Certificate = "";
m_Key = "";
}
void Jfjoch_settings_ssl::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Jfjoch_settings_ssl::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Jfjoch_settings_ssl::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Jfjoch_settings_ssl" : pathPrefix;
/* Certificate */ {
const std::string& value = m_Certificate;
const std::string currentValuePath = _pathPrefix + ".certificate";
if (value.length() < 1)
{
success = false;
msg << currentValuePath << ": must be at least 1 characters long;";
}
}
/* Key */ {
const std::string& value = m_Key;
const std::string currentValuePath = _pathPrefix + ".key";
if (value.length() < 1)
{
success = false;
msg << currentValuePath << ": must be at least 1 characters long;";
}
}
return success;
}
bool Jfjoch_settings_ssl::operator==(const Jfjoch_settings_ssl& rhs) const
{
return
(getCertificate() == rhs.getCertificate())
&&
(getKey() == rhs.getKey())
;
}
bool Jfjoch_settings_ssl::operator!=(const Jfjoch_settings_ssl& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Jfjoch_settings_ssl& o)
{
j = nlohmann::json::object();
j["certificate"] = o.m_Certificate;
j["key"] = o.m_Key;
}
void from_json(const nlohmann::json& j, Jfjoch_settings_ssl& o)
{
j.at("certificate").get_to(o.m_Certificate);
j.at("key").get_to(o.m_Key);
}
std::string Jfjoch_settings_ssl::getCertificate() const
{
return m_Certificate;
}
void Jfjoch_settings_ssl::setCertificate(std::string const& value)
{
m_Certificate = value;
}
std::string Jfjoch_settings_ssl::getKey() const
{
return m_Key;
}
void Jfjoch_settings_ssl::setKey(std::string const& value)
{
m_Key = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,84 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Jfjoch_settings_ssl.h
*
*
*/
#ifndef Jfjoch_settings_ssl_H_
#define Jfjoch_settings_ssl_H_
#include <string>
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
///
/// </summary>
class Jfjoch_settings_ssl
{
public:
Jfjoch_settings_ssl();
virtual ~Jfjoch_settings_ssl() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Jfjoch_settings_ssl& rhs) const;
bool operator!=(const Jfjoch_settings_ssl& rhs) const;
/////////////////////////////////////////////
/// Jfjoch_settings_ssl members
/// <summary>
///
/// </summary>
std::string getCertificate() const;
void setCertificate(std::string const& value);
/// <summary>
///
/// </summary>
std::string getKey() const;
void setKey(std::string const& value);
friend void to_json(nlohmann::json& j, const Jfjoch_settings_ssl& o);
friend void from_json(const nlohmann::json& j, Jfjoch_settings_ssl& o);
protected:
std::string m_Certificate;
std::string m_Key;
};
} // namespace org::openapitools::server::model
#endif /* Jfjoch_settings_ssl_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -38,6 +38,7 @@ Jfjoch_statistics::Jfjoch_statistics()
m_RoiIsSet = false;
m_Az_intIsSet = false;
m_BufferIsSet = false;
m_IndexingIsSet = false;
}
@@ -102,7 +103,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path
}
}
return success;
}
@@ -160,7 +161,10 @@ bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const
((!azIntIsSet() && !rhs.azIntIsSet()) || (azIntIsSet() && rhs.azIntIsSet() && getAzInt() == rhs.getAzInt())) &&
((!bufferIsSet() && !rhs.bufferIsSet()) || (bufferIsSet() && rhs.bufferIsSet() && getBuffer() == rhs.getBuffer()))
((!bufferIsSet() && !rhs.bufferIsSet()) || (bufferIsSet() && rhs.bufferIsSet() && getBuffer() == rhs.getBuffer())) &&
((!indexingIsSet() && !rhs.indexingIsSet()) || (indexingIsSet() && rhs.indexingIsSet() && getIndexing() == rhs.getIndexing()))
;
}
@@ -207,6 +211,8 @@ void to_json(nlohmann::json& j, const Jfjoch_statistics& o)
j["az_int"] = o.m_Az_int;
if(o.bufferIsSet())
j["buffer"] = o.m_Buffer;
if(o.indexingIsSet())
j["indexing"] = o.m_Indexing;
}
@@ -297,6 +303,11 @@ void from_json(const nlohmann::json& j, Jfjoch_statistics& o)
j.at("buffer").get_to(o.m_Buffer);
o.m_BufferIsSet = true;
}
if(j.find("indexing") != j.end())
{
j.at("indexing").get_to(o.m_Indexing);
o.m_IndexingIsSet = true;
}
}
@@ -589,6 +600,23 @@ void Jfjoch_statistics::unsetBuffer()
{
m_BufferIsSet = false;
}
org::openapitools::server::model::Indexing_settings Jfjoch_statistics::getIndexing() const
{
return m_Indexing;
}
void Jfjoch_statistics::setIndexing(org::openapitools::server::model::Indexing_settings const& value)
{
m_Indexing = value;
m_IndexingIsSet = true;
}
bool Jfjoch_statistics::indexingIsSet() const
{
return m_IndexingIsSet;
}
void Jfjoch_statistics::unsetIndexing()
{
m_IndexingIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -32,6 +32,7 @@
#include "Zeromq_metadata_settings.h"
#include "Detector_settings.h"
#include <vector>
#include "Indexing_settings.h"
#include "Detector_status.h"
#include "Roi_definitions.h"
#include "Fpga_status_inner.h"
@@ -194,6 +195,13 @@ public:
void setBuffer(org::openapitools::server::model::Image_buffer_status const& value);
bool bufferIsSet() const;
void unsetBuffer();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Indexing_settings getIndexing() const;
void setIndexing(org::openapitools::server::model::Indexing_settings const& value);
bool indexingIsSet() const;
void unsetIndexing();
friend void to_json(nlohmann::json& j, const Jfjoch_statistics& o);
friend void from_json(const nlohmann::json& j, Jfjoch_statistics& o);
@@ -232,6 +240,8 @@ protected:
bool m_Az_intIsSet;
org::openapitools::server::model::Image_buffer_status m_Buffer;
bool m_BufferIsSet;
org::openapitools::server::model::Indexing_settings m_Indexing;
bool m_IndexingIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,6 +22,7 @@ namespace org::openapitools::server::model
Plot::Plot()
{
m_Title = "";
m_zIsSet = false;
}
@@ -81,6 +82,27 @@ bool Plot::validate(std::stringstream& msg, const std::string& pathPrefix) const
i++;
}
}
}
if (ZIsSet())
{
const std::vector<float>& value = m_z;
const std::string currentValuePath = _pathPrefix + ".Z";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const float& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
@@ -102,8 +124,11 @@ bool Plot::operator==(const Plot& rhs) const
&&
(getY() == rhs.getY())
&&
((!ZIsSet() && !rhs.ZIsSet()) || (ZIsSet() && rhs.ZIsSet() && getZ() == rhs.getZ()))
;
}
@@ -118,6 +143,8 @@ void to_json(nlohmann::json& j, const Plot& o)
j["title"] = o.m_Title;
j["x"] = o.m_x;
j["y"] = o.m_y;
if(o.ZIsSet() || !o.m_z.empty())
j["z"] = o.m_z;
}
@@ -126,6 +153,11 @@ void from_json(const nlohmann::json& j, Plot& o)
j.at("title").get_to(o.m_Title);
j.at("x").get_to(o.m_x);
j.at("y").get_to(o.m_y);
if(j.find("z") != j.end())
{
j.at("z").get_to(o.m_z);
o.m_zIsSet = true;
}
}
@@ -153,6 +185,23 @@ void Plot::setY(std::vector<float> const value)
{
m_y = value;
}
std::vector<float> Plot::getZ() const
{
return m_z;
}
void Plot::setZ(std::vector<float> const value)
{
m_z = value;
m_zIsSet = true;
}
bool Plot::ZIsSet() const
{
return m_zIsSet;
}
void Plot::unsetz()
{
m_zIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -74,6 +74,13 @@ public:
/// </summary>
std::vector<float> getY() const;
void setY(std::vector<float> const value);
/// <summary>
///
/// </summary>
std::vector<float> getZ() const;
void setZ(std::vector<float> const value);
bool ZIsSet() const;
void unsetz();
friend void to_json(nlohmann::json& j, const Plot& o);
friend void from_json(const nlohmann::json& j, Plot& o);
@@ -84,6 +91,8 @@ protected:
std::vector<float> m_y;
std::vector<float> m_z;
bool m_zIsSet;
};

View File

@@ -0,0 +1,140 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Plot_unit_x.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace org::openapitools::server::model
{
Plot_unit_x::Plot_unit_x()
{
}
void Plot_unit_x::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Plot_unit_x::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Plot_unit_x::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Plot_unit_x" : pathPrefix;
if (m_value == Plot_unit_x::ePlot_unit_x::INVALID_VALUE_OPENAPI_GENERATED)
{
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool Plot_unit_x::operator==(const Plot_unit_x& rhs) const
{
return
getValue() == rhs.getValue()
;
}
bool Plot_unit_x::operator!=(const Plot_unit_x& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Plot_unit_x& o)
{
j = nlohmann::json::object();
switch (o.getValue())
{
case Plot_unit_x::ePlot_unit_x::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case Plot_unit_x::ePlot_unit_x::IMAGE_NUMBER:
j = "image_number";
break;
case Plot_unit_x::ePlot_unit_x::Q_RECIPA:
j = "q_recipA";
break;
case Plot_unit_x::ePlot_unit_x::D_A:
j = "d_A";
break;
case Plot_unit_x::ePlot_unit_x::ANGLE_DEG:
j = "angle_deg";
break;
case Plot_unit_x::ePlot_unit_x::ADU:
j = "ADU";
break;
case Plot_unit_x::ePlot_unit_x::GRID_UM:
j = "grid_um";
break;
}
}
void from_json(const nlohmann::json& j, Plot_unit_x& o)
{
auto s = j.get<std::string>();
if (s == "image_number") {
o.setValue(Plot_unit_x::ePlot_unit_x::IMAGE_NUMBER);
}
else if (s == "q_recipA") {
o.setValue(Plot_unit_x::ePlot_unit_x::Q_RECIPA);
}
else if (s == "d_A") {
o.setValue(Plot_unit_x::ePlot_unit_x::D_A);
}
else if (s == "angle_deg") {
o.setValue(Plot_unit_x::ePlot_unit_x::ANGLE_DEG);
}
else if (s == "ADU") {
o.setValue(Plot_unit_x::ePlot_unit_x::ADU);
}
else if (s == "grid_um") {
o.setValue(Plot_unit_x::ePlot_unit_x::GRID_UM);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " Plot_unit_x::ePlot_unit_x";
throw std::invalid_argument(ss.str());
}
}
Plot_unit_x::ePlot_unit_x Plot_unit_x::getValue() const
{
return m_value;
}
void Plot_unit_x::setValue(Plot_unit_x::ePlot_unit_x value)
{
m_value = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,83 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Plot_unit_x.h
*
*
*/
#ifndef Plot_unit_x_H_
#define Plot_unit_x_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
///
/// </summary>
class Plot_unit_x
{
public:
Plot_unit_x();
virtual ~Plot_unit_x() = default;
enum class ePlot_unit_x {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
IMAGE_NUMBER,
Q_RECIPA,
D_A,
ANGLE_DEG,
ADU,
GRID_UM
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Plot_unit_x& rhs) const;
bool operator!=(const Plot_unit_x& rhs) const;
/////////////////////////////////////////////
/// Plot_unit_x members
Plot_unit_x::ePlot_unit_x getValue() const;
void setValue(Plot_unit_x::ePlot_unit_x value);
friend void to_json(nlohmann::json& j, const Plot_unit_x& o);
friend void from_json(const nlohmann::json& j, Plot_unit_x& o);
protected:
Plot_unit_x::ePlot_unit_x m_value = Plot_unit_x::ePlot_unit_x::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace org::openapitools::server::model
#endif /* Plot_unit_x_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -23,6 +23,10 @@ Plots::Plots()
{
m_Title = "";
m_TitleIsSet = false;
m_Size_x = 0.0f;
m_Size_xIsSet = false;
m_Size_y = 0.0f;
m_Size_yIsSet = false;
}
@@ -45,7 +49,7 @@ bool Plots::validate(std::stringstream& msg, const std::string& pathPrefix) cons
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Plots" : pathPrefix;
/* Plot */ {
const std::vector<org::openapitools::server::model::Plot>& value = m_Plot;
@@ -78,6 +82,15 @@ bool Plots::operator==(const Plots& rhs) const
((!titleIsSet() && !rhs.titleIsSet()) || (titleIsSet() && rhs.titleIsSet() && getTitle() == rhs.getTitle())) &&
(getUnitX() == rhs.getUnitX())
&&
((!sizeXIsSet() && !rhs.sizeXIsSet()) || (sizeXIsSet() && rhs.sizeXIsSet() && getSizeX() == rhs.getSizeX())) &&
((!sizeYIsSet() && !rhs.sizeYIsSet()) || (sizeYIsSet() && rhs.sizeYIsSet() && getSizeY() == rhs.getSizeY())) &&
(getPlot() == rhs.getPlot())
@@ -94,6 +107,11 @@ void to_json(nlohmann::json& j, const Plots& o)
j = nlohmann::json::object();
if(o.titleIsSet())
j["title"] = o.m_Title;
j["unit_x"] = o.m_Unit_x;
if(o.sizeXIsSet())
j["size_x"] = o.m_Size_x;
if(o.sizeYIsSet())
j["size_y"] = o.m_Size_y;
j["plot"] = o.m_Plot;
}
@@ -105,6 +123,17 @@ void from_json(const nlohmann::json& j, Plots& o)
j.at("title").get_to(o.m_Title);
o.m_TitleIsSet = true;
}
j.at("unit_x").get_to(o.m_Unit_x);
if(j.find("size_x") != j.end())
{
j.at("size_x").get_to(o.m_Size_x);
o.m_Size_xIsSet = true;
}
if(j.find("size_y") != j.end())
{
j.at("size_y").get_to(o.m_Size_y);
o.m_Size_yIsSet = true;
}
j.at("plot").get_to(o.m_Plot);
}
@@ -126,6 +155,48 @@ void Plots::unsetTitle()
{
m_TitleIsSet = false;
}
org::openapitools::server::model::Plot_unit_x Plots::getUnitX() const
{
return m_Unit_x;
}
void Plots::setUnitX(org::openapitools::server::model::Plot_unit_x const& value)
{
m_Unit_x = value;
}
float Plots::getSizeX() const
{
return m_Size_x;
}
void Plots::setSizeX(float const value)
{
m_Size_x = value;
m_Size_xIsSet = true;
}
bool Plots::sizeXIsSet() const
{
return m_Size_xIsSet;
}
void Plots::unsetSize_x()
{
m_Size_xIsSet = false;
}
float Plots::getSizeY() const
{
return m_Size_y;
}
void Plots::setSizeY(float const value)
{
m_Size_y = value;
m_Size_yIsSet = true;
}
bool Plots::sizeYIsSet() const
{
return m_Size_yIsSet;
}
void Plots::unsetSize_y()
{
m_Size_yIsSet = false;
}
std::vector<org::openapitools::server::model::Plot> Plots::getPlot() const
{
return m_Plot;

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,6 +22,7 @@
#include "Plot.h"
#include <string>
#include <vector>
#include "Plot_unit_x.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
@@ -70,6 +71,25 @@ public:
/// <summary>
///
/// </summary>
org::openapitools::server::model::Plot_unit_x getUnitX() const;
void setUnitX(org::openapitools::server::model::Plot_unit_x const& value);
/// <summary>
/// Max X range of the plot
/// </summary>
float getSizeX() const;
void setSizeX(float const value);
bool sizeXIsSet() const;
void unsetSize_x();
/// <summary>
/// Max Y range of the plot
/// </summary>
float getSizeY() const;
void setSizeY(float const value);
bool sizeYIsSet() const;
void unsetSize_y();
/// <summary>
///
/// </summary>
std::vector<org::openapitools::server::model::Plot> getPlot() const;
void setPlot(std::vector<org::openapitools::server::model::Plot> const& value);
@@ -78,6 +98,12 @@ public:
protected:
std::string m_Title;
bool m_TitleIsSet;
org::openapitools::server::model::Plot_unit_x m_Unit_x;
float m_Size_x;
bool m_Size_xIsSet;
float m_Size_y;
bool m_Size_yIsSet;
std::vector<org::openapitools::server::model::Plot> m_Plot;

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.36
* The version of the OpenAPI document: 1.0.0-rc.80
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

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