mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 15:27:13 +02:00
Compare commits
37 Commits
7.0.3
...
2023.03.16
Author | SHA1 | Date | |
---|---|---|---|
d23722a4b7 | |||
bc46d0f6ab | |||
532f76ed4f | |||
21db57dd89 | |||
dc5db905d4 | |||
48a684b95f | |||
276dc52196 | |||
eb025b54ef | |||
3bf6be41b4 | |||
7729e47685 | |||
f31fa92516 | |||
39b1f5bbf2 | |||
7ab3b25f87 | |||
0f6f20a720 | |||
1340408c2d | |||
7b7c4a2b86 | |||
8fc45676b9 | |||
53fe5f5116 | |||
50f2165c55 | |||
056f650b92 | |||
3d54a4aa26 | |||
3a89c2a61e | |||
570a567a8c | |||
9874f596f6 | |||
984a59a9d7 | |||
e02b11fd1e | |||
68beba732e | |||
104bc6f619 | |||
66cf1825ea | |||
d8e497dbb3 | |||
60502cfa8f | |||
b089dc90cd | |||
4caf10c12b | |||
32cbb11bb6 | |||
339cb925c7 | |||
f8a29c3000 | |||
d431443dda |
@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(slsDetectorPackage)
|
||||
set(PROJECT_VERSION 7.0.3)
|
||||
set(PROJECT_VERSION 7.0.0)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||
|
||||
|
162
RELEASE.txt
162
RELEASE.txt
@ -1,125 +1,38 @@
|
||||
SLS Detector Package Major Release 7.0.3 released on 14.11.2023
|
||||
SLS Detector Package Major Release 7.x.x released on xx.xx.2023
|
||||
===============================================================
|
||||
|
||||
This document describes the differences between v7.0.3 and v7.0.2
|
||||
This document describes the differences between v7.x.x and v7.0.0
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1 Resolved Issues
|
||||
2 On-board Detector Server Compatibility
|
||||
3 Firmware Requirements
|
||||
4 Kernel Requirements
|
||||
5 Download, Documentation & Support
|
||||
1 New, Changed or Resolved Features
|
||||
1.1 Compilation
|
||||
1.2 Callback
|
||||
1.3 Python
|
||||
1.4 Client
|
||||
1.5 Detector Server
|
||||
1.6 Simulator
|
||||
1.7 Receiver
|
||||
1.8 Gui
|
||||
2 On-board Detector Server Compatibility
|
||||
3 Firmware Requirements
|
||||
4 Kernel Requirements
|
||||
5 Download, Documentation & Support
|
||||
|
||||
|
||||
|
||||
1 Resolved Issues
|
||||
=================
|
||||
|
||||
1 New, Changed or Resolved Features
|
||||
=====================================
|
||||
|
||||
|
||||
Firmware
|
||||
--------
|
||||
|
||||
|
||||
* [Eiger] Blocking trigger on quad
|
||||
Previously, blocking software trigger on a quad was not blocking. Fixed
|
||||
with firmware v32.
|
||||
|
||||
|
||||
Client
|
||||
------
|
||||
|
||||
|
||||
* Limit port number max to 65535
|
||||
Previously, one could set the port numbers (TCP, UDP, ZMQ) to values
|
||||
higher than 65535 and also to 0. However, it was truncated to 16 bit
|
||||
in the background, but not relayed to the user.
|
||||
Now, it will throw if it is 0 or greater than 65535 (16 bit).
|
||||
|
||||
|
||||
* Stopping acqusition for a single or subset of modules
|
||||
The Detector API previously stopped all modules.
|
||||
Now, it takes into account which modules the user wanted to stop.
|
||||
|
||||
|
||||
* [Jungfrau] Stop in sync mode
|
||||
When stopping acquisition in sync mode, only the master module sometimes
|
||||
returns 'Idle' state instead of 'Stopped'. The software threw an
|
||||
exception for the different states then.
|
||||
Now, it does not throw and a fix will be added to the next firmware
|
||||
release for the different states (with SW release: v8.0.0).
|
||||
|
||||
|
||||
* [Eiger] Incorrect error message in Stop
|
||||
When stopping acquisition, if a half module were to give an error in a
|
||||
rare case while the others succeeded, this would result in an re-attempt
|
||||
to stop 9 more times before throwing an incorrect exception messsage that
|
||||
it could not stop.
|
||||
Now, it is handled and will throw an exception of the error status
|
||||
immediately.
|
||||
|
||||
|
||||
Receiver
|
||||
--------
|
||||
|
||||
|
||||
* Limit TCP port number (command line) to max of 65535
|
||||
Refer issue under 'Client'.
|
||||
|
||||
|
||||
Detector Simulator
|
||||
------------------
|
||||
|
||||
|
||||
* Limit TCP port number (command line) to max of 65535
|
||||
Refer issue under 'Client'.
|
||||
|
||||
|
||||
* Some commands such as 'readnrows' would complain that it cannot be set
|
||||
because the detector is not idle, but was setting it anyway. Fixed.
|
||||
|
||||
|
||||
Gui/ Client Callback
|
||||
--------------------
|
||||
|
||||
|
||||
* [Jungfrau] Gui: corrected color map of gain plot
|
||||
Previously, color on the gain plot did not update after the first image,
|
||||
unless there were x/y min/max changes or window resizing. Fixed.
|
||||
|
||||
|
||||
* [Jungfrau] Acquisition finished callback error status in sync mode
|
||||
When stopping acquisition in multi module Jungfrau sync mode,
|
||||
different status (master 'idle' and slaves 'stopped' in
|
||||
firmware 2.4.1 or 1.4.1) show as 'error' in acquisition finished call
|
||||
back (mainly used for gui). This is fixed.
|
||||
|
||||
|
||||
* [Jungfrau] Gui: Next frame number shown as 0 for inconsistency
|
||||
When stopping an acquisition in a multi module Jungfrau, the next
|
||||
frame numbers might be different, for which the Gui shows an error message
|
||||
but keeps the number as 0. Now, it is fixed to show -1 for inconsistency
|
||||
and error message shown. So, setting 0 will also prompt an error message
|
||||
that 0 is an invalid input.
|
||||
|
||||
|
||||
Data Processing
|
||||
---------------
|
||||
|
||||
|
||||
* [Moench] Segmentation fault with moench03RawDataPrcess
|
||||
Previously, it crashed when nframes > 0. Fixed.
|
||||
|
||||
|
||||
* [Moench] Interpolation issues fixed.
|
||||
|
||||
|
||||
* [Moench] When receiver in discard_partial mode and gets an empty frame,
|
||||
it sends a zmq packet with header and no data. This is handled in post
|
||||
processing as a temporary solution.
|
||||
|
||||
- moench being made compatible with jungfrau 2.0 boards (jungfrau structure, away from ctb)
|
||||
- eiger febl and febr in versions, ensure its the same as beb fw version
|
||||
- eiger hardware version fx30 and fx70 (versions command)
|
||||
- fixed rx_arping error
|
||||
- fix hdf5 compilation (detspec fields)
|
||||
|
||||
|
||||
|
||||
@ -127,13 +40,13 @@ This document describes the differences between v7.0.3 and v7.0.2
|
||||
==========================================
|
||||
|
||||
|
||||
Eiger 7.0.3
|
||||
Jungfrau 7.0.3
|
||||
Mythen3 7.0.3
|
||||
Gotthard2 7.0.3
|
||||
Gotthard 7.0.3
|
||||
Moench 7.0.3
|
||||
Ctb 7.0.3
|
||||
Eiger 7.0.0
|
||||
Jungfrau 7.0.0
|
||||
Mythen3 7.0.0
|
||||
Gotthard2 7.0.0
|
||||
Gotthard 7.0.0
|
||||
Moench 7.0.0
|
||||
Ctb 7.0.0
|
||||
|
||||
|
||||
On-board Detector Server Upgrade
|
||||
@ -154,21 +67,21 @@ This document describes the differences between v7.0.3 and v7.0.2
|
||||
========================
|
||||
|
||||
|
||||
Eiger 02.10.2023 (v32) (updated in 7.0.3)
|
||||
Eiger 20.02.2023 (v31)
|
||||
|
||||
Jungfrau 16.05.2023 (v1.4.1, HW v1.0) (updated in 7.0.2)
|
||||
15.05.2023 (v2.4.1, HW v2.0) (updated in 7.0.2)
|
||||
Jungfrau 04.11.2022 (v1.4, HW v1.0)
|
||||
03.11.2022 (v2.4, HW v2.0)
|
||||
|
||||
Mythen3 24.01.2023 (v1.4) (updated in 7.0.0)
|
||||
Mythen3 24.01.2023 (v1.4)
|
||||
|
||||
Gotthard2 23.11.2022 (v0.3) (updated in 7.0.0)
|
||||
Gotthard2 23.11.2022 (v0.3)
|
||||
|
||||
Gotthard 08.02.2018 (50um and 25um Master)
|
||||
09.02.2018 (25 um Slave)
|
||||
|
||||
Moench 05.12.2022 (v0.3) (updated in 7.0.0)
|
||||
Moench 05.12.2022 (v0.3)
|
||||
|
||||
Ctb 05.12.2022 (v1.1) (updated in 7.0.0)
|
||||
Ctb 05.12.2022 (v1.1)
|
||||
|
||||
|
||||
Detector Upgrade
|
||||
@ -302,4 +215,3 @@ This document describes the differences between v7.0.3 and v7.0.2
|
||||
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
||||
|
||||
|
@ -3,5 +3,6 @@ python:
|
||||
- 3.9
|
||||
- 3.10
|
||||
- 3.11
|
||||
- 3.12
|
||||
|
||||
numpy:
|
||||
- 1.17
|
||||
|
@ -140,21 +140,14 @@ ZMQ: Json Header Format
|
||||
"quad": unsigned int,
|
||||
"addJsonHeader": {
|
||||
string : string
|
||||
},
|
||||
"rx_roi": [
|
||||
unsigned int,
|
||||
unsigned int,
|
||||
unsigned int,
|
||||
unsigned int
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+--------------+----------------------------------------------+
|
||||
| Field | Description |
|
||||
+--------------+----------------------------------------------+
|
||||
| jsonversion | Version of the json header. |
|
||||
| | Value at 4 for v6.x.x - v7.0.1 |
|
||||
| | Value at 5 for v7.0.2 |
|
||||
| | Value at 4 for v6.x.x and v7.x.x |
|
||||
+--------------+----------------------------------------------+
|
||||
| bitmode | Bits per pixel [4|8|16|32] |
|
||||
+--------------+----------------------------------------------+
|
||||
@ -229,10 +222,7 @@ ZMQ: Json Header Format
|
||||
| addJsonHeader| Optional custom parameters that is required |
|
||||
| | for processing code. |
|
||||
+--------------+----------------------------------------------+
|
||||
| rx_roi | ROI in the receiver per port (xmin, xmax, |
|
||||
| | ymin, ymax). For external guis to know |
|
||||
| | what is saved |
|
||||
+--------------+----------------------------------------------+
|
||||
|
||||
|
||||
SLS Receiver Header Format
|
||||
--------------------------
|
||||
|
@ -3,34 +3,33 @@
|
||||
### edit with hostname or IP address of your detector
|
||||
############################################
|
||||
#hostname bchip181+
|
||||
hostname bchip076
|
||||
hostname bchip135
|
||||
|
||||
#############################################
|
||||
### edit with hostname or 1Gbs IP address of your server
|
||||
############################################
|
||||
rx_hostname mpc2011:7777
|
||||
rx_hostname mpc2011
|
||||
|
||||
#############################################
|
||||
### edit with 10 Gbs IP of your server
|
||||
############################################
|
||||
udp_dstip 10.1.2.102
|
||||
udp_dstip 10.1.1.102
|
||||
#############################################
|
||||
### edit with any number in the subnet of your server (first 3 numbers as above)
|
||||
############################################
|
||||
udp_srcip 10.1.2.19
|
||||
udp_dstport 32777
|
||||
|
||||
udp_srcip 10.1.1.19
|
||||
udp_dstport 32411
|
||||
|
||||
#############################################
|
||||
### edit with 10 Gbs IP of your server
|
||||
############################################
|
||||
rx_zmqip 10.1.2.102
|
||||
rx_zmqport 9003
|
||||
rx_zmqip 10.1.1.102
|
||||
rx_zmqport 50003
|
||||
#############################################
|
||||
### edit with 1 Gbs IP of PC where you will run the GUI
|
||||
############################################
|
||||
zmqip 129.129.202.57
|
||||
zmqport 9005
|
||||
zmqport 50001
|
||||
|
||||
|
||||
|
||||
@ -39,7 +38,7 @@ rx_zmqstream 1
|
||||
|
||||
|
||||
|
||||
frames 1
|
||||
frames 100000
|
||||
period 0.0006
|
||||
exptime 0.00035
|
||||
|
||||
@ -50,7 +49,7 @@ fpath /mnt/moench_data/scratch1/
|
||||
|
||||
fwrite 0
|
||||
|
||||
rx_jsonpara frameMode newPedestal
|
||||
rx_jsonpara frameMode frame
|
||||
rx_jsonpara detectorMode counting
|
||||
rx_discardpolicy discardpartial
|
||||
|
||||
|
@ -230,7 +230,8 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def hardwareversion(self):
|
||||
"""
|
||||
[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version of detector.
|
||||
[Jungfrau][Moench][Gotthard2][Myhten3][Gotthard][Ctb] Hardware version of detector. \n
|
||||
[Eiger] Hardware version of front FPGA on detector.
|
||||
"""
|
||||
return self.getHardwareVersion()
|
||||
|
||||
@ -305,7 +306,7 @@ class Detector(CppDetectorApi):
|
||||
-----
|
||||
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2 (quarter speed), else to 0 (full speed)\n
|
||||
[Mythen3] Options: 8, 16, 32 \n
|
||||
[Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16
|
||||
"""
|
||||
return self.getDynamicRange()
|
||||
|
||||
@ -363,10 +364,9 @@ class Detector(CppDetectorApi):
|
||||
-----
|
||||
|
||||
[Eiger] Use threshold command to load settings
|
||||
[Jungfrau] GAIN0, HIGHGAIN0 \n
|
||||
[Jungfrau][Moench] GAIN0, HIGHGAIN0 \n
|
||||
[Gotthard] DYNAMICGAIN, HIGHGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n
|
||||
[Gotthard2] DYNAMICGAIN, FIXGAIN1, FIXGAIN2 \n
|
||||
[Moench] G1_HIGHGAIN, G1_LOWGAIN, G2_HIGHCAP_HIGHGAIN, G2_HIGHCAP_LOWGAIN, G2_LOWCAP_HIGHGAIN, G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN \n
|
||||
[Eiger] settings loaded from file found in settingspath
|
||||
"""
|
||||
return element_if_equal(self.getSettings())
|
||||
@ -396,7 +396,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def framesl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of frames left in acquisition.\n
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of frames left in acquisition.\n
|
||||
[Gotthard2] only in continuous auto mode.
|
||||
|
||||
:setter: Not Implemented
|
||||
@ -407,7 +407,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def framecounter(self):
|
||||
"""
|
||||
[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control.
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of frames from start run control.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -436,12 +436,11 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def powerchip(self):
|
||||
"""
|
||||
[Jungfrau][Mythen3][Gotthard2][Moench] Power the chip.
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2] Power the chip.
|
||||
|
||||
Note
|
||||
----
|
||||
[Moench] Default is disabled. \n
|
||||
[Jungfrau] Default is disabled. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1).\n
|
||||
[Jungfrau][Moench] Default is disabled. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1).\n
|
||||
[Mythen3][Gotthard2] Default is 1. If module not connected or wrong module, powerchip will fail.
|
||||
"""
|
||||
return self.getPowerChip()
|
||||
@ -615,7 +614,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def periodl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Period left for current frame.
|
||||
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Period left for current frame.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -637,7 +636,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def delay(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta
|
||||
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -682,7 +681,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def delayl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper
|
||||
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -741,7 +740,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def txdelay(self):
|
||||
"""
|
||||
[Eiger][Jungfrau][Mythen3] Set transmission delay for all modules in the detector using the step size provided.
|
||||
[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules in the detector using the step size provided.
|
||||
|
||||
Note
|
||||
----
|
||||
@ -749,7 +748,7 @@ class Detector(CppDetectorApi):
|
||||
\t\t[Eiger] txdelay_left to (2 * mod_index * n_delay), \n
|
||||
\t\t[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and \n
|
||||
\t\t[Eiger] txdelay_frame to (2 *num_modules * n_delay) \n
|
||||
\t\t[Jungfrau][Mythen3] txdelay_frame to (num_modules * n_delay)\n\n
|
||||
\t\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay)\n\n
|
||||
Please refer txdelay_left, txdelay_right and txdelay_frame for details.
|
||||
"""
|
||||
return self.getTransmissionDelay()
|
||||
@ -762,11 +761,11 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def txdelay_frame(self):
|
||||
"""
|
||||
[Eiger][Jungfrau][Mythen3] Transmission delay of first udp packet being streamed out of the module.\n
|
||||
[Eiger][Jungfrau][Moench][Mythen3] Transmission delay of first udp packet being streamed out of the module.\n
|
||||
|
||||
Note
|
||||
----
|
||||
[Jungfrau] [0-31] Each value represents 1 ms. \n
|
||||
[Jungfrau][Moench] [0-31] Each value represents 1 ms. \n
|
||||
[Eiger] Additional delay to txdelay_left and txdelay_right. Each value represents 10ns. Typical value is 50000. \n
|
||||
[Mythen3] [0-16777215] Each value represents 8 ns (125 MHz clock), max is 134 ms.
|
||||
"""
|
||||
@ -949,7 +948,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def numinterfaces(self):
|
||||
"""[Jungfrau][Gotthard2] Number of udp interfaces to stream data from detector. Default is 1.
|
||||
"""[Jungfrau][Moench][Gotthard2] Number of udp interfaces to stream data from detector. Default is 1.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -1295,11 +1294,11 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def udp_dstip2(self):
|
||||
"""
|
||||
[Jungfrau][Gotthard2] Ip address of the receiver (destination) udp interface 2.
|
||||
[Jungfrau][Moench][Gotthard2] Ip address of the receiver (destination) udp interface 2.
|
||||
|
||||
Note
|
||||
----
|
||||
[Jungfrau] bottom half \n
|
||||
[Jungfrau][Moench] bottom half \n
|
||||
[Gotthard2] veto debugging \n
|
||||
If 'auto' used, then ip is set to ip of rx_hostname. \n
|
||||
To set IPs for individual modules, use setDestinationUDPIP2.
|
||||
@ -1348,13 +1347,13 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def udp_dstmac2(self):
|
||||
"""
|
||||
[Jungfrau][Gotthard2] Mac address of the receiver (destination) udp interface 2.
|
||||
[Jungfrau][Moench][Gotthard2] Mac address of the receiver (destination) udp interface 2.
|
||||
|
||||
Note
|
||||
----
|
||||
Not mandatory to set as udp_dstip2 retrieves it from slsReceiver process but must be set if you use a custom receiver (not slsReceiver). \n
|
||||
To set MACs for individual modules, use setDestinationUDPMAC2. \n
|
||||
[Jungfrau] bottom half \n
|
||||
[Jungfrau][Moench] bottom half \n
|
||||
[Gotthard2] veto debugging \n
|
||||
Use router mac if router between detector and receiver.
|
||||
|
||||
@ -1399,11 +1398,11 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def udp_srcmac2(self):
|
||||
"""
|
||||
[Jungfrau][Gotthard2] Mac address of the receiver (source) udp interface 2.
|
||||
[Jungfrau][Moench][Gotthard2] Mac address of the receiver (source) udp interface 2.
|
||||
|
||||
Note
|
||||
----
|
||||
[Jungfrau] bottom half \n
|
||||
[Jungfrau][Moench] bottom half \n
|
||||
[Gotthard2] veto debugging \n
|
||||
To set MACs for individual modules, use setSourceUDPMAC2.
|
||||
|
||||
@ -1449,11 +1448,11 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def udp_srcip2(self):
|
||||
"""
|
||||
[Jungfrau][Gotthard2] Ip address of the detector (source) udp interface 2.
|
||||
[Jungfrau][Moench][Gotthard2] Ip address of the detector (source) udp interface 2.
|
||||
|
||||
Note
|
||||
-----
|
||||
[Jungfrau] bottom half \n
|
||||
[Jungfrau][Moench] bottom half \n
|
||||
[Gotthard2] veto debugging \n
|
||||
Must be same subnet as destination udp ip2.\n
|
||||
To set IPs for individual modules, use setSourceUDPIP2.
|
||||
@ -1499,7 +1498,7 @@ class Detector(CppDetectorApi):
|
||||
----
|
||||
Default is 50002. \n
|
||||
[Eiger] right half \n
|
||||
[Jungfrau] bottom half \n
|
||||
[Jungfrau][Moench] bottom half \n
|
||||
[Gotthard2] veto debugging \n
|
||||
Ports for each module is calculated (incremented by 2) \n
|
||||
To set ports for individual modules, use setDestinationUDPPort2.
|
||||
@ -1519,7 +1518,7 @@ class Detector(CppDetectorApi):
|
||||
-----
|
||||
[Gotthard] 0, 90, 110, 120, 150, 180, 200 \n
|
||||
[Eiger][Mythen3][Gotthard2] 0 - 200 \n
|
||||
[Jungfrau][Ctb][Moench] 0, 60 - 200
|
||||
[Jungfrau][Moench][Ctb] 0, 60 - 200
|
||||
"""
|
||||
return self.getHighVoltage()
|
||||
|
||||
@ -1642,8 +1641,8 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def master(self):
|
||||
"""
|
||||
[Eiger][Gotthard2][Jungfrau] Sets (half) module to master and other(s) to slaves.\n
|
||||
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau] Gets if the current (half) module is master.
|
||||
[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n
|
||||
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master.
|
||||
"""
|
||||
return self.getMaster()
|
||||
|
||||
@ -1655,7 +1654,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def sync(self):
|
||||
"""
|
||||
[Jungfrau] Enables or disables synchronization between modules.
|
||||
[Jungfrau][Moench] Enables or disables synchronization between modules.
|
||||
"""
|
||||
return self.getSynchronization()
|
||||
|
||||
@ -1809,7 +1808,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def adcreg(self):
|
||||
"""[Jungfrau][Ctb][Moench][Gotthard] Writes to an adc register
|
||||
"""[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -1822,7 +1821,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def adcinvert(self):
|
||||
"""[Ctb][Moench][Jungfrau] ADC Inversion Mask.
|
||||
"""[Ctb][Jungfrau][Moench] ADC Inversion Mask.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -1838,7 +1837,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def triggersl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of triggers left in acquisition.\n
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of triggers left in acquisition.\n
|
||||
|
||||
Note
|
||||
----
|
||||
@ -1851,7 +1850,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def frametime(self):
|
||||
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Timestamp at a frame start.
|
||||
"""[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Timestamp at a frame start.
|
||||
|
||||
Note
|
||||
----
|
||||
@ -1892,14 +1891,22 @@ class Detector(CppDetectorApi):
|
||||
def versions(self):
|
||||
version_list = {'type': self.type,
|
||||
'package': self.packageversion,
|
||||
'client': self.clientversion,
|
||||
'firmware': self.firmwareversion,
|
||||
'detectorserver': self.detectorserverversion,
|
||||
'kernel': self.kernelversion}
|
||||
if self.type != detectorType.EIGER:
|
||||
version_list ['hardware'] = self.hardwareversion
|
||||
'client': self.clientversion}
|
||||
|
||||
if self.type == detectorType.EIGER:
|
||||
version_list ['firmware (Beb)'] = self.firmwareversion
|
||||
version_list ['firmware(Febl)'] = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_LEFT)
|
||||
version_list ['firmware (Febr)'] = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_RIGHT)
|
||||
else:
|
||||
version_list ['firmware'] = self.firmwareversion
|
||||
|
||||
version_list ['detectorserver'] = self.detectorserverversion
|
||||
version_list ['kernel'] = self.kernelversion
|
||||
version_list ['hardware'] = self.hardwareversion
|
||||
|
||||
if self.use_receiver:
|
||||
version_list ['receiver'] = self.rx_version
|
||||
|
||||
return version_list
|
||||
|
||||
@property
|
||||
@ -1967,10 +1974,10 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
[Jungfrau] FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED
|
||||
[Jungfrau][Moench] FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED
|
||||
[Eiger] FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED
|
||||
[Gottthard2] G2_108MHZ (Default), G2_144MHZ
|
||||
[Jungfrau] FULL_SPEED option only available from v2.0 boards and is recommended to set number of interfaces to 2. \n
|
||||
[Jungfrau][Moench] FULL_SPEED option only available from v2.0 boards and is recommended to set number of interfaces to 2. \n
|
||||
Also overwrites adcphase to recommended default.
|
||||
"""
|
||||
return element_if_equal(self.getReadoutSpeed())
|
||||
@ -2056,7 +2063,7 @@ class Detector(CppDetectorApi):
|
||||
Note
|
||||
-----
|
||||
Default: AUTO_TIMING \n
|
||||
[Jungfrau][Gotthard][Ctb][Moench][Gotthard2] AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2] AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||
[Mythen3] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
|
||||
[Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||
"""
|
||||
@ -2215,13 +2222,13 @@ class Detector(CppDetectorApi):
|
||||
def readnrows(self):
|
||||
"""
|
||||
[Eiger] Number of rows to read out per half module starting from the centre.
|
||||
[Jungfrau] Number of rows to read per module starting from the centre.
|
||||
[Jungfrau][Moench] Number of rows to read per module starting from the centre.
|
||||
|
||||
Note
|
||||
----
|
||||
[Eiger] Options: 1 - 256. 256 is default. \n
|
||||
[Eiger]The permissible values depend on dynamic range and 10Gbe enabled.\n\n
|
||||
[Jungfrau] Options: 8 - 512 (multiples of 8)
|
||||
[Jungfrau][Moench] Options: 8 - 512 (multiples of 8)
|
||||
"""
|
||||
return self.getReadNRows()
|
||||
|
||||
@ -2312,7 +2319,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def tengiga(self):
|
||||
"""[Eiger][Ctb][Moench][Mythen3] 10GbE Enable."""
|
||||
"""[Eiger][Ctb][Mythen3] 10GbE Enable."""
|
||||
return self.getTenGiga()
|
||||
|
||||
@tengiga.setter
|
||||
@ -2332,7 +2339,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def flowcontrol10g(self):
|
||||
"""[Eiger][Jungfrau] Enable or disable 10GbE Flow Control."""
|
||||
"""[Eiger][Jungfrau][Moench] Enable or disable 10GbE Flow Control."""
|
||||
return self.getTenGigaFlowControl()
|
||||
|
||||
@flowcontrol10g.setter
|
||||
@ -2352,7 +2359,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def gappixels(self):
|
||||
"""[Eiger][Jungfrau] Include Gap pixels in client data call back in Detecor api. Will not be in detector streaming, receiver file or streaming. Default is disabled. """
|
||||
"""[Eiger][Jungfrau][Moench] Include Gap pixels in client data call back in Detecor api. Will not be in detector streaming, receiver file or streaming. Default is disabled. """
|
||||
return self.getRxAddGapPixels()
|
||||
|
||||
@gappixels.setter
|
||||
@ -2408,7 +2415,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def chipversion(self):
|
||||
"""
|
||||
[Jungfrau] Chip version of module. Can be 1.0 or 1.1.
|
||||
[Jungfrau][Moench] Chip version of module. Can be 1.0 or 1.1.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -2421,7 +2428,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def autocompdisable(self):
|
||||
"""[Jungfrau] Enable or disable auto comparator disable mode.
|
||||
"""[Jungfrau][Moench] Enable or disable auto comparator disable mode.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -2437,7 +2444,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def compdisabletime(self):
|
||||
"""[Jungfrau] Time before end of exposure when comparator is disabled.
|
||||
"""[Jungfrau][Moench] Time before end of exposure when comparator is disabled.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -2483,7 +2490,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def runtime(self):
|
||||
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up.
|
||||
"""[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Time from detector start up.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -2576,7 +2583,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def temp_threshold(self):
|
||||
"""
|
||||
[Jungfrau] Threshold temperature in degrees.
|
||||
[Jungfrau][Moench] Threshold temperature in degrees.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -2593,7 +2600,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def temp_event(self):
|
||||
"""
|
||||
[Jungfrau] 1, if a temperature event occured. \n
|
||||
[Jungfrau][Moench] 1, if a temperature event occured. \n
|
||||
|
||||
Note
|
||||
----
|
||||
@ -2621,7 +2628,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def temp_control(self):
|
||||
"""
|
||||
[Jungfrau] Temperature control enable.
|
||||
[Jungfrau][Moench] Temperature control enable.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -2638,7 +2645,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def selinterface(self):
|
||||
"""[Jungfrau] The udp interface to stream data from detector.
|
||||
"""[Jungfrau][Moench] The udp interface to stream data from detector.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -2658,11 +2665,11 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def gainmode(self):
|
||||
"""
|
||||
[Jungfrau] Detector gain mode. Enum: gainMode
|
||||
[Jungfrau][Moench] Detector gain mode. Enum: gainMode
|
||||
|
||||
Note
|
||||
-----
|
||||
[Jungfrau] DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, FIX_G2, FIX_G0 \n
|
||||
[Jungfrau][Moench] DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, FIX_G2, FIX_G0 \n
|
||||
CAUTION: Do not use FIX_G0 without caution, you can damage the detector!!!
|
||||
"""
|
||||
return element_if_equal(self.getGainMode())
|
||||
@ -2717,14 +2724,14 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def filterresistor(self):
|
||||
"""
|
||||
[Gotthard2][Jungfrau] Set filter resistor. Increasing values for increasing "
|
||||
[Gotthard2][Jungfrau][Moench] Set filter resistor. Increasing values for increasing "
|
||||
"resistance.
|
||||
|
||||
Note
|
||||
----
|
||||
Advanced user command.
|
||||
[Gotthard2] Default is 0. Options: 0-3.
|
||||
[Jungfrau] Default is 1. Options: 0-1.
|
||||
[Jungfrau][Moench] Default is 1. Options: 0-1.
|
||||
"""
|
||||
return self.getFilterResistor()
|
||||
|
||||
@ -2736,11 +2743,11 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def filtercells(self):
|
||||
"""
|
||||
[Jungfrau] Set filter capacitor.
|
||||
[Jungfrau][Moench] Set filter capacitor.
|
||||
|
||||
Note
|
||||
----
|
||||
[Jungfrau] Options: 0-12. Default: 0. Advanced user command. Only for chipv1.1.
|
||||
[Jungfrau][Moench] Options: 0-12. Default: 0. Advanced user command. Only for chipv1.1.
|
||||
"""
|
||||
return self.getNumberOfFilterCells()
|
||||
|
||||
@ -3076,7 +3083,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def adcenable(self):
|
||||
"""[Ctb][Moench] ADC Enable Mask for 1Gb. Enable for each 32 ADC channel."""
|
||||
"""[Ctb] ADC Enable Mask for 1Gb. Enable for each 32 ADC channel."""
|
||||
return self.getADCEnableMask()
|
||||
|
||||
@adcenable.setter
|
||||
@ -3086,7 +3093,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def adcenable10g(self):
|
||||
"""[Ctb][Moench] ADC Enable Mask for 10Gb mode for each 32 ADC channel.
|
||||
"""[Ctb] ADC Enable Mask for 10Gb mode for each 32 ADC channel.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -3103,7 +3110,6 @@ class Detector(CppDetectorApi):
|
||||
def samples(self):
|
||||
"""
|
||||
[CTB] Number of samples (both analog and digitial) expected. \n
|
||||
[Moench] Number of samples (analog only)
|
||||
"""
|
||||
return self.getNumberOfAnalogSamples()
|
||||
|
||||
@ -3114,7 +3120,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def runclk(self):
|
||||
"""[Ctb][Moench] Run clock in MHz."""
|
||||
"""[Ctb] Run clock in MHz."""
|
||||
return self.getRUNClock()
|
||||
|
||||
@runclk.setter
|
||||
@ -3147,7 +3153,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def asamples(self):
|
||||
"""[Ctb][Moench] Number of analog samples expected. """
|
||||
"""[Ctb] Number of analog samples expected. """
|
||||
return element_if_equal(self.getNumberOfAnalogSamples())
|
||||
|
||||
@asamples.setter
|
||||
@ -3167,7 +3173,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def dbitphase(self):
|
||||
"""[Ctb][Jungfrau] Phase shift of clock to latch digital bits. Absolute phase shift.
|
||||
"""[Ctb][Jungfrau][Moench] Phase shift of clock to latch digital bits. Absolute phase shift.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -3219,7 +3225,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def maxdbitphaseshift(self):
|
||||
"""[CTB][Jungfrau] Absolute maximum Phase shift of of the clock to latch digital bits.
|
||||
"""[CTB][Jungfrau][Moench] Absolute maximum Phase shift of of the clock to latch digital bits.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -3266,7 +3272,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def maxadcphaseshift(self):
|
||||
"""[Jungfrau][CTB][Moench] Absolute maximum Phase shift of ADC clock.
|
||||
"""[Jungfrau][Moench][CTB] Absolute maximum Phase shift of ADC clock.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -3278,12 +3284,12 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def adcphase(self):
|
||||
"""[Gotthard][Jungfrau][CTB][Moench] Sets phase shift of ADC clock.
|
||||
"""[Gotthard][Jungfrau][Moench][CTB] Sets phase shift of ADC clock.
|
||||
|
||||
Note
|
||||
-----
|
||||
[Jungfrau] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.\n
|
||||
[Ctb][Moench] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.\n
|
||||
[Jungfrau][Moench] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.\n
|
||||
[Ctb] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.\n
|
||||
[Gotthard] Relative phase shift.
|
||||
|
||||
:getter: Not implemented for Gotthard
|
||||
@ -3297,7 +3303,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def adcpipeline(self):
|
||||
"""[Ctb][Moench] Sets pipeline for ADC clock. """
|
||||
"""[Ctb] Sets pipeline for ADC clock. """
|
||||
return self.getADCPipeline()
|
||||
|
||||
@adcpipeline.setter
|
||||
@ -3307,7 +3313,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def adcclk(self):
|
||||
"""[Ctb][Moench] Sets ADC clock frequency in MHz. """
|
||||
"""[Ctb] Sets ADC clock frequency in MHz. """
|
||||
return self.getADCClock()
|
||||
|
||||
@adcclk.setter
|
||||
@ -3318,7 +3324,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def syncclk(self):
|
||||
"""
|
||||
[Ctb][Moench] Sync clock in MHz.
|
||||
[Ctb] Sync clock in MHz.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -3329,7 +3335,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def pattern(self):
|
||||
"""[Mythen3][Moench][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
|
||||
"""[Mythen3][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
|
||||
|
||||
Note
|
||||
----
|
||||
@ -3351,7 +3357,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patioctrl(self):
|
||||
"""[Ctb][Moench] 64 bit mask defining input (0) and output (1) signals.
|
||||
"""[Ctb] 64 bit mask defining input (0) and output (1) signals.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3368,7 +3374,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patlimits(self):
|
||||
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of complete pattern.
|
||||
"""[Ctb][Mythen3] Limits (start and stop address) of complete pattern.
|
||||
|
||||
Example
|
||||
---------
|
||||
@ -3388,7 +3394,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patsetbit(self):
|
||||
"""[Ctb][Moench][Mythen3] Sets the mask applied to every pattern to the selected bits.
|
||||
"""[Ctb][Mythen3] Sets the mask applied to every pattern to the selected bits.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3405,7 +3411,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patmask(self):
|
||||
"""[Ctb][Moench][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern.
|
||||
"""[Ctb][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3423,7 +3429,7 @@ class Detector(CppDetectorApi):
|
||||
# @element
|
||||
def patwait(self):
|
||||
"""
|
||||
[Ctb][Moench][Mythen3] Wait address of loop level provided.
|
||||
[Ctb][Mythen3] Wait address of loop level provided.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3440,7 +3446,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwait0(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 0 address.
|
||||
"""[Ctb][Mythen3] Wait 0 address.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3460,7 +3466,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwait1(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 1 address.
|
||||
"""[Ctb][Mythen3] Wait 1 address.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3480,7 +3486,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwait2(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 2 address.
|
||||
"""[Ctb][Mythen3] Wait 2 address.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3500,7 +3506,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def patwaittime(self):
|
||||
"""
|
||||
[Ctb][Moench][Mythen3] Wait time in clock cycles of loop level provided.
|
||||
[Ctb][Mythen3] Wait time in clock cycles of loop level provided.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3517,7 +3523,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwaittime0(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 0 time in clock cycles."""
|
||||
"""[Ctb][Mythen3] Wait 0 time in clock cycles."""
|
||||
return self.getPatternWaitTime(0)
|
||||
|
||||
@patwaittime0.setter
|
||||
@ -3528,7 +3534,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwaittime1(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 1 time in clock cycles."""
|
||||
"""[Ctb][Mythen3] Wait 1 time in clock cycles."""
|
||||
return self.getPatternWaitTime(1)
|
||||
|
||||
@patwaittime1.setter
|
||||
@ -3539,7 +3545,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwaittime2(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 2 time in clock cycles."""
|
||||
"""[Ctb][Mythen3] Wait 2 time in clock cycles."""
|
||||
return self.getPatternWaitTime(2)
|
||||
|
||||
@patwaittime2.setter
|
||||
@ -3551,7 +3557,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def patloop(self):
|
||||
"""
|
||||
[Ctb][Moench][Mythen3] Limits (start and stop address) of the loop provided.
|
||||
[Ctb][Mythen3] Limits (start and stop address) of the loop provided.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3568,7 +3574,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patloop0(self):
|
||||
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 0.
|
||||
"""[Ctb][Mythen3] Limits (start and stop address) of loop 0.
|
||||
|
||||
Example
|
||||
---------
|
||||
@ -3588,7 +3594,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patloop1(self):
|
||||
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 1.
|
||||
"""[Ctb][Mythen3] Limits (start and stop address) of loop 1.
|
||||
|
||||
Example
|
||||
---------
|
||||
@ -3609,7 +3615,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patloop2(self):
|
||||
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 2.
|
||||
"""[Ctb][Mythen3] Limits (start and stop address) of loop 2.
|
||||
|
||||
Example
|
||||
---------
|
||||
@ -3631,7 +3637,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def patnloop(self):
|
||||
"""
|
||||
[Ctb][Moench][Mythen3] Number of cycles of the loop provided.
|
||||
[Ctb][Mythen3] Number of cycles of the loop provided.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3648,7 +3654,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patnloop0(self):
|
||||
"""[Ctb][Moench][Mythen3] Number of cycles of loop 0."""
|
||||
"""[Ctb][Mythen3] Number of cycles of loop 0."""
|
||||
return self.getPatternLoopCycles(0)
|
||||
|
||||
@patnloop0.setter
|
||||
@ -3659,7 +3665,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patnloop1(self):
|
||||
"""[Ctb][Moench][Mythen3] Number of cycles of loop 1."""
|
||||
"""[Ctb][Mythen3] Number of cycles of loop 1."""
|
||||
return self.getPatternLoopCycles(1)
|
||||
|
||||
@patnloop1.setter
|
||||
@ -3670,7 +3676,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patnloop2(self):
|
||||
"""[Ctb][Moench][Mythen3] Number of cycles of loop 2."""
|
||||
"""[Ctb][Mythen3] Number of cycles of loop 2."""
|
||||
return self.getPatternLoopCycles(2)
|
||||
|
||||
@patnloop2.setter
|
||||
@ -3741,7 +3747,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def v_limit(self):
|
||||
"""[Ctb][Moench] Soft limit for power supplies (ctb only) and DACS in mV."""
|
||||
"""[Ctb] Soft limit for power supplies (ctb only) and DACS in mV."""
|
||||
return self.getDAC(dacIndex.V_LIMIT, True)
|
||||
|
||||
@v_limit.setter
|
||||
|
@ -61,6 +61,11 @@ void init_det(py::module &m) {
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getFirmwareVersion,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def("getFrontEndFirmwareVersion",
|
||||
(Result<int64_t>(Detector::*)(const defs::fpgaPosition,
|
||||
sls::Positions) const) &
|
||||
Detector::getFrontEndFirmwareVersion,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getDetectorServerVersion",
|
||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||
|
@ -286,6 +286,11 @@ void init_enums(py::module &m) {
|
||||
.value("BOTTOM", slsDetectorDefs::portPosition::BOTTOM)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::fpgaPosition>(Defs, "fpgaPosition")
|
||||
.value("FRONT_LEFT", slsDetectorDefs::fpgaPosition::FRONT_LEFT)
|
||||
.value("FRONT_RIGHT", slsDetectorDefs::fpgaPosition::FRONT_RIGHT)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::streamingInterface>(Defs, "streamingInterface",
|
||||
py::arithmetic())
|
||||
.value("NONE", slsDetectorDefs::streamingInterface::NONE)
|
||||
|
1
serverBin/ctbDetectorServer_developer
Symbolic link
1
serverBin/ctbDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
|
1
serverBin/ctbDetectorServerv7.0.0
Symbolic link
1
serverBin/ctbDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.3
|
1
serverBin/eigerDetectorServer_developer
Symbolic link
1
serverBin/eigerDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
|
1
serverBin/eigerDetectorServerv7.0.0
Symbolic link
1
serverBin/eigerDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.3
|
1
serverBin/gotthard2DetectorServer_developer
Symbolic link
1
serverBin/gotthard2DetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
1
serverBin/gotthard2DetectorServerv7.0.0
Symbolic link
1
serverBin/gotthard2DetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.3
|
1
serverBin/gotthardDetectorServer_developer
Symbolic link
1
serverBin/gotthardDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
1
serverBin/gotthardDetectorServerv7.0.0
Symbolic link
1
serverBin/gotthardDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.3
|
1
serverBin/jungfrauDetectorServer_developer
Symbolic link
1
serverBin/jungfrauDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
1
serverBin/jungfrauDetectorServerv7.0.0
Symbolic link
1
serverBin/jungfrauDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.3
|
1
serverBin/moenchDetectorServer_developer
Symbolic link
1
serverBin/moenchDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
|
1
serverBin/moenchDetectorServerv7.0.0
Symbolic link
1
serverBin/moenchDetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.3
|
1
serverBin/mythen3DetectorServer_developer
Symbolic link
1
serverBin/mythen3DetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
1
serverBin/mythen3DetectorServerv7.0.0
Symbolic link
1
serverBin/mythen3DetectorServerv7.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.3
|
@ -42,7 +42,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||
int sc_width;
|
||||
int sc_height;
|
||||
const int nSamples;
|
||||
int headerSize;
|
||||
|
||||
double ghost[200][25];
|
||||
|
||||
// Single point of definition if we need to customize
|
||||
@ -62,7 +62,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||
moench03T1ReceiverDataNew(int ns = 5000)
|
||||
: slsDetectorData<uint16_t>(400, 400, ns * 2 * 32 + sizeof(header)),
|
||||
nSamples(ns) {
|
||||
headerSize=112;
|
||||
|
||||
int nadc = 32;
|
||||
int sc_width = 25;
|
||||
int sc_height = 200;
|
||||
@ -250,22 +250,13 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||
virtual char *readNextFrame(std::ifstream &filebin, int &ff, int &np,
|
||||
char *data) {
|
||||
np = 0;
|
||||
if (filebin.is_open()) {
|
||||
|
||||
if (filebin.read(data, headerSize)) {
|
||||
ff = getFrameNumber(data);
|
||||
np = getPacketNumber(data);
|
||||
if (np>0)
|
||||
filebin.read(data+headerSize, dataSize-headerSize);
|
||||
return data;
|
||||
}
|
||||
/* if (filebin.read(data, dataSize)) { */
|
||||
/* ff = getFrameNumber(data); */
|
||||
/* np = getPacketNumber(data); */
|
||||
/* return data; */
|
||||
/* } */
|
||||
}
|
||||
|
||||
if (filebin.is_open()) {
|
||||
if (filebin.read(data, dataSize)) {
|
||||
ff = getFrameNumber(data);
|
||||
np = getPacketNumber(data);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,22 @@ class etaInterpolationGlobal : public etaInterpolationBase {
|
||||
|
||||
virtual void prepareInterpolation(int &ok) {
|
||||
ok = 1;
|
||||
#ifdef MYROOT1
|
||||
if (hhx)
|
||||
delete hhx;
|
||||
if (hhy)
|
||||
delete hhy;
|
||||
|
||||
hhx = new TH2D("hhx", "hhx", heta->GetNbinsX(),
|
||||
heta->GetXaxis()->GetXmin(), heta->GetXaxis()->GetXmax(),
|
||||
heta->GetNbinsY(), heta->GetYaxis()->GetXmin(),
|
||||
heta->GetYaxis()->GetXmax());
|
||||
hhy = new TH2D("hhy", "hhy", heta->GetNbinsX(),
|
||||
heta->GetXaxis()->GetXmin(), heta->GetXaxis()->GetXmax(),
|
||||
heta->GetNbinsY(), heta->GetYaxis()->GetXmin(),
|
||||
heta->GetYaxis()->GetXmax());
|
||||
|
||||
#endif
|
||||
|
||||
///*Eta Distribution Rebinning*///
|
||||
double bsize = 1. / nSubPixels; // precision
|
||||
|
@ -357,16 +357,6 @@ class slsInterpolation {
|
||||
}
|
||||
}
|
||||
|
||||
/* cout << "(((" << totquad << "\t" << corner << endl; */
|
||||
/* for (int iy=0; iy<3; iy++) { */
|
||||
/* for (int ix=0; ix<3; ix++) */
|
||||
/* cout << cl[ix+iy*3] <<"\t"; */
|
||||
/* cout << endl; */
|
||||
|
||||
/* } */
|
||||
|
||||
/* cout << ")))" << endl; */
|
||||
|
||||
return corner;
|
||||
}
|
||||
|
||||
@ -380,10 +370,6 @@ class slsInterpolation {
|
||||
etax = r / totquad;
|
||||
etay = t / totquad;
|
||||
}
|
||||
/* cout << "************" << endl; */
|
||||
/* cout << sDum[0][0]<< "\t"<<sDum[0][1] << endl << sDum[1][0]<< "\t"<<sDum[1][1] << endl; */
|
||||
/* cout << "***************" <<endl; */
|
||||
/* cout << etax << " " << etay << endl; */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ int main(int argc, char *argv[]) {
|
||||
#ifndef FF
|
||||
if (argc < 9) {
|
||||
cout << "Wrong usage! Should be: " << argv[0]
|
||||
<< " infile etafile outfile runmin runmax ns [cmin cmax xmin xmax ymin ymax]" << endl;
|
||||
<< " infile etafile outfile runmin runmax ns cmin cmax" << endl;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
@ -41,7 +41,7 @@ int main(int argc, char *argv[]) {
|
||||
#ifdef FF
|
||||
if (argc < 7) {
|
||||
cout << "Wrong usage! Should be: " << argv[0]
|
||||
<< " infile etafile runmin runmax [cmin cmax xmin xmax ymin ymax]" << endl;
|
||||
<< " infile etafile runmin runmax cmin cmax" << endl;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
@ -65,30 +65,13 @@ int main(int argc, char *argv[]) {
|
||||
nsubpix = atoi(argv[iarg++]);
|
||||
cout << "Subpix: " << nsubpix << endl;
|
||||
#endif
|
||||
|
||||
float cmin = 0;
|
||||
float cmax=1000000;
|
||||
if (argc>iarg)
|
||||
cmin=atof(argv[iarg++]);
|
||||
if (argc>iarg)
|
||||
cmax= atof(argv[iarg++]);
|
||||
float cmin = atof(argv[iarg++]);
|
||||
float cmax = atof(argv[iarg++]);
|
||||
cout << "Energy min: " << cmin << endl;
|
||||
cout << "Energy max: " << cmax << endl;
|
||||
int xmin=0, xmax=NC, ymin=0, ymax=NR;
|
||||
|
||||
if (argc>iarg)
|
||||
xmin=atof(argv[iarg++]);
|
||||
if (argc>iarg)
|
||||
xmax= atof(argv[iarg++]);
|
||||
|
||||
if (argc>iarg)
|
||||
ymin=atof(argv[iarg++]);
|
||||
if (argc>iarg)
|
||||
ymax= atof(argv[iarg++]);
|
||||
|
||||
// int etabins=500;
|
||||
int etabins = 1000; // nsubpix*2*100;
|
||||
double etamin = -0.25, etamax = 1.25;
|
||||
double etamin = -1, etamax = 2;
|
||||
// double etamin=-0.1, etamax=1.1;
|
||||
// double eta3min = -2, eta3max = 2;
|
||||
double sum, totquad;
|
||||
@ -97,7 +80,7 @@ int main(int argc, char *argv[]) {
|
||||
// double eta3x, eta3y, int3_x, int3_y, noint_x, noint_y;
|
||||
|
||||
int ix, iy, isx, isy;
|
||||
int nframes = 0, lastframe = -1, iframe, nphFrame;
|
||||
int nframes = 0, lastframe = -1;
|
||||
//double d_x, d_y, res = 5, xx, yy;
|
||||
int nph = 0, totph = 0;
|
||||
//badph = 0,
|
||||
@ -115,7 +98,7 @@ int main(int argc, char *argv[]) {
|
||||
// int nSubPixels = nsubpix;
|
||||
#ifndef NOINTERPOLATION
|
||||
eta2InterpolationPosXY *interp =
|
||||
new eta2InterpolationPosXY(NC, NR, nsubpix, nsubpix, etabins, etabins, etamin, etamax);
|
||||
new eta2InterpolationPosXY(NC, NR, nsubpix, etabins, etamin, etamax);
|
||||
// eta2InterpolationCleverAdaptiveBins *interp=new
|
||||
// eta2InterpolationCleverAdaptiveBins(NC, NR, nsubpix, etabins, etamin,
|
||||
// etamax);
|
||||
@ -124,8 +107,8 @@ int main(int argc, char *argv[]) {
|
||||
noInterpolation *interp = new noInterpolation(NC, NR, nsubpix);
|
||||
#endif
|
||||
|
||||
int quad;
|
||||
#ifndef FF
|
||||
int quad;
|
||||
#ifndef NOINTERPOLATION
|
||||
char fname[10000];
|
||||
int ok;
|
||||
@ -159,26 +142,19 @@ int main(int argc, char *argv[]) {
|
||||
#endif
|
||||
|
||||
int irun;
|
||||
for (irun = runmin; irun <= runmax; irun++) {
|
||||
for (irun = runmin; irun < runmax; irun++) {
|
||||
sprintf(infname, argv[1], irun);
|
||||
#ifndef FF
|
||||
sprintf(outfname, argv[3], irun);
|
||||
#endif
|
||||
|
||||
|
||||
f = fopen(infname, "r");
|
||||
if (f) {
|
||||
cout << infname << endl;
|
||||
nframes = 0;
|
||||
//f0 = -1;
|
||||
|
||||
//iff=0;
|
||||
while (fread((void*)&iframe, 1, sizeof(int), f)) {
|
||||
//n=0;
|
||||
if (fread((void*)&nphFrame, 1, sizeof(int), f)) {
|
||||
for (int iph=0; iph<nphFrame; iph++) {
|
||||
//while (cl.read(f)) {
|
||||
if (cl.read(f)) {
|
||||
while (cl.read(f)) {
|
||||
totph++;
|
||||
if (lastframe != cl.iframe) {
|
||||
lastframe = cl.iframe;
|
||||
@ -189,28 +165,18 @@ int main(int argc, char *argv[]) {
|
||||
nframes++;
|
||||
}
|
||||
// quad=interp->calcQuad(cl.get_cluster(), sum, totquad, sDum);
|
||||
// #ifndef FF
|
||||
// quad = interp->calcEta(cl.get_cluster(), etax, etay, sum,
|
||||
// totquad, sDum);
|
||||
// #endif
|
||||
// #ifdef FF
|
||||
|
||||
#ifndef FF
|
||||
quad = interp->calcEta(cl.get_cluster(), etax, etay, sum,
|
||||
totquad, sDum);
|
||||
|
||||
|
||||
/* cl.print();
|
||||
cout << "(" << etax <<","<< etay <<")"<< quad<< endl;
|
||||
*/
|
||||
//#endif
|
||||
#endif
|
||||
#ifdef FF
|
||||
interp->calcEta(cl.get_cluster(), etax, etay, sum,
|
||||
totquad, sDum);
|
||||
#endif
|
||||
|
||||
if (totquad > cmin && cl.x >= xmin && cl.x <= xmax &&
|
||||
cl.y >= ymin && cl.y <= ymax &&
|
||||
totquad < cmax) {
|
||||
|
||||
// if (sum > cmin && totquad / sum > 0.8 && totquad / sum < 1.2 &&
|
||||
// sum < cmax) {
|
||||
nph++;
|
||||
if (sum > cmin && totquad / sum > 0.8 && totquad / sum < 1.2 &&
|
||||
sum < cmax) {
|
||||
nph++;
|
||||
// if (sum>200 && sum<580) {
|
||||
// interp->getInterpolatedPosition(cl.x,cl.y,
|
||||
// totquad,quad,cl.get_cluster(),int_x, int_y);
|
||||
@ -261,12 +227,9 @@ int main(int argc, char *argv[]) {
|
||||
#ifdef FF
|
||||
interp->writeFlatField(outfname);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
#ifdef FF
|
||||
|
@ -304,38 +304,18 @@ int main(int argc, char *argv[]) {
|
||||
int ifile = 0;
|
||||
|
||||
mt->setFrameMode(eFrame);
|
||||
int filelist=0;
|
||||
ifstream flist;
|
||||
flist.open (fformat, std::ifstream::in);
|
||||
if (flist.is_open()) {
|
||||
runmin=0;
|
||||
runmax=0;
|
||||
while (flist.getline(ffname,10000)){
|
||||
cout << ffname << endl;
|
||||
runmax++;
|
||||
}
|
||||
runmax--;
|
||||
flist.close();
|
||||
cout << "Found " << runmax << " files " << endl;
|
||||
flist.open (fformat, std::ifstream::in);
|
||||
}
|
||||
|
||||
for (int irun = runmin; irun <= runmax; irun++) {
|
||||
cout << "DATA ";
|
||||
// sprintf(fn,fformat,irun);
|
||||
if (flist.is_open()) {
|
||||
flist.getline(ffname,10000);
|
||||
cout << "file list " << ffname << endl;
|
||||
} else {
|
||||
sprintf(ffname,(const char*)fformat,irun);
|
||||
cout << "loop " << ffname << endl;
|
||||
}
|
||||
cout << "ffname "<<ffname << endl;
|
||||
sprintf(fname, "%s/%s.raw",indir,ffname);
|
||||
sprintf(imgfname, "%s/%s.tiff",outdir,ffname);
|
||||
sprintf(cfname, "%s/%s.clust",outdir,ffname);
|
||||
sprintf(ffname, "%s/%s.raw", indir, fformat);
|
||||
sprintf(fname, (const char*)ffname, irun);
|
||||
sprintf(ffname, "%s/%s.tiff", outdir, fformat);
|
||||
sprintf(imgfname, (const char*)ffname, irun);
|
||||
sprintf(ffname, "%s/%s.clust", outdir, fformat);
|
||||
sprintf(cfname, (const char*)ffname, irun);
|
||||
cout << fname << " ";
|
||||
cout << imgfname << " " << cfname << endl;
|
||||
cout << imgfname << endl;
|
||||
std::time(&end_time);
|
||||
cout << std::ctime(&end_time) << endl;
|
||||
// cout << fname << " " << outfname << " " << imgfname << endl;
|
||||
@ -369,15 +349,13 @@ int main(int argc, char *argv[]) {
|
||||
mt->popFree(buff);
|
||||
|
||||
ifr++;
|
||||
if (ifr % 10000 == 0)
|
||||
if (ifr % 100 == 0)
|
||||
cout << ifr << " " << ff << endl;
|
||||
if (nframes > 0) {
|
||||
if (ifr % nframes == 0) {
|
||||
|
||||
sprintf(imgfname, "%s/%s_f%05d.tiff",outdir,ffname,ifile);
|
||||
|
||||
while (mt->isBusy())
|
||||
;
|
||||
sprintf(ffname, "%s/%s_f%05d.tiff", outdir, fformat,
|
||||
ifile);
|
||||
sprintf(imgfname, (const char*)ffname, irun);
|
||||
mt->writeImage(imgfname, thr1);
|
||||
mt->clearImage();
|
||||
ifile++;
|
||||
@ -396,13 +374,13 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
if (nframes >= 0) {
|
||||
if (nframes > 0) {
|
||||
sprintf(imgfname, "%s/%s_f%05d.tiff",outdir,ffname,ifile);
|
||||
sprintf(ffname, "%s/%s_f%05d.tiff", outdir, fformat, ifile);
|
||||
sprintf(imgfname, (const char*)ffname, irun);
|
||||
} else {
|
||||
sprintf(imgfname, "%s/%s_f%05d.tiff",outdir,ffname,ifile);
|
||||
sprintf(ffname, "%s/%s.tiff", outdir, fformat);
|
||||
sprintf(imgfname, (const char*)ffname, irun);
|
||||
}
|
||||
cout << "Writing tiff to " << imgfname << " " << thr1 << endl;
|
||||
while (mt->isBusy())
|
||||
;
|
||||
mt->writeImage(imgfname, thr1);
|
||||
mt->clearImage();
|
||||
if (of) {
|
||||
@ -417,12 +395,11 @@ int main(int argc, char *argv[]) {
|
||||
cout << "Could not open " << fname << " for reading " << endl;
|
||||
}
|
||||
if (nframes < 0) {
|
||||
sprintf(imgfname, "%s/%s_tot.tiff",outdir,ffname);
|
||||
cout << "Writing tiff to " << imgfname << " " << thr1 << endl;
|
||||
mt->writeImage(imgfname, thr1);
|
||||
}
|
||||
if (flist.is_open()) {
|
||||
flist.close();
|
||||
sprintf(ffname, "%s/%s.tiff", outdir, fformat);
|
||||
strcpy(imgfname, ffname);
|
||||
cout << "Writing tiff to " << imgfname << " " << thr1 << endl;
|
||||
mt->writeImage(imgfname, thr1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -720,22 +720,6 @@ int main(int argc, char *argv[]) {
|
||||
ymin >> ymax;
|
||||
}
|
||||
|
||||
if (addJsonHeader.find("xMin") != addJsonHeader.end()) {
|
||||
istringstream(addJsonHeader.at("xMin")) >> xmin;
|
||||
}
|
||||
|
||||
if (addJsonHeader.find("yMin") != addJsonHeader.end()) {
|
||||
istringstream(addJsonHeader.at("yMin")) >> ymin;
|
||||
}
|
||||
|
||||
if (addJsonHeader.find("xMax") != addJsonHeader.end()) {
|
||||
istringstream(addJsonHeader.at("xMax")) >> xmax;
|
||||
}
|
||||
|
||||
if (addJsonHeader.find("yMax") != addJsonHeader.end()) {
|
||||
istringstream(addJsonHeader.at("yMax")) >> ymax;
|
||||
}
|
||||
|
||||
cprintf(MAGENTA, "%d %d %d %d\n", xmin, xmax, ymin, ymax);
|
||||
mt->setROI(xmin, xmax, ymin, ymax);
|
||||
if (addJsonHeader.find("dynamicRange") != addJsonHeader.end()) {
|
||||
|
@ -533,7 +533,7 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
|
||||
(clusters + nph)->print();
|
||||
cout << max << " " << val[iy * nx + ix] << endl;
|
||||
}
|
||||
//good = 1;
|
||||
good = 1;
|
||||
if (eMin > 0 && tot < eMin)
|
||||
good = 0;
|
||||
if (eMax > 0 && tot > eMax)
|
||||
@ -542,7 +542,7 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
|
||||
nph++;
|
||||
image[iy * nx + ix]++;
|
||||
}
|
||||
good=1;
|
||||
|
||||
} else if (ee == PEDESTAL) {
|
||||
addToPedestal(data, ix, iy, cm);
|
||||
} /*else {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -32,7 +32,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void SetNumFrames(int val);
|
||||
void SetNumTriggers(int val);
|
||||
void SetNumBursts(int val);
|
||||
void SetNumSamples(int val);
|
||||
void SetNumGates(int val);
|
||||
void SetExposureTime();
|
||||
void SetAcquisitionPeriod();
|
||||
@ -64,7 +63,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void GetNumFrames();
|
||||
void GetNumTriggers();
|
||||
void GetNumBursts();
|
||||
void GetNumSamples();
|
||||
void GetNumGates();
|
||||
void GetExposureTime();
|
||||
void GetAcquisitionPeriod();
|
||||
@ -96,7 +94,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
QString errPeriodTip;
|
||||
QPalette red;
|
||||
bool delayImplemented;
|
||||
bool sampleImplemented;
|
||||
bool gateImplemented;
|
||||
bool startingFnumImplemented;
|
||||
bool isAcquisitionStopped{false};
|
||||
|
@ -52,6 +52,7 @@ void qDrawPlot::SetupWidgetWindow() {
|
||||
detType = det->getDetectorType().squash();
|
||||
switch (detType) {
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
pixelMask = ((1 << 14) - 1);
|
||||
gainMask = (3 << 14);
|
||||
gainOffset = 14;
|
||||
@ -193,7 +194,6 @@ void qDrawPlot::SetupPlots() {
|
||||
gainplot2d = new SlsQt2DPlot(boxPlot, true);
|
||||
gainplot2d->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY, -0.5,
|
||||
nPixelsY - 0.5, gainData);
|
||||
gainplot2d->Update();
|
||||
gainplot2d->hide();
|
||||
connect(plot2d, SIGNAL(PlotZoomedSignal(const QRectF &)), this,
|
||||
SLOT(Zoom2DGainPlot(const QRectF &)));
|
||||
@ -1010,7 +1010,6 @@ void qDrawPlot::Update2dPlot() {
|
||||
if (isGainDataExtracted) {
|
||||
gainplot2d->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY, -0.5,
|
||||
nPixelsY - 0.5, gainData);
|
||||
gainplot2d->Update();
|
||||
if (!gainplot2d->isVisible()) {
|
||||
gainplot2d->setFixedWidth(plot2d->width() /
|
||||
qDefs::DATA_GAIN_PLOT_RATIO);
|
||||
@ -1144,7 +1143,8 @@ void qDrawPlot::toDoublePixelData(double *dest, char *source, int size,
|
||||
break;
|
||||
|
||||
case 16:
|
||||
if (detType == slsDetectorDefs::JUNGFRAU ||
|
||||
if (detType == slsDetectorDefs::MOENCH ||
|
||||
detType == slsDetectorDefs::JUNGFRAU ||
|
||||
detType == slsDetectorDefs::GOTTHARD2) {
|
||||
|
||||
// show gain plot
|
||||
|
@ -48,6 +48,10 @@ void qTabAdvanced::SetupWidgetWindow() {
|
||||
lblDiscardBits->setEnabled(true);
|
||||
spinDiscardBits->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
lblNumStoragecells->setEnabled(true);
|
||||
spinNumStoragecells->setEnabled(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -40,13 +40,11 @@ void qTabDataOutput::SetupWidgetWindow() {
|
||||
comboClkDivider->setEnabled(true);
|
||||
chkParallel->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::MOENCH:
|
||||
chkTenGiga->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
chkParallel->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
lblClkDivider->setEnabled(true);
|
||||
comboClkDivider->setEnabled(true);
|
||||
break;
|
||||
|
@ -111,6 +111,7 @@ void qTabDeveloper::SetupWidgetWindow() {
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"v vb comp: ", getSLSIndex(detType, tempid++)));
|
||||
@ -139,72 +140,6 @@ void qTabDeveloper::SetupWidgetWindow() {
|
||||
"Temperature ADC: ", getSLSIndex(detType, tempid++)));
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MOENCH:
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vbp_colbuf: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vipre: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vin_cm: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vb_sda: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vcasc_sfp: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vout_cm: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vipre_cds: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"ibias_sfp: ", getSLSIndex(detType, tempid++)));
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vcassh: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vth2: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vrshaper: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vrshaper_n: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vipre_out: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vth3: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vth1: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vicin: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vcas: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vrpreamp: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vcal_p: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vipre: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vishaper: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vcal_n: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vtrim: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(
|
||||
this, det, true, "vdcsh: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
"vthreshold: ", getSLSIndex(detType, tempid++)));
|
||||
adcWidgets.push_back(new qDacWidget(
|
||||
this, det, false,
|
||||
"Temperature FPGA: ", getSLSIndex(detType, tempid++)));
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
dacWidgets.push_back(
|
||||
new qDacWidget(this, det, true,
|
||||
@ -386,6 +321,7 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
switch (index) {
|
||||
case 0:
|
||||
return slsDetectorDefs::VB_COMP;
|
||||
@ -411,30 +347,6 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
|
||||
}
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MOENCH:
|
||||
switch (index) {
|
||||
case 0:
|
||||
return slsDetectorDefs::VBP_COLBUF;
|
||||
case 1:
|
||||
return slsDetectorDefs::VIPRE;
|
||||
case 2:
|
||||
return slsDetectorDefs::VIN_CM;
|
||||
case 3:
|
||||
return slsDetectorDefs::VB_SDA;
|
||||
case 4:
|
||||
return slsDetectorDefs::VCASC_SFP;
|
||||
case 5:
|
||||
return slsDetectorDefs::VOUT_CM;
|
||||
case 6:
|
||||
return slsDetectorDefs::VIPRE_CDS;
|
||||
case 7:
|
||||
return slsDetectorDefs::IBIAS_SFP;
|
||||
default:
|
||||
throw RuntimeError(std::string("Unknown dac/adc index") +
|
||||
std::to_string(index));
|
||||
}
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
switch (index) {
|
||||
case 0:
|
||||
|
@ -35,7 +35,6 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
// timer to update the progress bar
|
||||
progressTimer = new QTimer(this);
|
||||
|
||||
sampleImplemented = false;
|
||||
gateImplemented = false;
|
||||
delayImplemented = true;
|
||||
startingFnumImplemented = false;
|
||||
@ -47,18 +46,11 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
// default is triggers and delay (not #bursts and burst period for gotthard2
|
||||
// in auto mode)
|
||||
ShowTriggerDelay();
|
||||
// default is to show samples, mythen3, show gates
|
||||
ShowGates();
|
||||
|
||||
// enabling according to det type
|
||||
lblBurstMode->hide();
|
||||
comboBurstMode->hide();
|
||||
switch (det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::MOENCH:
|
||||
lblNumSamples->setEnabled(true);
|
||||
spinNumSamples->setEnabled(true);
|
||||
sampleImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
delayImplemented = false;
|
||||
lblNextFrameNumber->setEnabled(true);
|
||||
@ -66,6 +58,7 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
startingFnumImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
lblNextFrameNumber->setEnabled(true);
|
||||
spinNextFrameNumber->setEnabled(true);
|
||||
startingFnumImplemented = true;
|
||||
@ -112,10 +105,6 @@ void qTabMeasurement::Initialization() {
|
||||
connect(spinNumBursts, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumBursts(int)));
|
||||
}
|
||||
if (spinNumSamples->isEnabled()) {
|
||||
connect(spinNumSamples, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumSamples(int)));
|
||||
}
|
||||
if (gateImplemented) {
|
||||
connect(spinNumGates, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumGates(int)));
|
||||
@ -198,16 +187,6 @@ void qTabMeasurement::ShowTriggerDelay() {
|
||||
}
|
||||
}
|
||||
|
||||
void qTabMeasurement::ShowGates() {
|
||||
if (det->getDetectorType().squash() == slsDetectorDefs::MYTHEN3) {
|
||||
stackedLblSamplesGates->setCurrentWidget(pageLblGates);
|
||||
stackedSpinSamplesGates->setCurrentWidget(pageSpinGates);
|
||||
} else {
|
||||
stackedLblSamplesGates->setCurrentWidget(pageLblSamples);
|
||||
stackedSpinSamplesGates->setCurrentWidget(pageSpinSamples);
|
||||
}
|
||||
}
|
||||
|
||||
void qTabMeasurement::SetupTimingMode() {
|
||||
QStandardItemModel *model =
|
||||
qobject_cast<QStandardItemModel *>(comboTimingMode->model());
|
||||
@ -510,31 +489,6 @@ void qTabMeasurement::SetNumBursts(int val) {
|
||||
&qTabMeasurement::GetNumBursts)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetNumSamples() {
|
||||
LOG(logDEBUG) << "Getting number of samples";
|
||||
disconnect(spinNumSamples, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumSamples(int)));
|
||||
try {
|
||||
auto retval = det->getNumberOfAnalogSamples().tsquash(
|
||||
"Inconsistent number of analog samples for all detectors.");
|
||||
spinNumSamples->setValue(retval);
|
||||
}
|
||||
CATCH_DISPLAY("Could not get number of samples.",
|
||||
"qTabMeasurement::GetNumSamples")
|
||||
connect(spinNumSamples, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNumSamples(int)));
|
||||
}
|
||||
|
||||
void qTabMeasurement::SetNumSamples(int val) {
|
||||
LOG(logINFO) << "Setting number of samples to " << val;
|
||||
try {
|
||||
det->setNumberOfAnalogSamples(val);
|
||||
}
|
||||
CATCH_HANDLE("Could not set number of samples.",
|
||||
"qTabMeasurement::SetNumSamples", this,
|
||||
&qTabMeasurement::GetNumSamples)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetNumGates() {
|
||||
LOG(logDEBUG) << "Getting number of gates";
|
||||
disconnect(spinNumGates, SIGNAL(valueChanged(int)), this,
|
||||
@ -849,9 +803,8 @@ void qTabMeasurement::GetNextFrameNumber() {
|
||||
"Inconsistent starting frame number for all detectors.");
|
||||
spinNextFrameNumber->setValue(retval);
|
||||
}
|
||||
CATCH_HANDLE("Could not get starting frame number.",
|
||||
"qTabMeasurement::GetNextFrameNumber", spinNextFrameNumber,
|
||||
&QSpinBox::setValue, -1)
|
||||
CATCH_DISPLAY("Could not get starting frame number.",
|
||||
"qTabMeasurement::GetNextFrameNumber")
|
||||
connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetNextFrameNumber(int)));
|
||||
}
|
||||
@ -1004,9 +957,6 @@ void qTabMeasurement::Refresh() {
|
||||
if (spinBurstPeriod->isEnabled()) {
|
||||
GetBurstPeriod();
|
||||
}
|
||||
if (sampleImplemented) {
|
||||
GetNumSamples();
|
||||
}
|
||||
if (gateImplemented) {
|
||||
GetNumGates();
|
||||
}
|
||||
|
@ -62,6 +62,11 @@ void qTabPlot::SetupWidgetWindow() {
|
||||
chkGainPlot->setChecked(true);
|
||||
plot->EnableGainPlot(true);
|
||||
break;
|
||||
case slsDetectorDefs::MOENCH:
|
||||
chkGainPlot->setEnabled(true);
|
||||
chkGainPlot->setChecked(true);
|
||||
plot->EnableGainPlot(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -799,6 +804,9 @@ void qTabPlot::Refresh() {
|
||||
chkGainPlot->setEnabled(true);
|
||||
GetGapPixels();
|
||||
break;
|
||||
case slsDetectorDefs::MOENCH:
|
||||
chkGainPlot->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
chkGainPlot1D->setEnabled(true);
|
||||
break;
|
||||
|
@ -92,7 +92,8 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
comboDynamicRange->setEnabled(true);
|
||||
lblThreshold->setEnabled(true);
|
||||
spinThreshold->setEnabled(true);
|
||||
} else if (detType == slsDetectorDefs::JUNGFRAU) {
|
||||
} else if (detType == slsDetectorDefs::JUNGFRAU ||
|
||||
detType == slsDetectorDefs::MOENCH) {
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
lblGainMode->setEnabled(true);
|
||||
@ -100,9 +101,6 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
} else if (detType == slsDetectorDefs::GOTTHARD) {
|
||||
comboHV->show();
|
||||
lblComboHV->show();
|
||||
} else if (detType == slsDetectorDefs::MOENCH) {
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
} else if (detType == slsDetectorDefs::GOTTHARD2) {
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
@ -132,7 +130,7 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
}
|
||||
|
||||
void qTabSettings::SetExportMode(bool exportMode) {
|
||||
if (comboGainMode->isEnabled()) {
|
||||
if (comboGainMode->isVisible()) {
|
||||
ShowFixG0(exportMode);
|
||||
}
|
||||
}
|
||||
|
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
Executable file
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
@ -1742,6 +1742,7 @@ int Feb_Control_WriteRegister_BitMask(uint32_t offset, uint32_t data,
|
||||
|
||||
int Feb_Control_ReadRegister_BitMask(uint32_t offset, uint32_t *retval,
|
||||
uint32_t bitmask) {
|
||||
|
||||
uint32_t actualOffset = offset;
|
||||
char side[2][10] = {"right", "left"};
|
||||
unsigned int addr[2] = {Feb_Control_rightAddress, Feb_Control_leftAddress};
|
||||
@ -2206,6 +2207,51 @@ int Feb_Control_GetRightFPGATemp() {
|
||||
return (int)temperature;
|
||||
}
|
||||
|
||||
int Feb_Control_GetFPGAHardwareVersion(int *retval) {
|
||||
if (!Feb_Control_activated) {
|
||||
return 0;
|
||||
}
|
||||
unsigned int value = 0;
|
||||
if (!Feb_Control_ReadRegister_BitMask(FEB_REG_STATUS, &value,
|
||||
FEB_REG_STATUS_FX30_MSK)) {
|
||||
LOG(logERROR,
|
||||
("Trouble reading FEB_REG_STATUS reg to feb hardware version\n"));
|
||||
return 0;
|
||||
}
|
||||
*retval = (value >> FEB_REG_STATUS_FX30_OFST);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int64_t Feb_Control_GetFrontLeftFirmwareVersion() {
|
||||
if (!Feb_Control_activated) {
|
||||
return 0;
|
||||
}
|
||||
unsigned int value = 0;
|
||||
if (!Feb_Interface_ReadRegister(Feb_Control_leftAddress, FEB_REG_STATUS,
|
||||
&value)) {
|
||||
LOG(logERROR, ("Trouble reading FEB_REG_STATUS reg to get left feb "
|
||||
"fw version\n"));
|
||||
return 0;
|
||||
}
|
||||
return ((value & FEB_REG_STATUS_FW_VERSION_MSK) >>
|
||||
FEB_REG_STATUS_FW_VERSION_OFST);
|
||||
}
|
||||
|
||||
int64_t Feb_Control_GetFrontRightFirmwareVersion() {
|
||||
if (!Feb_Control_activated) {
|
||||
return 0;
|
||||
}
|
||||
unsigned int value = 0;
|
||||
if (!Feb_Interface_ReadRegister(Feb_Control_rightAddress, FEB_REG_STATUS,
|
||||
&value)) {
|
||||
LOG(logERROR, ("Trouble reading FEB_REG_STATUS reg to get right feb "
|
||||
"fw version\n"));
|
||||
return 0;
|
||||
}
|
||||
return ((value & FEB_REG_STATUS_FW_VERSION_MSK) >>
|
||||
FEB_REG_STATUS_FW_VERSION_OFST);
|
||||
}
|
||||
|
||||
int64_t Feb_Control_GetMeasuredPeriod() {
|
||||
if (!Feb_Control_activated) {
|
||||
return 0;
|
||||
|
@ -119,5 +119,7 @@ int Feb_Control_PrintCorrectedValues();
|
||||
// adcs
|
||||
int Feb_Control_GetLeftFPGATemp();
|
||||
int Feb_Control_GetRightFPGATemp();
|
||||
int64_t Feb_Control_GetFrontLeftFirmwareVersion();
|
||||
int64_t Feb_Control_GetFrontRightFirmwareVersion();
|
||||
int64_t Feb_Control_GetMeasuredPeriod();
|
||||
int64_t Feb_Control_GetSubMeasuredPeriod();
|
||||
|
@ -46,6 +46,10 @@
|
||||
#define FEB_REG_STATUS_WAIT_FOR_TRGGR_MSK (0x00000001 << FEB_REG_STATUS_WAIT_FOR_TRGGR_OFST)
|
||||
#define FEB_REG_STATUS_ACQ_DONE_OFST (6)
|
||||
#define FEB_REG_STATUS_ACQ_DONE_MSK (0x00000001 << FEB_REG_STATUS_ACQ_DONE_OFST)
|
||||
#define FEB_REG_STATUS_FX30_OFST (7)
|
||||
#define FEB_REG_STATUS_FX30_MSK (0x00000001 << FEB_REG_STATUS_FX30_OFST)
|
||||
#define FEB_REG_STATUS_FW_VERSION_OFST (8)
|
||||
#define FEB_REG_STATUS_FW_VERSION_MSK (0x000000FF << FEB_REG_STATUS_FW_VERSION_OFST)
|
||||
#define FEB_REG_STATUS_TEMP_OFST (16)
|
||||
#define FEB_REG_STATUS_TEMP_MSK (0x0000FFFF << FEB_REG_STATUS_TEMP_OFST)
|
||||
|
||||
|
BIN
slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
Executable file
BIN
slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
@ -123,18 +123,18 @@ void basictests() {
|
||||
int64_t sw_fw_apiversion = getFirmwareAPIVersion();
|
||||
|
||||
LOG(logINFOBLUE,
|
||||
("**************************************************\n"
|
||||
"Detector IP Addr:\t\t 0x%x\n"
|
||||
"Detector MAC Addr:\t\t 0x%llx\n"
|
||||
("\n********************************************************\n"
|
||||
"Detector IP Addr : 0x%x\n"
|
||||
"Detector MAC Addr : 0x%llx\n"
|
||||
|
||||
"Firmware Version:\t\t %lld\n"
|
||||
"Software Version:\t\t %s\n"
|
||||
"F/w-S/w API Version:\t\t %lld\n"
|
||||
"Required Firmware Version:\t %d\n"
|
||||
"Firmware (Beb) Version : %lld\n"
|
||||
"F/w-S/w API Version : %lld\n"
|
||||
"Required Firmware Version: %d\n"
|
||||
"Software Version : %s\n"
|
||||
"********************************************************\n",
|
||||
(unsigned int)ipadd, (long long unsigned int)macadd,
|
||||
(long long int)fwversion, swversion, (long long int)sw_fw_apiversion,
|
||||
REQUIRED_FIRMWARE_VERSION));
|
||||
(long long int)fwversion,
|
||||
(long long int)sw_fw_apiversion, REQUIRED_FIRMWARE_VERSION, swversion));
|
||||
|
||||
// update default udpdstip and udpdstmac (1g is hardware ip and hardware
|
||||
// mac)
|
||||
@ -161,9 +161,9 @@ void basictests() {
|
||||
// check for API compatibility - old server
|
||||
if (sw_fw_apiversion > REQUIRED_FIRMWARE_VERSION) {
|
||||
sprintf(initErrorMessage,
|
||||
"This firmware-software api version (0x%llx) is incompatible "
|
||||
"This firmware-software api version (0x%lld) is incompatible "
|
||||
"with the software's minimum required firmware version "
|
||||
"(0x%llx).\nPlease update detector software to be compatible "
|
||||
"(0x%lld).\nPlease update detector software to be compatible "
|
||||
"with this firmware.\n",
|
||||
(long long int)sw_fw_apiversion,
|
||||
(long long int)REQUIRED_FIRMWARE_VERSION);
|
||||
@ -210,20 +210,70 @@ void getServerVersion(char *version) { strcpy(version, APIEIGER); }
|
||||
|
||||
u_int64_t getFirmwareVersion() {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
return REQUIRED_FIRMWARE_VERSION;
|
||||
#else
|
||||
return Beb_GetFirmwareRevision();
|
||||
#endif
|
||||
}
|
||||
|
||||
uint64_t getFrontEndFirmwareVersion(enum fpgaPosition fpgaPosition) {
|
||||
uint64_t retval = 0;
|
||||
#ifdef VIRTUAL
|
||||
return REQUIRED_FIRMWARE_VERSION;
|
||||
#else
|
||||
sharedMemory_lockLocalLink();
|
||||
switch (fpgaPosition) {
|
||||
case FRONT_LEFT:
|
||||
retval = Feb_Control_GetFrontLeftFirmwareVersion(fpgaPosition);
|
||||
break;
|
||||
case FRONT_RIGHT:
|
||||
retval = Feb_Control_GetFrontRightFirmwareVersion(fpgaPosition);
|
||||
break;
|
||||
default:
|
||||
LOG(logERROR,
|
||||
("unknown index for fpga position to read firmware version\n"));
|
||||
retval = 0;
|
||||
}
|
||||
sharedMemory_unlockLocalLink();
|
||||
#endif
|
||||
return retval;
|
||||
}
|
||||
|
||||
u_int64_t getFirmwareAPIVersion() {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
return REQUIRED_FIRMWARE_VERSION;
|
||||
#else
|
||||
return (u_int64_t)Beb_GetFirmwareSoftwareAPIVersion();
|
||||
return Beb_GetFirmwareSoftwareAPIVersion();
|
||||
#endif
|
||||
}
|
||||
|
||||
void getHardwareVersion(char *version) {
|
||||
strcpy(version, "unknown");
|
||||
int hwversion = getHardwareVersionNumber();
|
||||
const int hwNumberList[] = HARDWARE_VERSION_NUMBERS;
|
||||
const char *hwNamesList[] = HARDWARE_VERSION_NAMES;
|
||||
for (int i = 0; i != NUM_HARDWARE_VERSIONS; ++i) {
|
||||
LOG(logDEBUG, ("0x%x %d 0x%x %s\n", hwversion, i, hwNumberList[i],
|
||||
hwNamesList[i]));
|
||||
if (hwNumberList[i] == hwversion) {
|
||||
strcpy(version, hwNamesList[i]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int getHardwareVersionNumber() {
|
||||
int retval = 0;
|
||||
#ifndef VIRTUAL
|
||||
sharedMemory_lockLocalLink();
|
||||
if (!Feb_Control_GetFPGAHardwareVersion(&retval)) {
|
||||
retval = -1;
|
||||
}
|
||||
sharedMemory_unlockLocalLink();
|
||||
#endif
|
||||
return retval;
|
||||
}
|
||||
|
||||
int getModuleId(int *ret, char *mess) {
|
||||
return getModuleIdInFile(ret, mess, ID_FILE);
|
||||
}
|
||||
@ -355,6 +405,36 @@ void initControlServer() {
|
||||
Beb_SetTopVariable(top);
|
||||
Beb_Beb();
|
||||
LOG(logDEBUG1, ("Control server: BEB Initialization done\n"));
|
||||
|
||||
// Getting the feb versions after initialization
|
||||
char hversion[MAX_STR_LENGTH] = {0};
|
||||
memset(hversion, 0, MAX_STR_LENGTH);
|
||||
getHardwareVersion(hversion);
|
||||
int64_t fwversion = getFirmwareVersion();
|
||||
int64_t feblfwversion = getFrontEndFirmwareVersion(FRONT_LEFT);
|
||||
int64_t febrfwversion = getFrontEndFirmwareVersion(FRONT_RIGHT);
|
||||
LOG(logINFOBLUE,
|
||||
("\n********************************************************\n"
|
||||
"Feb Versions\n"
|
||||
"Hardware Version : %s\n"
|
||||
"Firmware (Febl) Version : %lld\n"
|
||||
"Firmware (Febr) Version : %lld\n"
|
||||
"********************************************************\n",
|
||||
hversion, (long long int)feblfwversion,
|
||||
(long long int)febrfwversion));
|
||||
|
||||
// ensure febl, febr and beb fw versions are the same
|
||||
if (fwversion != feblfwversion || fwversion != febrfwversion) {
|
||||
sprintf(initErrorMessage,
|
||||
"Inconsistent firmware versions in feb and beb. [Beb: %lld, "
|
||||
"Febl: %lld Febr: %lld]\n",
|
||||
(long long int)fwversion, (long long int)feblfwversion,
|
||||
(long long int)febrfwversion);
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
// also reads config file and deactivates
|
||||
setupDetector();
|
||||
|
@ -5,7 +5,12 @@
|
||||
|
||||
#define LINKED_SERVER_NAME "eigerDetectorServer"
|
||||
|
||||
#define REQUIRED_FIRMWARE_VERSION (32)
|
||||
#define NUM_HARDWARE_VERSIONS (2)
|
||||
#define HARDWARE_VERSION_NUMBERS {0x0, 0x1};
|
||||
#define HARDWARE_VERSION_NAMES \
|
||||
{ "FX70T", "FX30T" }
|
||||
|
||||
#define REQUIRED_FIRMWARE_VERSION (31)
|
||||
// virtual ones renamed for consistency
|
||||
// real ones keep previous name for compatibility (already in production)
|
||||
#ifdef VIRTUAL
|
||||
|
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
Executable file
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
@ -3323,27 +3323,6 @@ void *start_timer(void *arg) {
|
||||
break;
|
||||
}
|
||||
|
||||
// change gain and data for every frame
|
||||
{
|
||||
const int nchannels = NCHIP * NCHAN;
|
||||
int gainVal = 0;
|
||||
for (int i = 0; i < nchannels; ++i) {
|
||||
if ((i % nchannels) < 400) {
|
||||
gainVal = 1 + frameNr;
|
||||
} else if ((i % nchannels) < 800) {
|
||||
gainVal = 2 + frameNr;
|
||||
} else {
|
||||
gainVal = 3 + frameNr;
|
||||
}
|
||||
int dataVal =
|
||||
*((uint16_t *)(imageData + i * sizeof(uint16_t)));
|
||||
dataVal += frameNr;
|
||||
int channelVal =
|
||||
(dataVal & ~GAIN_VAL_MSK) | (gainVal << GAIN_VAL_OFST);
|
||||
*((uint16_t *)(imageData + i * sizeof(uint16_t))) =
|
||||
(uint16_t)channelVal;
|
||||
}
|
||||
}
|
||||
// sleep for exposure time
|
||||
struct timespec begin, end;
|
||||
clock_gettime(CLOCK_REALTIME, &begin);
|
||||
|
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
Executable file
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
@ -1388,18 +1388,14 @@ int setMaster(enum MASTERINDEX m) {
|
||||
char *master_names[] = {MASTER_NAMES};
|
||||
LOG(logINFOBLUE, ("Setting up as %s in (%s server)\n", master_names[m],
|
||||
(isControlServer ? "control" : "stop")));
|
||||
|
||||
int prevSync = getSynchronization();
|
||||
setSynchronization(0);
|
||||
int retval = -1;
|
||||
int retMaster = OK;
|
||||
switch (m) {
|
||||
case OW_MASTER:
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_MASTER_MSK);
|
||||
isMaster(&retval);
|
||||
if (retval != 1) {
|
||||
LOG(logERROR, ("Could not set master\n"));
|
||||
retMaster = FAIL;
|
||||
return FAIL;
|
||||
}
|
||||
break;
|
||||
case OW_SLAVE:
|
||||
@ -1407,16 +1403,15 @@ int setMaster(enum MASTERINDEX m) {
|
||||
isMaster(&retval);
|
||||
if (retval != 0) {
|
||||
LOG(logERROR, ("Could not set slave\n"));
|
||||
retMaster = FAIL;
|
||||
return FAIL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG(logERROR, ("Cannot reset to hardware settings from client. Restart "
|
||||
"detector server.\n"));
|
||||
retMaster = FAIL;
|
||||
return FAIL;
|
||||
}
|
||||
setSynchronization(prevSync);
|
||||
return retMaster;
|
||||
return OK;
|
||||
}
|
||||
|
||||
int isMaster(int *retval) {
|
||||
@ -1454,7 +1449,7 @@ void setTiming(enum timingMode arg) {
|
||||
}
|
||||
|
||||
enum timingMode getTiming() {
|
||||
if ((bus_r(EXT_SIGNAL_REG) & EXT_SIGNAL_MSK) >> EXT_SIGNAL_OFST)
|
||||
if (bus_r(EXT_SIGNAL_REG) == EXT_SIGNAL_MSK)
|
||||
return TRIGGER_EXPOSURE;
|
||||
return AUTO_TIMING;
|
||||
}
|
||||
@ -1741,40 +1736,40 @@ int setDetectorPosition(int pos[]) {
|
||||
detPos[2] = outerPos[X];
|
||||
detPos[3] = outerPos[Y];
|
||||
|
||||
// row [Y]
|
||||
// row
|
||||
// outer
|
||||
uint32_t addr = COORD_ROW_REG;
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_ROW_OUTER_MSK) |
|
||||
((outerPos[Y] << COORD_ROW_OUTER_OFST) & COORD_ROW_OUTER_MSK));
|
||||
((outerPos[X] << COORD_ROW_OUTER_OFST) & COORD_ROW_OUTER_MSK));
|
||||
if (((bus_r(addr) & COORD_ROW_OUTER_MSK) >> COORD_ROW_OUTER_OFST) !=
|
||||
outerPos[Y])
|
||||
ret = FAIL;
|
||||
// inner
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_ROW_INNER_MSK) |
|
||||
((innerPos[Y] << COORD_ROW_INNER_OFST) & COORD_ROW_INNER_MSK));
|
||||
if (((bus_r(addr) & COORD_ROW_INNER_MSK) >> COORD_ROW_INNER_OFST) !=
|
||||
innerPos[Y])
|
||||
ret = FAIL;
|
||||
|
||||
// col [X]
|
||||
// outer
|
||||
addr = COORD_COL_REG;
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_COL_OUTER_MSK) |
|
||||
((outerPos[X] << COORD_COL_OUTER_OFST) & COORD_COL_OUTER_MSK));
|
||||
if (((bus_r(addr) & COORD_COL_OUTER_MSK) >> COORD_COL_OUTER_OFST) !=
|
||||
outerPos[X])
|
||||
ret = FAIL;
|
||||
// inner
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_COL_INNER_MSK) |
|
||||
((innerPos[X] << COORD_COL_INNER_OFST) & COORD_COL_INNER_MSK));
|
||||
if (((bus_r(addr) & COORD_COL_INNER_MSK) >> COORD_COL_INNER_OFST) !=
|
||||
(bus_r(addr) & ~COORD_ROW_INNER_MSK) |
|
||||
((innerPos[X] << COORD_ROW_INNER_OFST) & COORD_ROW_INNER_MSK));
|
||||
if (((bus_r(addr) & COORD_ROW_INNER_MSK) >> COORD_ROW_INNER_OFST) !=
|
||||
innerPos[X])
|
||||
ret = FAIL;
|
||||
|
||||
// col
|
||||
// outer
|
||||
addr = COORD_COL_REG;
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_COL_OUTER_MSK) |
|
||||
((outerPos[Y] << COORD_COL_OUTER_OFST) & COORD_COL_OUTER_MSK));
|
||||
if (((bus_r(addr) & COORD_COL_OUTER_MSK) >> COORD_COL_OUTER_OFST) !=
|
||||
outerPos[Y])
|
||||
ret = FAIL;
|
||||
// inner
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_COL_INNER_MSK) |
|
||||
((innerPos[Y] << COORD_COL_INNER_OFST) & COORD_COL_INNER_MSK));
|
||||
if (((bus_r(addr) & COORD_COL_INNER_MSK) >> COORD_COL_INNER_OFST) !=
|
||||
innerPos[Y])
|
||||
ret = FAIL;
|
||||
|
||||
if (ret == OK) {
|
||||
if (getNumberofUDPInterfaces() == 1) {
|
||||
LOG(logINFOBLUE, ("Position set to [%d, %d] #(col, row)\n",
|
||||
@ -2632,7 +2627,6 @@ void *start_timer(void *arg) {
|
||||
if (i % pixelsPerPacket == 0) {
|
||||
++dataVal;
|
||||
}
|
||||
|
||||
if ((i % 1024) < 300) {
|
||||
gainVal = 1;
|
||||
} else if ((i % 1024) < 600) {
|
||||
@ -2673,28 +2667,6 @@ void *start_timer(void *arg) {
|
||||
clock_gettime(CLOCK_REALTIME, &begin);
|
||||
usleep(expUs);
|
||||
|
||||
// change gain and data for every frame
|
||||
{
|
||||
const int npixels = (NCHAN * NCHIP);
|
||||
for (int i = 0; i < npixels; ++i) {
|
||||
int gainVal = 0;
|
||||
if ((i % 1024) < 300) {
|
||||
gainVal = 1 + iframes;
|
||||
} else if ((i % 1024) < 600) {
|
||||
gainVal = 2 + iframes;
|
||||
} else {
|
||||
gainVal = 3 + iframes;
|
||||
}
|
||||
int dataVal =
|
||||
*((uint16_t *)(imageData + i * sizeof(uint16_t)));
|
||||
dataVal += iframes;
|
||||
int pixelVal =
|
||||
(dataVal & ~GAIN_VAL_MSK) | (gainVal << GAIN_VAL_OFST);
|
||||
*((uint16_t *)(imageData + i * sizeof(uint16_t))) =
|
||||
(uint16_t)pixelVal;
|
||||
}
|
||||
}
|
||||
|
||||
int srcOffset = 0;
|
||||
int srcOffset2 = DATA_BYTES / 2;
|
||||
int row0 = (numInterfaces == 1 ? detPos[1] : detPos[3]);
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#define MIN_REQRD_VRSN_T_RD_API 0x171220
|
||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x230516 // 1.0 pcb (version = 010)
|
||||
#define REQRD_FRMWRE_VRSN 0x230515 // 2.0 pcb (version = 011)
|
||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x221104 // 1.0 pcb (version = 010)
|
||||
#define REQRD_FRMWRE_VRSN 0x221103 // 2.0 pcb (version = 011)
|
||||
|
||||
#define NUM_HARDWARE_VERSIONS (2)
|
||||
#define HARDWARE_VERSION_NUMBERS \
|
||||
|
@ -8,35 +8,28 @@ add_executable(moenchDetectorServer_virtual
|
||||
../slsDetectorServer/src/blackfin.c
|
||||
../slsDetectorServer/src/common.c
|
||||
../slsDetectorServer/src/commonServerFunctions.c
|
||||
../slsDetectorServer/src/communication_funcs_UDP.c
|
||||
../slsDetectorServer/src/UDPPacketHeaderGenerator.c
|
||||
../slsDetectorServer/src/AD9257.c
|
||||
../slsDetectorServer/src/ALTERA_PLL.c
|
||||
../slsDetectorServer/src/LTC2620.c
|
||||
../slsDetectorServer/src/MAX1932.c
|
||||
../slsDetectorServer/src/programViaBlackfin.c
|
||||
../slsDetectorServer/src/loadPattern.c
|
||||
../slsDetectorServer/src/programViaBlackfin.c
|
||||
../slsDetectorServer/src/communication_funcs_UDP.c
|
||||
../slsDetectorServer/src/sharedMemory.c
|
||||
../../slsSupportLib/src/md5.c
|
||||
)
|
||||
|
||||
include_directories(
|
||||
target_include_directories(moenchDetectorServer_virtual
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
../slsDetectorServer/include
|
||||
../../slsSupportLib/include
|
||||
../../slsDetectorSoftware/include/sls/
|
||||
)
|
||||
|
||||
target_include_directories(moenchDetectorServer_virtual
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(moenchDetectorServer_virtual
|
||||
PUBLIC MOENCHD VIRTUAL STOP_SERVER
|
||||
PUBLIC MOENCHD VIRTUAL STOP_SERVER #TEST_MOD_GEOMETRY
|
||||
)
|
||||
|
||||
target_link_libraries(moenchDetectorServer_virtual
|
||||
PUBLIC pthread rt slsProjectCSettings
|
||||
m
|
||||
)
|
||||
|
||||
set_target_properties(moenchDetectorServer_virtual PROPERTIES
|
||||
@ -44,7 +37,9 @@ set_target_properties(moenchDetectorServer_virtual PROPERTIES
|
||||
)
|
||||
|
||||
install(TARGETS moenchDetectorServer_virtual
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
configure_file(DefaultPattern_moench.txt ${CMAKE_BINARY_DIR}/bin/DefaultPattern_moench.txt COPYONLY)
|
||||
configure_file(config_moench.txt ${CMAKE_BINARY_DIR}/bin/config_moench.txt COPYONLY)
|
||||
configure_file(detid_moench.txt ${CMAKE_BINARY_DIR}/bin/detid_moench.txt COPYONLY)
|
||||
|
@ -1,301 +0,0 @@
|
||||
patword 0x0000 0x0008599f0418503a
|
||||
patword 0x0001 0x0008599f0418503a
|
||||
patword 0x0002 0x000859960418503a
|
||||
patword 0x0003 0x000859960418503a
|
||||
patword 0x0004 0x000859960418503a
|
||||
patword 0x0005 0x000859960418503a
|
||||
patword 0x0006 0x000859960418503a
|
||||
patword 0x0007 0x000859960418503a
|
||||
patword 0x0008 0x000859960418503a
|
||||
patword 0x0009 0x000859960418503a
|
||||
patword 0x000a 0x000859960418503a
|
||||
patword 0x000b 0x000859960418503a
|
||||
patword 0x000c 0x000859960418503a
|
||||
patword 0x000d 0x000859960418503a
|
||||
patword 0x000e 0x000859960418503a
|
||||
patword 0x000f 0x000859960418503a
|
||||
patword 0x0010 0x000859960418503a
|
||||
patword 0x0011 0x000859960418503a
|
||||
patword 0x0012 0x000859960418503a
|
||||
patword 0x0013 0x000859960418503a
|
||||
patword 0x0014 0x000859960418503a
|
||||
patword 0x0015 0x000859960418503a
|
||||
patword 0x0016 0x000819960418501a
|
||||
patword 0x0017 0x000819960418501a
|
||||
patword 0x0018 0x000819960418501a
|
||||
patword 0x0019 0x000819960418501a
|
||||
patword 0x001a 0x000819960418501a
|
||||
patword 0x001b 0x000819960418501a
|
||||
patword 0x001c 0x000819960418501a
|
||||
patword 0x001d 0x000819960418501a
|
||||
patword 0x001e 0x000819960418501a
|
||||
patword 0x001f 0x000819960418501a
|
||||
patword 0x0020 0x000819960418501a
|
||||
patword 0x0021 0x000819960418501a
|
||||
patword 0x0022 0x000819960418501a
|
||||
patword 0x0023 0x000819960418501a
|
||||
patword 0x0024 0x000819960418501a
|
||||
patword 0x0025 0x000819960418501a
|
||||
patword 0x0026 0x000819960418501a
|
||||
patword 0x0027 0x000819960418501a
|
||||
patword 0x0028 0x000819960418501a
|
||||
patword 0x0029 0x000819960418501a
|
||||
patword 0x002a 0x000819960418501a
|
||||
patword 0x002b 0x000819960418501a
|
||||
patword 0x002c 0x000819960418501a
|
||||
patword 0x002d 0x000819960418501a
|
||||
patword 0x002e 0x000819960418501a
|
||||
patword 0x002f 0x000819960418501a
|
||||
patword 0x0030 0x000819960008501a
|
||||
patword 0x0031 0x000819960008501a
|
||||
patword 0x0032 0x000819960008501a
|
||||
patword 0x0033 0x000819960008501a
|
||||
patword 0x0034 0x000819960008501a
|
||||
patword 0x0035 0x000819960008501a
|
||||
patword 0x0036 0x000819960008501a
|
||||
patword 0x0037 0x000819960008501a
|
||||
patword 0x0038 0x000819960008501a
|
||||
patword 0x0039 0x000819960008501a
|
||||
patword 0x003a 0x000819960008501a
|
||||
patword 0x003b 0x000819960008501a
|
||||
patword 0x003c 0x000819960008501a
|
||||
patword 0x003d 0x000819960008501a
|
||||
patword 0x003e 0x000819960008501a
|
||||
patword 0x003f 0x000819960008501a
|
||||
patword 0x0040 0x000819960008501a
|
||||
patword 0x0041 0x000819960008501a
|
||||
patword 0x0042 0x000819960008501a
|
||||
patword 0x0043 0x000819960008501a
|
||||
patword 0x0044 0x0008199f0008501a
|
||||
patword 0x0045 0x0008199f0008501a
|
||||
patword 0x0046 0x0008199f0008501a
|
||||
patword 0x0047 0x0008199f0008501a
|
||||
patword 0x0048 0x0008199f0008501a
|
||||
patword 0x0049 0x0008199f0008501a
|
||||
patword 0x004a 0x0008199f0008501a
|
||||
patword 0x004b 0x0008199f0008501a
|
||||
patword 0x004c 0x0008199f0008501a
|
||||
patword 0x004d 0x0008199f0008501a
|
||||
patword 0x004e 0x0008199f0008501a
|
||||
patword 0x004f 0x0008199f0008501a
|
||||
patword 0x0050 0x0008199f0008501a
|
||||
patword 0x0051 0x0008199f0008501a
|
||||
patword 0x0052 0x0008199f0008501a
|
||||
patword 0x0053 0x0008199f0008501a
|
||||
patword 0x0054 0x0008199f0008501a
|
||||
patword 0x0055 0x0008199f0008501a
|
||||
patword 0x0056 0x0008199f0008501a
|
||||
patword 0x0057 0x0008199f0008501a
|
||||
patword 0x0058 0x0008599f0008503a
|
||||
patword 0x0059 0x0008599f0008503a
|
||||
patword 0x005a 0x000c599f000850ba
|
||||
patword 0x005b 0x000c599f000850ba
|
||||
patword 0x005c 0x000c599f000850ba
|
||||
patword 0x005d 0x000c599f000850ba
|
||||
patword 0x005e 0x000c599f000850ba
|
||||
patword 0x005f 0x000c599f000850ba
|
||||
patword 0x0060 0x000c599f000850ba
|
||||
patword 0x0061 0x000c599f000850ba
|
||||
patword 0x0062 0x000c599f000850ba
|
||||
patword 0x0063 0x000c599f000850ba
|
||||
patword 0x0064 0x000c599f000850ba
|
||||
patword 0x0065 0x000c599f000850ba
|
||||
patword 0x0066 0x000c599f000850ba
|
||||
patword 0x0067 0x000c599f000850ba
|
||||
patword 0x0068 0x000c599f000850ba
|
||||
patword 0x0069 0x000c599f000850ba
|
||||
patword 0x006a 0x000c599f000850ba
|
||||
patword 0x006b 0x000c599f000850ba
|
||||
patword 0x006c 0x000c599f000850ba
|
||||
patword 0x006d 0x000c599f000850ba
|
||||
patword 0x006e 0x000c799f010858ba
|
||||
patword 0x006f 0x000c799f010858ba
|
||||
patword 0x0070 0x000c599f000850ba
|
||||
patword 0x0071 0x000c599f000850ba
|
||||
patword 0x0072 0x000c599f000850ba
|
||||
patword 0x0073 0x000c599f000850ba
|
||||
patword 0x0074 0x000c599f000850ba
|
||||
patword 0x0075 0x000c599f000850ba
|
||||
patword 0x0076 0x000c599f000850ba
|
||||
patword 0x0077 0x000c599f000850ba
|
||||
patword 0x0078 0x000c599f000850ba
|
||||
patword 0x0079 0x000c599f000850ba
|
||||
patword 0x007a 0x000c599f000850ba
|
||||
patword 0x007b 0x000c599f000850ba
|
||||
patword 0x007c 0x000c599f000850ba
|
||||
patword 0x007d 0x000c599f000850ba
|
||||
patword 0x007e 0x000c599f000850ba
|
||||
patword 0x007f 0x000c599f000850ba
|
||||
patword 0x0080 0x000c599f000850ba
|
||||
patword 0x0081 0x000c599f000850ba
|
||||
patword 0x0082 0x000c599f000850ba
|
||||
patword 0x0083 0x000c599f000850ba
|
||||
patword 0x0084 0x000c599f000850ba
|
||||
patword 0x0085 0x000c599f000850ba
|
||||
patword 0x0086 0x000c599f400850ba
|
||||
patword 0x0087 0x000c599f400850ba
|
||||
patword 0x0088 0x000c599f600850ba
|
||||
patword 0x0089 0x000c599f400850ba
|
||||
patword 0x008a 0x000c599f400850ba
|
||||
patword 0x008b 0x000c599f400850ba
|
||||
patword 0x008c 0x840c599f682e50ba
|
||||
patword 0x008d 0x840c599f482850ba
|
||||
patword 0x008e 0x840c599f000e50ba
|
||||
patword 0x008f 0x840c599f000850ba
|
||||
patword 0x0090 0x840c599f000e50ba
|
||||
patword 0x0091 0x840c599f000850ba
|
||||
patword 0x0092 0x840c599f000e50ba
|
||||
patword 0x0093 0x840c599f000850ba
|
||||
patword 0x0094 0x840c599f000e50ba
|
||||
patword 0x0095 0x840c599f000850ba
|
||||
patword 0x0096 0x840c599f000e50ba
|
||||
patword 0x0097 0x840c599f000850ba
|
||||
patword 0x0098 0x840c599f000e50ba
|
||||
patword 0x0099 0x840c599f000850ba
|
||||
patword 0x009a 0x840c599f000e50ba
|
||||
patword 0x009b 0x840c599f000850ba
|
||||
patword 0x009c 0x840c599f000e50ba
|
||||
patword 0x009d 0x840c599f000850ba
|
||||
patword 0x009e 0x840c599f000e50ba
|
||||
patword 0x009f 0x840c599f000850ba
|
||||
patword 0x00a0 0x840c599f000e50ba
|
||||
patword 0x00a1 0x840c599f000850ba
|
||||
patword 0x00a2 0x840c599f000e50ba
|
||||
patword 0x00a3 0x840c599f000850ba
|
||||
patword 0x00a4 0x840c599f000e50ba
|
||||
patword 0x00a5 0x840c599f000850ba
|
||||
patword 0x00a6 0x840c599f200e50ba
|
||||
patword 0x00a7 0x840c599f000850ba
|
||||
patword 0x00a8 0x840c599f000e50ba
|
||||
patword 0x00a9 0x840c599f000850ba
|
||||
patword 0x00aa 0x840c599f000e50ba
|
||||
patword 0x00ab 0x840c599f000850ba
|
||||
patword 0x00ac 0x840c599f000e50ba
|
||||
patword 0x00ad 0x840c599f000850ba
|
||||
patword 0x00ae 0x840c599f000e50ba
|
||||
patword 0x00af 0x840c599f000850ba
|
||||
patword 0x00b0 0x840c599f000e50ba
|
||||
patword 0x00b1 0x840c599f000850ba
|
||||
patword 0x00b2 0x840c599f000e50ba
|
||||
patword 0x00b3 0x840c599f000850ba
|
||||
patword 0x00b4 0x840c599f000e50ba
|
||||
patword 0x00b5 0x840c599f000850ba
|
||||
patword 0x00b6 0x840c599f000e50ba
|
||||
patword 0x00b7 0x840c599f000850ba
|
||||
patword 0x00b8 0x840c599f000e50ba
|
||||
patword 0x00b9 0x840c599f000850ba
|
||||
patword 0x00ba 0x840c599f000e50ba
|
||||
patword 0x00bb 0x840c599f000850ba
|
||||
patword 0x00bc 0x840c599f000e50ba
|
||||
patword 0x00bd 0x840c599f000850ba
|
||||
patword 0x00be 0x840c599f282e50ba
|
||||
patword 0x00bf 0x840c599f082850ba
|
||||
patword 0x00c0 0x840c599f000e50ba
|
||||
patword 0x00c1 0x840c599f000850ba
|
||||
patword 0x00c2 0x840c599f000e50ba
|
||||
patword 0x00c3 0x840c599f000850ba
|
||||
patword 0x00c4 0x840c599f000e50ba
|
||||
patword 0x00c5 0x840c599f000850ba
|
||||
patword 0x00c6 0x840c599f000e50ba
|
||||
patword 0x00c7 0x840c599f000850ba
|
||||
patword 0x00c8 0x840c599f000e50ba
|
||||
patword 0x00c9 0x840c599f000850ba
|
||||
patword 0x00ca 0x840c599f000e50ba
|
||||
patword 0x00cb 0x840c599f000850ba
|
||||
patword 0x00cc 0x840c599f000e50ba
|
||||
patword 0x00cd 0x840c599f000850ba
|
||||
patword 0x00ce 0x840c599f000e50ba
|
||||
patword 0x00cf 0x840c599f000850ba
|
||||
patword 0x00d0 0x840c599f000e50ba
|
||||
patword 0x00d1 0x840c599f000850ba
|
||||
patword 0x00d2 0x840c599f000e50ba
|
||||
patword 0x00d3 0x840c599f000850ba
|
||||
patword 0x00d4 0x840c599f000e50ba
|
||||
patword 0x00d5 0x840c599f000850ba
|
||||
patword 0x00d6 0x840c599f000e50ba
|
||||
patword 0x00d7 0x840c599f000850ba
|
||||
patword 0x00d8 0x840c599f200e50ba
|
||||
patword 0x00d9 0x840c599f000850ba
|
||||
patword 0x00da 0x840c599f000e50ba
|
||||
patword 0x00db 0x840c599f000850ba
|
||||
patword 0x00dc 0x840c599f000e50ba
|
||||
patword 0x00dd 0x840c599f000850ba
|
||||
patword 0x00de 0x840c599f000e50ba
|
||||
patword 0x00df 0x840c599f000850ba
|
||||
patword 0x00e0 0x840c599f000e50ba
|
||||
patword 0x00e1 0x840c599f000850ba
|
||||
patword 0x00e2 0x840c599f000e50ba
|
||||
patword 0x00e3 0x840c599f000850ba
|
||||
patword 0x00e4 0x840c599f000e50ba
|
||||
patword 0x00e5 0x840c599f000850ba
|
||||
patword 0x00e6 0x840c599f000e50ba
|
||||
patword 0x00e7 0x840c599f000850ba
|
||||
patword 0x00e8 0x840c599f000e50ba
|
||||
patword 0x00e9 0x840c599f000850ba
|
||||
patword 0x00ea 0x840c599f000e50ba
|
||||
patword 0x00eb 0x840c599f000850ba
|
||||
patword 0x00ec 0x840c599f000e50ba
|
||||
patword 0x00ed 0x840c599f000850ba
|
||||
patword 0x00ee 0x840c599f000e50ba
|
||||
patword 0x00ef 0x840c599f000850ba
|
||||
patword 0x00f0 0x040c599f000850ba
|
||||
patword 0x00f1 0x040c599f000850ba
|
||||
patword 0x00f2 0x000c599f000850ba
|
||||
patword 0x00f3 0x000c599f000850ba
|
||||
patword 0x00f4 0x0008599f200e503a
|
||||
patword 0x00f5 0x0008599f0008503a
|
||||
patword 0x00f6 0x0008599f200e503a
|
||||
patword 0x00f7 0x0008599f0008503a
|
||||
patword 0x00f8 0x0008599f0008503a
|
||||
patword 0x00f9 0x0008599f0008503a
|
||||
patword 0x00fa 0x0008599f0008503a
|
||||
patword 0x00fb 0x0008599f0008503a
|
||||
patword 0x00fc 0x0008599f0008503a
|
||||
patword 0x00fd 0x0008599f0008503a
|
||||
patword 0x00fe 0x0008599f0008503a
|
||||
patword 0x00ff 0x0008599f0008503a
|
||||
patword 0x0100 0x0008599f0008503a
|
||||
patword 0x0101 0x0008599f0008503a
|
||||
patword 0x0102 0x0008599f0008503a
|
||||
patword 0x0103 0x0008599f0008503a
|
||||
patword 0x0104 0x0008599f0008503a
|
||||
patword 0x0105 0x0008599f0008503a
|
||||
patword 0x0106 0x0008599f0008503a
|
||||
patword 0x0107 0x0008599f0008503a
|
||||
patword 0x0108 0x0008599f0008503a
|
||||
patword 0x0109 0x0008599f0008503a
|
||||
patword 0x010a 0x0008599f0008503a
|
||||
patword 0x010b 0x0008599f0008503a
|
||||
patword 0x010c 0x0008599f0008503a
|
||||
patword 0x010d 0x0008599f0008503a
|
||||
patword 0x010e 0x0008599f0008503a
|
||||
patword 0x010f 0x0008599f0008503a
|
||||
patword 0x0110 0x0008599f0008503a
|
||||
patword 0x0111 0x0008599f0008503a
|
||||
patioctrl 0x8f0effff6dbffdbf
|
||||
patlimits 0x0000 0x0110
|
||||
patloop 0 0x00be 0x00ef
|
||||
patnloop 0 199
|
||||
patloop 1 0x0400 0x0400
|
||||
patnloop 1 0
|
||||
patloop 2 0x0400 0x0400
|
||||
patnloop 2 0
|
||||
patwait 0 0x002e
|
||||
patwaittime 0 800
|
||||
patwait 1 0x0400
|
||||
patwaittime 1 0
|
||||
patwait 2 0x0400
|
||||
patwaittime 2 0
|
||||
|
||||
patloop 3 0x1fff 0x1fff
|
||||
patnloop 3 0
|
||||
patloop 4 0x1fff 0x1fff
|
||||
patnloop 4 0
|
||||
patloop 5 0x1fff 0x1fff
|
||||
patnloop 5 0
|
||||
patwait 3 0x1fff
|
||||
patwaittime 3 0
|
||||
patwait 4 0x1fff
|
||||
patwaittime 4 0
|
||||
patwait 5 0x1fff
|
||||
patwaittime 5 0
|
@ -4,22 +4,21 @@ current_dir = $(shell pwd)
|
||||
main_inc = ../slsDetectorServer/include/
|
||||
main_src = ../slsDetectorServer/src/
|
||||
support_lib = ../../slsSupportLib/include/
|
||||
det_lib = ../../slsDetectorSoftware/include/sls/
|
||||
md5_dir = ../../slsSupportLib/src/
|
||||
|
||||
CROSS = bfin-uclinux-
|
||||
CC = $(CROSS)gcc
|
||||
CFLAGS += -Wall -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DVERBOSEI #-DVERBOSE
|
||||
LDLIBS += -lm -lrt -pthread
|
||||
CFLAGS += -Wall -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DVERBOSEI #-DVERBOSE
|
||||
LDLIBS += -lm -lrt -pthread
|
||||
PROGS = moenchDetectorServer
|
||||
DESTDIR ?= bin
|
||||
INSTMODE = 0777
|
||||
|
||||
SRCS = slsDetectorFunctionList.c
|
||||
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c $(main_src)common.c $(main_src)commonServerFunctions.c $(main_src)communication_funcs_UDP.c $(main_src)UDPPacketHeaderGenerator.c $(main_src)AD9257.c $(main_src)ALTERA_PLL.c $(main_src)LTC2620.c $(main_src)MAX1932.c $(main_src)programViaBlackfin.c $(main_src)loadPattern.c $(main_src)/sharedMemory.c $(md5_dir)md5.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
SRCS = slsDetectorFunctionList.c
|
||||
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c $(main_src)common.c $(main_src)commonServerFunctions.c $(main_src)AD9257.c $(main_src)ALTERA_PLL.c $(main_src)LTC2620.c $(main_src)MAX1932.c $(main_src)programViaBlackfin.c $(main_src)/sharedMemory.c $(md5_dir)md5.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
all: clean $(PROGS)
|
||||
version: clean versioning $(PROGS)
|
||||
|
||||
@ -35,12 +34,12 @@ versioning:
|
||||
$(PROGS): $(OBJS)
|
||||
# echo $(OBJS)
|
||||
mkdir -p $(DESTDIR)
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
|
||||
mv $(PROGS) $(DESTDIR)
|
||||
cp DefaultPattern_moench.txt $(DESTDIR)
|
||||
cp config_moench.txt $(DESTDIR)
|
||||
cp detid_moench.txt $(DESTDIR)
|
||||
rm *.gdb
|
||||
rm $(main_src)*.o
|
||||
rm *.o $(md5_dir)*.o
|
||||
rm $(main_src)*.o $(md5_dir)*.o
|
||||
|
||||
clean:
|
||||
rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_src)*.o $(md5_dir)*.o
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,301 +0,0 @@
|
||||
patword 0x0000 0x0008599f0418503a
|
||||
patword 0x0001 0x0008599f0418503a
|
||||
patword 0x0002 0x000859960418503a
|
||||
patword 0x0003 0x000859960418503a
|
||||
patword 0x0004 0x000859960418503a
|
||||
patword 0x0005 0x000859960418503a
|
||||
patword 0x0006 0x000859960418503a
|
||||
patword 0x0007 0x000859960418503a
|
||||
patword 0x0008 0x000859960418503a
|
||||
patword 0x0009 0x000859960418503a
|
||||
patword 0x000a 0x000859960418503a
|
||||
patword 0x000b 0x000859960418503a
|
||||
patword 0x000c 0x000859960418503a
|
||||
patword 0x000d 0x000859960418503a
|
||||
patword 0x000e 0x000859960418503a
|
||||
patword 0x000f 0x000859960418503a
|
||||
patword 0x0010 0x000859960418503a
|
||||
patword 0x0011 0x000859960418503a
|
||||
patword 0x0012 0x000859960418503a
|
||||
patword 0x0013 0x000859960418503a
|
||||
patword 0x0014 0x000859960418503a
|
||||
patword 0x0015 0x000859960418503a
|
||||
patword 0x0016 0x000819960418501a
|
||||
patword 0x0017 0x000819960418501a
|
||||
patword 0x0018 0x000819960418501a
|
||||
patword 0x0019 0x000819960418501a
|
||||
patword 0x001a 0x000819960418501a
|
||||
patword 0x001b 0x000819960418501a
|
||||
patword 0x001c 0x000819960418501a
|
||||
patword 0x001d 0x000819960418501a
|
||||
patword 0x001e 0x000819960418501a
|
||||
patword 0x001f 0x000819960418501a
|
||||
patword 0x0020 0x000819960418501a
|
||||
patword 0x0021 0x000819960418501a
|
||||
patword 0x0022 0x000819960418501a
|
||||
patword 0x0023 0x000819960418501a
|
||||
patword 0x0024 0x000819960418501a
|
||||
patword 0x0025 0x000819960418501a
|
||||
patword 0x0026 0x000819960418501a
|
||||
patword 0x0027 0x000819960418501a
|
||||
patword 0x0028 0x000819960418501a
|
||||
patword 0x0029 0x000819960418501a
|
||||
patword 0x002a 0x000819960418501a
|
||||
patword 0x002b 0x000819960418501a
|
||||
patword 0x002c 0x000819960418501a
|
||||
patword 0x002d 0x000819960418501a
|
||||
patword 0x002e 0x000819960418501a
|
||||
patword 0x002f 0x000819960418501a
|
||||
patword 0x0030 0x000819960008501a
|
||||
patword 0x0031 0x000819960008501a
|
||||
patword 0x0032 0x000819960008501a
|
||||
patword 0x0033 0x000819960008501a
|
||||
patword 0x0034 0x000819960008501a
|
||||
patword 0x0035 0x000819960008501a
|
||||
patword 0x0036 0x000819960008501a
|
||||
patword 0x0037 0x000819960008501a
|
||||
patword 0x0038 0x000819960008501a
|
||||
patword 0x0039 0x000819960008501a
|
||||
patword 0x003a 0x000819960008501a
|
||||
patword 0x003b 0x000819960008501a
|
||||
patword 0x003c 0x000819960008501a
|
||||
patword 0x003d 0x000819960008501a
|
||||
patword 0x003e 0x000819960008501a
|
||||
patword 0x003f 0x000819960008501a
|
||||
patword 0x0040 0x000819960008501a
|
||||
patword 0x0041 0x000819960008501a
|
||||
patword 0x0042 0x000819960008501a
|
||||
patword 0x0043 0x000819960008501a
|
||||
patword 0x0044 0x0008199f0008501a
|
||||
patword 0x0045 0x0008199f0008501a
|
||||
patword 0x0046 0x0008199f0008501a
|
||||
patword 0x0047 0x0008199f0008501a
|
||||
patword 0x0048 0x0008199f0008501a
|
||||
patword 0x0049 0x0008199f0008501a
|
||||
patword 0x004a 0x0008199f0008501a
|
||||
patword 0x004b 0x0008199f0008501a
|
||||
patword 0x004c 0x0008199f0008501a
|
||||
patword 0x004d 0x0008199f0008501a
|
||||
patword 0x004e 0x0008199f0008501a
|
||||
patword 0x004f 0x0008199f0008501a
|
||||
patword 0x0050 0x0008199f0008501a
|
||||
patword 0x0051 0x0008199f0008501a
|
||||
patword 0x0052 0x0008199f0008501a
|
||||
patword 0x0053 0x0008199f0008501a
|
||||
patword 0x0054 0x0008199f0008501a
|
||||
patword 0x0055 0x0008199f0008501a
|
||||
patword 0x0056 0x0008199f0008501a
|
||||
patword 0x0057 0x0008199f0008501a
|
||||
patword 0x0058 0x0008599f0008503a
|
||||
patword 0x0059 0x0008599f0008503a
|
||||
patword 0x005a 0x000c599f000850ba
|
||||
patword 0x005b 0x000c599f000850ba
|
||||
patword 0x005c 0x000c599f000850ba
|
||||
patword 0x005d 0x000c599f000850ba
|
||||
patword 0x005e 0x000c599f000850ba
|
||||
patword 0x005f 0x000c599f000850ba
|
||||
patword 0x0060 0x000c599f000850ba
|
||||
patword 0x0061 0x000c599f000850ba
|
||||
patword 0x0062 0x000c599f000850ba
|
||||
patword 0x0063 0x000c599f000850ba
|
||||
patword 0x0064 0x000c599f000850ba
|
||||
patword 0x0065 0x000c599f000850ba
|
||||
patword 0x0066 0x000c599f000850ba
|
||||
patword 0x0067 0x000c599f000850ba
|
||||
patword 0x0068 0x000c599f000850ba
|
||||
patword 0x0069 0x000c599f000850ba
|
||||
patword 0x006a 0x000c599f000850ba
|
||||
patword 0x006b 0x000c599f000850ba
|
||||
patword 0x006c 0x000c599f000850ba
|
||||
patword 0x006d 0x000c599f000850ba
|
||||
patword 0x006e 0x000c799f010858ba
|
||||
patword 0x006f 0x000c799f010858ba
|
||||
patword 0x0070 0x000c599f000850ba
|
||||
patword 0x0071 0x000c599f000850ba
|
||||
patword 0x0072 0x000c599f000850ba
|
||||
patword 0x0073 0x000c599f000850ba
|
||||
patword 0x0074 0x000c599f000850ba
|
||||
patword 0x0075 0x000c599f000850ba
|
||||
patword 0x0076 0x000c599f000850ba
|
||||
patword 0x0077 0x000c599f000850ba
|
||||
patword 0x0078 0x000c599f000850ba
|
||||
patword 0x0079 0x000c599f000850ba
|
||||
patword 0x007a 0x000c599f000850ba
|
||||
patword 0x007b 0x000c599f000850ba
|
||||
patword 0x007c 0x000c599f000850ba
|
||||
patword 0x007d 0x000c599f000850ba
|
||||
patword 0x007e 0x000c599f000850ba
|
||||
patword 0x007f 0x000c599f000850ba
|
||||
patword 0x0080 0x000c599f000850ba
|
||||
patword 0x0081 0x000c599f000850ba
|
||||
patword 0x0082 0x000c599f000850ba
|
||||
patword 0x0083 0x000c599f000850ba
|
||||
patword 0x0084 0x000c599f000850ba
|
||||
patword 0x0085 0x000c599f000850ba
|
||||
patword 0x0086 0x000c599f400850ba
|
||||
patword 0x0087 0x000c599f400850ba
|
||||
patword 0x0088 0x000c599f600850ba
|
||||
patword 0x0089 0x000c599f400850ba
|
||||
patword 0x008a 0x000c599f400850ba
|
||||
patword 0x008b 0x000c599f400850ba
|
||||
patword 0x008c 0x840c599f682e50ba
|
||||
patword 0x008d 0x840c599f482850ba
|
||||
patword 0x008e 0x840c599f000e50ba
|
||||
patword 0x008f 0x840c599f000850ba
|
||||
patword 0x0090 0x840c599f000e50ba
|
||||
patword 0x0091 0x840c599f000850ba
|
||||
patword 0x0092 0x840c599f000e50ba
|
||||
patword 0x0093 0x840c599f000850ba
|
||||
patword 0x0094 0x840c599f000e50ba
|
||||
patword 0x0095 0x840c599f000850ba
|
||||
patword 0x0096 0x840c599f000e50ba
|
||||
patword 0x0097 0x840c599f000850ba
|
||||
patword 0x0098 0x840c599f000e50ba
|
||||
patword 0x0099 0x840c599f000850ba
|
||||
patword 0x009a 0x840c599f000e50ba
|
||||
patword 0x009b 0x840c599f000850ba
|
||||
patword 0x009c 0x840c599f000e50ba
|
||||
patword 0x009d 0x840c599f000850ba
|
||||
patword 0x009e 0x840c599f000e50ba
|
||||
patword 0x009f 0x840c599f000850ba
|
||||
patword 0x00a0 0x840c599f000e50ba
|
||||
patword 0x00a1 0x840c599f000850ba
|
||||
patword 0x00a2 0x840c599f000e50ba
|
||||
patword 0x00a3 0x840c599f000850ba
|
||||
patword 0x00a4 0x840c599f000e50ba
|
||||
patword 0x00a5 0x840c599f000850ba
|
||||
patword 0x00a6 0x840c599f200e50ba
|
||||
patword 0x00a7 0x840c599f000850ba
|
||||
patword 0x00a8 0x840c599f000e50ba
|
||||
patword 0x00a9 0x840c599f000850ba
|
||||
patword 0x00aa 0x840c599f000e50ba
|
||||
patword 0x00ab 0x840c599f000850ba
|
||||
patword 0x00ac 0x840c599f000e50ba
|
||||
patword 0x00ad 0x840c599f000850ba
|
||||
patword 0x00ae 0x840c599f000e50ba
|
||||
patword 0x00af 0x840c599f000850ba
|
||||
patword 0x00b0 0x840c599f000e50ba
|
||||
patword 0x00b1 0x840c599f000850ba
|
||||
patword 0x00b2 0x840c599f000e50ba
|
||||
patword 0x00b3 0x840c599f000850ba
|
||||
patword 0x00b4 0x840c599f000e50ba
|
||||
patword 0x00b5 0x840c599f000850ba
|
||||
patword 0x00b6 0x840c599f000e50ba
|
||||
patword 0x00b7 0x840c599f000850ba
|
||||
patword 0x00b8 0x840c599f000e50ba
|
||||
patword 0x00b9 0x840c599f000850ba
|
||||
patword 0x00ba 0x840c599f000e50ba
|
||||
patword 0x00bb 0x840c599f000850ba
|
||||
patword 0x00bc 0x840c599f000e50ba
|
||||
patword 0x00bd 0x840c599f000850ba
|
||||
patword 0x00be 0x840c599f282e50ba
|
||||
patword 0x00bf 0x840c599f082850ba
|
||||
patword 0x00c0 0x840c599f000e50ba
|
||||
patword 0x00c1 0x840c599f000850ba
|
||||
patword 0x00c2 0x840c599f000e50ba
|
||||
patword 0x00c3 0x840c599f000850ba
|
||||
patword 0x00c4 0x840c599f000e50ba
|
||||
patword 0x00c5 0x840c599f000850ba
|
||||
patword 0x00c6 0x840c599f000e50ba
|
||||
patword 0x00c7 0x840c599f000850ba
|
||||
patword 0x00c8 0x840c599f000e50ba
|
||||
patword 0x00c9 0x840c599f000850ba
|
||||
patword 0x00ca 0x840c599f000e50ba
|
||||
patword 0x00cb 0x840c599f000850ba
|
||||
patword 0x00cc 0x840c599f000e50ba
|
||||
patword 0x00cd 0x840c599f000850ba
|
||||
patword 0x00ce 0x840c599f000e50ba
|
||||
patword 0x00cf 0x840c599f000850ba
|
||||
patword 0x00d0 0x840c599f000e50ba
|
||||
patword 0x00d1 0x840c599f000850ba
|
||||
patword 0x00d2 0x840c599f000e50ba
|
||||
patword 0x00d3 0x840c599f000850ba
|
||||
patword 0x00d4 0x840c599f000e50ba
|
||||
patword 0x00d5 0x840c599f000850ba
|
||||
patword 0x00d6 0x840c599f000e50ba
|
||||
patword 0x00d7 0x840c599f000850ba
|
||||
patword 0x00d8 0x840c599f200e50ba
|
||||
patword 0x00d9 0x840c599f000850ba
|
||||
patword 0x00da 0x840c599f000e50ba
|
||||
patword 0x00db 0x840c599f000850ba
|
||||
patword 0x00dc 0x840c599f000e50ba
|
||||
patword 0x00dd 0x840c599f000850ba
|
||||
patword 0x00de 0x840c599f000e50ba
|
||||
patword 0x00df 0x840c599f000850ba
|
||||
patword 0x00e0 0x840c599f000e50ba
|
||||
patword 0x00e1 0x840c599f000850ba
|
||||
patword 0x00e2 0x840c599f000e50ba
|
||||
patword 0x00e3 0x840c599f000850ba
|
||||
patword 0x00e4 0x840c599f000e50ba
|
||||
patword 0x00e5 0x840c599f000850ba
|
||||
patword 0x00e6 0x840c599f000e50ba
|
||||
patword 0x00e7 0x840c599f000850ba
|
||||
patword 0x00e8 0x840c599f000e50ba
|
||||
patword 0x00e9 0x840c599f000850ba
|
||||
patword 0x00ea 0x840c599f000e50ba
|
||||
patword 0x00eb 0x840c599f000850ba
|
||||
patword 0x00ec 0x840c599f000e50ba
|
||||
patword 0x00ed 0x840c599f000850ba
|
||||
patword 0x00ee 0x840c599f000e50ba
|
||||
patword 0x00ef 0x840c599f000850ba
|
||||
patword 0x00f0 0x040c599f000850ba
|
||||
patword 0x00f1 0x040c599f000850ba
|
||||
patword 0x00f2 0x000c599f000850ba
|
||||
patword 0x00f3 0x000c599f000850ba
|
||||
patword 0x00f4 0x0008599f200e503a
|
||||
patword 0x00f5 0x0008599f0008503a
|
||||
patword 0x00f6 0x0008599f200e503a
|
||||
patword 0x00f7 0x0008599f0008503a
|
||||
patword 0x00f8 0x0008599f0008503a
|
||||
patword 0x00f9 0x0008599f0008503a
|
||||
patword 0x00fa 0x0008599f0008503a
|
||||
patword 0x00fb 0x0008599f0008503a
|
||||
patword 0x00fc 0x0008599f0008503a
|
||||
patword 0x00fd 0x0008599f0008503a
|
||||
patword 0x00fe 0x0008599f0008503a
|
||||
patword 0x00ff 0x0008599f0008503a
|
||||
patword 0x0100 0x0008599f0008503a
|
||||
patword 0x0101 0x0008599f0008503a
|
||||
patword 0x0102 0x0008599f0008503a
|
||||
patword 0x0103 0x0008599f0008503a
|
||||
patword 0x0104 0x0008599f0008503a
|
||||
patword 0x0105 0x0008599f0008503a
|
||||
patword 0x0106 0x0008599f0008503a
|
||||
patword 0x0107 0x0008599f0008503a
|
||||
patword 0x0108 0x0008599f0008503a
|
||||
patword 0x0109 0x0008599f0008503a
|
||||
patword 0x010a 0x0008599f0008503a
|
||||
patword 0x010b 0x0008599f0008503a
|
||||
patword 0x010c 0x0008599f0008503a
|
||||
patword 0x010d 0x0008599f0008503a
|
||||
patword 0x010e 0x0008599f0008503a
|
||||
patword 0x010f 0x0008599f0008503a
|
||||
patword 0x0110 0x0008599f0008503a
|
||||
patword 0x0111 0x0008599f0008503a
|
||||
patioctrl 0x8f0effff6dbffdbf
|
||||
patlimits 0x0000 0x0110
|
||||
patloop 0 0x00be 0x00ef
|
||||
patnloop 0 199
|
||||
patloop 1 0x0400 0x0400
|
||||
patnloop 1 0
|
||||
patloop 2 0x0400 0x0400
|
||||
patnloop 2 0
|
||||
patwait 0 0x002e
|
||||
patwaittime 0 800
|
||||
patwait 1 0x0400
|
||||
patwaittime 1 0
|
||||
patwait 2 0x0400
|
||||
patwaittime 2 0
|
||||
|
||||
patloop 3 0x1fff 0x1fff
|
||||
patnloop 3 0
|
||||
patloop 4 0x1fff 0x1fff
|
||||
patnloop 4 0
|
||||
patloop 5 0x1fff 0x1fff
|
||||
patnloop 5 0
|
||||
patwait 3 0x1fff
|
||||
patwaittime 3 0
|
||||
patwait 4 0x1fff
|
||||
patwaittime 4 0
|
||||
patwait 5 0x1fff
|
||||
patwaittime 5 0
|
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
Executable file
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
4
slsDetectorServers/moenchDetectorServer/config_moench.txt
Executable file
4
slsDetectorServers/moenchDetectorServer/config_moench.txt
Executable file
@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
#chip version version (multiplied by 10)
|
||||
chipversion 11
|
1
slsDetectorServers/moenchDetectorServer/detid_moench.txt
Executable file
1
slsDetectorServers/moenchDetectorServer/detid_moench.txt
Executable file
@ -0,0 +1 @@
|
||||
1234
|
File diff suppressed because it is too large
Load Diff
@ -4,18 +4,140 @@
|
||||
#include "RegisterDefs.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#define MIN_REQRD_VRSN_T_RD_API 0x180314
|
||||
#define REQRD_FRMWR_VRSN 0x221205
|
||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x221130 // 1.0 pcb (version = 010)
|
||||
#define REQRD_FRMWRE_VRSN 0x221130 // 2.0 pcb (version = 011)
|
||||
|
||||
#define NUM_HARDWARE_VERSIONS (1)
|
||||
#define NUM_HARDWARE_VERSIONS (2)
|
||||
#define HARDWARE_VERSION_NUMBERS \
|
||||
{ 0x1 }
|
||||
{ 0x2, 0x3 }
|
||||
#define HARDWARE_VERSION_NAMES \
|
||||
{ "1.0" }
|
||||
{ "1.0", "2.0" }
|
||||
|
||||
#define ID_FILE ("detid_moench.txt")
|
||||
#define CONFIG_FILE ("config_moench.txt")
|
||||
#define LINKED_SERVER_NAME "moenchDetectorServer"
|
||||
|
||||
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
|
||||
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
|
||||
|
||||
/* Hardware Definitions */
|
||||
#define NCHAN (400 * 400)
|
||||
#define NCHIP (1)
|
||||
#define NDAC (8)
|
||||
#define DYNAMIC_RANGE (16)
|
||||
#define NUM_BYTES_PER_PIXEL (DYNAMIC_RANGE / 8)
|
||||
#define DATA_BYTES (NCHIP * NCHAN * NUM_BYTES_PER_PIXEL)
|
||||
#define CLK_RUN (40) // MHz
|
||||
#define CLK_SYNC (20) // MHz
|
||||
#define ADC_CLK_INDEX (1)
|
||||
#define DBIT_CLK_INDEX (0)
|
||||
|
||||
/** Default Parameters */
|
||||
#define DEFAULT_NUM_FRAMES (1)
|
||||
#define DEFAULT_STARTING_FRAME_NUMBER (1)
|
||||
#define DEFAULT_NUM_CYCLES (1)
|
||||
#define DEFAULT_EXPTIME (10 * 1000) // ns
|
||||
#define DEFAULT_PERIOD (2 * 1000 * 1000) // ns
|
||||
#define DEFAULT_DELAY (0)
|
||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||
#define DEFAULT_SETTINGS (GAIN0)
|
||||
#define DEFAULT_GAINMODE (DYNAMIC)
|
||||
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
||||
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
|
||||
#define DEFAULT_FLIP_ROWS (0)
|
||||
#define DEFAULT_FILTER_RESISTOR (1) // higher resistor
|
||||
#define DEFAULT_FILTER_CELL (0)
|
||||
|
||||
#define HIGHVOLTAGE_MIN (60)
|
||||
#define HIGHVOLTAGE_MAX (200)
|
||||
#define DAC_MIN_MV (0)
|
||||
#define DAC_MAX_MV (2500)
|
||||
#define MAX_FILTER_CELL_VAL (12)
|
||||
|
||||
#define READ_N_ROWS_MULTIPLE (16) // 400 rows/50packets * 2 interfaces
|
||||
#define MIN_ROWS_PER_READOUT (16)
|
||||
#define MAX_ROWS_PER_READOUT (400)
|
||||
#define ROWS_PER_PACKET (8)
|
||||
|
||||
/* Defines in the Firmware */
|
||||
#define MAX_TIMESLOT_VAL (0x1F)
|
||||
#define MAX_THRESHOLD_TEMP_VAL (127999) // millidegrees
|
||||
#define ACQ_TIME_MIN_CLOCK (2)
|
||||
#define ASIC_FILTER_MAX_RES_VALUE (1)
|
||||
#define MAX_SELECT_CHIP10_VAL (63)
|
||||
|
||||
#define MAX_PHASE_SHIFTS (240)
|
||||
#define BIT16_MASK (0xFFFF)
|
||||
|
||||
#define GAIN_VAL_OFST (14)
|
||||
#define GAIN_VAL_MSK (0x3 << GAIN_VAL_OFST)
|
||||
|
||||
// pipeline
|
||||
#define ADC_PORT_INVERT_VAL (0x5A5A5A5A)
|
||||
#define ADC_PORT_INVERT_BOARD2_VAL (0x453b2a9c)
|
||||
|
||||
// 2.0 pcb (chipv1.1)
|
||||
#define SAMPLE_ADC_FULL_SPEED_CHIP11 \
|
||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
|
||||
SAMPLE_DGTL_SAMPLE_0_VAL + SAMPLE_DECMT_FACTOR_FULL_VAL) // 0x0000
|
||||
#define SAMPLE_ADC_HALF_SPEED_CHIP11 \
|
||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
|
||||
SAMPLE_DGTL_SAMPLE_1_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1110
|
||||
#define SAMPLE_ADC_QUARTER_SPEED_CHIP11 \
|
||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_3_VAL + \
|
||||
SAMPLE_DGTL_SAMPLE_2_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2230
|
||||
|
||||
#define ADC_PHASE_FULL_SPEED_CHIP11 (160)
|
||||
#define ADC_PHASE_HALF_SPEED_CHIP11 (160)
|
||||
#define ADC_PHASE_QUARTER_SPEED_CHIP11 (160)
|
||||
|
||||
#define DBIT_PHASE_FULL_SPEED_CHIP11 (80)
|
||||
#define DBIT_PHASE_HALF_SPEED_CHIP11 (135)
|
||||
#define DBIT_PHASE_QUARTER_SPEED_CHIP11 (135)
|
||||
|
||||
#define ADC_OFST_FULL_SPEED_VAL_CHIP11 (0x10)
|
||||
#define ADC_OFST_HALF_SPEED_VAL_CHIP11 (0x08)
|
||||
#define ADC_OFST_QUARTER_SPEED_VAL_CHIP11 (0x04)
|
||||
|
||||
// 2.0 pcb (chipv1.0)
|
||||
#define SAMPLE_ADC_FULL_SPEED_CHIP10 \
|
||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
|
||||
SAMPLE_DGTL_SAMPLE_1_VAL + SAMPLE_DECMT_FACTOR_FULL_VAL) // 0x0100
|
||||
#define SAMPLE_ADC_HALF_SPEED_CHIP10 \
|
||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
|
||||
SAMPLE_DGTL_SAMPLE_3_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1310
|
||||
#define SAMPLE_ADC_QUARTER_SPEED_CHIP10 \
|
||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_3_VAL + \
|
||||
SAMPLE_DGTL_SAMPLE_6_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2630
|
||||
|
||||
#define ADC_PHASE_FULL_SPEED_CHIP10 (160)
|
||||
#define ADC_PHASE_HALF_SPEED_CHIP10 (160)
|
||||
#define ADC_PHASE_QUARTER_SPEED_CHIP10 (160)
|
||||
|
||||
#define DBIT_PHASE_FULL_SPEED_CHIP10 (125)
|
||||
#define DBIT_PHASE_HALF_SPEED_CHIP10 (175)
|
||||
#define DBIT_PHASE_QUARTER_SPEED_CHIP10 (175)
|
||||
|
||||
#define ADC_OFST_FULL_SPEED_VAL_CHIP10 (0x10)
|
||||
#define ADC_OFST_HALF_SPEED_VAL_CHIP10 (0x08)
|
||||
#define ADC_OFST_QUARTER_SPEED_VAL_CHIP10 (0x04)
|
||||
|
||||
// 1.0 pcb (2 resistor network)
|
||||
#define SAMPLE_ADC_HALF_SPEED_BOARD2 \
|
||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
|
||||
SAMPLE_DGTL_SAMPLE_3_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1300
|
||||
#define SAMPLE_ADC_QUARTER_SPEED_BOARD2 \
|
||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
|
||||
SAMPLE_DGTL_SAMPLE_6_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2610
|
||||
|
||||
#define ADC_PHASE_HALF_SPEED_BOARD2 (110)
|
||||
#define ADC_PHASE_QUARTER_SPEED_BOARD2 (220)
|
||||
|
||||
#define DBIT_PHASE_HALF_SPEED_BOARD2 (150)
|
||||
#define DBIT_PHASE_QUARTER_SPEED_BOARD2 (150)
|
||||
|
||||
#define ADC_OFST_HALF_SPEED_BOARD2_VAL (0x10)
|
||||
#define ADC_OFST_QUARTER_SPEED_BOARD2_VAL (0x08)
|
||||
|
||||
/* Struct Definitions */
|
||||
typedef struct udp_header_struct {
|
||||
@ -45,111 +167,44 @@ typedef struct udp_header_struct {
|
||||
#define UDP_IP_HEADER_LENGTH_BYTES (28)
|
||||
|
||||
/* Enums */
|
||||
enum ADCINDEX { TEMP_FPGA, TEMP_ADC };
|
||||
enum DACINDEX {
|
||||
MO_VBP_COLBUF,
|
||||
MO_VIPRE,
|
||||
MO_VIN_CM,
|
||||
MO_VB_SDA,
|
||||
MO_VCASC_SFP,
|
||||
MO_VOUT_CM,
|
||||
MO_VIPRE_CDS,
|
||||
MO_IBIAS_SFP
|
||||
J_VB_COMP,
|
||||
J_VDD_PROT,
|
||||
J_VIN_COM,
|
||||
J_VREF_PRECH,
|
||||
J_VB_PIXBUF,
|
||||
J_VB_DS,
|
||||
J_VREF_DS,
|
||||
J_VREF_COMP
|
||||
};
|
||||
#define DAC_NAMES \
|
||||
"vbp_colbuf", "vipre", "vin_cm", "vb_sda", "vcasc_sfp", "vout_cm", \
|
||||
"vipre_cds", "ibias_sfp"
|
||||
"vb_comp", "vdd_prot", "vin_com", "vref_prech", "vb_pixbuf", "vb_ds", \
|
||||
"vref_ds", "vref_comp"
|
||||
|
||||
#define DEFAULT_DAC_VALS \
|
||||
{ \
|
||||
1300, /* MO_VBP_COLBUF */ \
|
||||
1000, /* MO_VIPRE */ \
|
||||
1400, /* MO_VIN_CM */ \
|
||||
680, /* MO_VB_SDA */ \
|
||||
1428, /* MO_VCASC_SFP */ \
|
||||
1200, /* MO_VOUT_CM */ \
|
||||
800, /* MO_VIPRE_CDS */ \
|
||||
900 /* MO_IBIAS_SFP */ \
|
||||
1220, /* J_VB_COMP */ \
|
||||
3000, /* J_VDD_PROT */ \
|
||||
1053, /* J_VIN_COM */ \
|
||||
1450, /* J_VREF_PRECH */ \
|
||||
750, /* J_VB_PIXBUF */ \
|
||||
1000, /* J_VB_DS */ \
|
||||
480, /* J_VREF_DS */ \
|
||||
420 /* J_VREF_COMP */ \
|
||||
};
|
||||
|
||||
enum CLKINDEX { RUN_CLK, ADC_CLK, SYNC_CLK, DBIT_CLK, NUM_CLOCKS };
|
||||
#define CLK_NAMES "run", "adc", "sync", "dbit"
|
||||
enum MASTERINDEX { MASTER_HARDWARE, OW_MASTER, OW_SLAVE };
|
||||
#define MASTER_NAMES "hardware", "master", "slave"
|
||||
|
||||
/* Hardware Definitions */
|
||||
#define NCHAN (32)
|
||||
#define NCHIP (1)
|
||||
#define NDAC (8)
|
||||
#define DYNAMIC_RANGE (16)
|
||||
#define NUM_BYTES_PER_PIXEL (DYNAMIC_RANGE / 8)
|
||||
#define CLK_FREQ (156.25) /* MHz */
|
||||
#define NSAMPLES_PER_ROW (25)
|
||||
#define NCHANS_PER_ADC (25)
|
||||
#define NUMSETTINGS (2)
|
||||
#define NSPECIALDACS (3)
|
||||
#define SPECIALDACINDEX {J_VREF_PRECH, J_VREF_DS, J_VREF_COMP};
|
||||
#define SPECIAL_DEFAULT_DYNAMIC_GAIN_VALS \
|
||||
{ 1450, 480, 420 }
|
||||
#define SPECIAL_DEFAULT_DYNAMICHG0_GAIN_VALS \
|
||||
{ 1550, 450, 620 }
|
||||
|
||||
/** Default Parameters */
|
||||
#define DEFAULT_PATTERN_FILE ("DefaultPattern_moench.txt")
|
||||
#define DEFAULT_STARTING_FRAME_NUMBER (1)
|
||||
#define DEFAULT_DATA_BYTES (NCHIP * NCHAN * NUM_BITS_PER_PIXEL)
|
||||
#define DEFAULT_NUM_SAMPLES (5000)
|
||||
#define DEFAULT_EXPTIME (0)
|
||||
#define DEFAULT_NUM_FRAMES (1)
|
||||
#define DEFAULT_NUM_CYCLES (1)
|
||||
#define DEFAULT_PERIOD (1 * 1000 * 1000) // ns
|
||||
#define DEFAULT_DELAY (0)
|
||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||
#define DEFAULT_VLIMIT (-100)
|
||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
||||
|
||||
#define DEFAULT_RUN_CLK_AT_STARTUP (200) // 40
|
||||
#define DEFAULT_ADC_CLK_AT_STARTUP (40) // 20
|
||||
#define DEFAULT_SYNC_CLK_AT_STARTUP (40) // 20
|
||||
#define DEFAULT_DBIT_CLK_AT_STARTUP (200)
|
||||
|
||||
#define DEFAULT_RUN_CLK (40)
|
||||
#define DEFAULT_ADC_CLK (20)
|
||||
#define DEFAULT_DBIT_CLK (40)
|
||||
#define DEFAULT_ADC_PHASE_DEG (30)
|
||||
|
||||
#define DEFAULT_PIPELINE (15)
|
||||
#define DEFAULT_SETTINGS (G4_HIGHGAIN)
|
||||
|
||||
#define UDP_HEADER_MAX_FRAME_VALUE (0xFFFFFFFFFFFF)
|
||||
|
||||
// settings
|
||||
#define DEFAULT_PATMASK (0x00000C800000800AULL)
|
||||
#define G1_HIGHGAIN_PATSETBIT (0x00000C0000008008ULL)
|
||||
#define G1_LOWGAIN_PATSETBIT (0x0000040000008000ULL)
|
||||
#define G2_HIGHCAP_HIGHGAIN_PATSETBIT (0x0000080000000008ULL)
|
||||
#define G2_HIGHCAP_LOWGAIN_PATSETBIT (0x0000000000000000ULL)
|
||||
#define G2_LOWCAP_HIGHGAIN_PATSETBIT (0x00000C800000800AULL)
|
||||
#define G2_LOWCAP_LOWGAIN_PATSETBIT (0x0000048000008002ULL)
|
||||
#define G4_HIGHGAIN_PATSETBIT (0x000008800000000AULL)
|
||||
#define G4_LOWGAIN_PATSETBIT (0x0000008000000002ULL)
|
||||
|
||||
#define HIGHVOLTAGE_MIN (60)
|
||||
#define HIGHVOLTAGE_MAX (200) // min dac val
|
||||
#define DAC_MIN_MV (0)
|
||||
#define DAC_MAX_MV (2500)
|
||||
|
||||
/* Defines in the Firmware */
|
||||
#define DIGITAL_IO_DELAY_MAXIMUM_PS \
|
||||
((OUTPUT_DELAY_0_OTPT_STTNG_MSK >> OUTPUT_DELAY_0_OTPT_STTNG_OFST) * \
|
||||
OUTPUT_DELAY_0_OTPT_STTNG_STEPS)
|
||||
#define MAX_PHASE_SHIFTS_STEPS (8)
|
||||
|
||||
#define WAIT_TME_US_FR_ACQDONE_REG \
|
||||
(100) // wait time in us after acquisition done to ensure there is no data
|
||||
// in fifo
|
||||
#define WAIT_TIME_US_PLL (10 * 1000)
|
||||
#define WAIT_TIME_US_STP_ACQ (100)
|
||||
#define WAIT_TIME_CONFIGURE_MAC (2 * 1000 * 1000)
|
||||
#define WAIT_TIME_PATTERN_READ (10)
|
||||
#define WAIT_TIME_1US_FOR_LOOP_CNT (50) // around 30 is 1 us in blackfin
|
||||
|
||||
/* MSB & LSB DEFINES */
|
||||
#define MSB_OF_64_BIT_REG_OFST (32)
|
||||
#define LSB_OF_64_BIT_REG_OFST (0)
|
||||
#define BIT32_MSK (0xFFFFFFFF)
|
||||
#define BIT16_MASK (0xFFFF)
|
||||
|
||||
#define ADC_PORT_INVERT_VAL (0x4a342593)
|
||||
#define MAXIMUM_ADC_CLK (20)
|
||||
#define PLL_VCO_FREQ_MHZ (800)
|
||||
enum NETWORKINDEX { TXN_FRAME, FLOWCTRL_10G };
|
||||
enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
|
||||
#define CLK_NAMES "run", "adc", "dbit"
|
||||
|
BIN
slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
Executable file
BIN
slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
@ -4,7 +4,7 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
/**
|
||||
* Set Defines
|
||||
* @param creg control register
|
||||
@ -14,8 +14,9 @@
|
||||
* @param prmsk pll reset mask
|
||||
* @param amsk address mask
|
||||
* @param aofst address offset
|
||||
* @param wd2msk write parameter mask for pll for dbit clock (Jungfrau only)
|
||||
* @param clk2Index clkIndex of second pll (Jungfrau only)
|
||||
* @param wd2msk write parameter mask for pll for dbit clock (Jungfrau/moench
|
||||
* only)
|
||||
* @param clk2Index clkIndex of second pll (Jungfrau/moench only)
|
||||
*/
|
||||
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk,
|
||||
uint32_t wpmsk, uint32_t prmsk, uint32_t amsk,
|
||||
@ -50,8 +51,8 @@ void ALTERA_PLL_ResetPLLAndReconfiguration();
|
||||
* Set PLL Reconfig register
|
||||
* @param reg register
|
||||
* @param val value
|
||||
* @param useDefaultWRMask only jungfrau for dbit clk (clkindex1, use second WR
|
||||
* mask)
|
||||
* @param useDefaultWRMask only jungfrau/moench for dbit clk (clkindex1, use
|
||||
* second WR mask)
|
||||
*/
|
||||
void ALTERA_PLL_SetPllReconfigReg(uint32_t reg, uint32_t val,
|
||||
int useSecondWRMask);
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "clogger.h"
|
||||
|
||||
void initializePatternAddresses();
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#ifdef CHIPTESTBOARDD
|
||||
#ifdef VIRTUAL
|
||||
void initializePatternWord();
|
||||
#endif
|
||||
|
@ -6,8 +6,8 @@
|
||||
#include "AD9252.h" // old board compatibility
|
||||
#include "clogger.h" // runState(enum TLogLevel)
|
||||
#endif
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || \
|
||||
defined(MOENCHD)
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
|
||||
defined(CHIPTESTBOARDD)
|
||||
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
|
||||
#endif
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
|
||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
#include "nios.h"
|
||||
#elif defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || \
|
||||
defined(MOENCHD)
|
||||
#elif defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
|
||||
defined(CHIPTESTBOARDD)
|
||||
#include "blackfin.h"
|
||||
#endif
|
||||
|
||||
@ -61,15 +61,16 @@ typedef struct udpStruct_s {
|
||||
int isInitCheckDone();
|
||||
int getInitResult(char **mess);
|
||||
void basictests();
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || \
|
||||
defined(MOENCHD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
|
||||
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int checkType();
|
||||
int testFpga();
|
||||
int testBus();
|
||||
#endif
|
||||
|
||||
#if defined(GOTTHARDD) || \
|
||||
((defined(EIGERD) || defined(JUNGFRAUD)) && defined(VIRTUAL))
|
||||
((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \
|
||||
defined(VIRTUAL))
|
||||
void setTestImageMode(int ival);
|
||||
int getTestImageMode();
|
||||
#endif
|
||||
@ -77,19 +78,24 @@ int getTestImageMode();
|
||||
// Ids
|
||||
void getServerVersion(char *version);
|
||||
u_int64_t getFirmwareVersion();
|
||||
#ifdef EIGERD
|
||||
uint64_t getFrontEndFirmwareVersion(enum fpgaPosition fpgaPosition);
|
||||
#endif
|
||||
u_int64_t getFirmwareAPIVersion();
|
||||
#ifndef EIGERD
|
||||
void getHardwareVersion(char *version);
|
||||
#ifdef EIGERD
|
||||
int getHardwareVersionNumber();
|
||||
#else
|
||||
u_int16_t getHardwareVersionNumber();
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD)
|
||||
u_int16_t getHardwareSerialNumber();
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(GOTTHARD2D) || defined(MYTHEN3D) || \
|
||||
defined(GOTTHARDD)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) || \
|
||||
defined(MYTHEN3D) || defined(GOTTHARDD)
|
||||
int isHardwareVersion_1_0();
|
||||
#endif
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
int getChipVersion();
|
||||
void setChipVersion(int version);
|
||||
#endif
|
||||
@ -98,7 +104,7 @@ u_int32_t getDetectorNumber();
|
||||
#endif
|
||||
|
||||
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(MYTHEN3D) || \
|
||||
defined(JUNGFRAUD)
|
||||
defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
int getModuleId(int *ret, char *mess);
|
||||
int updateModuleId();
|
||||
#ifndef EIGERD
|
||||
@ -125,7 +131,7 @@ void checkVirtual9MFlag();
|
||||
void allocateDetectorStructureMemory();
|
||||
#endif
|
||||
void setupDetector();
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
int updateDatabytesandAllocateRAM();
|
||||
void updateDataBytes();
|
||||
#endif
|
||||
@ -141,7 +147,8 @@ void setASICDefaults();
|
||||
#ifdef MYTHEN3D
|
||||
void setADIFDefaults();
|
||||
#endif
|
||||
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(JUNGFRAUD)
|
||||
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(JUNGFRAUD) || \
|
||||
defined(MOENCHD)
|
||||
int readConfigFile();
|
||||
#endif
|
||||
#if defined(GOTTHARDD) || defined(GOTTHARD2D) || defined(EIGERD) || \
|
||||
@ -157,14 +164,13 @@ void resetToHardwareSettings();
|
||||
int writeRegister(uint32_t offset, uint32_t data);
|
||||
int readRegister(uint32_t offset, uint32_t *retval);
|
||||
#elif GOTTHARDD
|
||||
uint32_t
|
||||
writeRegister16And32(uint32_t offset,
|
||||
uint32_t data); // FIXME its not there in ctb or moench?
|
||||
uint32_t writeRegister16And32(uint32_t offset,
|
||||
uint32_t data); // FIXME its not there in ctb
|
||||
uint32_t readRegister16And32(uint32_t offset);
|
||||
#endif
|
||||
|
||||
// firmware functions (resets)
|
||||
#if defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD) || \
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
|
||||
defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
void cleanFifos();
|
||||
void resetCore();
|
||||
@ -189,11 +195,11 @@ int getDynamicRange(int *retval);
|
||||
int setROI(ROI arg);
|
||||
ROI getROI();
|
||||
#endif
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
void setADCInvertRegister(uint32_t val);
|
||||
uint32_t getADCInvertRegister();
|
||||
#endif
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
int setADCEnableMask(uint32_t mask);
|
||||
uint32_t getADCEnableMask();
|
||||
void setADCEnableMask_10G(uint32_t mask);
|
||||
@ -221,11 +227,11 @@ int getReadoutMode();
|
||||
#endif
|
||||
|
||||
// parameters - timer
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD)
|
||||
int selectStoragecellStart(int pos);
|
||||
int getMaxStoragecellStart();
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(EIGERD) || defined(MOENCHD) || \
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD) || \
|
||||
defined(CHIPTESTBOARDD)
|
||||
int setNextFrameNumber(uint64_t value);
|
||||
int getNextFrameNumber(uint64_t *value);
|
||||
@ -265,13 +271,13 @@ int64_t getSubDeadTime();
|
||||
int64_t getMeasuredPeriod();
|
||||
int64_t getMeasuredSubPeriod();
|
||||
#endif
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD)
|
||||
void setNumAdditionalStorageCells(int val);
|
||||
int getNumAdditionalStorageCells();
|
||||
int setStorageCellDelay(int64_t val);
|
||||
int64_t getStorageCellDelay();
|
||||
#endif
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
int setNumAnalogSamples(int val);
|
||||
int getNumAnalogSamples();
|
||||
#endif
|
||||
@ -286,8 +292,8 @@ uint32_t getCounterMask();
|
||||
void updatePacketizing();
|
||||
#endif
|
||||
|
||||
#if defined(JUNGFRAUD) || defined(GOTTHARDD) || defined(CHIPTESTBOARDD) || \
|
||||
defined(MOENCHD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \
|
||||
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int setDelayAfterTrigger(int64_t val);
|
||||
int64_t getDelayAfterTrigger();
|
||||
int64_t getNumFramesLeft();
|
||||
@ -301,7 +307,7 @@ int64_t getNumBurstsLeft();
|
||||
#ifdef GOTTHARDD
|
||||
int64_t getExpTimeLeft();
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD) || \
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
|
||||
defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int64_t getFramesFromStart();
|
||||
int64_t getActualTime();
|
||||
@ -312,7 +318,7 @@ int64_t getMeasurementTime();
|
||||
#if defined(MYTHEN3D) || defined(EIGERD)
|
||||
void getModule(sls_detector_module *myMod);
|
||||
#endif
|
||||
#if (!defined(CHIPTESTBOARDD)) && (!defined(MOENCHD)) && (!defined(GOTTHARD2D))
|
||||
#if (!defined(CHIPTESTBOARDD)) && (!defined(GOTTHARD2D))
|
||||
int setModule(sls_detector_module myMod, char *mess);
|
||||
#endif
|
||||
|
||||
@ -328,7 +334,7 @@ int getAllTrimbits();
|
||||
enum detectorSettings setSettings(enum detectorSettings sett);
|
||||
#endif
|
||||
enum detectorSettings getSettings();
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
enum gainMode getGainMode();
|
||||
void setGainMode(enum gainMode mode);
|
||||
#endif
|
||||
@ -357,7 +363,7 @@ void setDAC(enum DACINDEX ind, int val, int mV);
|
||||
#endif
|
||||
int getDAC(enum DACINDEX ind, int mV);
|
||||
int getMaxDacSteps();
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
int dacToVoltage(int dac);
|
||||
int checkVLimitCompliant(int mV);
|
||||
int checkVLimitDacCompliant(int dac);
|
||||
@ -380,14 +386,15 @@ void powerOff();
|
||||
|
||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int getADC(enum ADCINDEX ind, int *value);
|
||||
#elif !defined(MOENCHD)
|
||||
#else
|
||||
int getADC(enum ADCINDEX ind);
|
||||
#endif
|
||||
|
||||
int setHighVoltage(int val);
|
||||
|
||||
// parameters - timing, extsig
|
||||
#if defined(EIGERD) || defined(GOTTHARD2D) || defined(JUNGFRAUD)
|
||||
#if defined(EIGERD) || defined(GOTTHARD2D) || defined(JUNGFRAUD) || \
|
||||
defined(MOENCHD)
|
||||
int setMaster(enum MASTERINDEX m);
|
||||
#endif
|
||||
#ifdef EIGERD
|
||||
@ -395,11 +402,11 @@ int setTop(enum TOPINDEX t);
|
||||
int isTop(int *retval);
|
||||
#endif
|
||||
#if defined(MYTHEN3D) || defined(EIGERD) || defined(GOTTHARDD) || \
|
||||
defined(GOTTHARD2D) || defined(JUNGFRAUD)
|
||||
defined(GOTTHARD2D) || defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
int isMaster(int *retval);
|
||||
#endif
|
||||
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
int getSynchronization();
|
||||
void setSynchronization(int enable);
|
||||
#endif
|
||||
@ -430,29 +437,30 @@ int getExtSignal(int signalIndex);
|
||||
#ifdef GOTTHARDD
|
||||
void calcChecksum(mac_conf *mac, int sourceip, int destip);
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(GOTTHARD2D)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D)
|
||||
void setNumberofUDPInterfaces(int val);
|
||||
#endif
|
||||
int getNumberofUDPInterfaces();
|
||||
|
||||
#if defined(JUNGFRAUD) || defined(EIGERD) || defined(MYTHEN3D) || \
|
||||
defined(GOTTHARD2D)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD) || \
|
||||
defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int getNumberofDestinations(int *retval);
|
||||
int setNumberofDestinations(int value);
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(MYTHEN3D) || \
|
||||
defined(GOTTHARD2D)
|
||||
int getFirstUDPDestination();
|
||||
void setFirstUDPDestination(int value);
|
||||
#endif
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
void selectPrimaryInterface(int val);
|
||||
int getPrimaryInterface();
|
||||
void setupHeader(int iRxEntry, enum interfaceType type, uint32_t destip,
|
||||
uint64_t destmac, uint32_t destport, uint64_t sourcemac,
|
||||
uint32_t sourceip, uint32_t sourceport);
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(GOTTHARD2D) || defined(MYTHEN3D) || \
|
||||
defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) || \
|
||||
defined(MYTHEN3D) || defined(CHIPTESTBOARDD)
|
||||
void calcChecksum(udp_header *udp);
|
||||
#endif
|
||||
#ifdef GOTTHARDD
|
||||
@ -471,22 +479,15 @@ int getInterruptSubframe();
|
||||
int setReadNRows(int value);
|
||||
int getReadNRows();
|
||||
#endif
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD) || defined(EIGERD) || \
|
||||
defined(MYTHEN3D)
|
||||
#if defined(CHIPTESTBOARDD) || defined(EIGERD) || defined(MYTHEN3D)
|
||||
int enableTenGigabitEthernet(int val);
|
||||
#endif
|
||||
|
||||
// very detector specific
|
||||
|
||||
// moench specific - powerchip
|
||||
#ifdef MOENCHD
|
||||
int powerChip(int on);
|
||||
int setAnalogOnlyReadout();
|
||||
#endif
|
||||
|
||||
// chip test board or moench specific - configure frequency, phase, pll,
|
||||
// chip test board specific - configure frequency, phase, pll,
|
||||
// flashing firmware
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
int setPhase(enum CLKINDEX ind, int val, int degrees);
|
||||
int getPhase(enum CLKINDEX ind, int degrees);
|
||||
int getMaxPhase(enum CLKINDEX ind);
|
||||
@ -505,9 +506,9 @@ int setLEDEnable(int enable);
|
||||
void setDigitalIODelay(uint64_t pinMask, int delay);
|
||||
#endif
|
||||
|
||||
// jungfrau specific - powerchip, autocompdisable, clockdiv, asictimer, clock,
|
||||
// pll, flashing firmware
|
||||
#ifdef JUNGFRAUD
|
||||
// jungfrau/moench specific - powerchip, autocompdisable, clockdiv, asictimer,
|
||||
// clock, pll, flashing firmware
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
int setReadNRows(int value);
|
||||
int getReadNRows();
|
||||
void initReadoutConfiguration();
|
||||
@ -517,7 +518,9 @@ void configureChip();
|
||||
int autoCompDisable(int on);
|
||||
int setComparatorDisableTime(int64_t val);
|
||||
int64_t getComparatorDisableTime();
|
||||
#ifndef MOENCHD
|
||||
void configureASICTimer();
|
||||
#endif
|
||||
int setReadoutSpeed(int val);
|
||||
int getReadoutSpeed(int *retval);
|
||||
int setPhase(enum CLKINDEX ind, int val, int degrees);
|
||||
@ -637,11 +640,12 @@ int setBadChannels(int numChannels, int *channelList);
|
||||
int *getBadChannels(int *numChannels);
|
||||
#endif
|
||||
|
||||
#if defined(JUNGFRAUD) || defined(EIGERD)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD)
|
||||
int getTenGigaFlowControl();
|
||||
int setTenGigaFlowControl(int value);
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(EIGERD) || defined(MYTHEN3D)
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD) || \
|
||||
defined(MYTHEN3D)
|
||||
int getTransmissionDelayFrame();
|
||||
int setTransmissionDelayFrame(int value);
|
||||
#endif
|
||||
@ -661,14 +665,14 @@ int stopStateMachine();
|
||||
#ifdef MYTHEN3D
|
||||
int softwareTrigger();
|
||||
#endif
|
||||
#if defined(EIGERD) || defined(JUNGFRAUD)
|
||||
#if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
int softwareTrigger(int block);
|
||||
#endif
|
||||
#if defined(EIGERD) || defined(MYTHEN3D)
|
||||
int startReadOut();
|
||||
#endif
|
||||
enum runStatus getRunStatus();
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
void readFrames(int *ret, char *mess);
|
||||
#endif
|
||||
#ifdef EIGERD
|
||||
@ -676,7 +680,7 @@ void waitForAcquisitionEnd(int *ret, char *mess);
|
||||
#else
|
||||
void waitForAcquisitionEnd();
|
||||
#endif
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
void readandSendUDPFrames(int *ret, char *mess);
|
||||
void unsetFifoReadStrobes();
|
||||
void readSample(int ns);
|
||||
@ -685,8 +689,8 @@ int checkFifoForEndOfAcquisition();
|
||||
int readFrameFromFifo();
|
||||
#endif
|
||||
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || \
|
||||
defined(MOENCHD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
|
||||
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
u_int32_t runBusy();
|
||||
#endif
|
||||
|
||||
@ -697,7 +701,7 @@ u_int32_t runState(enum TLogLevel lev);
|
||||
// common
|
||||
int calculateDataBytes();
|
||||
int getTotalNumberOfChannels();
|
||||
#if defined(MOENCHD) || defined(CHIPTESTBOARDD)
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
void getNumberOfChannels(int *nchanx, int *nchany);
|
||||
#endif
|
||||
int getNumberOfChips();
|
||||
|
@ -306,3 +306,4 @@ int get_module(int);
|
||||
int get_synchronization(int);
|
||||
int set_synchronization(int);
|
||||
int get_hardware_version(int);
|
||||
int get_frontend_firmware_version(int);
|
||||
|
@ -300,7 +300,7 @@ void AD9257_Configure() {
|
||||
AD9257_CLK_CH_IFCO_MSK);
|
||||
|
||||
// vref
|
||||
#if defined(GOTTHARDD) || defined(MOENCHD)
|
||||
#ifdef GOTTHARDD
|
||||
LOG(logINFO, ("\tVref default at 2.0\n"));
|
||||
AD9257_SetVrefVoltage(AD9257_VREF_DEFAULT_VAL, 0);
|
||||
#else
|
||||
|
@ -127,7 +127,7 @@ uint32_t ALTERA_PLL_Cntrl_Reg = 0x0;
|
||||
uint32_t ALTERA_PLL_Param_Reg = 0x0;
|
||||
uint32_t ALTERA_PLL_Cntrl_RcnfgPrmtrRstMask = 0x0;
|
||||
uint32_t ALTERA_PLL_Cntrl_WrPrmtrMask = 0x0;
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
uint32_t ALTERA_PLL_Cntrl_DBIT_PLL_WrPrmtrMask = 0x0;
|
||||
int ALTERA_PLL_Cntrl_DBIT_ClkIndex = 0;
|
||||
|
||||
@ -136,7 +136,7 @@ uint32_t ALTERA_PLL_Cntrl_PLLRstMask = 0x0;
|
||||
uint32_t ALTERA_PLL_Cntrl_AddrMask = 0x0;
|
||||
int ALTERA_PLL_Cntrl_AddrOfst = 0;
|
||||
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk,
|
||||
uint32_t wpmsk, uint32_t prmsk, uint32_t amsk,
|
||||
int aofst, uint32_t wd2msk, int clk2Index) {
|
||||
@ -201,7 +201,7 @@ void ALTERA_PLL_SetPllReconfigReg(uint32_t reg, uint32_t val,
|
||||
reg, val, useSecondWRMask));
|
||||
|
||||
uint32_t wrmask = ALTERA_PLL_Cntrl_WrPrmtrMask;
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
if (useSecondWRMask) {
|
||||
wrmask = ALTERA_PLL_Cntrl_DBIT_PLL_WrPrmtrMask;
|
||||
}
|
||||
@ -252,7 +252,7 @@ void ALTERA_PLL_SetPhaseShift(int32_t phase, int clkIndex, int pos) {
|
||||
LOG(logDEBUG1, ("C%d phase word:0x%08x\n", clkIndex, value));
|
||||
|
||||
int useSecondWR = 0;
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
if (clkIndex == ALTERA_PLL_Cntrl_DBIT_ClkIndex) {
|
||||
useSecondWR = 1;
|
||||
}
|
||||
|
@ -224,10 +224,10 @@ int getModuleIdInFile(int *ret, char *mess, char *fileName) {
|
||||
// open id file
|
||||
FILE *fd = fopen(fname, "r");
|
||||
if (fd == NULL) {
|
||||
#ifdef JUNGFRAUD
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
*ret = OK;
|
||||
LOG(logWARNING,
|
||||
("Could not find detid_jungfrau.txt to set module id\n"));
|
||||
LOG(logWARNING, ("Could not find detid file to set module id. "
|
||||
"Continuing without.\n"));
|
||||
return 0;
|
||||
#else
|
||||
*ret = FAIL;
|
||||
@ -485,7 +485,7 @@ int setupDetectorServer(char *mess, char *sname) {
|
||||
|
||||
// blackfin boards (respawn) (only kept for backwards compatibility)
|
||||
#ifndef VIRTUAL
|
||||
#if defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD) || \
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
|
||||
defined(GOTTHARDD)
|
||||
// delete every line with DetectorServer in /etc/inittab
|
||||
strcpy(cmd, "sed -i '/DetectorServer/d' /etc/inittab");
|
||||
|
@ -13,7 +13,7 @@
|
||||
extern enum TLogLevel trimmingPrint;
|
||||
#endif
|
||||
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#ifdef CHIPTESTBOARDD
|
||||
#ifdef VIRTUAL
|
||||
uint64_t virtual_pattern[MAX_PATTERN_LENGTH];
|
||||
#endif
|
||||
@ -40,7 +40,7 @@ void initializePatternAddresses() {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
#ifdef CHIPTESTBOARDD
|
||||
#ifdef VIRTUAL
|
||||
void initializePatternWord() {
|
||||
memset(virtual_pattern, 0, sizeof(virtual_pattern));
|
||||
@ -128,7 +128,7 @@ int validate_writePatternWord(char *message, int addr, uint64_t word) {
|
||||
|
||||
// validate result
|
||||
int ret = OK;
|
||||
// cannot validate for moench, ctb ( same as executing pattern word)
|
||||
// cannot validate for ctb ( same as executing pattern word)
|
||||
#ifdef MYTHEN3D
|
||||
uint64_t retval = readPatternWord(addr);
|
||||
LOG(logDEBUG1, ("Pattern word (addr:0x%x) retval: 0x%llx\n", addr,
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "slsDetectorServer_funcs.h"
|
||||
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@ -89,7 +88,7 @@ int main(int argc, char *argv[]) {
|
||||
"and "
|
||||
"initial detector setup. \n"
|
||||
"\t-i, --ignore-config : "
|
||||
"[Eiger][Jungfrau][Gotthard][Gotthard2] \n"
|
||||
"[Eiger][Jungfrau][Gotthard][Gotthard2][Moench] \n"
|
||||
"\t Ignore config file. \n"
|
||||
"\t-m, --master <master> : "
|
||||
"[Eiger][Mythen3][Gotthard][Gotthard2] \n"
|
||||
@ -206,7 +205,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
case 'i':
|
||||
#if defined(EIGERD) || defined(GOTTHARDD) || defined(GOTTHARD2D) || \
|
||||
defined(JUNGFRAUD)
|
||||
defined(JUNGFRAUD) || defined(MOENCHD)
|
||||
LOG(logINFO, ("Ignoring config file\n"));
|
||||
ignoreConfigFileFlag = 1;
|
||||
#else
|
||||
@ -277,14 +276,6 @@ int main(int argc, char *argv[]) {
|
||||
LOG(logERROR, ("Could not set handler function for SIGINT"));
|
||||
}
|
||||
|
||||
// validate control and stop port number
|
||||
if (0 >= portno || portno > USHRT_MAX || 0 >= (portno + 1) ||
|
||||
(portno + 1) > USHRT_MAX) {
|
||||
LOG(logERROR, ("Invalid control server or stop server port "
|
||||
"numbers (%d, %d). It must be in range 1 - %d",
|
||||
portno, portno + 1, USHRT_MAX));
|
||||
return -1;
|
||||
}
|
||||
if (sharedMemory_create(portno) == FAIL) {
|
||||
return -1;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -78,18 +78,22 @@ class Detector {
|
||||
|
||||
Result<int64_t> getFirmwareVersion(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger] Options: FRONT_LEFT, FRONT_RIGHT */
|
||||
Result<int64_t>
|
||||
getFrontEndFirmwareVersion(const defs::fpgaPosition fpgaPosition,
|
||||
Positions pos = {}) const;
|
||||
|
||||
Result<std::string> getDetectorServerVersion(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] */
|
||||
Result<std::string> getHardwareVersion(Positions pos = {}) const;
|
||||
|
||||
Result<std::string> getKernelVersion(Positions pos = {}) const;
|
||||
|
||||
/* [Jungfrau][Gotthard][Mythen3][Gotthard2][CTB][Moench] */
|
||||
/* [Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][CTB] */
|
||||
Result<int64_t> getSerialNumber(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Gotthard2][Mythen3][Jungfrau] 6 bit value (ideally unique) that
|
||||
* is streamed out in the UDP header of the detector.*/
|
||||
/** [Eiger][Gotthard2][Mythen3][Jungfrau][Moench] 6 bit value (ideally
|
||||
* unique) that is streamed out in the UDP header of the detector.*/
|
||||
Result<int> getModuleId(Positions pos = {}) const;
|
||||
|
||||
Result<std::string> getReceiverVersion(Positions pos = {}) const;
|
||||
@ -122,14 +126,12 @@ class Detector {
|
||||
/** list of possible settings for this detector */
|
||||
std::vector<defs::detectorSettings> getSettingsList() const;
|
||||
|
||||
/** [Jungfrau][Gotthard][Gotthard2][Mythen3] */
|
||||
/** [Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
||||
Result<defs::detectorSettings> getSettings(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] GAIN0, HIGHGAIN0 \n [Gotthard] DYNAMICGAIN, HIGHGAIN,
|
||||
/** [Jungfrau][Moench] GAIN0, HIGHGAIN0 \n [Gotthard] DYNAMICGAIN, HIGHGAIN,
|
||||
* LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n [Gotthard2] DYNAMICGAIN,
|
||||
* FIXGAIN1, FIXGAIN2 \n [Moench] G1_HIGHGAIN, G1_LOWGAIN,
|
||||
* G2_HIGHCAP_HIGHGAIN, G2_HIGHCAP_LOWGAIN, G2_LOWCAP_HIGHGAIN,
|
||||
* G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN \n [Mythen3] STANDARD, FAST,
|
||||
* FIXGAIN1, FIXGAIN2 \n [Mythen3] STANDARD, FAST,
|
||||
* HIGHGAIN. Also changes vrshaper and vrpreamp \n [Eiger] Use threshold
|
||||
* command. Settings loaded from file found in settingspath
|
||||
*/
|
||||
@ -179,38 +181,39 @@ class Detector {
|
||||
* files exist in corresponding trim folders */
|
||||
void setTrimEnergies(std::vector<int> energies, Positions pos = {});
|
||||
|
||||
/**[Eiger][Jungfrau] */
|
||||
/**[Eiger][Jungfrau][Moench] */
|
||||
bool getGapPixelsinCallback() const;
|
||||
|
||||
/**
|
||||
* [Eiger][Jungfrau]
|
||||
* [Eiger][Jungfrau][Moench]
|
||||
* Include gap pixels in client data call back. Will not be in detector
|
||||
* streaming, receiver file or streaming. Default is disabled.
|
||||
*/
|
||||
void setGapPixelsinCallback(const bool enable);
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
/** [Eiger][Jungfrau][Moench] */
|
||||
Result<bool> getFlipRows(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger] flips rows paramater sent to slsreceiver to stream as json
|
||||
* parameter to flip rows in gui \n[Jungfrau] flips rows in the detector
|
||||
* itself. For bottom module and number of interfaces must be set to 2.
|
||||
* slsReceiver and slsDetectorGui does not handle.slsReceiver and
|
||||
* parameter to flip rows in gui \n[Jungfrau][Moench] flips rows in the
|
||||
* detector itself. For bottom module and number of interfaces must be set
|
||||
* to 2. slsReceiver and slsDetectorGui does not handle.slsReceiver and
|
||||
* slsDetectorGui does not handle
|
||||
*/
|
||||
void setFlipRows(bool value, Positions pos = {});
|
||||
|
||||
/** [Eiger][Mythen3][Gotthard1][Gotthard2][Jungfrau] via stop server **/
|
||||
/** [Eiger][Mythen3][Gotthard1][Gotthard2][Jungfrau][Moench] via stop server
|
||||
* **/
|
||||
Result<bool> getMaster(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Gotthard2][Jungfrau] Set (half) module to master and the
|
||||
/** [Eiger][Gotthard2][Jungfrau][Moench] Set (half) module to master and the
|
||||
* other(s) to slaves */
|
||||
void setMaster(bool value, int pos);
|
||||
|
||||
/** [Jungfrau] **/
|
||||
/** [Jungfrau][Moench] **/
|
||||
Result<bool> getSynchronization(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Moench] */
|
||||
void setSynchronization(bool value);
|
||||
|
||||
/** [Gotthard2][Mythen3] */
|
||||
@ -285,11 +288,11 @@ class Detector {
|
||||
|
||||
void setNumberOfTriggers(int64_t value);
|
||||
|
||||
/** [Gotthard][Jungfrau][Eiger][CTB][Moench][Gotthard2] \n
|
||||
/** [Gotthard][Jungfrau][Moench][Eiger][CTB][Gotthard2] \n
|
||||
* [Mythen3] use function with gate index **/
|
||||
Result<ns> getExptime(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Eiger][CTB][Moench][Gotthard2] \n
|
||||
/** [Gotthard][Jungfrau][Moench][Eiger][CTB][Gotthard2] \n
|
||||
* [Mythen3] sets exptime for all gate signals. To specify gate index, use
|
||||
* function with gate index **/
|
||||
void setExptime(ns t, Positions pos = {});
|
||||
@ -298,25 +301,25 @@ class Detector {
|
||||
|
||||
void setPeriod(ns t, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] */
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] */
|
||||
Result<ns> getDelayAfterTrigger(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] */
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] */
|
||||
void setDelayAfterTrigger(ns value, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3]
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3]
|
||||
* [Gotthard2] only in continuous auto mode */
|
||||
Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3]
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3]
|
||||
* Only when external trigger used */
|
||||
Result<int64_t> getNumberOfTriggersLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2]
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
Result<ns> getPeriodLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3]
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
Result<ns> getDelayAfterTriggerLeft(Positions pos = {}) const;
|
||||
|
||||
@ -325,7 +328,7 @@ class Detector {
|
||||
/**
|
||||
* [Eiger] Options: 4, 8, 12, 16, 32. If i is 32, also sets clkdivider to 2,
|
||||
* else sets clkdivider to 1 \n [Mythen3] Options: 8, 16, 32 \n
|
||||
* [Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16
|
||||
* [Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16
|
||||
*/
|
||||
void setDynamicRange(int value);
|
||||
|
||||
@ -335,7 +338,7 @@ class Detector {
|
||||
Result<defs::timingMode> getTimingMode(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Gotthard][Jungfrau][Gotthard][CTB][Moench][Gotthard2] Options:
|
||||
* [Gotthard][Jungfrau][Moench][Gotthard][CTB][Gotthard2] Options:
|
||||
* AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||
* [Mythen3] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
|
||||
* [Eiger] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||
@ -345,64 +348,62 @@ class Detector {
|
||||
/** list of possible timing modes for this detector */
|
||||
std::vector<defs::timingMode> getTimingModeList() const;
|
||||
|
||||
/** [Eiger][Jungfrau][Gotthard2] */
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard2] */
|
||||
Result<defs::speedLevel> getReadoutSpeed(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Jungfrau][Gotthard2]
|
||||
* [Jungfrau] Options: FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED \n
|
||||
* [Eiger] Options: FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED \n
|
||||
* [Gotthard2] Options: G2_108MHZ (Default), G2_144MHZ \n
|
||||
* [Jungfrau] FULL_SPEED option only available from v2.0 boards and is
|
||||
* recommended to set number of interfaces to 2. \n Also overwrites adcphase
|
||||
* to recommended default.
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard2]
|
||||
* [Jungfrau][Moench] Options: FULL_SPEED, HALF_SPEED (Default),
|
||||
* QUARTER_SPEED \n [Eiger] Options: FULL_SPEED (Default), HALF_SPEED,
|
||||
* QUARTER_SPEED \n [Gotthard2] Options: G2_108MHZ (Default), G2_144MHZ \n
|
||||
* [Jungfrau][Moench] FULL_SPEED option only available from v2.0 boards and
|
||||
* is recommended to set number of interfaces to 2. \n Also overwrites
|
||||
* adcphase to recommended default.
|
||||
*/
|
||||
void setReadoutSpeed(defs::speedLevel value, Positions pos = {});
|
||||
|
||||
/** list of possible readoutspeed modes for this detector */
|
||||
std::vector<defs::speedLevel> getReadoutSpeedList() const;
|
||||
|
||||
/** [Jungfrau][CTB][Moench] */
|
||||
/** [Jungfrau][Moench][CTB] */
|
||||
Result<int> getADCPhase(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench]
|
||||
* [Jungfrau] Absolute phase shift. Changing Speed also resets adcphase to
|
||||
* recommended defaults. \n
|
||||
* [Ctb][Moench] Absolute phase shift. Changing adcclk also resets adcphase
|
||||
* and sets it to previous values. \n
|
||||
* [Gotthard] Relative phase shift
|
||||
/** [Gotthard][Jungfrau][Moench][CTB]
|
||||
* [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets
|
||||
* adcphase to recommended defaults. \n [Ctb] Absolute phase shift. Changing
|
||||
* adcclk also resets adcphase and sets it to previous values. \n [Gotthard]
|
||||
* Relative phase shift
|
||||
*/
|
||||
void setADCPhase(int value, Positions pos = {});
|
||||
|
||||
/** [Jungfrau][CTB][Moench] */
|
||||
/** [Jungfrau][Moench][CTB] */
|
||||
Result<int> getMaxADCPhaseShift(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench] */
|
||||
/** [Gotthard][Jungfrau][Moench][CTB] */
|
||||
Result<int> getADCPhaseInDegrees(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench]
|
||||
* [Jungfrau] Absolute phase shift. Changing Speed also resets adcphase to
|
||||
* recommended defaults. \n
|
||||
* [Ctb][Moench] Absolute phase shift. Changing adcclk also resets adcphase
|
||||
* and sets it to previous values. \n
|
||||
* [Gotthard] Relative phase shift
|
||||
/** [Gotthard][Jungfrau][Moench][CTB]
|
||||
* [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets
|
||||
* adcphase to recommended defaults. \n [Ctb] Absolute phase shift. Changing
|
||||
* adcclk also resets adcphase and sets it to previous values. \n [Gotthard]
|
||||
* Relative phase shift
|
||||
*/
|
||||
void setADCPhaseInDegrees(int value, Positions pos = {});
|
||||
|
||||
/** [CTB][Jungfrau] */
|
||||
/** [CTB][Jungfrau][Moench] */
|
||||
Result<int> getDBITPhase(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Jungfrau] Absolute phase shift \n
|
||||
/** [CTB][Jungfrau][Moench] Absolute phase shift \n
|
||||
* [CTB] changing dbitclk also resets dbitphase and sets to previous values.
|
||||
*/
|
||||
void setDBITPhase(int value, Positions pos = {});
|
||||
|
||||
/** [CTB][Jungfrau] */
|
||||
/** [CTB][Jungfrau][Moench] */
|
||||
Result<int> getMaxDBITPhaseShift(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Jungfrau] */
|
||||
/** [CTB][Jungfrau][Moench] */
|
||||
Result<int> getDBITPhaseInDegrees(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Jungfrau] Absolute phase shift \n
|
||||
/** [CTB][Jungfrau][Moench] Absolute phase shift \n
|
||||
* [CTB] changing dbitclk also resets dbitphase and sets to previous values.
|
||||
*/
|
||||
void setDBITPhaseInDegrees(int value, Positions pos = {});
|
||||
@ -435,18 +436,18 @@ class Detector {
|
||||
|
||||
/**
|
||||
* [Gotthard] Options: 0, 90, 110, 120, 150, 180, 200
|
||||
* [Jungfrau][CTB][Moench] Options: 0, 60 - 200
|
||||
* [Jungfrau][Moench][CTB] Options: 0, 60 - 200
|
||||
* [Eiger][Mythen3][Gotthard2] Options: 0 - 200
|
||||
*/
|
||||
void setHighVoltage(int value, Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Mythen3][Gotthard2][Moench] */
|
||||
/** [Jungfrau][Moench][Mythen3][Gotthard2] */
|
||||
Result<bool> getPowerChip(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau][Mythen3][Gotthard2][Moench] Power the chip. \n
|
||||
* [Moench] Default is disabled. \n
|
||||
* [Jungfrau] Default is disabled. Get will return power status. Can be off
|
||||
* if temperature event occured (temperature over temp_threshold with
|
||||
/** [Jungfrau][Moench][Mythen3][Gotthard2] Power the chip. \n
|
||||
* Default is disabled. \n
|
||||
* [Jungfrau][Moench] Default is disabled. Get will return power status. Can
|
||||
* be off if temperature event occured (temperature over temp_threshold with
|
||||
* temp_control enabled. Will configure chip (only chip v1.1)\n
|
||||
* [Mythen3][Gotthard2] Default is 1. If module not connected or wrong
|
||||
* module, powerchip will fail.
|
||||
@ -458,8 +459,8 @@ class Detector {
|
||||
|
||||
/** [Gotthard] If 1, adds channel intensity with precalculated values.
|
||||
* Default is 0 \n
|
||||
* [Eiger][Jungfrau] Only for virtual servers, if 1, pixels are saturated.
|
||||
* If 0, increasing intensity */
|
||||
* [Eiger][Jungfrau][Moench] Only for virtual servers, if 1, pixels are
|
||||
* saturated. If 0, increasing intensity */
|
||||
void setImageTestMode(const int value, Positions pos = {});
|
||||
|
||||
/** gets list of temperature indices for this detector */
|
||||
@ -469,7 +470,7 @@ class Detector {
|
||||
* (Degrees)
|
||||
* [Mythen3][Gotthard2] Options: TEMPERATURE_FPGA
|
||||
* [Gotthard] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n
|
||||
* [Jungfrau] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n
|
||||
* [Jungfrau][Moench] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n
|
||||
* [Eiger] Options: TEMPERATURE_FPGA, TEMPERATURE_FPGAEXT, TEMPERATURE_10GE,
|
||||
* TEMPERATURE_DCDC, TEMPERATURE_SODL, TEMPERATURE_SODR, TEMPERATURE_FPGA2,
|
||||
* TEMPERATURE_FPGA3 \n [CTB] Options: SLOW_ADC_TEMP
|
||||
@ -486,11 +487,11 @@ class Detector {
|
||||
void setDefaultDac(defs::dacIndex index, int defaultValue,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Mythen3] */
|
||||
/** [Jungfrau][Moench][Mythen3] */
|
||||
Result<int> getDefaultDac(defs::dacIndex index, defs::detectorSettings sett,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Mythen3] */
|
||||
/** [Jungfrau][Moench][Mythen3] */
|
||||
void setDefaultDac(defs::dacIndex index, int defaultValue,
|
||||
defs::detectorSettings sett, Positions pos = {});
|
||||
|
||||
@ -539,20 +540,21 @@ class Detector {
|
||||
* mode.*/
|
||||
void setParallelMode(bool value, Positions pos = {});
|
||||
|
||||
/** [Gotthard2][Jungfrau] */
|
||||
/** [Gotthard2][Jungfrau][Moench] */
|
||||
Result<int> getFilterResistor(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard2][Jungfrau] Set filter resistor. Increasing values for
|
||||
/** [Gotthard2][Jungfrau][Moench] Set filter resistor. Increasing values for
|
||||
* increasing resistance.\n[Gotthard2] Options: [0|1|2|3]. Default is
|
||||
* 0.\n[Jungfrau] Options: [0|1]. Default is 1.*/
|
||||
* 0.\n[Jungfrau][Moench] Options: [0|1]. Default is 1.*/
|
||||
void setFilterResistor(int value, Positions pos = {});
|
||||
|
||||
/** [Gotthard2][Jungfrau] */
|
||||
/** [Gotthard2][Jungfrau][Moench] */
|
||||
Result<defs::currentSrcParameters>
|
||||
getCurrentSource(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard2][Jungfrau] Please refer documentation on currentSrcParameters
|
||||
* (sls_detector_defs.h) on the structure and its members */
|
||||
/** [Gotthard2][Jungfrau][Moench] Please refer documentation on
|
||||
* currentSrcParameters (sls_detector_defs.h) on the structure and its
|
||||
* members */
|
||||
void setCurrentSource(defs::currentSrcParameters par, Positions pos = {});
|
||||
|
||||
/** [CTB][Gotthard2] */
|
||||
@ -561,14 +563,14 @@ class Detector {
|
||||
/** [CTB] Options: 0-255 \n [Gotthard2] Options: 0-7 */
|
||||
void setDBITPipeline(int value, Positions pos = {});
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
/** [Eiger][Jungfrau][Moench] */
|
||||
Result<int> getReadNRows(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger] Number of rows to read out per half module
|
||||
* Options: 0 - 256. 256 is default. The permissible values depend on
|
||||
* dynamic range and 10Gbe enabled. \n[Jungfrau] Number of rows per module
|
||||
* starting from the centre. Options: 8 - 512, must be multiples of 8.
|
||||
* Default is 512.
|
||||
* dynamic range and 10Gbe enabled. \n[Jungfrau][Moench] Number of rows per
|
||||
* module starting from the centre. Options: 8 - 512, must be multiples
|
||||
* of 8. Default is 512.
|
||||
*/
|
||||
void setReadNRows(const int lines, Positions pos = {});
|
||||
|
||||
@ -647,10 +649,9 @@ class Detector {
|
||||
* different frame numbers for different modules.*/
|
||||
void setNextFrameNumber(uint64_t value, Positions pos = {});
|
||||
|
||||
/** [Eiger][Mythen3][Jungfrau] Sends an internal software trigger to the
|
||||
* detector block true if command blocks till frames are sent out from that
|
||||
* trigger
|
||||
* [Eiger][Jungfrau] Block can be true
|
||||
/** [Eiger][Mythen3][Jungfrau][Moench] Sends an internal software trigger to
|
||||
* the detector block true if command blocks till frames are sent out from
|
||||
* that trigger [Eiger][Jungfrau][Moench] Block can be true
|
||||
*/
|
||||
void sendSoftwareTrigger(const bool block = false, Positions pos = {});
|
||||
|
||||
@ -676,23 +677,23 @@ class Detector {
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** [Jungfrau][Gotthard2][Eiger] */
|
||||
/** [Jungfrau][Moench][Gotthard2][Eiger] */
|
||||
Result<int> getNumberofUDPInterfaces(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau][Gotthard2] Number of udp interfaces to stream data from
|
||||
* detector. Default is 1. \n Also enables second interface in receiver for
|
||||
* listening (Writes a file per interface if writing enabled). \n Also
|
||||
/** [Jungfrau][Moench][Gotthard2] Number of udp interfaces to stream data
|
||||
* from detector. Default is 1. \n Also enables second interface in receiver
|
||||
* for listening (Writes a file per interface if writing enabled). \n Also
|
||||
* restarts client and receiver zmq sockets if zmq streaming enabled. \n
|
||||
* [Gotthard2] second interface enabled to send veto information via 10Gbps
|
||||
* for debugging. By default, if veto enabled, it is sent via 2.5 gbps
|
||||
* interface. */
|
||||
void setNumberofUDPInterfaces(int n, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Moench] */
|
||||
Result<int> getSelectedUDPInterface(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Jungfrau]
|
||||
* [Jungfrau][Moench]
|
||||
* Effective only when number of interfaces is 1.
|
||||
* Options: 0 (outer, default), 1(inner)] //TODO: enum?
|
||||
*/
|
||||
@ -706,11 +707,11 @@ class Detector {
|
||||
*/
|
||||
void setSourceUDPIP(const IpAddr ip, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] bottom half [Gotthard2] veto debugging */
|
||||
/** [Jungfrau][Moench] bottom half [Gotthard2] veto debugging */
|
||||
Result<IpAddr> getSourceUDPIP2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] bottom half [Gotthard2] veto debugging. \n The source UDP IP
|
||||
* must be in the same subnet of the destination UDP IP2 */
|
||||
/** [Jungfrau][Moench] bottom half [Gotthard2] veto debugging. \n The source
|
||||
* UDP IP must be in the same subnet of the destination UDP IP2 */
|
||||
void setSourceUDPIP2(const IpAddr ip, Positions pos = {});
|
||||
|
||||
Result<MacAddr> getSourceUDPMAC(Positions pos = {}) const;
|
||||
@ -721,10 +722,10 @@ class Detector {
|
||||
*/
|
||||
void setSourceUDPMAC(const MacAddr mac, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] bottom half [Gotthard2] veto debugging */
|
||||
/** [Jungfrau][Moench] bottom half [Gotthard2] veto debugging */
|
||||
Result<MacAddr> getSourceUDPMAC2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] bottom half [Gotthard2] veto debugging */
|
||||
/** [Jungfrau][Moench] bottom half [Gotthard2] veto debugging */
|
||||
void setSourceUDPMAC2(const MacAddr mac, Positions pos = {});
|
||||
|
||||
Result<UdpDestination> getDestinationUDPList(const uint32_t entry,
|
||||
@ -732,16 +733,16 @@ class Detector {
|
||||
|
||||
void setDestinationUDPList(const UdpDestination, const int module_id);
|
||||
|
||||
/** [Jungfrau][Eiger][Mythen3][Gotthard2] */
|
||||
/** [Jungfrau][Moench][Eiger][Mythen3][Gotthard2] */
|
||||
Result<int> getNumberofUDPDestinations(Positions pos = {}) const;
|
||||
|
||||
void clearUDPDestinations(Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Mythen3][Gotthard2] */
|
||||
/** [Jungfrau][Moench][Mythen3][Gotthard2] */
|
||||
Result<int> getFirstUDPDestination(Positions pos = {}) const;
|
||||
|
||||
/**[Jungfrau][Gotthard2] Options 0-31 (or number of udp destinations)\n
|
||||
* [Mythen3] Options 0-63 (or number of udp destinations)
|
||||
/**[Jungfrau][Moench][Gotthard2] Options 0-31 (or number of udp
|
||||
* destinations)\n [Mythen3] Options 0-63 (or number of udp destinations)
|
||||
*/
|
||||
void setFirstUDPDestination(const int value, Positions pos = {});
|
||||
|
||||
@ -750,10 +751,10 @@ class Detector {
|
||||
/** IP of the interface in receiver that the detector sends data to */
|
||||
void setDestinationUDPIP(const IpAddr ip, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] bottom half \n [Gotthard2] veto debugging */
|
||||
/** [Jungfrau][Moench] bottom half \n [Gotthard2] veto debugging */
|
||||
Result<IpAddr> getDestinationUDPIP2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] bottom half \n [Gotthard2] veto debugging */
|
||||
/** [Jungfrau][Moench] bottom half \n [Gotthard2] veto debugging */
|
||||
void setDestinationUDPIP2(const IpAddr ip, Positions pos = {});
|
||||
|
||||
Result<MacAddr> getDestinationUDPMAC(Positions pos = {}) const;
|
||||
@ -765,14 +766,15 @@ class Detector {
|
||||
*/
|
||||
void setDestinationUDPMAC(const MacAddr mac, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] bottom half \n [Gotthard2] veto debugging */
|
||||
/** [Jungfrau][Moench] bottom half \n [Gotthard2] veto debugging */
|
||||
Result<MacAddr> getDestinationUDPMAC2(Positions pos = {}) const;
|
||||
|
||||
/* [Jungfrau][Gotthard2] Mac address of the receiver (destination) udp
|
||||
* interface 2. \n Not mandatory to set as udp_dstip2 retrieves it from
|
||||
/* [Jungfrau][Moench][Gotthard2] Mac address of the receiver (destination)
|
||||
* udp interface 2. \n Not mandatory to set as udp_dstip2 retrieves it from
|
||||
* slsReceiver process but must be set if you use a custom receiver (not
|
||||
* slsReceiver). \n [Jungfrau] bottom half \n [Gotthard2] veto debugging \n
|
||||
* Use router mac address if router in between detector and receiver.
|
||||
* slsReceiver). \n [Jungfrau][Moench] bottom half \n [Gotthard2] veto
|
||||
* debugging \n Use router mac address if router in between detector and
|
||||
* receiver.
|
||||
*/
|
||||
void setDestinationUDPMAC2(const MacAddr mac, Positions pos = {});
|
||||
|
||||
@ -782,12 +784,13 @@ class Detector {
|
||||
* calculated (incremented by 1 if no 2nd interface) */
|
||||
void setDestinationUDPPort(int port, int module_id = -1);
|
||||
|
||||
/** [Eiger] right port[Jungfrau] bottom half [Gotthard2] veto debugging */
|
||||
/** [Eiger] right port[Jungfrau][Moench] bottom half [Gotthard2] veto
|
||||
* debugging */
|
||||
Result<int> getDestinationUDPPort2(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger] right port[Jungfrau] bottom half [Gotthard2] veto debugging \n
|
||||
* Default is 50002. \n If module_id is -1, ports for each module is
|
||||
* calculated (incremented by 1 if no 2nd interface)*/
|
||||
/** [Eiger] right port[Jungfrau][Moench] bottom half [Gotthard2] veto
|
||||
* debugging \n Default is 50002. \n If module_id is -1, ports for each
|
||||
* module is calculated (incremented by 1 if no 2nd interface)*/
|
||||
void setDestinationUDPPort2(int port, int module_id = -1);
|
||||
|
||||
/** Reconfigures Detector with UDP destination. More for debugging as the
|
||||
@ -802,27 +805,28 @@ class Detector {
|
||||
|
||||
Result<std::string> printRxConfiguration(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][CTB][Moench][Mythen3] */
|
||||
/** [Eiger][CTB][Mythen3] */
|
||||
Result<bool> getTenGiga(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][CTB][Moench][Mythen3] */
|
||||
/** [Eiger][CTB][Mythen3] */
|
||||
void setTenGiga(bool value, Positions pos = {});
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
/** [Eiger][Jungfrau][Moench] */
|
||||
Result<bool> getTenGigaFlowControl(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
/** [Eiger][Jungfrau][Moench] */
|
||||
void setTenGigaFlowControl(bool enable, Positions pos = {});
|
||||
|
||||
/** [Eiger][Jungfrau][Mythen3] */
|
||||
/** [Eiger][Jungfrau][Moench][Mythen3] */
|
||||
Result<int> getTransmissionDelayFrame(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Eiger][Jungfrau][Mythen3] Transmission delay of first udp packet being
|
||||
* streamed out of the module.\n[Jungfrau] [0-31] Each value represents 1
|
||||
* ms\n[Eiger] Additional delay to txndelay_left and txndelay_right. Each
|
||||
* value represents 10ns. Typical value is 50000.\n[Mythen3] [0-16777215]
|
||||
* Each value represents 8 ns (125 MHz clock), max is 134 ms.
|
||||
* Eiger][Jungfrau][Moench][Mythen3] Transmission delay of first udp packet
|
||||
* being streamed out of the module.\n[Jungfrau][Moench] [0-31] Each value
|
||||
* represents 1 ms\n[Eiger] Additional delay to txndelay_left and
|
||||
* txndelay_right. Each value represents 10ns. Typical value is
|
||||
* 50000.\n[Mythen3] [0-16777215] Each value represents 8 ns (125 MHz
|
||||
* clock), max is 134 ms.
|
||||
*/
|
||||
void setTransmissionDelayFrame(int value, Positions pos = {});
|
||||
|
||||
@ -847,16 +851,16 @@ class Detector {
|
||||
*/
|
||||
void setTransmissionDelayRight(int value, Positions pos = {});
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
/** [Eiger][Jungfrau][Moench] */
|
||||
int getTransmissionDelay() const;
|
||||
|
||||
/**
|
||||
* [Eiger][Jungfrau][Mythen3] Set transmission delay for all modules in the
|
||||
* detector using the step size provided.Sets up \n\t\t[Eiger] txdelay_left
|
||||
* to (2 * mod_index * n_delay), \n\t\t[Eiger] txdelay_right to ((2 *
|
||||
* mod_index + 1) * n_delay) and \n\t\t[Eiger] txdelay_frame to (2
|
||||
* *num_modules * n_delay) \n\t\t[Jungfrau][Mythen3] txdelay_frame to
|
||||
* (num_modules * n_delay) \nfor every module.
|
||||
* [Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules
|
||||
* in the detector using the step size provided.Sets up \n\t\t[Eiger]
|
||||
* txdelay_left to (2 * mod_index * n_delay), \n\t\t[Eiger] txdelay_right to
|
||||
* ((2 * mod_index + 1) * n_delay) and \n\t\t[Eiger] txdelay_frame to (2
|
||||
* *num_modules * n_delay) \n\t\t[Jungfrau][Moench][Mythen3] txdelay_frame
|
||||
* to (num_modules * n_delay) \nfor every module.
|
||||
*/
|
||||
void setTransmissionDelay(int step);
|
||||
|
||||
@ -1238,22 +1242,22 @@ class Detector {
|
||||
|
||||
///@}
|
||||
|
||||
/** @name Jungfrau Specific */
|
||||
/** @name Jungfrau/Moench Specific */
|
||||
///@{
|
||||
/**************************************************
|
||||
* *
|
||||
* Jungfrau Specific *
|
||||
* Jungfrau/Moench Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Moench] */
|
||||
Result<double> getChipVersion(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Moench] */
|
||||
Result<int> getThresholdTemperature(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Jungfrau]Set threshold temperature in degrees.
|
||||
* [Jungfrau][Moench]Set threshold temperature in degrees.
|
||||
* If temperature crosses threshold temperature
|
||||
* and temperature control is enabled (default is disabled), power to chip
|
||||
* will be switched off and temperature event will be set. \n To power on
|
||||
@ -1262,23 +1266,23 @@ class Detector {
|
||||
*/
|
||||
void setThresholdTemperature(int temp, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Moench] */
|
||||
Result<bool> getTemperatureControl(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] refer to setThresholdTemperature
|
||||
/** [Jungfrau][Moench] refer to setThresholdTemperature
|
||||
* Default is disabled */
|
||||
void setTemperatureControl(bool enable, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] refer to setThresdholdTemperature */
|
||||
/** [Jungfrau][Moench] refer to setThresdholdTemperature */
|
||||
Result<int> getTemperatureEvent(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] refer to setThresdholdTemperature */
|
||||
/** [Jungfrau][Moench] refer to setThresdholdTemperature */
|
||||
void resetTemperatureEvent(Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Moench] */
|
||||
Result<bool> getAutoComparatorDisable(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Advanced
|
||||
/** [Jungfrau][Moench] Advanced
|
||||
* //TODO naming
|
||||
* By default, the on-chip gain switching is active during the
|
||||
* entire exposure. This mode disables the on-chip gain switching comparator
|
||||
@ -1290,11 +1294,11 @@ class Detector {
|
||||
*/
|
||||
void setAutoComparatorDisable(bool value, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Moench] */
|
||||
Result<ns> getComparatorDisableTime(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Time before end of exposure when comparator is disabled. It
|
||||
* is only possible for chipv1.1.*/
|
||||
/** [Jungfrau][Moench] Time before end of exposure when comparator is
|
||||
* disabled. It is only possible for chipv1.1.*/
|
||||
void setComparatorDisableTime(ns t, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] Advanced TODO naming */
|
||||
@ -1308,37 +1312,37 @@ class Detector {
|
||||
/** [Jungfrau] Advanced */
|
||||
Result<int> getStorageCellStart(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Advanced. Sets the storage cell storing the first acquisition
|
||||
* of the series. Options: 0-max. max is 15 (default) for chipv1.0 and 3
|
||||
* (default) for chipv1.1.
|
||||
/** [Jungfrau] Advanced. Sets the storage cell storing the first
|
||||
* acquisition of the series. Options: 0-max. max is 15 (default) for
|
||||
* chipv1.0 and 3 (default) for chipv1.1.
|
||||
*/
|
||||
void setStorageCellStart(int cell, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] Advanced*/
|
||||
Result<ns> getStorageCellDelay(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Advanced \n Additional time delay between 2 consecutive
|
||||
* exposures in burst mode. \n Options: (0-1638375 ns (resolution of 25ns)\n
|
||||
* Only applicable for chipv1.0.
|
||||
/** [Jungfrau] Advanced \n Additional time delay between 2
|
||||
* consecutive exposures in burst mode. \n Options: (0-1638375 ns
|
||||
* (resolution of 25ns)\n Only applicable for chipv1.0.
|
||||
*/
|
||||
void setStorageCellDelay(ns value, Positions pos = {});
|
||||
|
||||
/** list of possible gainmode */
|
||||
std::vector<defs::gainMode> getGainModeList() const;
|
||||
|
||||
/** [Jungfrau]*/
|
||||
/** [Jungfrau][Moench]*/
|
||||
Result<defs::gainMode> getGainMode(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Options: DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2,
|
||||
/** [Jungfrau][Moench] Options: DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2,
|
||||
* FIX_G1, FIX_G2, FIX_G0 \n\CAUTION: Do not use FIX_G0 without caution, you
|
||||
* can damage the detector!!!\n
|
||||
*/
|
||||
void setGainMode(const defs::gainMode mode, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
/** [Jungfrau][Moench] Advanced */
|
||||
Result<int> getNumberOfFilterCells(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Advanced Options[0-12], only for chip v1.1
|
||||
/** [Jungfrau][Moench] Advanced Options[0-12], only for chip v1.1
|
||||
*/
|
||||
void setNumberOfFilterCells(int cell, Positions pos = {});
|
||||
|
||||
@ -1570,69 +1574,68 @@ class Detector {
|
||||
|
||||
///@}
|
||||
|
||||
/** @name CTB / Moench Specific */
|
||||
/** @name CTB Specific */
|
||||
///@{
|
||||
/**************************************************
|
||||
* *
|
||||
* CTB / Moench Specific *
|
||||
* CTB Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
Result<int> getNumberOfAnalogSamples(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
void setNumberOfAnalogSamples(int value, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
Result<int> getADCClock(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
void setADCClock(int value_in_MHz, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
Result<int> getRUNClock(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
void setRUNClock(int value_in_MHz, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench] in MHZ */
|
||||
/** [CTB] in MHZ */
|
||||
Result<int> getSYNCClock(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
Result<int> getADCPipeline(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
void setADCPipeline(int value, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
Result<int> getVoltage(defs::dacIndex index, Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [CTB][Moench] mV
|
||||
* [CTB] mV
|
||||
* [Ctb] Options: V_LIMIT, V_POWER_A, V_POWER_B, V_POWER_C,
|
||||
* V_POWER_D, V_POWER_IO, V_POWER_CHIP
|
||||
* [Moench] Options: V_LIMIT
|
||||
*/
|
||||
void setVoltage(defs::dacIndex index, int value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* [CTB][Moench] Options: [0- 4] or [1V, 1.14V, 1.33V, 1.6V, 2V]
|
||||
* [CTB] Options: [0- 4] or [1V, 1.14V, 1.33V, 1.6V, 2V]
|
||||
*/
|
||||
Result<int> getADCVpp(bool mV = false, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
void setADCVpp(int value, bool mV = false, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
Result<uint32_t> getADCEnableMask(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
void setADCEnableMask(uint32_t mask, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
Result<uint32_t> getTenGigaADCEnableMask(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] If any of a consecutive 4 bits are enabled, the "
|
||||
/** [CTB] If any of a consecutive 4 bits are enabled, the "
|
||||
"complete 4 bits are enabled */
|
||||
void setTenGigaADCEnableMask(uint32_t mask, Positions pos = {});
|
||||
///@}
|
||||
@ -1734,78 +1737,78 @@ class Detector {
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** [CTB][Moench][Mythen3] Loads ASCII pattern file directly to server
|
||||
/** [CTB][Mythen3] Loads ASCII pattern file directly to server
|
||||
* (instead of executing line by line)*/
|
||||
void setPattern(const std::string &fname, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench][Mythen3] Loads pattern parameters structure directly to
|
||||
/** [CTB][Mythen3] Loads pattern parameters structure directly to
|
||||
* server */
|
||||
void setPattern(const Pattern &pat, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench][Mythen3] [Ctb][Moench][Mythen3] Saves pattern to file
|
||||
* (ascii). \n [Ctb][Moench] Also executes pattern.*/
|
||||
/** [CTB][Mythen3] [Ctb][Mythen3] Saves pattern to file
|
||||
* (ascii). \n [Ctb] Also executes pattern.*/
|
||||
void savePattern(const std::string &fname);
|
||||
|
||||
/** [Mythen3][Moench] Loads and runs default pattern */
|
||||
/** [Mythen3] Loads and runs default pattern */
|
||||
void loadDefaultPattern(Positions pos = {});
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
Result<uint64_t> getPatternIOControl(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench] */
|
||||
/** [CTB] */
|
||||
void setPatternIOControl(uint64_t word, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench][Mythen3] same as executing for ctb and moench */
|
||||
/** [CTB][Mythen3] same as executing for ctb */
|
||||
Result<uint64_t> getPatternWord(int addr, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench] Caution: If word is -1 reads the addr (same as
|
||||
/** [CTB] Caution: If word is -1 reads the addr (same as
|
||||
* executing the pattern)
|
||||
* [Mythen3] */
|
||||
void setPatternWord(int addr, uint64_t word, Positions pos = {});
|
||||
|
||||
/**[CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
/**[CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
* levels
|
||||
* @returns array of start address and stop address
|
||||
*/
|
||||
Result<std::array<int, 2>>
|
||||
getPatternLoopAddresses(int level, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
/** [CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
* levels */
|
||||
void setPatternLoopAddresses(int level, int start, int stop,
|
||||
Positions pos = {});
|
||||
|
||||
/**[CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
/**[CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
* levels */
|
||||
Result<int> getPatternLoopCycles(int level, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench][Mythen3] n: 0-2, level: -1 (complete pattern) and 0-2
|
||||
/** [CTB][Mythen3] n: 0-2, level: -1 (complete pattern) and 0-2
|
||||
* levels */
|
||||
void setPatternLoopCycles(int level, int n, Positions pos = {});
|
||||
|
||||
/**[CTB][Moench][Mythen3] */
|
||||
/**[CTB][Mythen3] */
|
||||
Result<int> getPatternWaitAddr(int level, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench][Mythen3] Options: level 0-2 */
|
||||
/** [CTB][Mythen3] Options: level 0-2 */
|
||||
void setPatternWaitAddr(int level, int addr, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench][Mythen3] */
|
||||
/** [CTB][Mythen3] */
|
||||
Result<uint64_t> getPatternWaitTime(int level, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench][Mythen3] Options: level 0-2 */
|
||||
/** [CTB][Mythen3] Options: level 0-2 */
|
||||
void setPatternWaitTime(int level, uint64_t t, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench][Mythen3] */
|
||||
/** [CTB][Mythen3] */
|
||||
Result<uint64_t> getPatternMask(Positions pos = {});
|
||||
|
||||
/** [CTB][Moench][Mythen3] Selects the bits that will have a pattern mask
|
||||
/** [CTB][Mythen3] Selects the bits that will have a pattern mask
|
||||
* applied to the selected patmask for every pattern. */
|
||||
void setPatternMask(uint64_t mask, Positions pos = {});
|
||||
|
||||
/** [CTB][Moench][Mythen3] */
|
||||
/** [CTB][Mythen3] */
|
||||
Result<uint64_t> getPatternBitMask(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench][Mythen3] Sets the mask applied to every pattern to the
|
||||
/** [CTB][Mythen3] Sets the mask applied to every pattern to the
|
||||
* selected bits */
|
||||
void setPatternBitMask(uint64_t mask, Positions pos = {});
|
||||
|
||||
@ -1813,19 +1816,18 @@ class Detector {
|
||||
void startPattern(Positions pos = {});
|
||||
///@}
|
||||
|
||||
/** @name Moench specific */
|
||||
/** @name Json Header specific */
|
||||
///@{
|
||||
/**************************************************
|
||||
* *
|
||||
* Moench specific *
|
||||
* Json Header specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** [Moench] */
|
||||
Result<std::map<std::string, std::string>>
|
||||
getAdditionalJsonHeader(Positions pos = {}) const;
|
||||
|
||||
/** [Moench] If empty, reset additional json header. Default is empty. Max
|
||||
/** If empty, reset additional json header. Default is empty. Max
|
||||
* 20 characters for each key/value. Empty value deletes header. Use only if
|
||||
* to be processed by an intermediate user process listening to receiver zmq
|
||||
* packets such as in Moench */
|
||||
@ -1833,11 +1835,9 @@ class Detector {
|
||||
const std::map<std::string, std::string> &jsonHeader,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Moench] */
|
||||
Result<std::string> getAdditionalJsonParameter(const std::string &key,
|
||||
Positions pos = {}) const;
|
||||
/**
|
||||
* [Moench]
|
||||
* Sets the value for additional json header parameters. If not found,
|
||||
* the pair is appended. Empty value deletes parameter. Max 20 characters
|
||||
* for each key/value.
|
||||
@ -1855,41 +1855,41 @@ class Detector {
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** [Jungfrau][Gotthard][CTB][Moench][Mythen3][Gotthard2]
|
||||
/** [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2]
|
||||
* Advanced user Function!
|
||||
* Program firmware from command line, after which detector controller is
|
||||
* rebooted. forceDeleteNormalFile is true, if normal file found
|
||||
* in device tree, it must be deleted, a new device drive created and
|
||||
* programming continued.[Jungfrau][CTB][Moench] fname is a pof file (full
|
||||
* programming continued.[Jungfrau][Moench][CTB] fname is a pof file (full
|
||||
* path) \n [Mythen3][Gotthard2] fname is an rbf file (full path)
|
||||
*/
|
||||
void programFPGA(const std::string &fname, const bool forceDeleteNormalFile,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Jungfrau][CTB][Moench] Advanced user Function! */
|
||||
/** [Jungfrau][Moench][CTB] Advanced user Function! */
|
||||
void resetFPGA(Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Eiger][Ctb][Moench][Mythen3][Gotthard2] Copies detector
|
||||
/** [Jungfrau][Moench][Eiger][Ctb][Mythen3][Gotthard2] Copies detector
|
||||
* server via TCP (without tftp).\nMakes a symbolic link with a shorter
|
||||
* name (without vx.x.x).\nThen, detector controller reboots (except
|
||||
* Eiger).\n[Jungfrau][Ctb][Moench] Also deletes old server binary and
|
||||
* Eiger).\n[Jungfrau][Moench][Ctb] Also deletes old server binary and
|
||||
* changes respawn server to the link, which is effective after a reboot.
|
||||
*/
|
||||
void updateDetectorServer(const std::string &fname, Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Ctb][Moench][Mythen3][Gotthard2] \n
|
||||
/** [Jungfrau][Moench][Ctb][Mythen3][Gotthard2] \n
|
||||
* Advanced Command!! You could damage the detector. Please use with
|
||||
* caution.\nUpdates the kernel image. Then, detector controller reboots
|
||||
* with new kernel
|
||||
*/
|
||||
void updateKernel(const std::string &fname, Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Gotthard][CTB][Moench][Mythen3][Gotthard2] Advanced user
|
||||
/** [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2] Advanced user
|
||||
* Function! */
|
||||
void rebootController(Positions pos = {});
|
||||
|
||||
/**
|
||||
* Advanced user Function!\n [Jungfrau][Gotthard][CTB][Moench] Updates the
|
||||
* Advanced user Function!\n [Jungfrau][Moench][Gotthard][CTB] Updates the
|
||||
* firmware, detector server, make a soft link and then reboots detector
|
||||
* controller. \n [Mythen3][Gotthard2] Will require a script to start up the
|
||||
* shorter named server link at start up \n sname is full path name of
|
||||
@ -1926,16 +1926,16 @@ class Detector {
|
||||
/** Advanced user Function! */
|
||||
Result<int> getBit(uint32_t addr, int bitnr, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Advanced user
|
||||
/** [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user
|
||||
* Function! */
|
||||
void executeFirmwareTest(Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Advanced user
|
||||
/** [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user
|
||||
* Function! Writes different values in a R/W register and confirms the
|
||||
* writes to check bus */
|
||||
void executeBusTest(Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench] Advanced user Function! not possible
|
||||
/** [Gotthard][Jungfrau][Moench][CTB] Advanced user Function! not possible
|
||||
* to read back */
|
||||
void writeAdcRegister(uint32_t addr, uint32_t value, Positions pos = {});
|
||||
|
||||
@ -1948,11 +1948,11 @@ class Detector {
|
||||
* incompatible. \n Advanced user Function! */
|
||||
void setInitialChecks(const bool value);
|
||||
|
||||
/** [CTB][Moench][Jungfrau] Advanced user Function! */
|
||||
/** [CTB][Jungfrau][Moench] Advanced user Function! */
|
||||
Result<uint32_t> getADCInvert(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench][Jungfrau] Advanced user Function! \n
|
||||
[Jungfrau] Inversions on top of default mask */
|
||||
/** [CTB][Jungfrau][Moench] Advanced user Function! \n
|
||||
[Jungfrau][Moench] Inversions on top of default mask */
|
||||
void setADCInvert(uint32_t value, Positions pos = {});
|
||||
///@}
|
||||
|
||||
@ -1989,15 +1989,15 @@ class Detector {
|
||||
Result<std::string> executeCommand(const std::string &value,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Mythen3][CTB][Moench]
|
||||
/** [Jungfrau][Moench][Mythen3][CTB]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
Result<int64_t> getNumberOfFramesFromStart(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau][Mythen3][CTB][Moench] Get time from detector start
|
||||
/** [Jungfrau][Moench][Mythen3][CTB] Get time from detector start
|
||||
* [Gotthard2] not in burst and auto mode */
|
||||
Result<ns> getActualTime(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau][Mythen3][CTB][Moench] Get timestamp at a frame start
|
||||
/** [Jungfrau][Moench][Mythen3][CTB] Get timestamp at a frame start
|
||||
* [Gotthard2] not in burst and auto mode */
|
||||
Result<ns> getMeasurementTime(Positions pos = {}) const;
|
||||
|
||||
@ -2008,7 +2008,7 @@ class Detector {
|
||||
///@}
|
||||
|
||||
private:
|
||||
std::vector<int> getValidPortNumbers(int start_port);
|
||||
std::vector<int> getPortNumbers(int start_port);
|
||||
void updateRxRateCorrections();
|
||||
void setNumberofUDPInterfaces_(int n, Positions pos);
|
||||
};
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/TypeTraits.h"
|
||||
#include "sls/container_utils.h"
|
||||
|
||||
namespace sls {
|
||||
@ -129,25 +128,6 @@ template <class T, class Allocator = std::allocator<T>> class Result {
|
||||
/** Test whether all elements of the result are equal */
|
||||
bool equal() const noexcept { return allEqual(vec); }
|
||||
|
||||
/** Test whether any element of the result are equal to a value */
|
||||
bool any(const T &value) const noexcept { return anyEqualTo(vec, value); }
|
||||
|
||||
template <typename V, typename... Args, typename = AllSame<V, Args...>>
|
||||
typename std::enable_if<std::is_same<V, T>::value, bool>::type
|
||||
contains_only(const V &a, const Args &...args) const noexcept {
|
||||
auto values = {a, args...};
|
||||
for (const auto &element : vec) {
|
||||
int found = 0;
|
||||
for (const auto &value : values) {
|
||||
if (value == element)
|
||||
found++;
|
||||
}
|
||||
if (!found)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Convert Result<T> to std::vector<T> */
|
||||
operator std::vector<T>() { return vec; }
|
||||
};
|
||||
|
@ -277,24 +277,34 @@ std::string CmdProxy::Versions(int action) {
|
||||
}
|
||||
bool eiger = (det->getDetectorType().squash() == defs::EIGER);
|
||||
auto t = det->getFirmwareVersion(std::vector<int>{det_id});
|
||||
os << "\nType : " << OutString(det->getDetectorType())
|
||||
<< "\nRelease : " << det->getPackageVersion() << std::hex
|
||||
<< "\nClient : " << det->getClientVersion();
|
||||
os << "\nFirmware : ";
|
||||
os << "\nType : " << OutString(det->getDetectorType())
|
||||
<< "\nRelease : " << det->getPackageVersion() << std::hex
|
||||
<< "\nClient : " << det->getClientVersion();
|
||||
|
||||
if (eiger) {
|
||||
os << OutString(t);
|
||||
os << "\nFirmware (Beb) : "
|
||||
<< OutString(det->getFirmwareVersion(std::vector<int>{det_id}));
|
||||
os << "\nFirmware (Febl) : "
|
||||
<< OutString(det->getFrontEndFirmwareVersion(
|
||||
defs::FRONT_LEFT, std::vector<int>{det_id}));
|
||||
os << "\nFirmware (Febr) : "
|
||||
<< OutString(det->getFrontEndFirmwareVersion(
|
||||
defs::FRONT_RIGHT, std::vector<int>{det_id}));
|
||||
} else {
|
||||
os << OutStringHex(t);
|
||||
os << "\nFirmware : "
|
||||
<< OutStringHex(
|
||||
det->getFirmwareVersion(std::vector<int>{det_id}));
|
||||
}
|
||||
os << "\nServer : "
|
||||
|
||||
os << "\nServer : "
|
||||
<< OutString(det->getDetectorServerVersion(std::vector<int>{det_id}))
|
||||
<< "\nKernel : "
|
||||
<< OutString(det->getKernelVersion({std::vector<int>{det_id}}));
|
||||
if (!eiger)
|
||||
os << "\nHardware : "
|
||||
<< OutString(det->getHardwareVersion(std::vector<int>{det_id}));
|
||||
<< "\nKernel : "
|
||||
<< OutString(det->getKernelVersion({std::vector<int>{det_id}}))
|
||||
<< "\nHardware : "
|
||||
<< OutString(det->getHardwareVersion(std::vector<int>{det_id}));
|
||||
|
||||
if (det->getUseReceiverFlag().squash(true)) {
|
||||
os << "\nReceiver : "
|
||||
os << "\nReceiver : "
|
||||
<< OutString(det->getReceiverVersion(std::vector<int>{det_id}));
|
||||
}
|
||||
os << std::dec << '\n';
|
||||
@ -516,7 +526,8 @@ std::string CmdProxy::GapPixels(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[0, 1]\n\t[Eiger][Jungfrau] Include Gap pixels in client data "
|
||||
os << "[0, 1]\n\t[Eiger][Jungfrau][Moench] Include Gap pixels in "
|
||||
"client data "
|
||||
"call back in Detecor api. Will not be in detector streaming, "
|
||||
"receiver file or streaming. Default is 0. "
|
||||
<< '\n';
|
||||
@ -606,8 +617,8 @@ std::string CmdProxy::Exptime(int action) {
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "exptime") {
|
||||
os << "[duration] [(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Eiger][Jungfrau][Gotthard][Gotthard2]["
|
||||
"Moench][Ctb] Exposure time"
|
||||
"ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard]["
|
||||
"Gotthard2][Ctb] Exposure time"
|
||||
"\n\t[Mythen3] Exposure time of all gate signals in auto and "
|
||||
"trigger mode (internal gating). To specify gate index, use "
|
||||
"exptime1, exptime2, exptime3."
|
||||
@ -691,9 +702,10 @@ std::string CmdProxy::ReadoutSpeed(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "\n\t[0 or full_speed|1 or half_speed|2 or "
|
||||
"quarter_speed]\n\t\t[Eiger][Jungfrau] Readout "
|
||||
"quarter_speed]\n\t\t[Eiger][Jungfrau][Moench] Readout "
|
||||
"speed of chip.\n\t\t[Eiger] Default speed is full_speed."
|
||||
"\n\t\t[Jungfrau] Default speed is half_speed. full_speed "
|
||||
"\n\t\t[Jungfrau][Moench] Default speed is half_speed. "
|
||||
"full_speed "
|
||||
"option only available from v2.0 boards and is recommended to "
|
||||
"set "
|
||||
"number of interfaces to 2. Also overwrites "
|
||||
@ -702,7 +714,7 @@ std::string CmdProxy::ReadoutSpeed(int action) {
|
||||
<< '\n';
|
||||
} else {
|
||||
defs::detectorType type = det->getDetectorType().squash();
|
||||
if (type == defs::CHIPTESTBOARD || type == defs::MOENCH) {
|
||||
if (type == defs::CHIPTESTBOARD) {
|
||||
throw RuntimeError(
|
||||
"ReadoutSpeed not implemented. Did you mean runclk?");
|
||||
}
|
||||
@ -731,10 +743,11 @@ std::string CmdProxy::Adcphase(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_value] "
|
||||
"[(optional)deg]\n\t[Jungfrau][Ctb][Moench][Gotthard] "
|
||||
"Phase shift of ADC clock. \n\t[Jungfrau] Absolute phase shift. "
|
||||
"[(optional)deg]\n\t[Jungfrau][Moench][Ctb][Gotthard] "
|
||||
"Phase shift of ADC clock. \n\t[Jungfrau][Moench] Absolute phase "
|
||||
"shift. "
|
||||
"If deg used, then shift in degrees. Changing Speed also resets "
|
||||
"adcphase to recommended defaults.\n\t[Ctb][Moench] Absolute "
|
||||
"adcphase to recommended defaults.\n\t[Ctb] Absolute "
|
||||
"phase shift. If deg used, then shift in degrees. Changing "
|
||||
"adcclk also resets adcphase and sets it to previous "
|
||||
"values.\n\t[Gotthard] Relative phase shift. Cannot get"
|
||||
@ -787,7 +800,8 @@ std::string CmdProxy::Dbitphase(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau] Phase shift of "
|
||||
os << "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau][Moench] Phase "
|
||||
"shift of "
|
||||
"clock to latch digital bits. Absolute phase shift. If deg used, "
|
||||
"then shift in degrees. \n\t[Ctb]Changing dbitclk also resets "
|
||||
"dbitphase and sets to previous values."
|
||||
@ -1024,7 +1038,8 @@ std::string CmdProxy::CurrentSource(int action) {
|
||||
os << "\n\t[0|1]\n\t\t[Gotthard2] Enable or disable current source. "
|
||||
"Default "
|
||||
"is disabled.\n\t[0|1] [fix|nofix] [select source] [(only for "
|
||||
"chipv1.1)normal|low]\n\t\t[Jungfrau] Disable or enable current "
|
||||
"chipv1.1)normal|low]\n\t\t[Jungfrau][Moench] Disable or enable "
|
||||
"current "
|
||||
"source with some parameters. The select source is 0-63 for "
|
||||
"chipv1.0 and a 64 bit mask for chipv1.1. To disable, one needs "
|
||||
"only one argument '0'."
|
||||
@ -1273,7 +1288,7 @@ std::string CmdProxy::ResetDacs(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[(optional) hard] "
|
||||
"\n\t[Eiger][Jungfrau][Gotthard][Moench][Gotthard2]["
|
||||
"\n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2]["
|
||||
"Mythen3]Reset dac values to the defaults. A 'hard' optional "
|
||||
"reset will reset the dacs to the hardcoded defaults in on-board "
|
||||
"detector server."
|
||||
@ -1304,7 +1319,8 @@ std::string CmdProxy::DefaultDac(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[dac name][value][(optional)setting]\n\tSets the default for "
|
||||
"that dac to this value.\n\t[Jungfrau][Mythen3] When settings is "
|
||||
"that dac to this value.\n\t[Jungfrau][Moench][Mythen3] When "
|
||||
"settings is "
|
||||
"provided, it sets the default value only for that setting"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -1447,10 +1463,12 @@ std::string CmdProxy::Trigger(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "trigger") {
|
||||
os << "\n\t[Eiger][Mythen3][Jungfrau] Sends software trigger "
|
||||
os << "\n\t[Eiger][Mythen3][Jungfrau][Moench] Sends software "
|
||||
"trigger "
|
||||
"signal to detector";
|
||||
} else if (cmd == "blockingtrigger") {
|
||||
os << "\n\t[Eiger][Jungfrau] Sends software trigger signal to "
|
||||
os << "\n\t[Eiger][Jungfrau][Moench] Sends software trigger signal "
|
||||
"to "
|
||||
"detector and blocks till the frames are sent out for that "
|
||||
"trigger.";
|
||||
} else {
|
||||
@ -1554,7 +1572,8 @@ std::string CmdProxy::UDPDestinationList(int action) {
|
||||
"[(optional)mac2=xx:xx:xx:xx:xx:xx]\n\t[port=value] "
|
||||
"[(optional)port2=value\n\tThe order of ip, mac and port does "
|
||||
"not matter. entry_value can be >0 only for "
|
||||
"[Eiger][Jungfrau][Mythen3][Gotthard2] where round robin is "
|
||||
"[Eiger][Jungfrau][Moench][Mythen3][Gotthard2] where round robin "
|
||||
"is "
|
||||
"implemented. If 'auto' used, then ip is set to ip of "
|
||||
"rx_hostname."
|
||||
<< '\n';
|
||||
@ -1634,9 +1653,10 @@ std::string CmdProxy::UDPSourceIP2(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Gotthard2] Ip address of the "
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Moench][Gotthard2] Ip address "
|
||||
"of the "
|
||||
"detector (source) udp interface 2. Must be same subnet as "
|
||||
"destination udp ip2.\n\t [Jungfrau] top half or inner "
|
||||
"destination udp ip2.\n\t [Jungfrau][Moench] top half or inner "
|
||||
"interface\n\t [Gotthard2] veto debugging. \n\tOne can also set "
|
||||
"this to 'auto' for 1 GbE data and virtual detectors. It will "
|
||||
"set to IP of detector."
|
||||
@ -1707,9 +1727,10 @@ std::string CmdProxy::UDPDestinationIP2(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Gotthard2] Ip address of the "
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Moench][Gotthard2] Ip address "
|
||||
"of the "
|
||||
"receiver (destination) udp interface 2. If 'auto' used, then ip "
|
||||
"is set to ip of rx_hostname.\n\t[Jungfrau] bottom half "
|
||||
"is set to ip of rx_hostname.\n\t[Jungfrau][Moench] bottom half "
|
||||
"\n\t[Gotthard2] veto debugging. "
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -1743,12 +1764,13 @@ std::string CmdProxy::TransmissionDelay(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_delay]\n\t[Eiger][Jungfrau][Mythen3] Set transmission delay "
|
||||
os << "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set "
|
||||
"transmission delay "
|
||||
"for all modules in the detector using the step size "
|
||||
"provided.Sets up \n\t\t[Eiger] txdelay_left to (2 * mod_index * "
|
||||
"n_delay), \n\t\t[Eiger] txdelay_right to ((2 * mod_index + 1) * "
|
||||
"n_delay) and \n\t\t[Eiger] txdelay_frame to (2 *num_modules * "
|
||||
"n_delay) \n\t\t[Jungfrau][Mythen3] txdelay_frame to "
|
||||
"n_delay) \n\t\t[Jungfrau][Moench][Mythen3] txdelay_frame to "
|
||||
"(num_modules * n_delay) \nfor every module."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -2090,7 +2112,8 @@ std::string CmdProxy::TemperatureEvent(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[0]\n\t[Jungfrau] 1, if a temperature event occured. To clear "
|
||||
os << "[0]\n\t[Jungfrau][Moench] 1, if a temperature event occured. To "
|
||||
"clear "
|
||||
"this event, set it to 0.\n\tIf temperature crosses threshold "
|
||||
"temperature and temperature control is enabled, power to chip "
|
||||
"will be switched off and temperature event occurs. To power on "
|
||||
@ -2584,14 +2607,14 @@ std::string CmdProxy::GainCaps(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* CTB / Moench Specific */
|
||||
/* CTB Specific */
|
||||
|
||||
std::string CmdProxy::Samples(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_samples]\n\t[CTB] Number of samples (both analog and "
|
||||
"digitial) expected.\n\t[Moench] Number of samples (analog only)"
|
||||
"digitial) expected.\n"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
@ -2633,7 +2656,7 @@ std::string CmdProxy::AdcVpp(int action) {
|
||||
os << cmd << ' ';
|
||||
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[dac or mV value][(optional unit) mV] \n\t[Ctb][Moench] Vpp of "
|
||||
os << "[dac or mV value][(optional unit) mV] \n\t[Ctb] Vpp of "
|
||||
"ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> "
|
||||
"2V. \n\tAdvanced User function!\n"
|
||||
<< '\n';
|
||||
@ -2775,7 +2798,7 @@ std::string CmdProxy::Pattern(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[fname]\n\t[Mythen3][Moench][Ctb] Loads ASCII pattern file "
|
||||
os << "[fname]\n\t[Mythen3][Ctb] Loads ASCII pattern file "
|
||||
"directly to server (instead of executing line by line)"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -2796,8 +2819,8 @@ std::string CmdProxy::PatternWord(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[step or address] [64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 "
|
||||
"bit pattern at address of pattern memory.\n\t[Ctb][Moench] read "
|
||||
os << "[step or address] [64 bit mask]\n\t[Ctb][Mythen3] 64 "
|
||||
"bit pattern at address of pattern memory.\n\t[Ctb] read "
|
||||
"is same as executing pattern"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -2856,11 +2879,11 @@ std::string CmdProxy::PatternLoopAddresses(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patlimits") {
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] Limits "
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits "
|
||||
"of complete pattern."
|
||||
<< '\n';
|
||||
} else if (cmd == "patloop") {
|
||||
os << "[0-6] [start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] "
|
||||
os << "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3] "
|
||||
"Limits of the loop level provided."
|
||||
<< "\n\t[Mythen3] Level options: 0-3 only." << '\n';
|
||||
} else {
|
||||
@ -2901,7 +2924,7 @@ std::string CmdProxy::PatternLoopCycles(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patnloop") {
|
||||
os << "[0-6] [n_cycles] \n\t[Ctb][Moench][Mythen3] Number of "
|
||||
os << "[0-6] [n_cycles] \n\t[Ctb][Mythen3] Number of "
|
||||
"cycles of "
|
||||
"the loop level provided."
|
||||
<< "\n\t[Mythen3] Level options: 0-3 only." << '\n';
|
||||
@ -2937,7 +2960,7 @@ std::string CmdProxy::PatternWaitAddress(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patwait") {
|
||||
os << "[0-6] [addr] \n\t[Ctb][Moench][Mythen3] Wait address for "
|
||||
os << "[0-6] [addr] \n\t[Ctb][Mythen3] Wait address for "
|
||||
"loop level provided."
|
||||
<< "\n\t[Mythen3] Level options: 0-3 only.";
|
||||
} else {
|
||||
@ -2973,7 +2996,7 @@ std::string CmdProxy::PatternWaitTime(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patwaittime") {
|
||||
os << "[0-6] [n_clk] \n\t[Ctb][Moench][Mythen3] Wait time in clock "
|
||||
os << "[0-6] [n_clk] \n\t[Ctb][Mythen3] Wait time in clock "
|
||||
"cycles for the loop provided."
|
||||
<< "\n\t[Mythen3] Level options: 0-3 only." << '\n';
|
||||
} else {
|
||||
@ -3000,8 +3023,6 @@ std::string CmdProxy::PatternWaitTime(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* Moench */
|
||||
|
||||
std::string CmdProxy::AdditionalJsonHeader(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
@ -3084,8 +3105,9 @@ std::string CmdProxy::ProgramFpga(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[fname.pof | fname.rbf (full "
|
||||
"path)][(opitonal)--force-delete-normal-file]\n\t[Jungfrau][Ctb]["
|
||||
"Moench] Programs FPGA from pof file (full path). Then, detector "
|
||||
"path)][(opitonal)--force-delete-normal-file]\n\t[Jungfrau]["
|
||||
"Moench][Ctb] "
|
||||
"Programs FPGA from pof file (full path). Then, detector "
|
||||
"controller is rebooted. \n\t\tUse --force-delete-normal-file "
|
||||
"argument, if normal file found in device tree, it must be "
|
||||
"deleted, a new device drive created and programming "
|
||||
@ -3119,11 +3141,11 @@ std::string CmdProxy::UpdateDetectorServer(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[server_name with full "
|
||||
"path]\n\t[Jungfrau][Eiger][Ctb][Moench][Mythen3][Gotthard2] "
|
||||
"path]\n\t[Jungfrau][Moench][Eiger][Ctb][Mythen3][Gotthard2] "
|
||||
"Copies detector server via TCP (without tftp). Makes a symbolic "
|
||||
"link with a shorter name (without vx.x.x). Then, detector "
|
||||
"controller reboots (except "
|
||||
"Eiger).\n\t[Jungfrau][Ctb][Moench]Also changes respawn server "
|
||||
"Eiger).\n\t[Jungfrau][Moench][Ctb]Also changes respawn server "
|
||||
"to the link, which is effective after a reboot."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -3145,7 +3167,7 @@ std::string CmdProxy::UpdateKernel(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[kernel_name with full "
|
||||
"path]\n\t[Jungfrau][Ctb][Moench][Mythen3][Gotthard2] Advanced "
|
||||
"path]\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2] Advanced "
|
||||
"Command!! You could damage the detector. Please use with "
|
||||
"caution.\n\tUpdates the kernel image. Then, detector controller "
|
||||
"reboots with new kernel."
|
||||
@ -3170,7 +3192,7 @@ std::string CmdProxy::UpdateFirmwareAndDetectorServer(int action) {
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof "
|
||||
"(incl full path)] This does not use "
|
||||
"tftp.\n\t\t[Jungfrau][Gotthard][CTB][Moench] Updates the "
|
||||
"tftp.\n\t\t[Jungfrau][Moench][Gotthard][CTB] Updates the "
|
||||
"firmware, detector server, deletes old server, creates the "
|
||||
"symbolic link and then reboots detector controller. "
|
||||
"\n\t\t[Mythen3][Gotthard2] will require a script to start up "
|
||||
@ -3232,7 +3254,7 @@ std::string CmdProxy::AdcRegister(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[address] [value]\n\t[Jungfrau][Ctb][Moench][Gotthard] Writes "
|
||||
os << "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes "
|
||||
"to an adc register in hex. Advanced user Function!"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
|
@ -1244,7 +1244,8 @@ class CmdProxy {
|
||||
|
||||
GET_COMMAND(hardwareversion, getHardwareVersion,
|
||||
"\n\t[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] "
|
||||
"Hardware version of detector.");
|
||||
"Hardware version of detector. \n\t[Eiger] Hardware version of "
|
||||
"front FPGA on detector.");
|
||||
|
||||
GET_COMMAND(
|
||||
kernelversion, getKernelVersion,
|
||||
@ -1253,13 +1254,14 @@ class CmdProxy {
|
||||
GET_COMMAND(rx_version, getReceiverVersion, "\n\tReceiver version");
|
||||
|
||||
GET_COMMAND_HEX(serialnumber, getSerialNumber,
|
||||
"\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][CTB][Moench]"
|
||||
"\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][CTB]"
|
||||
"Serial number of detector.");
|
||||
|
||||
GET_COMMAND(moduleid, getModuleId,
|
||||
"\n\t[Gotthard2][Eiger][Mythen3][Jungfrau] 16 bit value "
|
||||
"(ideally unique) that is streamed out in the UDP header of "
|
||||
"the detector. Picked up from a file on the module.");
|
||||
GET_COMMAND(
|
||||
moduleid, getModuleId,
|
||||
"\n\t[Gotthard2][Eiger][Mythen3][Jungfrau][Moench] 16 bit value "
|
||||
"(ideally unique) that is streamed out in the UDP header of "
|
||||
"the detector. Picked up from a file on the module.");
|
||||
|
||||
GET_COMMAND(type, getDetectorType,
|
||||
"\n\tReturns detector type. Can be Eiger, Jungfrau, Gotthard, "
|
||||
@ -1279,12 +1281,10 @@ class CmdProxy {
|
||||
"verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, "
|
||||
"g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]"
|
||||
"\n\t Detector Settings"
|
||||
"\n\t[Jungfrau] - [ gain0 | highgain0]"
|
||||
"\n\t[Jungfrau][Moench] - [ gain0 | highgain0]"
|
||||
"\n\t[Gotthard] - [dynamicgain | highgain | lowgain | "
|
||||
"mediumgain | veryhighgain]"
|
||||
"\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]"
|
||||
"\n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | "
|
||||
"g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
|
||||
"\n\t[Mythen3] - [standard | fast | highgain] Also changes vrshaper "
|
||||
"and vrpreamp. \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] "
|
||||
"threshold and settings loaded from file found in settingspath. "
|
||||
@ -1302,22 +1302,24 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
fliprows, getFlipRows, setFlipRows, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger] flips rows paramater sent to slsreceiver "
|
||||
"to stream as json parameter to flip rows in gui \n\t[Jungfrau] flips "
|
||||
"to stream as json parameter to flip rows in gui "
|
||||
"\n\t[Jungfrau][Moench] flips "
|
||||
"rows in the detector itself. For bottom module and number of "
|
||||
"interfaces must be set to 2. slsReceiver and slsDetectorGui "
|
||||
"does not handle.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID_GET(
|
||||
master, getMaster, setMaster, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger][Gotthard2][Jungfrau] Sets (half) module to master "
|
||||
"and other(s) to "
|
||||
"slaves.\n\t[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau] Gets if "
|
||||
"the current (half) module is master.");
|
||||
INTEGER_COMMAND_VEC_ID_GET(master, getMaster, setMaster, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger][Gotthard2][Jungfrau][Moench] "
|
||||
"Sets (half) module to master "
|
||||
"and other(s) to "
|
||||
"slaves.\n\t[Gotthard][Gotthard2][Mythen3]["
|
||||
"Eiger][Jungfrau][Moench] Gets if "
|
||||
"the current (half) module is master.");
|
||||
|
||||
INTEGER_COMMAND_SET_NOID_GET_ID(sync, getSynchronization,
|
||||
setSynchronization, StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau] Enables or disables "
|
||||
"synchronization between modules.");
|
||||
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||
sync, getSynchronization, setSynchronization, StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau][Moench] Enables or disables "
|
||||
"synchronization between modules.");
|
||||
|
||||
/* acquisition parameters */
|
||||
|
||||
@ -1337,28 +1339,29 @@ class CmdProxy {
|
||||
period, getPeriod, setPeriod,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\tPeriod between frames");
|
||||
|
||||
TIME_COMMAND(delay, getDelayAfterTrigger, setDelayAfterTrigger,
|
||||
"[duration] [(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb]["
|
||||
"Moench] Delay after trigger");
|
||||
TIME_COMMAND(
|
||||
delay, getDelayAfterTrigger, setDelayAfterTrigger,
|
||||
"[duration] [(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]["
|
||||
"Moench] Delay after trigger");
|
||||
|
||||
GET_COMMAND(framesl, getNumberOfFramesLeft,
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] "
|
||||
"\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] "
|
||||
"Number of frames left in acquisition."
|
||||
"\n\t[Gotthard2] only in continuous auto mode.");
|
||||
|
||||
GET_COMMAND(triggersl, getNumberOfTriggersLeft,
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] "
|
||||
"\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] "
|
||||
"Number of triggers left in acquisition. Only when external "
|
||||
"trigger used.");
|
||||
|
||||
TIME_GET_COMMAND(delayl, getDelayAfterTriggerLeft,
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench]"
|
||||
"\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB]"
|
||||
" DelayLeft Delay Left in Acquisition."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
TIME_GET_COMMAND(periodl, getPeriodLeft,
|
||||
"\n\t[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2]"
|
||||
"\n\t[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2]"
|
||||
" Period left for current frame."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
@ -1369,7 +1372,7 @@ class CmdProxy {
|
||||
"[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets "
|
||||
"clkdivider to 2, else to 0.\n\t"
|
||||
"[Mythen3] Options: 8, 16, 32\n\t"
|
||||
"[Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16");
|
||||
"[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16");
|
||||
|
||||
GET_COMMAND_NOID(drlist, getDynamicRangeList,
|
||||
"\n\tGets the list of dynamic ranges for this detector.");
|
||||
@ -1378,7 +1381,7 @@ class CmdProxy {
|
||||
timing, getTimingMode, setTimingMode,
|
||||
StringTo<slsDetectorDefs::timingMode>,
|
||||
"[auto|trigger|gating|burst_trigger]\n\tTiming Mode of "
|
||||
"detector.\n\t[Jungfrau][Gotthard][Ctb][Moench][Gotthard2] "
|
||||
"detector.\n\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2] "
|
||||
"[auto|trigger]\n\t[Mythen3] "
|
||||
"[auto|trigger|gating|trigger_gating]\n\t[Eiger] "
|
||||
"[auto|trigger|gating|burst_trigger]");
|
||||
@ -1391,24 +1394,25 @@ class CmdProxy {
|
||||
"\n\tList of readout speed levels implemented for this detector.");
|
||||
|
||||
GET_COMMAND(maxadcphaseshift, getMaxADCPhaseShift,
|
||||
"\n\t[Jungfrau][CTB][Moench] Absolute maximum Phase shift of "
|
||||
"\n\t[Jungfrau][Moench][CTB] Absolute maximum Phase shift of "
|
||||
"ADC clock.");
|
||||
|
||||
GET_COMMAND(maxdbitphaseshift, getMaxDBITPhaseShift,
|
||||
"\n\t[CTB][Jungfrau] Absolute maximum Phase shift of of the "
|
||||
"clock to latch digital bits.");
|
||||
GET_COMMAND(
|
||||
maxdbitphaseshift, getMaxDBITPhaseShift,
|
||||
"\n\t[CTB][Jungfrau][Moench] Absolute maximum Phase shift of of the "
|
||||
"clock to latch digital bits.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(highvoltage, getHighVoltage, setHighVoltage,
|
||||
StringTo<int>,
|
||||
"[n_value]\n\tHigh voltage to the sensor in Voltage."
|
||||
"\n\t[Gotthard] [0|90|110|120|150|180|200]"
|
||||
"\n\t[Eiger][Mythen3][Gotthard2] 0-200"
|
||||
"\n\t[Jungfrau][Ctb][Moench] [0|60-200]");
|
||||
"\n\t[Jungfrau][Moench][Ctb] [0|60-200]");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
powerchip, getPowerChip, setPowerChip, StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau][Mythen3][Gotthard2][Moench] Power "
|
||||
"the chip. \n\t[Moench] Default is 0. \n\t[Jungfrau] Default is 0. Get "
|
||||
"[0, 1]\n\t[Jungfrau][Moench][Mythen3][Gotthard2] Power "
|
||||
"the chip. \n\t[Jungfrau][Moench] Default is 0. Get "
|
||||
"will return power status. Can be off if temperature event occured "
|
||||
"(temperature over temp_threshold with temp_control "
|
||||
"enabled. Will configure chip (only chip v1.1)\n\t[Mythen3][Gotthard2] "
|
||||
@ -1419,7 +1423,8 @@ class CmdProxy {
|
||||
imagetest, getImageTestMode, setImageTestMode, StringTo<int>,
|
||||
"[0, 1]\n\t[Gotthard] 1 adds channel intensity with precalculated "
|
||||
"values when taking an acquisition. Default is 0."
|
||||
"\n\t[Eiger][Jungfrau] Only for Virtual servers. If 0, each pixel "
|
||||
"\n\t[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each "
|
||||
"pixel "
|
||||
"intensity incremented by 1. If 1, all pixels almost saturated.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
@ -1433,9 +1438,10 @@ class CmdProxy {
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
filterresistor, getFilterResistor, setFilterResistor, StringTo<int>,
|
||||
"[value] [Gotthard2][Jungfrau] Set filter resistor. Increasing values "
|
||||
"[value] [Gotthard2][Jungfrau][Moench] Set filter resistor. Increasing "
|
||||
"values "
|
||||
"for increasing resistance.\n\t[Gotthard2] Options: [0|1|2|3]. Default "
|
||||
"is 0.\n\t[Jungfrau] Options: [0|1]. Default is 1.");
|
||||
"is 0.\n\t[Jungfrau][Moench] Options: [0|1]. Default is 1.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(dbitpipeline, getDBITPipeline, setDBITPipeline,
|
||||
StringTo<int>,
|
||||
@ -1450,19 +1456,22 @@ class CmdProxy {
|
||||
"permissible values depend on dynamic range and 10Gbe "
|
||||
"enabled.\n\t[8-512 (multiple of 8)]\n\t\t[Jungfrau] Number of rows "
|
||||
"per module starting from the centre. Options: 8 - 512, must be "
|
||||
"multiples of 8. Default is 512.");
|
||||
"multiples of 8. Default is 512.\n\t\t[Moench] Number of rows "
|
||||
"per module starting from the centre. Options:16 - 400, must be "
|
||||
"multiples of 16. Default is 400.");
|
||||
|
||||
/** temperature */
|
||||
GET_COMMAND_NOID(
|
||||
templist, getTemperatureList,
|
||||
"\n\tList of temperature commands implemented for this detector.");
|
||||
|
||||
GET_IND_COMMAND(temp_adc, getTemperature, slsDetectorDefs::TEMPERATURE_ADC,
|
||||
" °C", "[n_value]\n\t[Jungfrau][Gotthard] ADC Temperature");
|
||||
GET_IND_COMMAND(
|
||||
temp_adc, getTemperature, slsDetectorDefs::TEMPERATURE_ADC, " °C",
|
||||
"[n_value]\n\t[Jungfrau][Moench][Gotthard] ADC Temperature");
|
||||
|
||||
GET_IND_COMMAND(temp_fpga, getTemperature,
|
||||
slsDetectorDefs::TEMPERATURE_FPGA, " °C",
|
||||
"[n_value]\n\t[Eiger][Jungfrau][Gotthard][Mythen3]["
|
||||
"[n_value]\n\t[Eiger][Jungfrau][Moench][Gotthard][Mythen3]["
|
||||
"Gotthard2] FPGA Temperature");
|
||||
|
||||
GET_IND_COMMAND(temp_fpgaext, getTemperature,
|
||||
@ -1596,7 +1605,7 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
numinterfaces, getNumberofUDPInterfaces, setNumberofUDPInterfaces,
|
||||
StringTo<int>,
|
||||
"[1, 2]\n\t[Jungfrau] Number of udp interfaces to stream "
|
||||
"[1, 2]\n\t[Jungfrau][Moench] Number of udp interfaces to stream "
|
||||
"data from detector. Default: 1.\n\tAlso enables second interface in "
|
||||
"receiver for listening (Writes a file per interface if writing "
|
||||
"enabled).\n\tAlso restarts client and receiver zmq sockets if zmq "
|
||||
@ -1605,12 +1614,14 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
selinterface, getSelectedUDPInterface, selectUDPInterface,
|
||||
StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau] The udp interface to stream data from detector. "
|
||||
"[0, 1]\n\t[Jungfrau][Moench] The udp interface to stream data from "
|
||||
"detector. "
|
||||
"Effective only when number of interfaces is 1. Default: 0 (outer)");
|
||||
|
||||
GET_COMMAND(
|
||||
udp_numdst, getNumberofUDPDestinations,
|
||||
"\n\t[Jungfrau][Eiger][Mythen3][Gotthard2] One can enter upto 32 (64 "
|
||||
"\n\t[Jungfrau][Moench][Eiger][Mythen3][Gotthard2] One can enter upto "
|
||||
"32 (64 "
|
||||
"for Mythen3) destinations that the detector will stream images out in "
|
||||
"a round robin fashion. This is get only command. Default: 1");
|
||||
|
||||
@ -1621,7 +1632,8 @@ class CmdProxy {
|
||||
udp_firstdst, getFirstUDPDestination, setFirstUDPDestination,
|
||||
StringTo<int>,
|
||||
"\n[0 - 31 (or number of udp "
|
||||
"destinations)]\n\t[Jungfrau][Gotthard2]\n[0-63]\n\t[Mythen3]\n\n\t "
|
||||
"destinations)]\n\t[Jungfrau][Moench][Gotthard2]\n[0-63]\n\t[Mythen3]"
|
||||
"\n\n\t "
|
||||
"One can set which is the first destination that the detector will "
|
||||
"stream images out from in a round robin fashion. The entry must not "
|
||||
"have been empty. Default: 0");
|
||||
@ -1632,10 +1644,10 @@ class CmdProxy {
|
||||
"interface. \n\t[Eiger] Do not set as detector will replace with its "
|
||||
"own DHCP Mac (1G) or DHCP Mac + 1 (10G).");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(udp_srcmac2, getSourceUDPMAC2, setSourceUDPMAC2,
|
||||
MacAddr,
|
||||
"[x:x:x:x:x:x]\n\t[Jungfrau] Mac address of the top "
|
||||
"half or inner (source) udp interface. ");
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
udp_srcmac2, getSourceUDPMAC2, setSourceUDPMAC2, MacAddr,
|
||||
"[x:x:x:x:x:x]\n\t[Jungfrau][Moench] Mac address of the top "
|
||||
"half or inner (source) udp interface. ");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
udp_dstmac, getDestinationUDPMAC, setDestinationUDPMAC, MacAddr,
|
||||
@ -1647,10 +1659,12 @@ class CmdProxy {
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
udp_dstmac2, getDestinationUDPMAC2, setDestinationUDPMAC2, MacAddr,
|
||||
"[x:x:x:x:x:x]\n\t[Jungfrau] Mac address of the receiver (destination) "
|
||||
"[x:x:x:x:x:x]\n\t[Jungfrau][Moench] Mac address of the receiver "
|
||||
"(destination) "
|
||||
"udp interface 2. Not mandatory to set as udp_dstip2 retrieves it from "
|
||||
"slsReceiver process but must be set if you use a custom receiver (not "
|
||||
"slsReceiver). \n\t [Jungfrau] top half or inner interface \n\t "
|
||||
"slsReceiver). \n\t [Jungfrau][Moench] top half or inner interface "
|
||||
"\n\t "
|
||||
"[Gotthard2] veto debugging. Use router mac if router between detector "
|
||||
"and receiver.");
|
||||
|
||||
@ -1664,10 +1678,10 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID_GET(
|
||||
udp_dstport2, getDestinationUDPPort2, setDestinationUDPPort2,
|
||||
StringTo<int>,
|
||||
"[n]\n\t[Jungfrau][Eiger][Gotthard2] Port number of the "
|
||||
"[n]\n\t[Jungfrau][Moench][Eiger][Gotthard2] Port number of the "
|
||||
"receiver (destination) udp interface 2. Default is 50002. "
|
||||
"\n\tIf multi command, ports for each module is calculated "
|
||||
"(incremented by 2) \n\t[Jungfrau] top half or inner interface "
|
||||
"(incremented by 2) \n\t[Jungfrau][Moench] top half or inner interface "
|
||||
"\n\t[Eiger] "
|
||||
"right half \n\t[Gotthard2] veto debugging");
|
||||
|
||||
@ -1686,19 +1700,21 @@ class CmdProxy {
|
||||
GET_COMMAND(rx_printconfig, printRxConfiguration,
|
||||
"\n\tPrints the receiver configuration.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
tengiga, getTenGiga, setTenGiga, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger][Ctb][Moench][Mythen3] 10GbE Enable.");
|
||||
INTEGER_COMMAND_VEC_ID(tengiga, getTenGiga, setTenGiga, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger][Ctb][Mythen3] 10GbE Enable.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(flowcontrol10g, getTenGigaFlowControl,
|
||||
setTenGigaFlowControl, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger][Jungfrau] 10GbE Flow Control.");
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
flowcontrol10g, getTenGigaFlowControl, setTenGigaFlowControl,
|
||||
StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger][Jungfrau][Moench] 10GbE Flow Control.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
txdelay_frame, getTransmissionDelayFrame, setTransmissionDelayFrame,
|
||||
StringTo<int>,
|
||||
"[n_delay]\n\t[Eiger][Jungfrau][Mythen3] Transmission delay of first "
|
||||
"udp packet being streamed out of the module.\n\t[Jungfrau] [0-31] "
|
||||
"[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Transmission delay of "
|
||||
"first "
|
||||
"udp packet being streamed out of the module.\n\t[Jungfrau][Moench] "
|
||||
"[0-31] "
|
||||
"Each value represents 1 ms\n\t[Eiger] Additional delay to "
|
||||
"txdelay_left and txdelay_right. Each value represents 10ns. Typical "
|
||||
"value is 50000.\n\t[Mythen3] [0-16777215] Each value represents 8 ns "
|
||||
@ -1941,13 +1957,15 @@ class CmdProxy {
|
||||
|
||||
/* Jungfrau Specific */
|
||||
|
||||
GET_COMMAND(chipversion, getChipVersion,
|
||||
"\n\t[Jungfrau] Returns chip version. Can be 1.0 or 1.1");
|
||||
GET_COMMAND(
|
||||
chipversion, getChipVersion,
|
||||
"\n\t[Jungfrau][Moench] Returns chip version. Can be 1.0 or 1.1");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
temp_threshold, getThresholdTemperature, setThresholdTemperature,
|
||||
StringTo<int>,
|
||||
"[n_temp (in degrees)]\n\t[Jungfrau] Threshold temperature in degrees. "
|
||||
"[n_temp (in degrees)]\n\t[Jungfrau][Moench] Threshold temperature in "
|
||||
"degrees. "
|
||||
"If temperature crosses threshold temperature and temperature control "
|
||||
"is enabled, power to chip will be switched off and temperature event "
|
||||
"occurs. To power on chip again, temperature has to be less than "
|
||||
@ -1956,7 +1974,7 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
temp_control, getTemperatureControl, setTemperatureControl,
|
||||
StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau] Temperature control enable. Default is 0 "
|
||||
"[0, 1]\n\t[Jungfrau][Moench] Temperature control enable. Default is 0 "
|
||||
"(disabled). If temperature crosses threshold temperature and "
|
||||
"temperature control is enabled, power to chip will be switched off "
|
||||
"and temperature event occurs. To power on chip again, temperature has "
|
||||
@ -1966,7 +1984,8 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
autocompdisable, getAutoComparatorDisable, setAutoComparatorDisable,
|
||||
StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the "
|
||||
"[0, 1]\n\t[Jungfrau][Moench] Auto comparator disable mode. By "
|
||||
"default, the "
|
||||
"on-chip gain switching is active during the entire exposure.This mode "
|
||||
"disables the on - chip gain switching comparator automatically after "
|
||||
"93.75% (only for chipv1.0) of exposure time (only for longer than "
|
||||
@ -1975,19 +1994,18 @@ class CmdProxy {
|
||||
"disabled(comparator enabled throughout). 1 enables mode. 0 disables "
|
||||
"mode. ");
|
||||
|
||||
TIME_COMMAND(compdisabletime, getComparatorDisableTime,
|
||||
setComparatorDisableTime,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time "
|
||||
"before end of exposure when comparator is disabled. It is "
|
||||
"only possible for chipv1.1.");
|
||||
TIME_COMMAND(
|
||||
compdisabletime, getComparatorDisableTime, setComparatorDisableTime,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench] Time "
|
||||
"before end of exposure when comparator is disabled. It is "
|
||||
"only possible for chipv1.1.");
|
||||
|
||||
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||
extrastoragecells, getNumberOfAdditionalStorageCells,
|
||||
setNumberOfAdditionalStorageCells, StringTo<int>,
|
||||
"[0-15]\n\t[Jungfrau] Only for chipv1.0. Number of additional storage "
|
||||
"cells. Default is "
|
||||
"0. For advanced users only. \n\tThe #images = #frames x #triggers x "
|
||||
"(#extrastoragecells + 1).");
|
||||
"cells. Default is 0. For advanced users only. \n\tThe #images = "
|
||||
"#frames x #triggers x (#extrastoragecells + 1).");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
storagecell_start, getStorageCellStart, setStorageCellStart,
|
||||
@ -1996,12 +2014,11 @@ class CmdProxy {
|
||||
"of the series. max is 15 (default) for chipv1.0 and 3 (default) for "
|
||||
"chipv1.1. For advanced users only.");
|
||||
|
||||
TIME_COMMAND(
|
||||
storagecell_delay, getStorageCellDelay, setStorageCellDelay,
|
||||
"[duration (0-1638375 ns)] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] "
|
||||
"Additional time delay between 2 consecutive exposures in burst mode "
|
||||
"(resolution of 25ns). Only applicable for chipv1.0. For advanced "
|
||||
"users only.");
|
||||
TIME_COMMAND(storagecell_delay, getStorageCellDelay, setStorageCellDelay,
|
||||
"[duration (0-1638375 ns)] [(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Jungfrau] Additional time delay between 2 "
|
||||
"consecutive exposures in burst mode (resolution of 25ns). "
|
||||
"Only applicable for chipv1.0. For advanced users only.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
gainmode, getGainMode, setGainMode, StringTo<slsDetectorDefs::gainMode>,
|
||||
@ -2009,10 +2026,11 @@ class CmdProxy {
|
||||
"Jungfrau] Gain mode.\n\tCAUTION: Do not use fixg0 without caution, "
|
||||
"you can damage the detector!!!");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(filtercells, getNumberOfFilterCells,
|
||||
setNumberOfFilterCells, StringTo<int>,
|
||||
"[0-12]\n\t[Jungfrau] Set Filter Cell. Only for "
|
||||
"chipv1.1. Advanced user Command");
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
filtercells, getNumberOfFilterCells, setNumberOfFilterCells,
|
||||
StringTo<int>,
|
||||
"[0-12]\n\t[Jungfrau][Moench] Set Filter Cell. Only for "
|
||||
"chipv1.1. Advanced user Command");
|
||||
|
||||
/* Gotthard Specific */
|
||||
TIME_GET_COMMAND(exptimel, getExptimeLeft,
|
||||
@ -2094,36 +2112,36 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
asamples, getNumberOfAnalogSamples, setNumberOfAnalogSamples,
|
||||
StringTo<int>,
|
||||
"[n_samples]\n\t[CTB][Moench] Number of analog samples expected.");
|
||||
"[n_samples]\n\t[CTB] Number of analog samples expected.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
adcclk, getADCClock, setADCClock, StringTo<int>,
|
||||
"[n_clk in MHz]\n\t[Ctb][Moench] ADC clock frequency in MHz.");
|
||||
"[n_clk in MHz]\n\t[Ctb] ADC clock frequency in MHz.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(runclk, getRUNClock, setRUNClock, StringTo<int>,
|
||||
"[n_clk in MHz]\n\t[Ctb][Moench] Run clock in MHz.");
|
||||
"[n_clk in MHz]\n\t[Ctb] Run clock in MHz.");
|
||||
|
||||
GET_COMMAND(syncclk, getSYNCClock,
|
||||
"[n_clk in MHz]\n\t[Ctb][Moench] Sync clock in MHz.");
|
||||
"[n_clk in MHz]\n\t[Ctb] Sync clock in MHz.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
adcpipeline, getADCPipeline, setADCPipeline, StringTo<int>,
|
||||
"[n_value]\n\t[Ctb][Moench] Pipeline for ADC clock.");
|
||||
INTEGER_COMMAND_VEC_ID(adcpipeline, getADCPipeline, setADCPipeline,
|
||||
StringTo<int>,
|
||||
"[n_value]\n\t[Ctb] Pipeline for ADC clock.");
|
||||
|
||||
INTEGER_IND_COMMAND(v_limit, getVoltage, setVoltage, StringTo<int>,
|
||||
defs::V_LIMIT,
|
||||
"[n_value]\n\t[Ctb][Moench] Soft limit for power "
|
||||
"[n_value]\n\t[Ctb] Soft limit for power "
|
||||
"supplies (ctb only) and DACS in mV.");
|
||||
|
||||
INTEGER_COMMAND_HEX(adcenable, getADCEnableMask, setADCEnableMask,
|
||||
StringTo<uint32_t>,
|
||||
"[bitmask]\n\t[Ctb][Moench] ADC Enable Mask for 1Gb "
|
||||
"[bitmask]\n\t[Ctb] ADC Enable Mask for 1Gb "
|
||||
"Enable for each 32 ADC channel.");
|
||||
|
||||
INTEGER_COMMAND_HEX(
|
||||
adcenable10g, getTenGigaADCEnableMask, setTenGigaADCEnableMask,
|
||||
StringTo<uint32_t>,
|
||||
"[bitmask]\n\t[Ctb][Moench] ADC Enable Mask for 10Gb mode for each 32 "
|
||||
"[bitmask]\n\t[Ctb] ADC Enable Mask for 10Gb mode for each 32 "
|
||||
"ADC channel. However, if any of a consecutive 4 bits are enabled, the "
|
||||
"complete 4 bits are enabled.");
|
||||
|
||||
@ -2224,28 +2242,28 @@ class CmdProxy {
|
||||
|
||||
EXECUTE_SET_COMMAND_NOID_1ARG(
|
||||
savepattern, savePattern,
|
||||
"[fname]\n\t[Ctb][Moench][Mythen3] Saves pattern to file (ascii). "
|
||||
"\n\t[Ctb][Moench] Also executes pattern.");
|
||||
"[fname]\n\t[Ctb][Mythen3] Saves pattern to file (ascii). "
|
||||
"\n\t[Ctb] Also executes pattern.");
|
||||
|
||||
EXECUTE_SET_COMMAND(
|
||||
defaultpattern, loadDefaultPattern,
|
||||
"\n\t[Mythen3][Moench] Loads and runs default pattern in pattern "
|
||||
"\n\t[Mythen3] Loads and runs default pattern in pattern "
|
||||
"generator. It is to go back to initial settings.");
|
||||
|
||||
INTEGER_COMMAND_HEX_WIDTH16(patioctrl, getPatternIOControl,
|
||||
setPatternIOControl, StringTo<uint64_t>,
|
||||
"[64 bit mask]\n\t[Ctb][Moench] 64 bit mask "
|
||||
"[64 bit mask]\n\t[Ctb] 64 bit mask "
|
||||
"defining input (0) and output (1) signals.");
|
||||
|
||||
INTEGER_COMMAND_HEX_WIDTH16(
|
||||
patmask, getPatternMask, setPatternMask, StringTo<uint64_t>,
|
||||
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] Selects the bits that will "
|
||||
"[64 bit mask]\n\t[Ctb][Mythen3] Selects the bits that will "
|
||||
"have a pattern mask applied to the selected patmask for every "
|
||||
"pattern.");
|
||||
|
||||
INTEGER_COMMAND_HEX_WIDTH16(
|
||||
patsetbit, getPatternBitMask, setPatternBitMask, StringTo<uint64_t>,
|
||||
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] Sets the mask applied to "
|
||||
"[64 bit mask]\n\t[Ctb][Mythen3] Sets the mask applied to "
|
||||
"every pattern to the selected bits.");
|
||||
|
||||
EXECUTE_SET_COMMAND(patternstart, startPattern,
|
||||
@ -2255,10 +2273,10 @@ class CmdProxy {
|
||||
/* Advanced */
|
||||
|
||||
EXECUTE_SET_COMMAND(resetfpga, resetFPGA,
|
||||
"\n\t[Jungfrau][Ctb][Moench] Reset FPGA.");
|
||||
"\n\t[Jungfrau][Moench][Ctb] Reset FPGA.");
|
||||
|
||||
EXECUTE_SET_COMMAND(rebootcontroller, rebootController,
|
||||
"\n\t[Jungfrau][Ctb][Moench][Gotthard][Mythen3]["
|
||||
"\n\t[Jungfrau][Moench][Ctb][Gotthard][Mythen3]["
|
||||
"Gotthard2] Reboot controller of detector.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
@ -2269,18 +2287,18 @@ class CmdProxy {
|
||||
|
||||
EXECUTE_SET_COMMAND(
|
||||
firmwaretest, executeFirmwareTest,
|
||||
"\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb][Moench] Firmware "
|
||||
"\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Firmware "
|
||||
"test, ie. reads a read fixed pattern from a register.");
|
||||
|
||||
EXECUTE_SET_COMMAND(
|
||||
bustest, executeBusTest,
|
||||
"\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb][Moench] Bus test, "
|
||||
"\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, "
|
||||
"ie. Writes different values in a R/W register and confirms the "
|
||||
"writes to check bus.\n\tAdvanced User function!");
|
||||
|
||||
INTEGER_COMMAND_HEX(
|
||||
adcinvert, getADCInvert, setADCInvert, StringTo<uint32_t>,
|
||||
"[bitmask]\n\t[Ctb][Moench][Jungfrau] ADC Inversion "
|
||||
"[bitmask]\n\t[Ctb][Jungfrau][Moench] ADC Inversion "
|
||||
"Mask.\n\t[Jungfrau][Moench] Inversions on top of the default mask.");
|
||||
|
||||
/* Insignificant */
|
||||
@ -2305,19 +2323,19 @@ class CmdProxy {
|
||||
"\n\tClient IP Address that last communicated with the detector.");
|
||||
|
||||
GET_COMMAND(framecounter, getNumberOfFramesFromStart,
|
||||
"\n\t[Jungfrau][Mythen3][Gotthard2][Moench][CTB] "
|
||||
"\n\t[Jungfrau][Moench][Mythen3][Gotthard2][CTB] "
|
||||
"Number of frames from start run control."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
TIME_GET_COMMAND(runtime, getActualTime,
|
||||
"[(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Mythen3][Gotthard2][Moench]["
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2]["
|
||||
"CTB] Time from detector start up."
|
||||
"\n\t[Gotthard2] not in burst and auto mode.");
|
||||
|
||||
TIME_GET_COMMAND(frametime, getMeasurementTime,
|
||||
"[(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Mythen3][Gotthard2][Moench]["
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2]["
|
||||
"CTB] Timestamp at a frame start."
|
||||
"\n\t[Gotthard2] not in burst and auto mode.");
|
||||
};
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
#include <set>
|
||||
#include <thread>
|
||||
|
||||
namespace sls {
|
||||
@ -109,9 +108,6 @@ void Detector::setHostname(const std::vector<std::string> &hostname) {
|
||||
}
|
||||
|
||||
void Detector::setVirtualDetectorServers(int numServers, int startingPort) {
|
||||
for (int i = 0; i != numServers; ++i) {
|
||||
validatePortNumber(startingPort + i * 2);
|
||||
}
|
||||
pimpl->setVirtualDetectorServers(numServers, startingPort);
|
||||
}
|
||||
|
||||
@ -128,6 +124,13 @@ Result<int64_t> Detector::getFirmwareVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getFirmwareVersion, pos);
|
||||
}
|
||||
|
||||
Result<int64_t>
|
||||
Detector::getFrontEndFirmwareVersion(const defs::fpgaPosition fpgaPosition,
|
||||
Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getFrontEndFirmwareVersion, pos,
|
||||
fpgaPosition);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getDetectorServerVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getDetectorServerVersion, pos);
|
||||
}
|
||||
@ -187,17 +190,12 @@ std::vector<defs::detectorSettings> Detector::getSettingsList() const {
|
||||
defs::HIGHGAIN, defs::DYNAMICGAIN, defs::LOWGAIN, defs::MEDIUMGAIN,
|
||||
defs::VERYHIGHGAIN};
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
return std::vector<defs::detectorSettings>{defs::GAIN0,
|
||||
defs::HIGHGAIN0};
|
||||
case defs::GOTTHARD2:
|
||||
return std::vector<defs::detectorSettings>{
|
||||
defs::DYNAMICGAIN, defs::FIXGAIN1, defs::FIXGAIN2};
|
||||
case defs::MOENCH:
|
||||
return std::vector<defs::detectorSettings>{
|
||||
defs::G1_HIGHGAIN, defs::G1_LOWGAIN,
|
||||
defs::G2_HIGHCAP_HIGHGAIN, defs::G2_HIGHCAP_LOWGAIN,
|
||||
defs::G2_LOWCAP_HIGHGAIN, defs::G2_LOWCAP_LOWGAIN,
|
||||
defs::G4_HIGHGAIN, defs::G4_LOWGAIN};
|
||||
case defs::MYTHEN3:
|
||||
return std::vector<defs::detectorSettings>{defs::STANDARD, defs::FAST,
|
||||
defs::HIGHGAIN};
|
||||
@ -509,6 +507,7 @@ std::vector<defs::speedLevel> Detector::getReadoutSpeedList() const {
|
||||
switch (getDetectorType().squash()) {
|
||||
case defs::EIGER:
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
return std::vector<defs::speedLevel>{defs::FULL_SPEED, defs::HALF_SPEED,
|
||||
defs::QUARTER_SPEED};
|
||||
case defs::GOTTHARD2:
|
||||
@ -631,6 +630,7 @@ std::vector<defs::dacIndex> Detector::getTemperatureList() const {
|
||||
case defs::CHIPTESTBOARD:
|
||||
return std::vector<defs::dacIndex>{defs::SLOW_ADC_TEMP};
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
case defs::GOTTHARD:
|
||||
return std::vector<defs::dacIndex>{defs::TEMPERATURE_ADC,
|
||||
defs::TEMPERATURE_FPGA};
|
||||
@ -669,6 +669,7 @@ Result<int> Detector::getTemperature(defs::dacIndex index,
|
||||
switch (getDetectorType().squash()) {
|
||||
case defs::EIGER:
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
case defs::MYTHEN3:
|
||||
case defs::GOTTHARD2:
|
||||
for (auto &it : res) {
|
||||
@ -696,6 +697,7 @@ std::vector<defs::dacIndex> Detector::getDacList() const {
|
||||
defs::VREF_DS, defs::VCASCN_PB, defs::VCASCP_PB, defs::VOUT_CM,
|
||||
defs::VCASC_OUT, defs::VIN_CM, defs::VREF_COMP, defs::IB_TESTC};
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
return std::vector<defs::dacIndex>{
|
||||
defs::VB_COMP, defs::VDD_PROT, defs::VIN_COM, defs::VREF_PRECH,
|
||||
defs::VB_PIXBUF, defs::VB_DS, defs::VREF_DS, defs::VREF_COMP};
|
||||
@ -713,10 +715,6 @@ std::vector<defs::dacIndex> Detector::getDacList() const {
|
||||
defs::VCAS, defs::VRPREAMP, defs::VCAL_N, defs::VIPRE,
|
||||
defs::VISHAPER, defs::VCAL_P, defs::VTRIM, defs::VDCSH,
|
||||
defs::VTHRESHOLD};
|
||||
case defs::MOENCH:
|
||||
return std::vector<defs::dacIndex>{
|
||||
defs::VBP_COLBUF, defs::VIPRE, defs::VIN_CM, defs::VB_SDA,
|
||||
defs::VCASC_SFP, defs::VOUT_CM, defs::VIPRE_CDS, defs::IBIAS_SFP};
|
||||
case defs::CHIPTESTBOARD:
|
||||
for (int i = 0; i != 18; ++i) {
|
||||
retval.push_back(static_cast<defs::dacIndex>(i));
|
||||
@ -849,26 +847,18 @@ void Detector::startDetectorReadout() {
|
||||
|
||||
void Detector::stopDetector(Positions pos) {
|
||||
|
||||
// stop and check status X times
|
||||
int retries{0};
|
||||
auto status = getDetectorStatus(pos);
|
||||
|
||||
// jf sync fix: status [stopped or idle] = [stopped]
|
||||
// sync issue: (master idle sometimes, slaves stopped)
|
||||
|
||||
// eiger fix: stop multiple times from multi client till all modules stopped
|
||||
// issue: asynchronous start and stop scripts with a module being started
|
||||
// (stop before) and waiting for the other to be done. So a module that was
|
||||
// idle before stopping will return running (after async start script) when
|
||||
// getting status after, which will then be stopped again.
|
||||
|
||||
while (!status.contains_only(defs::runStatus::IDLE,
|
||||
defs::runStatus::STOPPED)) {
|
||||
if (status.any(defs::runStatus::ERROR)) {
|
||||
throw RuntimeError("Could not stop detector. At least one module "
|
||||
"returned error status.");
|
||||
// avoid default construction of runStatus::IDLE on squash
|
||||
auto status = getDetectorStatus().squash(defs::runStatus::RUNNING);
|
||||
while (status != defs::runStatus::IDLE &&
|
||||
status != defs::runStatus::STOPPED) {
|
||||
if (status == defs::runStatus::ERROR) {
|
||||
throw RuntimeError(
|
||||
"Could not stop detector. Returned error status.");
|
||||
}
|
||||
pimpl->stopDetector(pos);
|
||||
status = getDetectorStatus(pos);
|
||||
pimpl->Parallel(&Module::stopAcquisition, pos);
|
||||
status = getDetectorStatus().squash(defs::runStatus::RUNNING);
|
||||
++retries;
|
||||
|
||||
if (retries == 10)
|
||||
@ -887,7 +877,7 @@ void Detector::stopDetector(Positions pos) {
|
||||
for (auto it : res) {
|
||||
maxVal = std::max(maxVal, it);
|
||||
}
|
||||
setNextFrameNumber(maxVal + 1, pos);
|
||||
setNextFrameNumber(maxVal + 1);
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
@ -926,7 +916,7 @@ void Detector::setNextFrameNumber(uint64_t value, Positions pos) {
|
||||
}
|
||||
|
||||
void Detector::sendSoftwareTrigger(const bool block, Positions pos) {
|
||||
pimpl->sendSoftwareTrigger(block, pos);
|
||||
pimpl->Parallel(&Module::sendSoftwareTrigger, pos, block);
|
||||
}
|
||||
|
||||
Result<defs::scanParameters> Detector::getScan(Positions pos) const {
|
||||
@ -954,7 +944,8 @@ Result<int> Detector::getNumberofUDPInterfaces(Positions pos) const {
|
||||
}
|
||||
|
||||
void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
||||
if (getDetectorType().squash() != defs::JUNGFRAU) {
|
||||
auto detType = getDetectorType().squash();
|
||||
if (detType != defs::JUNGFRAU && detType != defs::MOENCH) {
|
||||
throw RuntimeError(
|
||||
"Cannot set number of udp interfaces for this detector.");
|
||||
}
|
||||
@ -963,23 +954,18 @@ void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
||||
}
|
||||
|
||||
void Detector::setNumberofUDPInterfaces_(int n, Positions pos) {
|
||||
if (!size()) {
|
||||
throw RuntimeError("No modules added.");
|
||||
}
|
||||
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||
int clientStartingPort = getClientZmqPort({0}).squash(0);
|
||||
bool useReceiver = getUseReceiverFlag().squash(false);
|
||||
bool previouslyReceiverStreaming = false;
|
||||
int rxStartingPort = 0;
|
||||
int startingPort = 0;
|
||||
if (useReceiver) {
|
||||
previouslyReceiverStreaming = getRxZmqDataStream(pos).squash(true);
|
||||
rxStartingPort = getRxZmqPort({0}).squash(0);
|
||||
startingPort = getRxZmqPort({0}).squash(0);
|
||||
}
|
||||
pimpl->Parallel(&Module::setNumberofUDPInterfaces, pos, n);
|
||||
// ensure receiver zmq socket ports are multiplied by 2 (2 interfaces)
|
||||
setClientZmqPort(clientStartingPort, -1);
|
||||
if (getUseReceiverFlag().squash(false)) {
|
||||
setRxZmqPort(rxStartingPort, -1);
|
||||
if (getUseReceiverFlag().squash(false) && size()) {
|
||||
setRxZmqPort(startingPort, -1);
|
||||
}
|
||||
// redo the zmq sockets if enabled
|
||||
if (previouslyClientStreaming) {
|
||||
@ -1099,13 +1085,12 @@ Result<int> Detector::getDestinationUDPPort(Positions pos) const {
|
||||
|
||||
void Detector::setDestinationUDPPort(int port, int module_id) {
|
||||
if (module_id == -1) {
|
||||
std::vector<int> port_list = getValidPortNumbers(port);
|
||||
std::vector<int> port_list = getPortNumbers(port);
|
||||
for (int idet = 0; idet < size(); ++idet) {
|
||||
pimpl->Parallel(&Module::setDestinationUDPPort, {idet},
|
||||
port_list[idet]);
|
||||
}
|
||||
} else {
|
||||
validatePortNumber(port);
|
||||
pimpl->Parallel(&Module::setDestinationUDPPort, {module_id}, port);
|
||||
}
|
||||
}
|
||||
@ -1116,13 +1101,12 @@ Result<int> Detector::getDestinationUDPPort2(Positions pos) const {
|
||||
|
||||
void Detector::setDestinationUDPPort2(int port, int module_id) {
|
||||
if (module_id == -1) {
|
||||
std::vector<int> port_list = getValidPortNumbers(port);
|
||||
std::vector<int> port_list = getPortNumbers(port);
|
||||
for (int idet = 0; idet < size(); ++idet) {
|
||||
pimpl->Parallel(&Module::setDestinationUDPPort2, {idet},
|
||||
port_list[idet]);
|
||||
}
|
||||
} else {
|
||||
validatePortNumber(port);
|
||||
pimpl->Parallel(&Module::setDestinationUDPPort2, {module_id}, port);
|
||||
}
|
||||
}
|
||||
@ -1234,11 +1218,9 @@ void Detector::setRxPort(int port, int module_id) {
|
||||
it = port++;
|
||||
}
|
||||
for (int idet = 0; idet < size(); ++idet) {
|
||||
validatePortNumber(port_list[idet]);
|
||||
pimpl->Parallel(&Module::setReceiverPort, {idet}, port_list[idet]);
|
||||
}
|
||||
} else {
|
||||
validatePortNumber(port);
|
||||
pimpl->Parallel(&Module::setReceiverPort, {module_id}, port);
|
||||
}
|
||||
}
|
||||
@ -1436,13 +1418,12 @@ void Detector::setRxZmqPort(int port, int module_id) {
|
||||
bool previouslyReceiverStreaming =
|
||||
getRxZmqDataStream(std::vector<int>{module_id}).squash(false);
|
||||
if (module_id == -1) {
|
||||
std::vector<int> port_list = getValidPortNumbers(port);
|
||||
std::vector<int> port_list = getPortNumbers(port);
|
||||
for (int idet = 0; idet < size(); ++idet) {
|
||||
pimpl->Parallel(&Module::setReceiverStreamingPort, {idet},
|
||||
port_list[idet]);
|
||||
}
|
||||
} else {
|
||||
validatePortNumber(port);
|
||||
pimpl->Parallel(&Module::setReceiverStreamingPort, {module_id}, port);
|
||||
}
|
||||
if (previouslyReceiverStreaming) {
|
||||
@ -1471,13 +1452,12 @@ Result<int> Detector::getClientZmqPort(Positions pos) const {
|
||||
void Detector::setClientZmqPort(int port, int module_id) {
|
||||
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||
if (module_id == -1) {
|
||||
std::vector<int> port_list = getValidPortNumbers(port);
|
||||
std::vector<int> port_list = getPortNumbers(port);
|
||||
for (int idet = 0; idet < size(); ++idet) {
|
||||
pimpl->Parallel(&Module::setClientStreamingPort, {idet},
|
||||
port_list[idet]);
|
||||
}
|
||||
} else {
|
||||
validatePortNumber(port);
|
||||
pimpl->Parallel(&Module::setClientStreamingPort, {module_id}, port);
|
||||
}
|
||||
if (previouslyClientStreaming) {
|
||||
@ -1646,7 +1626,7 @@ void Detector::setTop(bool value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setTop, pos, value);
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
// Jungfrau/moench Specific
|
||||
Result<double> Detector::getChipVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getChipVersion, pos);
|
||||
}
|
||||
@ -1718,6 +1698,7 @@ void Detector::setStorageCellDelay(ns value, Positions pos) {
|
||||
std::vector<defs::gainMode> Detector::getGainModeList() const {
|
||||
switch (getDetectorType().squash()) {
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
return std::vector<defs::gainMode>{
|
||||
defs::DYNAMIC, defs::FORCE_SWITCH_G1, defs::FORCE_SWITCH_G2,
|
||||
defs::FIX_G1, defs::FIX_G2, defs::FIX_G0};
|
||||
@ -2009,7 +1990,7 @@ void Detector::setDigitalPulsing(bool value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setDigitalPulsing, pos, value);
|
||||
}
|
||||
|
||||
// CTB/ Moench Specific
|
||||
// CTB Specific
|
||||
|
||||
Result<int> Detector::getNumberOfAnalogSamples(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getNumberOfAnalogSamples, pos);
|
||||
@ -2347,8 +2328,6 @@ void Detector::startPattern(Positions pos) {
|
||||
pimpl->Parallel(&Module::startPattern, pos);
|
||||
}
|
||||
|
||||
// Moench
|
||||
|
||||
Result<std::map<std::string, std::string>>
|
||||
Detector::getAdditionalJsonHeader(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getAdditionalJsonHeader, pos);
|
||||
@ -2481,7 +2460,6 @@ Result<int> Detector::getControlPort(Positions pos) const {
|
||||
}
|
||||
|
||||
void Detector::setControlPort(int value, Positions pos) {
|
||||
validatePortNumber(value);
|
||||
pimpl->Parallel(&Module::setControlPort, pos, value);
|
||||
}
|
||||
|
||||
@ -2490,7 +2468,6 @@ Result<int> Detector::getStopPort(Positions pos) const {
|
||||
}
|
||||
|
||||
void Detector::setStopPort(int value, Positions pos) {
|
||||
validatePortNumber(value);
|
||||
pimpl->Parallel(&Module::setStopPort, pos, value);
|
||||
}
|
||||
|
||||
@ -2525,17 +2502,13 @@ Result<ns> Detector::getMeasurementTime(Positions pos) const {
|
||||
|
||||
std::string Detector::getUserDetails() const { return pimpl->getUserDetails(); }
|
||||
|
||||
std::vector<int> Detector::getValidPortNumbers(int start_port) {
|
||||
std::vector<int> Detector::getPortNumbers(int start_port) {
|
||||
int num_sockets_per_detector = getNumberofUDPInterfaces({}).tsquash(
|
||||
"Number of UDP Interfaces is not consistent among modules");
|
||||
std::vector<int> res;
|
||||
res.reserve(size());
|
||||
for (int idet = 0; idet < size(); ++idet) {
|
||||
int port = start_port + (idet * num_sockets_per_detector);
|
||||
for (int i = 0; i != num_sockets_per_detector; ++i) {
|
||||
validatePortNumber(port + i);
|
||||
}
|
||||
res.push_back(port);
|
||||
res.push_back(start_port + (idet * num_sockets_per_detector));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -288,7 +288,6 @@ void DetectorImpl::addModule(const std::string &hostname) {
|
||||
if (res.size() > 1) {
|
||||
host = res[0];
|
||||
port = StringTo<int>(res[1]);
|
||||
validatePortNumber(port);
|
||||
}
|
||||
|
||||
if (host != "localhost") {
|
||||
@ -322,10 +321,10 @@ void DetectorImpl::addModule(const std::string &hostname) {
|
||||
// module type updated by now
|
||||
shm()->detType = Parallel(&Module::getDetectorType, {})
|
||||
.tsquash("Inconsistent detector types.");
|
||||
// for moench and ctb
|
||||
// for ctb
|
||||
modules[pos]->updateNumberOfChannels();
|
||||
|
||||
// for eiger, jungfrau, gotthard2
|
||||
// for eiger, jungfrau, moench, gotthard2
|
||||
modules[pos]->updateNumberofUDPInterfaces();
|
||||
|
||||
// update zmq port in case numudpinterfaces changed
|
||||
@ -419,6 +418,7 @@ void DetectorImpl::setGapPixelsinCallback(const bool enable) {
|
||||
if (enable) {
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
break;
|
||||
case EIGER:
|
||||
if (size() && modules[0]->getQuad()) {
|
||||
@ -441,6 +441,7 @@ int DetectorImpl::getTransmissionDelay() const {
|
||||
bool eiger = false;
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
case MYTHEN3:
|
||||
break;
|
||||
case EIGER:
|
||||
@ -484,6 +485,7 @@ void DetectorImpl::setTransmissionDelay(int step) {
|
||||
bool eiger = false;
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
case MYTHEN3:
|
||||
break;
|
||||
case EIGER:
|
||||
@ -770,7 +772,7 @@ void DetectorImpl::readFrameFromReceiver() {
|
||||
int nDetActualPixelsY = nDetPixelsY;
|
||||
|
||||
if (gapPixels) {
|
||||
int n = insertGapPixels(multiframe.get(), multigappixels,
|
||||
int n = InsertGapPixels(multiframe.get(), multigappixels,
|
||||
quadEnable, dynamicRange,
|
||||
nDetActualPixelsX, nDetActualPixelsY);
|
||||
callbackImage = multigappixels;
|
||||
@ -809,7 +811,7 @@ void DetectorImpl::readFrameFromReceiver() {
|
||||
delete[] multigappixels;
|
||||
}
|
||||
|
||||
int DetectorImpl::insertGapPixels(char *image, char *&gpImage, bool quadEnable,
|
||||
int DetectorImpl::InsertGapPixels(char *image, char *&gpImage, bool quadEnable,
|
||||
int dr, int &nPixelsx, int &nPixelsy) {
|
||||
|
||||
LOG(logDEBUG) << "Insert Gap pixels:"
|
||||
@ -885,10 +887,10 @@ int DetectorImpl::insertGapPixels(char *image, char *&gpImage, bool quadEnable,
|
||||
nMod1TotPixelsx /= 2;
|
||||
}
|
||||
// eiger requires inter chip gap pixels are halved
|
||||
// jungfrau prefers same inter chip gap pixels as the boundary pixels
|
||||
// jungfrau/moench prefers same inter chip gap pixels as the boundary pixels
|
||||
int divisionValue = 2;
|
||||
slsDetectorDefs::detectorType detType = shm()->detType;
|
||||
if (detType == JUNGFRAU) {
|
||||
if (detType == JUNGFRAU || detType == MOENCH) {
|
||||
divisionValue = 1;
|
||||
}
|
||||
LOG(logDEBUG) << "Insert Gap pixels Calculations:\n\t"
|
||||
@ -1234,26 +1236,10 @@ int DetectorImpl::acquire() {
|
||||
dataProcessingThread.join();
|
||||
|
||||
if (acquisition_finished != nullptr) {
|
||||
// status
|
||||
runStatus status = IDLE;
|
||||
auto statusList = Parallel(&Module::getRunStatus, {});
|
||||
status = statusList.squash(ERROR);
|
||||
// difference, but none error
|
||||
if (status == ERROR && (!statusList.any(ERROR))) {
|
||||
// handle jf sync issue (master idle, slaves stopped)
|
||||
if (statusList.contains_only(IDLE, STOPPED)) {
|
||||
status = STOPPED;
|
||||
} else
|
||||
status = statusList.squash(RUNNING);
|
||||
}
|
||||
|
||||
// progress
|
||||
int status = Parallel(&Module::getRunStatus, {}).squash(ERROR);
|
||||
auto a = Parallel(&Module::getReceiverProgress, {});
|
||||
double progress = (*std::max_element(a.begin(), a.end()));
|
||||
|
||||
// callback
|
||||
acquisition_finished(progress, static_cast<int>(status),
|
||||
acqFinished_p);
|
||||
acquisition_finished(progress, status, acqFinished_p);
|
||||
}
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &end);
|
||||
@ -1273,103 +1259,42 @@ int DetectorImpl::acquire() {
|
||||
return OK;
|
||||
}
|
||||
|
||||
bool DetectorImpl::handleSynchronization(Positions pos) {
|
||||
bool handleSync = false;
|
||||
// multi module m3 or multi module sync enabled jungfrau
|
||||
if (size() > 1) {
|
||||
switch (shm()->detType) {
|
||||
case defs::MYTHEN3:
|
||||
case defs::GOTTHARD2:
|
||||
case defs::GOTTHARD:
|
||||
handleSync = true;
|
||||
break;
|
||||
case defs::JUNGFRAU:
|
||||
if (Parallel(&Module::getSynchronizationFromStopServer, pos)
|
||||
.tsquash("Inconsistent synchronization among modules")) {
|
||||
handleSync = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return handleSync;
|
||||
}
|
||||
|
||||
void DetectorImpl::getMasterSlaveList(std::vector<int> positions,
|
||||
std::vector<int> &masters,
|
||||
std::vector<int> &slaves) {
|
||||
// expand positions list
|
||||
if (positions.empty() || (positions.size() == 1 && positions[0] == -1)) {
|
||||
positions.resize(modules.size());
|
||||
std::iota(begin(positions), end(positions), 0);
|
||||
}
|
||||
// could be all slaves in positions
|
||||
slaves.reserve(positions.size());
|
||||
auto is_master = Parallel(&Module::isMaster, positions);
|
||||
for (size_t i : positions) {
|
||||
if (is_master[i])
|
||||
masters.push_back(i);
|
||||
else
|
||||
slaves.push_back(i);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectorImpl::startAcquisition(const bool blocking, Positions pos) {
|
||||
|
||||
// slaves first
|
||||
if (handleSynchronization(pos)) {
|
||||
std::vector<int> masters;
|
||||
void DetectorImpl::startAcquisition(bool blocking, std::vector<int> positions) {
|
||||
// handle Mythen3 synchronization
|
||||
if (shm()->detType == defs::MYTHEN3 && size() > 1) {
|
||||
std::vector<int> master;
|
||||
std::vector<int> slaves;
|
||||
getMasterSlaveList(pos, masters, slaves);
|
||||
if (positions.empty() ||
|
||||
(positions.size() == 1 && positions[0] == -1)) {
|
||||
positions.resize(modules.size());
|
||||
std::iota(begin(positions), end(positions), 0);
|
||||
}
|
||||
// could be all slaves in positions
|
||||
slaves.reserve(positions.size());
|
||||
auto is_master = Parallel(&Module::isMaster, positions);
|
||||
for (size_t i : positions) {
|
||||
if (is_master[i])
|
||||
master.push_back(i);
|
||||
else
|
||||
slaves.push_back(i);
|
||||
}
|
||||
|
||||
if (!slaves.empty()) {
|
||||
Parallel(&Module::startAcquisition, slaves);
|
||||
}
|
||||
if (!masters.empty()) {
|
||||
Parallel((blocking ? &Module::startAndReadAll
|
||||
: &Module::startAcquisition),
|
||||
masters);
|
||||
if (!master.empty()) {
|
||||
if (blocking) {
|
||||
Parallel(&Module::startAndReadAll, master);
|
||||
} else {
|
||||
Parallel(&Module::startAcquisition, master);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (blocking) {
|
||||
Parallel(&Module::startAndReadAll, positions);
|
||||
} else {
|
||||
Parallel(&Module::startAcquisition, positions);
|
||||
}
|
||||
}
|
||||
// all in parallel
|
||||
else {
|
||||
Parallel(
|
||||
(blocking ? &Module::startAndReadAll : &Module::startAcquisition),
|
||||
pos);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectorImpl::sendSoftwareTrigger(const bool block, Positions pos) {
|
||||
// slaves first
|
||||
if (handleSynchronization(pos)) {
|
||||
std::vector<int> masters;
|
||||
std::vector<int> slaves;
|
||||
getMasterSlaveList(pos, masters, slaves);
|
||||
if (!slaves.empty())
|
||||
Parallel(&Module::sendSoftwareTrigger, slaves, false);
|
||||
if (!masters.empty())
|
||||
Parallel(&Module::sendSoftwareTrigger, masters, block);
|
||||
}
|
||||
// all in parallel
|
||||
else {
|
||||
Parallel(&Module::sendSoftwareTrigger, pos, block);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectorImpl::stopDetector(Positions pos) {
|
||||
// masters first
|
||||
if (handleSynchronization(pos)) {
|
||||
std::vector<int> masters;
|
||||
std::vector<int> slaves;
|
||||
getMasterSlaveList(pos, masters, slaves);
|
||||
if (!masters.empty())
|
||||
Parallel(&Module::stopAcquisition, masters);
|
||||
if (!slaves.empty())
|
||||
Parallel(&Module::stopAcquisition, slaves);
|
||||
}
|
||||
// all in parallel
|
||||
else {
|
||||
Parallel(&Module::stopAcquisition, pos);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1402,7 +1327,7 @@ void DetectorImpl::processData(bool receiver) {
|
||||
if (fgetc(stdin) == 'q') {
|
||||
LOG(logINFO)
|
||||
<< "Caught the command to stop acquisition";
|
||||
stopDetector({});
|
||||
Parallel(&Module::stopAcquisition, {});
|
||||
}
|
||||
}
|
||||
// get and print progress
|
||||
@ -1456,8 +1381,8 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
bool isPof = false;
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
case CHIPTESTBOARD:
|
||||
if (fname.find(".pof") == std::string::npos) {
|
||||
throw RuntimeError("Programming file must be a pof file.");
|
||||
}
|
||||
@ -1475,8 +1400,7 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
default:
|
||||
throw RuntimeError(
|
||||
"Unknown detector type. Did the 'hostname' command execute "
|
||||
"successfully? Or use update mode in the detector server "
|
||||
"side.");
|
||||
"successfully? Or use update mode in the detector server side.");
|
||||
}
|
||||
|
||||
LOG(logINFO) << "This can take awhile. Please be patient.";
|
||||
@ -1504,9 +1428,10 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
int dst = mkstemp(destfname); // create temporary file and open it in r/w
|
||||
if (dst == -1) {
|
||||
fclose(src);
|
||||
throw RuntimeError(std::string("Could not create destination file "
|
||||
"in /tmp for programming: ") +
|
||||
destfname);
|
||||
throw RuntimeError(
|
||||
std::string(
|
||||
"Could not create destination file in /tmp for programming: ") +
|
||||
destfname);
|
||||
}
|
||||
|
||||
// convert src to dst rawbin
|
||||
@ -1558,8 +1483,8 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
}
|
||||
// validate pof: read less than footer offset
|
||||
if (isPof && dstFilePos < pofFooterOfst) {
|
||||
throw RuntimeError("Could not convert programming file. EOF "
|
||||
"before end of flash");
|
||||
throw RuntimeError(
|
||||
"Could not convert programming file. EOF before end of flash");
|
||||
}
|
||||
}
|
||||
if (fclose(src) != 0) {
|
||||
@ -1595,6 +1520,7 @@ defs::xy DetectorImpl::getPortGeometry() const {
|
||||
portGeometry.x = modules[0]->getNumberofUDPInterfacesFromShm();
|
||||
break;
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
portGeometry.y = modules[0]->getNumberofUDPInterfacesFromShm();
|
||||
break;
|
||||
default:
|
||||
@ -1613,7 +1539,7 @@ defs::xy DetectorImpl::calculatePosition(int moduleIndex,
|
||||
}
|
||||
|
||||
defs::ROI DetectorImpl::getRxROI() const {
|
||||
if (shm()->detType == CHIPTESTBOARD || shm()->detType == MOENCH) {
|
||||
if (shm()->detType == CHIPTESTBOARD) {
|
||||
throw RuntimeError("RxRoi not implemented for this Detector");
|
||||
}
|
||||
if (modules.size() == 0) {
|
||||
@ -1688,7 +1614,7 @@ defs::ROI DetectorImpl::getRxROI() const {
|
||||
}
|
||||
|
||||
void DetectorImpl::setRxROI(const defs::ROI arg) {
|
||||
if (shm()->detType == CHIPTESTBOARD || shm()->detType == MOENCH) {
|
||||
if (shm()->detType == CHIPTESTBOARD) {
|
||||
throw RuntimeError("RxRoi not implemented for this Detector");
|
||||
}
|
||||
if (modules.size() == 0) {
|
||||
|
@ -278,13 +278,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
||||
int acquire();
|
||||
|
||||
/** also takes care of master and slave for multi module mythen */
|
||||
void startAcquisition(const bool blocking, Positions pos);
|
||||
|
||||
/** also takes care of master and slave for multi module mythen */
|
||||
void sendSoftwareTrigger(const bool block, Positions pos);
|
||||
|
||||
/** also takes care of master and slave for multi module mythen */
|
||||
void stopDetector(Positions pos);
|
||||
void startAcquisition(bool blocking, std::vector<int> positions);
|
||||
|
||||
/**
|
||||
* Combines data from all readouts and gives it to the gui
|
||||
@ -364,7 +358,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
||||
*/
|
||||
void readFrameFromReceiver();
|
||||
|
||||
/** [Eiger][Jungfrau]
|
||||
/** [Eiger][Jungfrau][Moench]
|
||||
* add gap pixels to the imag
|
||||
* @param image pointer to image without gap pixels
|
||||
* @param gpImage poiner to image with gap pixels, if NULL, allocated
|
||||
@ -374,14 +368,9 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
||||
* @param nPixelsy number of pixels in Y axis (updated)
|
||||
* @returns total data bytes for updated image
|
||||
*/
|
||||
int insertGapPixels(char *image, char *&gpImage, bool quadEnable, int dr,
|
||||
int InsertGapPixels(char *image, char *&gpImage, bool quadEnable, int dr,
|
||||
int &nPixelsx, int &nPixelsy);
|
||||
|
||||
bool handleSynchronization(Positions pos);
|
||||
void getMasterSlaveList(std::vector<int> positions,
|
||||
std::vector<int> &masters,
|
||||
std::vector<int> &slaves);
|
||||
|
||||
void printProgress(double progress);
|
||||
|
||||
void startProcessingThread(bool receiver);
|
||||
|
@ -91,7 +91,7 @@ std::string GetHelpDac(std::string dac) {
|
||||
}
|
||||
if (dac == "vref_ds") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard][Jungfrau] Dac for ??");
|
||||
"\n\t[Gotthard][Jungfrau][Moench] Dac for ??");
|
||||
}
|
||||
if (dac == "vcascn_pb") {
|
||||
return std::string(
|
||||
@ -103,7 +103,7 @@ std::string GetHelpDac(std::string dac) {
|
||||
}
|
||||
if (dac == "vout_cm") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard] Dac for ??\n\t[Moench] Dac for 5");
|
||||
"\n\t[Gotthard] Dac for ??");
|
||||
}
|
||||
if (dac == "vcasc_out") {
|
||||
return std::string(
|
||||
@ -111,11 +111,11 @@ std::string GetHelpDac(std::string dac) {
|
||||
}
|
||||
if (dac == "vin_cm") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard] Dac for ??\n\t[Moench] Dac for 2");
|
||||
"\n\t[Gotthard] Dac for ??");
|
||||
}
|
||||
if (dac == "vref_comp") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard][Jungfrau] Dac for ??");
|
||||
"\n\t[Gotthard][Jungfrau][Moench] Dac for ??");
|
||||
}
|
||||
if (dac == "ib_test_c") {
|
||||
return std::string(
|
||||
@ -129,7 +129,7 @@ std::string GetHelpDac(std::string dac) {
|
||||
if (dac == "vipre") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for the "
|
||||
"preamplifier's input transistor current.\n\t[Moench] Dac for 1");
|
||||
"preamplifier's input transistor current.");
|
||||
}
|
||||
if (dac == "vdcsh") {
|
||||
return std::string(
|
||||
@ -224,7 +224,8 @@ std::string GetHelpDac(std::string dac) {
|
||||
}
|
||||
if (dac == "vref_prech") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard2][Jungfrau] "
|
||||
"[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard2][Jungfrau][Moench] "
|
||||
"Dac for reference votlage for precharing the preamplifier.");
|
||||
}
|
||||
if (dac == "vref_l_adc") {
|
||||
@ -254,44 +255,39 @@ std::string GetHelpDac(std::string dac) {
|
||||
"common mode voltage of ADC DAC bank 2.");
|
||||
}
|
||||
if (dac == "vb_ds") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Jungfrau] Dac for ??");
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Jungfrau][Moench] Dac for ??");
|
||||
}
|
||||
if (dac == "vb_comp") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Jungfrau] Dac for ??");
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Jungfrau][Moench] Dac for ??");
|
||||
}
|
||||
if (dac == "vb_pixbuf") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Jungfrau] Dac for ??");
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Jungfrau][Moench] Dac for ??");
|
||||
}
|
||||
if (dac == "vin_com") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Jungfrau] Dac for ??");
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Jungfrau][Moench] Dac for ??");
|
||||
}
|
||||
if (dac == "vdd_prot") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Jungfrau] Dac for ??");
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Jungfrau][Moench] Dac for ??");
|
||||
}
|
||||
if (dac == "vbp_colbuf") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 0");
|
||||
return std::string("[dac or mV value][(optional unit) mV] \n");
|
||||
}
|
||||
if (dac == "vb_sda") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 3");
|
||||
return std::string("[dac or mV value][(optional unit) mV] \n");
|
||||
}
|
||||
if (dac == "vcasc_sfp") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 4");
|
||||
return std::string("[dac or mV value][(optional unit) mV] \n");
|
||||
}
|
||||
if (dac == "vipre_cds") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 6");
|
||||
return std::string("[dac or mV value][(optional unit) mV] \n");
|
||||
}
|
||||
if (dac == "ibias_sfp") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Moench] Dac for 7");
|
||||
return std::string("[dac or mV value][(optional unit) mV] \n");
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
@ -73,8 +73,8 @@ void Module::setHostname(const std::string &hostname,
|
||||
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
|
||||
client.close();
|
||||
try {
|
||||
checkDetectorVersionCompatibility();
|
||||
initialDetectorServerChecks();
|
||||
checkDetectorVersionCompatibility();
|
||||
LOG(logINFO) << "Module Version Compatibility - Success";
|
||||
} catch (const RuntimeError &e) {
|
||||
if (!initialChecks) {
|
||||
@ -92,29 +92,16 @@ int64_t Module::getFirmwareVersion() const {
|
||||
return sendToDetector<int64_t>(F_GET_FIRMWARE_VERSION);
|
||||
}
|
||||
|
||||
std::string Module::getControlServerLongVersion() const {
|
||||
try {
|
||||
char retval[MAX_STR_LENGTH]{};
|
||||
sendToDetector(F_GET_SERVER_VERSION, nullptr, retval);
|
||||
return retval;
|
||||
}
|
||||
// throw with old server version (sends 8 bytes)
|
||||
catch (RuntimeError &e) {
|
||||
std::string emsg = std::string(e.what());
|
||||
if (emsg.find(F_GET_SERVER_VERSION) && emsg.find("8 bytes")) {
|
||||
throwDeprecatedServerVersion();
|
||||
}
|
||||
throw;
|
||||
}
|
||||
int64_t
|
||||
Module::getFrontEndFirmwareVersion(const fpgaPosition fpgaPosition) const {
|
||||
return sendToDetector<int64_t>(F_GET_FRONTEND_FIRMWARE_VERSION,
|
||||
fpgaPosition);
|
||||
}
|
||||
|
||||
void Module::throwDeprecatedServerVersion() const {
|
||||
uint64_t res = sendToDetectorStop<int64_t>(F_GET_SERVER_VERSION);
|
||||
std::cout << std::endl;
|
||||
std::ostringstream os;
|
||||
os << "Detector Server (Control) version (0x" << std::hex << res
|
||||
<< ") is incompatible with this client. Please update detector server!";
|
||||
throw RuntimeError(os.str());
|
||||
std::string Module::getControlServerLongVersion() const {
|
||||
char retval[MAX_STR_LENGTH]{};
|
||||
sendToDetector(F_GET_SERVER_VERSION, nullptr, retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
std::string Module::getStopServerLongVersion() const {
|
||||
@ -174,7 +161,7 @@ slsDetectorDefs::detectorType Module::getDetectorType() const {
|
||||
}
|
||||
|
||||
void Module::updateNumberOfChannels() {
|
||||
if (shm()->detType == CHIPTESTBOARD || shm()->detType == MOENCH) {
|
||||
if (shm()->detType == CHIPTESTBOARD) {
|
||||
std::array<int, 2> retvals{};
|
||||
sendToDetector(F_GET_NUM_CHANNELS, nullptr, retvals);
|
||||
shm()->nChan.x = retvals[0];
|
||||
@ -538,15 +525,8 @@ bool Module::getSynchronization() const {
|
||||
return sendToDetector<int>(F_GET_SYNCHRONIZATION);
|
||||
}
|
||||
|
||||
bool Module::getSynchronizationFromStopServer() const {
|
||||
return sendToDetectorStop<int>(F_GET_SYNCHRONIZATION);
|
||||
}
|
||||
|
||||
void Module::setSynchronization(const bool value) {
|
||||
sendToDetector(F_SET_SYNCHRONIZATION, static_cast<int>(value), nullptr);
|
||||
// to deal with virtual servers as well
|
||||
// (get sync from stop server during blocking acquisition)
|
||||
sendToDetectorStop(F_SET_SYNCHRONIZATION, static_cast<int>(value), nullptr);
|
||||
}
|
||||
|
||||
std::vector<int> Module::getBadChannels() const {
|
||||
@ -1250,7 +1230,7 @@ std::string Module::printReceiverConfiguration() {
|
||||
os << "\n\nModule " << moduleIndex << "\nReceiver Hostname:\t"
|
||||
<< getReceiverHostname();
|
||||
|
||||
if (shm()->detType == JUNGFRAU) {
|
||||
if (shm()->detType == JUNGFRAU || shm()->detType == MOENCH) {
|
||||
os << "\nNumber of Interfaces:\t" << getNumberofUDPInterfacesFromShm()
|
||||
<< "\nSelected Interface:\t" << getSelectedUDPInterface();
|
||||
}
|
||||
@ -1260,14 +1240,15 @@ std::string Module::printReceiverConfiguration() {
|
||||
<< getDestinationUDPIP() << "\nDestination UDP MAC:\t"
|
||||
<< getDestinationUDPMAC();
|
||||
|
||||
if (shm()->detType == JUNGFRAU) {
|
||||
if (shm()->detType == JUNGFRAU || shm()->detType == MOENCH) {
|
||||
os << "\nSource UDP IP2:\t" << getSourceUDPIP2()
|
||||
<< "\nSource UDP MAC2:\t" << getSourceUDPMAC2()
|
||||
<< "\nDestination UDP IP2:\t" << getDestinationUDPIP2()
|
||||
<< "\nDestination UDP MAC2:\t" << getDestinationUDPMAC2();
|
||||
}
|
||||
os << "\nDestination UDP Port:\t" << getDestinationUDPPort();
|
||||
if (shm()->detType == JUNGFRAU || shm()->detType == EIGER) {
|
||||
if (shm()->detType == JUNGFRAU || shm()->detType == MOENCH ||
|
||||
shm()->detType == EIGER) {
|
||||
os << "\nDestination UDP Port2:\t" << getDestinationUDPPort2();
|
||||
}
|
||||
os << "\n";
|
||||
@ -1350,9 +1331,7 @@ void Module::setReceiverHostname(const std::string &receiverIP,
|
||||
auto res = split(host, ':');
|
||||
if (res.size() > 1) {
|
||||
host = res[0];
|
||||
int port = StringTo<int>(res[1]);
|
||||
validatePortNumber(port);
|
||||
shm()->rxTCPPort = port;
|
||||
shm()->rxTCPPort = std::stoi(res[1]);
|
||||
}
|
||||
strcpy_safe(shm()->rxHostname, host.c_str());
|
||||
shm()->useReceiverFlag = true;
|
||||
@ -1818,7 +1797,7 @@ void Module::setTop(bool value) {
|
||||
sendToDetector(F_SET_TOP, static_cast<int>(value), nullptr);
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
// Jungfrau/Moench Specific
|
||||
double Module::getChipVersion() const {
|
||||
return (sendToDetector<int>(F_GET_CHIP_VERSION)) / 10.00;
|
||||
}
|
||||
@ -2330,7 +2309,7 @@ void Module::setDigitalPulsing(const bool enable) {
|
||||
sendToDetector(F_SET_DIGITAL_PULSING, static_cast<int>(enable), nullptr);
|
||||
}
|
||||
|
||||
// CTB / Moench Specific
|
||||
// CTB Specific
|
||||
int Module::getNumberOfAnalogSamples() const {
|
||||
return sendToDetector<int>(F_GET_NUM_ANALOG_SAMPLES);
|
||||
}
|
||||
@ -2565,8 +2544,6 @@ void Module::setPatternBitMask(uint64_t mask) {
|
||||
|
||||
void Module::startPattern() { sendToDetector(F_START_PATTERN); }
|
||||
|
||||
// Moench
|
||||
|
||||
std::map<std::string, std::string> Module::getAdditionalJsonHeader() const {
|
||||
// TODO, refactor this function with a more robust sending.
|
||||
// Now assuming whitespace separated key value
|
||||
@ -2659,8 +2636,8 @@ void Module::programFPGA(std::vector<char> buffer,
|
||||
const bool forceDeleteNormalFile) {
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
case CHIPTESTBOARD:
|
||||
sendProgram(true, buffer, F_PROGRAM_FPGA, "Update Firmware", "",
|
||||
forceDeleteNormalFile);
|
||||
break;
|
||||
@ -2680,8 +2657,8 @@ void Module::updateDetectorServer(std::vector<char> buffer,
|
||||
const std::string &serverName) {
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
case CHIPTESTBOARD:
|
||||
sendProgram(true, buffer, F_UPDATE_DETECTOR_SERVER,
|
||||
"Update Detector Server (no tftp)", serverName);
|
||||
break;
|
||||
@ -2701,8 +2678,8 @@ void Module::updateDetectorServer(std::vector<char> buffer,
|
||||
void Module::updateKernel(std::vector<char> buffer) {
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
case CHIPTESTBOARD:
|
||||
sendProgram(true, buffer, F_UPDATE_KERNEL, "Update Kernel");
|
||||
break;
|
||||
case MYTHEN3:
|
||||
@ -3873,8 +3850,8 @@ void Module::sendProgram(bool blackfin, std::vector<char> buffer,
|
||||
|
||||
void Module::simulatingActivityinDetector(const std::string &functionType,
|
||||
const int timeRequired) {
|
||||
LOG(logINFO) << functionType << " for module " << moduleIndex << " ("
|
||||
<< shm()->hostname << ")";
|
||||
LOG(logINFO) << "(Simulating) " << functionType << " for module "
|
||||
<< moduleIndex << " (" << shm()->hostname << ")";
|
||||
printf("%d%%\r", 0);
|
||||
std::cout << std::flush;
|
||||
const int ERASE_TIME = timeRequired;
|
||||
|
@ -90,9 +90,9 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setHostname(const std::string &hostname, const bool initialChecks);
|
||||
|
||||
int64_t getFirmwareVersion() const;
|
||||
int64_t getFrontEndFirmwareVersion(const fpgaPosition fpgaPosition) const;
|
||||
std::string getControlServerLongVersion() const;
|
||||
std::string getStopServerLongVersion() const;
|
||||
void throwDeprecatedServerVersion() const;
|
||||
std::string getDetectorServerVersion() const;
|
||||
std::string getHardwareVersion() const;
|
||||
std::string getKernelVersion() const;
|
||||
@ -129,7 +129,6 @@ class Module : public virtual slsDetectorDefs {
|
||||
bool isMaster() const;
|
||||
void setMaster(const bool master);
|
||||
bool getSynchronization() const;
|
||||
bool getSynchronizationFromStopServer() const;
|
||||
void setSynchronization(const bool value);
|
||||
std::vector<int> getBadChannels() const;
|
||||
void setBadChannels(std::vector<int> list);
|
||||
@ -390,7 +389,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* Jungfrau Specific *
|
||||
* Jungfrau/Moench Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
double getChipVersion() const;
|
||||
@ -492,7 +491,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* CTB / Moench Specific *
|
||||
* CTB Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
int getNumberOfAnalogSamples() const;
|
||||
@ -503,12 +502,6 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setADCEnableMask(uint32_t mask);
|
||||
uint32_t getTenGigaADCEnableMask() const;
|
||||
void setTenGigaADCEnableMask(uint32_t mask);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* CTB Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
int getNumberOfDigitalSamples() const;
|
||||
void setNumberOfDigitalSamples(int value);
|
||||
readoutMode getReadoutMode() const;
|
||||
|
@ -107,7 +107,7 @@ TEST_CASE("adcvpp", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getADCVpp(false);
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -132,14 +132,14 @@ TEST_CASE("adcvpp", "[.cmd]") {
|
||||
}
|
||||
}
|
||||
|
||||
/* CTB/ Moench Specific */
|
||||
/* CTB Specific */
|
||||
|
||||
TEST_CASE("samples", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_asamples = det.getNumberOfAnalogSamples();
|
||||
Result<int> prev_dsamples = 0;
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
@ -186,7 +186,7 @@ TEST_CASE("asamples", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getNumberOfAnalogSamples();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -216,7 +216,7 @@ TEST_CASE("adcclk", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getADCClock();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -247,7 +247,7 @@ TEST_CASE("runclk", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getRUNClock();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -277,7 +277,7 @@ TEST_CASE("syncclk", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
REQUIRE_NOTHROW(proxy.Call("syncclk", {}, -1, GET));
|
||||
} else {
|
||||
// clock index might work
|
||||
@ -290,7 +290,7 @@ TEST_CASE("adcpipeline", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getADCPipeline();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -325,7 +325,7 @@ TEST_CASE("v_limit", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getVoltage(defs::V_LIMIT);
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -363,7 +363,7 @@ TEST_CASE("adcenable", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getADCEnableMask();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -393,7 +393,7 @@ TEST_CASE("adcenable10g", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getTenGigaADCEnableMask();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
@ -11,31 +11,6 @@ namespace sls {
|
||||
using test::GET;
|
||||
using test::PUT;
|
||||
|
||||
void test_valid_port(const std::string &command,
|
||||
const std::vector<std::string> &arguments, int detector_id,
|
||||
int action, int port_number) {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
std::string string_port_number = std::to_string(port_number);
|
||||
REQUIRE_THROWS_WITH(proxy.Call(command, arguments, detector_id, action),
|
||||
"Invalid port number " + string_port_number +
|
||||
". It must be in range 1 - 65535");
|
||||
}
|
||||
|
||||
void test_valid_port(const std::string &command,
|
||||
const std::vector<std::string> &arguments, int detector_id,
|
||||
int action) {
|
||||
std::vector<std::string> arg(arguments);
|
||||
arg.push_back("0");
|
||||
|
||||
int test_values[2] = {77797, -1};
|
||||
for (int i = 0; i != 2; ++i) {
|
||||
int port_number = test_values[i];
|
||||
arg[arg.size() - 1] = std::to_string(port_number);
|
||||
test_valid_port(command, arg, detector_id, action, port_number);
|
||||
}
|
||||
}
|
||||
|
||||
void test_dac(defs::dacIndex index, const std::string &dacname, int dacvalue) {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
@ -5,14 +5,6 @@
|
||||
|
||||
namespace sls {
|
||||
|
||||
void test_valid_port(const std::string &command,
|
||||
const std::vector<std::string> &arguments, int detector_id,
|
||||
int action, int port_number);
|
||||
|
||||
void test_valid_port(const std::string &command,
|
||||
const std::vector<std::string> &arguments, int detector_id,
|
||||
int action);
|
||||
|
||||
void test_dac(slsDetectorDefs::dacIndex index, const std::string &dacname,
|
||||
int dacvalue);
|
||||
void test_onchip_dac(slsDetectorDefs::dacIndex index,
|
||||
|
@ -689,11 +689,10 @@ TEST_CASE("confadc", "[.cmd]") {
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::GOTTHARD2) {
|
||||
const int ndet = det.size();
|
||||
const int nchip = 10;
|
||||
const int nadc = 32;
|
||||
std::vector<std::vector<std::vector<int>>> prev_val(
|
||||
ndet, std::vector<std::vector<int>>(nchip, std::vector<int>(nadc)));
|
||||
int ndet = det.size();
|
||||
int nchip = 10;
|
||||
int nadc = 32;
|
||||
int prev_val[ndet][nchip][nadc];
|
||||
for (int i = 0; i != ndet; ++i) {
|
||||
for (int j = 0; j != nchip; ++j) {
|
||||
for (int k = 0; k != nadc; ++k) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user