mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
Moench rewrite (#597)
* copied jungfrau server to moench and adapted * fixed image size and num packets * read n rows allows 16 * commneted out configure_asic_timer at server startup. To be removed later the ASIC_CTRL_REG and storage cell options * moench:removing the decrement (which was in jf) in read n rows to register * removed lblsamples from gui
This commit is contained in:
@ -80,16 +80,16 @@ class Detector {
|
||||
|
||||
Result<std::string> getDetectorServerVersion(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] */
|
||||
/** [Jungfrau][Moench][Gotthard2][Myhten3][Gotthard][Ctb] */
|
||||
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 +122,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 +177,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] */
|
||||
@ -274,11 +273,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 = {});
|
||||
@ -287,25 +286,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;
|
||||
|
||||
@ -314,7 +313,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);
|
||||
|
||||
@ -324,7 +323,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
|
||||
@ -334,64 +333,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 = {});
|
||||
@ -424,18 +421,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.
|
||||
@ -447,8 +444,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 */
|
||||
@ -458,7 +455,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
|
||||
@ -475,11 +472,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 = {});
|
||||
|
||||
@ -528,20 +525,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] */
|
||||
@ -550,14 +548,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 = {});
|
||||
|
||||
@ -636,10 +634,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 = {});
|
||||
|
||||
@ -665,23 +662,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?
|
||||
*/
|
||||
@ -695,11 +692,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;
|
||||
@ -710,10 +707,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,
|
||||
@ -721,16 +718,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 = {});
|
||||
|
||||
@ -739,10 +736,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;
|
||||
@ -754,14 +751,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 = {});
|
||||
|
||||
@ -771,12 +769,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
|
||||
@ -791,27 +790,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 = {});
|
||||
|
||||
@ -836,16 +836,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);
|
||||
|
||||
@ -1226,22 +1226,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
|
||||
@ -1250,23 +1250,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
|
||||
@ -1278,55 +1278,55 @@ 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 */
|
||||
/** [Jungfrau][Moench] Advanced TODO naming */
|
||||
Result<int> getNumberOfAdditionalStorageCells(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Advanced \n
|
||||
/** [Jungfrau][Moench] Advanced \n
|
||||
* Only for chipv1.0. Options: 0 - 15. Default: 0. \n
|
||||
* The #images = #frames x #triggers x (#storagecells + 1) */
|
||||
void setNumberOfAdditionalStorageCells(int value);
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
/** [Jungfrau][Moench] 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][Moench] 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*/
|
||||
/** [Jungfrau][Moench] 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][Moench] 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 = {});
|
||||
|
||||
@ -1557,69 +1557,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 = {});
|
||||
///@}
|
||||
@ -1721,78 +1720,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 = {});
|
||||
|
||||
@ -1800,19 +1799,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 */
|
||||
@ -1820,11 +1818,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.
|
||||
@ -1842,41 +1838,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
|
||||
@ -1913,16 +1909,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 = {});
|
||||
|
||||
@ -1935,11 +1931,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 = {});
|
||||
///@}
|
||||
|
||||
@ -1976,15 +1972,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;
|
||||
|
||||
|
@ -516,7 +516,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';
|
||||
@ -591,8 +592,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."
|
||||
@ -676,9 +677,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 "
|
||||
@ -687,7 +689,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?");
|
||||
}
|
||||
@ -716,10 +718,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"
|
||||
@ -772,7 +775,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."
|
||||
@ -1009,7 +1013,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'."
|
||||
@ -1258,7 +1263,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."
|
||||
@ -1289,7 +1294,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) {
|
||||
@ -1432,10 +1438,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 {
|
||||
@ -1524,7 +1532,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';
|
||||
@ -1603,9 +1612,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. If 'auto' used, then "
|
||||
"ip is set to ip of rx_hostname."
|
||||
<< '\n';
|
||||
@ -1675,9 +1685,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) {
|
||||
@ -1711,12 +1722,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) {
|
||||
@ -2058,7 +2070,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 "
|
||||
@ -2552,14 +2565,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()) {
|
||||
@ -2601,7 +2614,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';
|
||||
@ -2743,7 +2756,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) {
|
||||
@ -2764,8 +2777,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) {
|
||||
@ -2824,11 +2837,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 {
|
||||
@ -2867,7 +2880,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';
|
||||
@ -2901,7 +2914,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 {
|
||||
@ -2935,7 +2948,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 {
|
||||
@ -2959,8 +2972,6 @@ std::string CmdProxy::PatternWaitTime(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* Moench */
|
||||
|
||||
std::string CmdProxy::AdditionalJsonHeader(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
@ -3043,8 +3054,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 "
|
||||
@ -3078,11 +3090,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) {
|
||||
@ -3104,7 +3116,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."
|
||||
@ -3129,7 +3141,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 "
|
||||
@ -3191,7 +3203,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) {
|
||||
|
@ -1252,13 +1252,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, "
|
||||
@ -1278,12 +1279,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. "
|
||||
@ -1301,22 +1300,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 */
|
||||
|
||||
@ -1336,28 +1337,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.");
|
||||
|
||||
@ -1368,7 +1370,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.");
|
||||
@ -1377,7 +1379,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]");
|
||||
@ -1390,24 +1392,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] "
|
||||
@ -1418,7 +1421,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(
|
||||
@ -1432,9 +1436,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>,
|
||||
@ -1449,19 +1454,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,
|
||||
@ -1595,7 +1603,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 "
|
||||
@ -1604,12 +1612,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");
|
||||
|
||||
@ -1620,7 +1630,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");
|
||||
@ -1631,10 +1642,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,
|
||||
@ -1646,10 +1657,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.");
|
||||
|
||||
@ -1663,10 +1676,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");
|
||||
|
||||
@ -1685,19 +1698,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 "
|
||||
@ -1939,13 +1954,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 "
|
||||
@ -1954,7 +1971,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 "
|
||||
@ -1964,7 +1981,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 "
|
||||
@ -1973,16 +1991,17 @@ 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 "
|
||||
"[0-15]\n\t[Jungfrau][Moench] 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).");
|
||||
@ -1990,13 +2009,15 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
storagecell_start, getStorageCellStart, setStorageCellStart,
|
||||
StringTo<int>,
|
||||
"[0-max]\n\t[Jungfrau] Storage cell that stores the first acquisition "
|
||||
"[0-max]\n\t[Jungfrau][Moench] Storage cell that stores the first "
|
||||
"acquisition "
|
||||
"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] "
|
||||
"[duration (0-1638375 ns)] [(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Jungfrau][Moench] "
|
||||
"Additional time delay between 2 consecutive exposures in burst mode "
|
||||
"(resolution of 25ns). Only applicable for chipv1.0. For advanced "
|
||||
"users only.");
|
||||
@ -2007,10 +2028,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,
|
||||
@ -2092,36 +2114,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.");
|
||||
|
||||
@ -2222,28 +2244,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,
|
||||
@ -2253,10 +2275,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(
|
||||
@ -2267,18 +2289,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 */
|
||||
@ -2303,19 +2325,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.");
|
||||
};
|
||||
|
@ -183,17 +183,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};
|
||||
@ -482,6 +477,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:
|
||||
@ -604,6 +600,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};
|
||||
@ -642,6 +639,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) {
|
||||
@ -669,6 +667,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};
|
||||
@ -686,10 +685,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));
|
||||
@ -919,7 +914,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.");
|
||||
}
|
||||
@ -1600,7 +1596,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);
|
||||
}
|
||||
@ -1672,6 +1668,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};
|
||||
@ -1963,7 +1960,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);
|
||||
@ -2301,8 +2298,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);
|
||||
|
@ -320,10 +320,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
|
||||
@ -413,6 +413,7 @@ void DetectorImpl::setGapPixelsinCallback(const bool enable) {
|
||||
if (enable) {
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
break;
|
||||
case EIGER:
|
||||
if (size() && modules[0]->getQuad()) {
|
||||
@ -435,6 +436,7 @@ int DetectorImpl::getTransmissionDelay() const {
|
||||
bool eiger = false;
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
case MYTHEN3:
|
||||
break;
|
||||
case EIGER:
|
||||
@ -478,6 +480,7 @@ void DetectorImpl::setTransmissionDelay(int step) {
|
||||
bool eiger = false;
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
case MYTHEN3:
|
||||
break;
|
||||
case EIGER:
|
||||
@ -882,10 +885,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"
|
||||
@ -1382,8 +1385,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.");
|
||||
}
|
||||
@ -1521,6 +1524,7 @@ defs::xy DetectorImpl::getPortGeometry() const {
|
||||
portGeometry.x = modules[0]->getNumberofUDPInterfacesFromShm();
|
||||
break;
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
portGeometry.y = modules[0]->getNumberofUDPInterfacesFromShm();
|
||||
break;
|
||||
default:
|
||||
@ -1539,7 +1543,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) {
|
||||
@ -1614,7 +1618,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) {
|
||||
|
@ -357,7 +357,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
|
||||
|
@ -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
|
||||
|
@ -155,7 +155,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];
|
||||
@ -1225,7 +1225,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();
|
||||
}
|
||||
@ -1235,14 +1235,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";
|
||||
@ -1791,7 +1792,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;
|
||||
}
|
||||
@ -2303,7 +2304,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);
|
||||
}
|
||||
@ -2538,8 +2539,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
|
||||
@ -2632,8 +2631,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;
|
||||
@ -2653,8 +2652,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;
|
||||
@ -2674,8 +2673,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:
|
||||
|
@ -388,7 +388,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* Jungfrau Specific *
|
||||
* Jungfrau/Moench Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
double getChipVersion() const;
|
||||
@ -490,7 +490,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* CTB / Moench Specific *
|
||||
* CTB Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
int getNumberOfAnalogSamples() const;
|
||||
@ -501,12 +501,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;
|
||||
|
@ -23,7 +23,7 @@ TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
SECTION("vb_comp") { test_dac(defs::VB_COMP, "vb_comp", 1220); }
|
||||
SECTION("vdd_prot") { test_dac(defs::VDD_PROT, "vdd_prot", 3000); }
|
||||
SECTION("vin_com") { test_dac(defs::VIN_COM, "vin_com", 1053); }
|
||||
@ -102,7 +102,7 @@ TEST_CASE("selinterface", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getSelectedUDPInterface().tsquash(
|
||||
"inconsistent selected interface to test");
|
||||
{
|
||||
@ -127,13 +127,13 @@ TEST_CASE("selinterface", "[.cmd]") {
|
||||
}
|
||||
}
|
||||
|
||||
/* Jungfrau Specific */
|
||||
/* Jungfrau/moench Specific */
|
||||
|
||||
TEST_CASE("temp_threshold", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getThresholdTemperature();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -163,7 +163,7 @@ TEST_CASE("chipversion", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
REQUIRE_NOTHROW(proxy.Call("chipversion", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("chipversion", {}, -1, GET));
|
||||
@ -175,7 +175,7 @@ TEST_CASE("temp_control", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getTemperatureControl();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -205,7 +205,7 @@ TEST_CASE("temp_event", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("temp_event", {"0"}, -1, PUT, oss);
|
||||
@ -226,7 +226,7 @@ TEST_CASE("autocompdisable", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getAutoComparatorDisable();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -256,7 +256,7 @@ TEST_CASE("compdisabletime", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU &&
|
||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) &&
|
||||
det.getChipVersion().squash() * 10 == 11) {
|
||||
auto prev_val = det.getComparatorDisableTime();
|
||||
{
|
||||
@ -287,7 +287,7 @@ TEST_CASE("extrastoragecells", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
// chip version 1.0
|
||||
if (det.getChipVersion().squash() * 10 == 10) {
|
||||
auto prev_val = det.getNumberOfAdditionalStorageCells().tsquash(
|
||||
@ -330,7 +330,7 @@ TEST_CASE("storagecell_start", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getStorageCellStart();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -375,7 +375,7 @@ TEST_CASE("storagecell_delay", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
// chip version 1.0
|
||||
if (det.getChipVersion().squash() * 10 == 10) {
|
||||
auto prev_val = det.getStorageCellDelay();
|
||||
@ -416,7 +416,7 @@ TEST_CASE("gainmode", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getGainMode();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -465,7 +465,7 @@ TEST_CASE("filtercells", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
// chip version 1.1
|
||||
if (det.getChipVersion().squash() * 10 == 11) {
|
||||
auto prev_val = det.getNumberOfFilterCells();
|
||||
@ -510,7 +510,7 @@ TEST_CASE("sync", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getSynchronization().tsquash(
|
||||
"inconsistent synchronization to test");
|
||||
{
|
||||
|
@ -19,94 +19,4 @@ using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back MOENCH dacs", "[.cmd][.dacs]") {
|
||||
// vbp_colbuf, vipre, vin_cm", vb_sda, vcasc_sfp, vout_cm, vipre_cds,
|
||||
// ibias_sfp
|
||||
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::MOENCH) {
|
||||
SECTION("vbp_colbuf") {
|
||||
test_dac(defs::VBP_COLBUF, "vbp_colbuf", 1300);
|
||||
}
|
||||
SECTION("vipre") { test_dac(defs::VIPRE, "vipre", 1000); }
|
||||
SECTION("vin_cm") { test_dac(defs::VIN_CM, "vin_cm", 1400); }
|
||||
SECTION("vb_sda") { test_dac(defs::VB_SDA, "vb_sda", 680); }
|
||||
SECTION("vcasc_sfp") { test_dac(defs::VCASC_SFP, "vcasc_sfp", 1428); }
|
||||
SECTION("vout_cm") { test_dac(defs::VOUT_CM, "vout_cm", 1200); }
|
||||
SECTION("vipre_cds") { test_dac(defs::VIPRE_CDS, "vipre_cds", 800); }
|
||||
SECTION("ibias_sfp") { test_dac(defs::IBIAS_SFP, "ibias_sfp", 900); }
|
||||
|
||||
// eiger
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vthreshold"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET));
|
||||
// jungfrau
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET));
|
||||
// gotthard
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcascn_pb"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcascp_pb"}, -1, GET));
|
||||
// REQUIRE_THROWS(proxy.Call("dac", {"vout_cm"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcasc_out"}, -1, GET));
|
||||
// REQUIRE_THROWS(proxy.Call("dac", {"vin_cm"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"ib_test_c"}, -1, GET));
|
||||
// mythen3
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vrshaper_n"}, -1, GET));
|
||||
// REQUIRE_THROWS(proxy.Call("dac", {"vipre"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vdcsh"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vth1"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vth2"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vth3"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcal_n"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcal_p"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcassh"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcas"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vicin"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vipre_out"}, -1, GET));
|
||||
// gotthard2
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_h_adc"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_fe"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_adc"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcom_cds"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_rstore"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_1st"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_comp_fe"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc1"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_l_adc"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vref_cds"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_cs"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_fd"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc2"}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
@ -23,8 +23,7 @@ TEST_CASE("pattern", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
// no proper test for put
|
||||
REQUIRE_THROWS(proxy.Call("pattern", {}, -1, GET));
|
||||
} else {
|
||||
@ -36,8 +35,7 @@ TEST_CASE("savepattern", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
REQUIRE_THROWS(
|
||||
proxy.Call("savepattern", {"/tmp/pattern.txt"}, -1, GET));
|
||||
if (det.size() == 1) {
|
||||
@ -54,7 +52,7 @@ TEST_CASE("defaultpattern", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::MOENCH || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::MYTHEN3) {
|
||||
REQUIRE_THROWS(proxy.Call("defaultpattern", {}, -1, GET));
|
||||
REQUIRE_NOTHROW(proxy.Call("defaultpattern", {}, -1, PUT));
|
||||
} else {
|
||||
@ -68,7 +66,7 @@ TEST_CASE("patioctrl", "[.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.getPatternIOControl();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -98,8 +96,7 @@ TEST_CASE("patword", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
int addr = 0x23;
|
||||
std::string saddr = ToStringHex(addr, 4);
|
||||
auto prev_val = det.getPatternWord(addr);
|
||||
@ -134,8 +131,7 @@ TEST_CASE("patlimits", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
auto prev_val = det.getPatternLoopAddresses(-1);
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -161,8 +157,7 @@ TEST_CASE("patloop", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||
// m3 only has 3 levels
|
||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||
@ -208,8 +203,7 @@ TEST_CASE("patnloop", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||
// m3 only has 3 levels
|
||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||
@ -254,8 +248,7 @@ TEST_CASE("patwait", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||
// m3 only has 3 levels
|
||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||
@ -300,8 +293,7 @@ TEST_CASE("patwaittime", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||
// m3 only has 3 levels
|
||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||
@ -346,8 +338,7 @@ TEST_CASE("patmask", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
auto prev_val = det.getPatternMask();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -372,8 +363,7 @@ TEST_CASE("patsetbit", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
auto prev_val = det.getPatternBitMask();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
@ -451,7 +451,7 @@ TEST_CASE("rx_roi", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
REQUIRE_THROWS(proxy.Call("rx_roi", {"5", "10"}, -1, PUT));
|
||||
} else {
|
||||
auto prev_val = det.getRxROI();
|
||||
@ -513,7 +513,7 @@ TEST_CASE("rx_clearroi", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
REQUIRE_THROWS(proxy.Call("rx_clearroi", {}, -1, PUT));
|
||||
} else {
|
||||
auto prev_val = det.getRxROI();
|
||||
@ -805,7 +805,7 @@ TEST_CASE("rx_zmqport", "[.cmd][.rx]") {
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER) {
|
||||
socketsperdetector *= 2;
|
||||
} else if (det_type == defs::JUNGFRAU) {
|
||||
} else if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
proxy.Call("numinterfaces", {"2"}, -1, PUT);
|
||||
socketsperdetector *= 2;
|
||||
}
|
||||
@ -830,7 +830,7 @@ TEST_CASE("rx_zmqport", "[.cmd][.rx]") {
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setRxZmqPort(prev_val_zmqport[i], i);
|
||||
}
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
det.setNumberofUDPInterfaces(prev_val_numinterfaces);
|
||||
}
|
||||
}
|
||||
@ -948,8 +948,6 @@ TEST_CASE("rx_dbitoffset", "[.cmd][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
/* Moench */
|
||||
|
||||
TEST_CASE("rx_jsonaddheader", "[.cmd][.rx]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
@ -149,7 +149,8 @@ TEST_CASE("moduleid", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::GOTTHARD2 || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
REQUIRE_NOTHROW(proxy.Call("moduleid", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("moduleid", {}, -1, GET));
|
||||
@ -217,6 +218,7 @@ TEST_CASE("settings", "[.cmd]") {
|
||||
std::vector<std::string> sett;
|
||||
switch (det_type) {
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
sett.push_back("gain0");
|
||||
sett.push_back("highgain0");
|
||||
break;
|
||||
@ -232,16 +234,6 @@ TEST_CASE("settings", "[.cmd]") {
|
||||
sett.push_back("fixgain1");
|
||||
sett.push_back("fixgain2");
|
||||
break;
|
||||
case defs::MOENCH:
|
||||
sett.push_back("g1_hg");
|
||||
sett.push_back("g1_lg");
|
||||
sett.push_back("g2_hc_hg");
|
||||
sett.push_back("g2_hc_lg");
|
||||
sett.push_back("g2_lc_hg");
|
||||
sett.push_back("g2_lc_lg");
|
||||
sett.push_back("g4_hg");
|
||||
sett.push_back("g4_lg");
|
||||
break;
|
||||
case defs::MYTHEN3:
|
||||
sett.push_back("standard");
|
||||
sett.push_back("fast");
|
||||
@ -525,7 +517,8 @@ TEST_CASE("gappixels", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::EIGER) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::EIGER) {
|
||||
auto prev_val = det.getGapPixelsinCallback();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -562,17 +555,17 @@ TEST_CASE("fliprows", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
bool jungfrauhw2 = false;
|
||||
if (det_type == defs::JUNGFRAU &&
|
||||
bool hw2 = false;
|
||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) &&
|
||||
((det.getHardwareVersion().tsquash(
|
||||
"inconsistent serial number to test") == "2.0"))) {
|
||||
jungfrauhw2 = true;
|
||||
hw2 = true;
|
||||
}
|
||||
if (det_type == defs::EIGER || jungfrauhw2) {
|
||||
if (det_type == defs::EIGER || hw2) {
|
||||
auto previous = det.getFlipRows();
|
||||
auto previous_numudp = det.getNumberofUDPInterfaces().tsquash(
|
||||
"inconsistent number of udp interfaces to test");
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
det.setNumberofUDPInterfaces(2);
|
||||
}
|
||||
std::ostringstream oss1, oss2, oss3;
|
||||
@ -585,7 +578,7 @@ TEST_CASE("fliprows", "[.cmd]") {
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setFlipRows(previous[i], {i});
|
||||
}
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
det.setNumberofUDPInterfaces(previous_numudp);
|
||||
}
|
||||
} else {
|
||||
@ -599,10 +592,10 @@ TEST_CASE("master", "[.cmd]") {
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD || det_type == defs::GOTTHARD2 ||
|
||||
det_type == defs::JUNGFRAU) {
|
||||
det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
REQUIRE_NOTHROW(proxy.Call("master", {}, -1, GET));
|
||||
if (det_type == defs::EIGER || det_type == defs::GOTTHARD2 ||
|
||||
det_type == defs::JUNGFRAU) {
|
||||
det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
// get previous master
|
||||
int prevMaster = 0;
|
||||
{
|
||||
@ -743,7 +736,7 @@ TEST_CASE("exptime", "[.cmd][.time]") {
|
||||
proxy.Call("exptime", {"1s"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "exptime 1s\n");
|
||||
}
|
||||
if (det_type != defs::JUNGFRAU) {
|
||||
if (det_type != defs::JUNGFRAU && det_type != defs::MOENCH) {
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("exptime", {"0"}, -1, PUT, oss);
|
||||
@ -849,7 +842,6 @@ TEST_CASE("delayl", "[.cmd]") {
|
||||
switch (det_type) {
|
||||
case defs::EIGER:
|
||||
case defs::CHIPTESTBOARD:
|
||||
case defs::MOENCH:
|
||||
case defs::GOTTHARD2:
|
||||
case defs::MYTHEN3:
|
||||
REQUIRE_THROWS(proxy.Call("delayl", {}, -1, GET));
|
||||
@ -867,7 +859,6 @@ TEST_CASE("periodl", "[.cmd]") {
|
||||
switch (det_type) {
|
||||
case defs::EIGER:
|
||||
case defs::CHIPTESTBOARD:
|
||||
case defs::MOENCH:
|
||||
case defs::GOTTHARD2:
|
||||
case defs::MYTHEN3:
|
||||
REQUIRE_THROWS(proxy.Call("periodl", {}, -1, GET));
|
||||
@ -1001,12 +992,12 @@ TEST_CASE("readoutspeed", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
det_type == defs::MOENCH || det_type == defs::GOTTHARD2) {
|
||||
auto prev_val = det.getReadoutSpeed();
|
||||
|
||||
// full speed for jungfrau only works for new boards (chipv1.1 is with
|
||||
// new board [hw1.0 and chipv1.0 not tested here])
|
||||
if ((det_type == defs::JUNGFRAU &&
|
||||
// full speed for jungfrau/moench only works for new boards (chipv1.1 is
|
||||
// with new board [hw1.0 and chipv1.0 not tested here])
|
||||
if (((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) &&
|
||||
det.getChipVersion().squash() * 10 == 11) ||
|
||||
(det_type == defs::EIGER)) {
|
||||
std::ostringstream oss1, oss2, oss3, oss4;
|
||||
@ -1020,7 +1011,8 @@ TEST_CASE("readoutspeed", "[.cmd]") {
|
||||
REQUIRE(oss4.str() == "readoutspeed full_speed\n");
|
||||
}
|
||||
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
{
|
||||
std::ostringstream oss1, oss2, oss3, oss4;
|
||||
proxy.Call("readoutspeed", {"1"}, -1, PUT, oss1);
|
||||
@ -1086,7 +1078,7 @@ TEST_CASE("readoutspeedlist", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::EIGER) {
|
||||
det_type == defs::MOENCH || det_type == defs::EIGER) {
|
||||
REQUIRE_NOTHROW(proxy.Call("readoutspeedlist", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("readoutspeedlist", {}, -1, PUT));
|
||||
} else {
|
||||
@ -1099,7 +1091,7 @@ TEST_CASE("adcphase", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::GOTTHARD || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH) {
|
||||
det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
std::ostringstream oss1;
|
||||
proxy.Call("adcphase", {"20"}, -1, PUT, oss1);
|
||||
@ -1137,8 +1129,8 @@ TEST_CASE("maxadcphaseshift", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MYTHEN3 || // only because clk index of 0 exists
|
||||
det_type == defs::GOTTHARD2) { // only because clk index of 0 exists
|
||||
REQUIRE_NOTHROW(proxy.Call("maxadcphaseshift", {}, -1, GET));
|
||||
@ -1151,7 +1143,8 @@ TEST_CASE("dbitphase", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getDBITPhase();
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
@ -1180,7 +1173,8 @@ TEST_CASE("maxdbitphaseshift", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MYTHEN3 || // only because clk index of 0 exists
|
||||
det_type == defs::GOTTHARD2) { // only because clk index of 0 exists
|
||||
REQUIRE_NOTHROW(proxy.Call("maxdbitphaseshift", {}, -1, GET));
|
||||
@ -1305,8 +1299,8 @@ TEST_CASE("highvoltage", "[.cmd]") {
|
||||
}
|
||||
}
|
||||
// range 0, 60 - 200
|
||||
else if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH) {
|
||||
else if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD) {
|
||||
REQUIRE_THROWS(proxy.Call("highvoltage", {"50"}, -1, PUT));
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
@ -1384,8 +1378,8 @@ TEST_CASE("powerchip", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2 || det_type == defs::MOENCH) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
auto prev_val = det.getPowerChip();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -1434,8 +1428,9 @@ TEST_CASE("imagetest", "[.cmd]") {
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setImageTestMode(prev_val[i], {i});
|
||||
}
|
||||
} else if (det_type != defs::JUNGFRAU && det_type != defs::EIGER) {
|
||||
// wont fail for eiger and jungfrau virtual servers
|
||||
} else if (det_type != defs::JUNGFRAU && det_type != defs::MOENCH &&
|
||||
det_type != defs::EIGER) {
|
||||
// wont fail for eiger and jungfrau/moench virtual servers
|
||||
REQUIRE_THROWS(proxy.Call("imagetest", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
@ -1557,7 +1552,7 @@ TEST_CASE("filterresistor", "[.cmd]") {
|
||||
|
||||
// only for chipv1.1
|
||||
bool chip11 = false;
|
||||
if (det_type == defs::JUNGFRAU &&
|
||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) &&
|
||||
det.getChipVersion().squash() * 10 == 11) {
|
||||
chip11 = true;
|
||||
}
|
||||
@ -1648,14 +1643,15 @@ TEST_CASE("readnrows", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
bool jungfrauhw2 = false;
|
||||
if (det_type == defs::JUNGFRAU &&
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
bool hw2 = false;
|
||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) &&
|
||||
((det.getHardwareVersion().tsquash(
|
||||
"inconsistent hardware version number to test") == "2.0"))) {
|
||||
jungfrauhw2 = true;
|
||||
hw2 = true;
|
||||
}
|
||||
if (det_type == defs::JUNGFRAU && !jungfrauhw2) {
|
||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) && !hw2) {
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("readnrows", {}, -1, GET, oss);
|
||||
@ -1678,7 +1674,7 @@ TEST_CASE("readnrows", "[.cmd]") {
|
||||
proxy.Call("readnrows", {"16"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "readnrows 16\n");
|
||||
}
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
REQUIRE_THROWS(proxy.Call("readnrows", {"7"}, -1, PUT));
|
||||
REQUIRE_THROWS(proxy.Call("readnrows", {"20"}, -1, PUT));
|
||||
REQUIRE_THROWS(proxy.Call("readnrows", {"44"}, -1, PUT));
|
||||
@ -1700,7 +1696,8 @@ TEST_CASE("currentsource", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getCurrentSource();
|
||||
|
||||
if (det_type == defs::GOTTHARD2) {
|
||||
@ -1724,7 +1721,7 @@ TEST_CASE("currentsource", "[.cmd]") {
|
||||
REQUIRE_THROWS(proxy.Call("currentsource",
|
||||
{"1", "fix", "42", "normal"}, -1, PUT));
|
||||
}
|
||||
// jungfrau
|
||||
// jungfrau/moench
|
||||
else {
|
||||
int chipVersion = det.getChipVersion().tsquash(
|
||||
"inconsistent chip versions to test") *
|
||||
@ -1852,7 +1849,8 @@ TEST_CASE("temp_adc", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::GOTTHARD) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::GOTTHARD) {
|
||||
REQUIRE_NOTHROW(proxy.Call("temp_adc", {}, -1, GET));
|
||||
std::ostringstream oss;
|
||||
REQUIRE_NOTHROW(proxy.Call("temp_adc", {}, 0, GET, oss));
|
||||
@ -1867,7 +1865,7 @@ TEST_CASE("temp_fpga", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::MOENCH && det_type != defs::CHIPTESTBOARD) {
|
||||
if (det_type != defs::CHIPTESTBOARD) {
|
||||
REQUIRE_NOTHROW(proxy.Call("temp_fpga", {}, -1, GET));
|
||||
std::ostringstream oss;
|
||||
REQUIRE_NOTHROW(proxy.Call("temp_fpga", {}, 0, GET, oss));
|
||||
@ -1924,7 +1922,7 @@ TEST_CASE("defaultdac", "[.cmd]") {
|
||||
det.setDefaultDac(it, prev_val[i], {i});
|
||||
}
|
||||
}
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
std::vector<defs::dacIndex> daclist = {
|
||||
defs::VREF_PRECH, defs::VREF_DS, defs::VREF_COMP};
|
||||
for (auto it : daclist) {
|
||||
@ -1964,7 +1962,7 @@ TEST_CASE("resetdacs", "[.cmd]") {
|
||||
REQUIRE_NOTHROW(proxy.Call("resetdacs", {}, -1, PUT));
|
||||
REQUIRE_NOTHROW(proxy.Call("resetdacs", {"hard"}, -1, PUT));
|
||||
|
||||
// settings should not change especially for jungfrau and m3
|
||||
// settings should not change especially for jungfrau/moench and m3
|
||||
auto next_val = det.getSettings();
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
REQUIRE(prev_val[i] == next_val[i]);
|
||||
@ -1984,7 +1982,8 @@ TEST_CASE("trigger", "[.cmd]") {
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::MYTHEN3) {
|
||||
REQUIRE_NOTHROW(proxy.Call("trigger", {}, -1, PUT));
|
||||
} else if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
} else if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
auto prev_timing =
|
||||
det.getTimingMode().tsquash("inconsistent timing mode in test");
|
||||
auto prev_frames =
|
||||
@ -2024,7 +2023,8 @@ TEST_CASE("blockingtrigger", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("blockingtrigger", {}, -1, GET));
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
auto prev_timing =
|
||||
det.getTimingMode().tsquash("inconsistent timing mode in test");
|
||||
auto prev_frames =
|
||||
@ -2275,6 +2275,7 @@ TEST_CASE("scan", "[.cmd]") {
|
||||
notImplementedInd = defs::VCASCP_PB;
|
||||
break;
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
ind = defs::VB_COMP;
|
||||
notImplementedInd = defs::VSVP;
|
||||
break;
|
||||
@ -2282,10 +2283,6 @@ TEST_CASE("scan", "[.cmd]") {
|
||||
ind = defs::VREF_DS;
|
||||
notImplementedInd = defs::VSVP;
|
||||
break;
|
||||
case defs::MOENCH:
|
||||
ind = defs::VBP_COLBUF;
|
||||
notImplementedInd = defs::VSVP;
|
||||
break;
|
||||
case defs::GOTTHARD2:
|
||||
ind = defs::VB_COMP_FE;
|
||||
notImplementedInd = defs::VSVP;
|
||||
@ -2401,7 +2398,7 @@ TEST_CASE("numinterfaces", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getNumberofUDPInterfaces().tsquash(
|
||||
"inconsistent numinterfaces to test");
|
||||
{
|
||||
@ -2456,8 +2453,9 @@ TEST_CASE("udp_dstlist", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::EIGER ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
REQUIRE_NOTHROW(proxy.Call("udp_dstlist", {}, 0, GET, std::cout, 0));
|
||||
REQUIRE_THROWS(proxy.Call(
|
||||
"udp_dstlist", {"ip=0.0.0.0", "mac=00:00:00:00:00:00", "port=1233"},
|
||||
@ -2471,8 +2469,9 @@ TEST_CASE("udp_numdst", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::EIGER ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
REQUIRE_NOTHROW(proxy.Call("udp_numdst", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("udp_numdst", {}, -1, GET));
|
||||
@ -2491,8 +2490,8 @@ TEST_CASE("udp_firstdst", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
auto prev_val = det.getFirstUDPDestination();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -2568,7 +2567,8 @@ TEST_CASE("udp_srcip2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::GOTTHARD2) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
auto prev_val = det.getSourceUDPIP2();
|
||||
REQUIRE_THROWS(proxy.Call("udp_srcip2", {"0.0.0.0"}, -1, PUT));
|
||||
{
|
||||
@ -2589,7 +2589,8 @@ TEST_CASE("udp_dstip2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::GOTTHARD2) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
REQUIRE_THROWS(proxy.Call("udp_dstip2", {"0.0.0.0"}, -1, PUT));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("udp_dstip2", {}, -1, GET));
|
||||
@ -2600,7 +2601,8 @@ TEST_CASE("udp_srcmac2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::GOTTHARD2) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
auto prev_val = det.getSourceUDPMAC2();
|
||||
REQUIRE_THROWS(
|
||||
proxy.Call("udp_srcmac2", {"00:00:00:00:00:00"}, -1, PUT));
|
||||
@ -2623,7 +2625,8 @@ TEST_CASE("udp_dstmac2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::GOTTHARD2) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
REQUIRE_THROWS(
|
||||
proxy.Call("udp_dstmac2", {"00:00:00:00:00:00"}, -1, PUT));
|
||||
} else {
|
||||
@ -2635,8 +2638,8 @@ TEST_CASE("udp_dstport2", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::GOTTHARD2 ||
|
||||
det_type == defs::EIGER) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::GOTTHARD2 || det_type == defs::EIGER) {
|
||||
auto prev_val = det.getDestinationUDPPort2();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -2671,7 +2674,7 @@ TEST_CASE("tengiga", "[.cmd]") {
|
||||
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3) {
|
||||
det_type == defs::MYTHEN3) {
|
||||
auto tengiga = det.getTenGiga();
|
||||
det.setTenGiga(false);
|
||||
|
||||
@ -2694,7 +2697,8 @@ TEST_CASE("flowcontrol10g", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getTenGigaFlowControl();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -2724,10 +2728,11 @@ TEST_CASE("txdelay_frame", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3) {
|
||||
auto prev_val = det.getTransmissionDelayFrame();
|
||||
auto val = 5000;
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
val = 5;
|
||||
}
|
||||
std::string sval = std::to_string(val);
|
||||
@ -2751,10 +2756,11 @@ TEST_CASE("txdelay", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3) {
|
||||
|
||||
// cannot get transmission delay with just one module
|
||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3) &&
|
||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) &&
|
||||
(det.size() < 2)) {
|
||||
REQUIRE_THROWS(proxy.Call("txdelay", {}, -1, GET));
|
||||
int val = 5;
|
||||
@ -2776,7 +2782,8 @@ TEST_CASE("txdelay", "[.cmd]") {
|
||||
}
|
||||
auto prev_frame = det.getTransmissionDelayFrame();
|
||||
auto val = 5000;
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::MYTHEN3) {
|
||||
val = 5;
|
||||
}
|
||||
std::string sval = std::to_string(val);
|
||||
@ -2829,7 +2836,7 @@ TEST_CASE("zmqport", "[.cmd]") {
|
||||
int prev = 1;
|
||||
if (det_type == defs::EIGER) {
|
||||
socketsperdetector *= 2;
|
||||
} else if (det_type == defs::JUNGFRAU) {
|
||||
} else if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
prev = det.getNumberofUDPInterfaces().squash();
|
||||
det.setNumberofUDPInterfaces(2);
|
||||
socketsperdetector *= 2;
|
||||
@ -2863,7 +2870,7 @@ TEST_CASE("zmqport", "[.cmd]") {
|
||||
std::to_string(port + i * socketsperdetector) +
|
||||
'\n');
|
||||
}
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
det.setNumberofUDPInterfaces(prev);
|
||||
}
|
||||
}
|
||||
@ -2917,8 +2924,8 @@ TEST_CASE("programfpga", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3 ||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
// TODO program a real board?
|
||||
/// afs/psi.ch/project/sls_det_firmware/jungfrau_firmware/cyclone_V/v0_8/Jungfrau_MCB.pof
|
||||
@ -2949,8 +2956,8 @@ TEST_CASE("updatekernel", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
// TODO: send real server?
|
||||
// std::ostringstream oss;
|
||||
@ -2968,8 +2975,8 @@ TEST_CASE("rebootcontroller", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2 || det_type == defs::GOTTHARD) {
|
||||
// TODO: reboot real server?
|
||||
// REQUIRE_NOTHROW(proxy.Call("rebootcontroller", {}, -1, PUT));
|
||||
@ -2984,8 +2991,8 @@ TEST_CASE("update", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD) {
|
||||
// TODO: update real server and firmware?
|
||||
// REQUIRE_NOTHROW(proxy.Call("update",
|
||||
// {"jungfrauDetectorServerv4.0.1.0", "pc13784",
|
||||
@ -3028,8 +3035,8 @@ TEST_CASE("adcreg", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::GOTTHARD) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD) {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("adcreg", {"0x8", "0x3"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "adcreg [0x8, 0x3]\n");
|
||||
@ -3113,8 +3120,8 @@ TEST_CASE("firmwaretest", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::GOTTHARD ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("firmwaretest", {}, -1, PUT, oss);
|
||||
@ -3130,8 +3137,8 @@ TEST_CASE("bustest", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::GOTTHARD ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("bustest", {}, -1, PUT, oss);
|
||||
@ -3170,8 +3177,8 @@ TEST_CASE("adcinvert", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH ||
|
||||
det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
auto prev_val = det.getADCInvert();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -3261,8 +3268,8 @@ TEST_CASE("framecounter", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
auto framecounter = det.getNumberOfFramesFromStart().squash();
|
||||
std::ostringstream oss;
|
||||
@ -3280,8 +3287,8 @@ TEST_CASE("runtime", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("runtime", {}, -1, GET, oss);
|
||||
@ -3298,8 +3305,8 @@ TEST_CASE("frametime", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
std::ostringstream oss;
|
||||
proxy.Call("frametime", {}, -1, GET, oss);
|
||||
|
Reference in New Issue
Block a user