mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
Dev/remove gotthard i (#1108)
* slsSupportLib done, at receiver rooting out in implementation * removed from receiver and client * removed everywhere except gui, python and client(commands.yaml and Detector.h) * updated python * fixed autocomplete to print what the issue is if there is one with ToString when running the autocomplete script to generate fixed.json. updated readme.md in generator folder * formatting * removed enums for dacs * udpating autocomplete and generating commands * removed gotthard from docs and release notes * removed dac test * bug from removing g1 * fixed virtual test for xilinx, was minor. so in this PR * gui done * binary in merge fix * formatting and removing enums * updated fixed and dump.json * bash autocomplete * updated doc on command line generation * removing increments in dac enums for backward compatibility. Not required * removed ROI from rxParameters (only in g1), not needed to be backward compatible * removed the phase shift option from det server staruip
This commit is contained in:
@ -532,10 +532,9 @@ std::string Caller::adcphase(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_value] [(optional)deg]
|
||||
[Jungfrau][Moench][Ctb][Gotthard] Phase shift of ADC clock.
|
||||
[Jungfrau][Moench][Ctb] Phase shift of ADC clock.
|
||||
[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees. Changing Speed also resets adcphase to recommended defaults.
|
||||
[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values.
|
||||
[Gotthard] Relative phase shift. Cannot get )V0G0N"
|
||||
[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -725,7 +724,7 @@ std::string Caller::adcreg(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([address] [value]
|
||||
[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register in hex. Advanced user Function! )V0G0N"
|
||||
[Jungfrau][Moench][Ctb] Writes to an adc register in hex. Advanced user Function! )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -1318,7 +1317,7 @@ std::string Caller::bustest(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.
|
||||
Advanced User function! )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -1589,45 +1588,6 @@ std::string Caller::clearbusy(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::clearroi(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard] Resets Region of interest in detector. All channels enabled. Default is all channels enabled. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
||||
// check if action and arguments are valid
|
||||
if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
if (1 && args.size() != 0) {
|
||||
throw RuntimeError("Wrong number of arguments for action PUT");
|
||||
}
|
||||
|
||||
if (args.size() == 0) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError(
|
||||
"INTERNAL ERROR: Invalid action: supported actions are ['PUT']");
|
||||
}
|
||||
|
||||
// generate code for each action
|
||||
if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
if (args.size() == 0) {
|
||||
det->clearROI(std::vector<int>{det_id});
|
||||
os << "successful" << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::clientversion(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
@ -3266,7 +3226,7 @@ std::string Caller::delay(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([duration] [(optional unit) ns|us|ms|s]
|
||||
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger )V0G0N"
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -3354,7 +3314,7 @@ std::string Caller::delayl(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition.
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition.
|
||||
[Gotthard2] only in continuous mode. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -3615,7 +3575,7 @@ std::string Caller::dr(int action) {
|
||||
Dynamic Range or number of bits per pixel in detector.
|
||||
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.
|
||||
[Mythen3] Options: 8, 16, 32
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 )V0G0N"
|
||||
[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -3781,7 +3741,7 @@ std::string Caller::exptime(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([duration] [(optional unit) ns|us|ms|s]
|
||||
[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Ctb][Xilinx Ctb] Exposure time
|
||||
[Eiger][Jungfrau][Moench][Gotthard2][Ctb][Xilinx Ctb] Exposure time
|
||||
[Mythen3] Exposure time of all gate signals in auto and trigger mode (internal gating). To specify gate index, use exptime1, exptime2, exptime3. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -4175,53 +4135,6 @@ std::string Caller::exptime3(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::exptimel(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([(optional unit) ns|us|ms|s]
|
||||
[Gotthard] Exposure time left for current frame. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
||||
// check if action and arguments are valid
|
||||
if (action == slsDetectorDefs::GET_ACTION) {
|
||||
if (1 && args.size() != 0 && args.size() != 1) {
|
||||
throw RuntimeError("Wrong number of arguments for action GET");
|
||||
}
|
||||
|
||||
if (args.size() == 0) {
|
||||
}
|
||||
|
||||
if (args.size() == 1) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError(
|
||||
"INTERNAL ERROR: Invalid action: supported actions are ['GET']");
|
||||
}
|
||||
|
||||
// generate code for each action
|
||||
if (action == slsDetectorDefs::GET_ACTION) {
|
||||
if (args.size() == 0) {
|
||||
auto t = det->getExptimeLeft(std::vector<int>{det_id});
|
||||
os << OutString(t) << '\n';
|
||||
}
|
||||
|
||||
if (args.size() == 1) {
|
||||
auto t = det->getExptimeLeft(std::vector<int>{det_id});
|
||||
os << OutString(t, args[0]) << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::extrastoragecells(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
@ -4420,8 +4333,7 @@ std::string Caller::extsig(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_signal] [signal_type]
|
||||
[Gotthard][Mythen3] External signal mode for trigger timing mode.
|
||||
[Gotthard] [0] [trigger_in_rising_edge|trigger_in_falling_edge]
|
||||
[Mythen3] External signal mode for trigger timing mode.
|
||||
[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]
|
||||
where 0 is master input trigger signal, 1-3 is master input gate signals, 4 is busy out signal and 5-7 is master output gate signals. )V0G0N"
|
||||
<< std::endl;
|
||||
@ -4749,7 +4661,7 @@ std::string Caller::firmwaretest(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register. )V0G0N"
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -5315,7 +5227,7 @@ std::string Caller::framesl(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition.
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition.
|
||||
[Gotthard2] only in continuous auto mode. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -6142,7 +6054,6 @@ std::string Caller::highvoltage(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_value]
|
||||
High voltage to the sensor in Voltage.
|
||||
[Gotthard] [0|90|110|120|150|180|200]
|
||||
[Eiger][Mythen3][Gotthard2] 0-200
|
||||
[Jungfrau][Moench][Ctb] [0|60-200] )V0G0N"
|
||||
<< std::endl;
|
||||
@ -6406,7 +6317,6 @@ std::string Caller::imagetest(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([0, 1]
|
||||
[Gotthard] 1 adds channel intensity with precalculated values when taking an acquisition. Default is 0.
|
||||
[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost saturated. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -6935,7 +6845,7 @@ std::string Caller::master(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([0, 1]
|
||||
[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.
|
||||
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master. )V0G0N"
|
||||
[Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -9078,7 +8988,7 @@ std::string Caller::periodl(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame.
|
||||
[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame.
|
||||
[Gotthard2] only in continuous mode. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -10151,7 +10061,7 @@ std::string Caller::rebootcontroller(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector. )V0G0N"
|
||||
[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -10303,7 +10213,7 @@ std::string Caller::resetdacs(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([(optional) hard]
|
||||
[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. )V0G0N"
|
||||
[Eiger][Jungfrau][Moench][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. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -10387,71 +10297,6 @@ std::string Caller::resetfpga(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::roi(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([xmin] [xmax]
|
||||
[Gotthard] Region of interest in detector.
|
||||
Options: Only a single ROI per module.
|
||||
Either all channels or a single adc or 2 chips (256 channels). Default is all channels enabled (-1 -1). )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
||||
// check if action and arguments are valid
|
||||
if (action == slsDetectorDefs::GET_ACTION) {
|
||||
if (1 && args.size() != 0) {
|
||||
throw RuntimeError("Wrong number of arguments for action GET");
|
||||
}
|
||||
|
||||
if (args.size() == 0) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
if (1 && args.size() != 2) {
|
||||
throw RuntimeError("Wrong number of arguments for action PUT");
|
||||
}
|
||||
|
||||
if (args.size() == 2) {
|
||||
defs::ROI t =
|
||||
defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions "
|
||||
"are ['GET', 'PUT']");
|
||||
}
|
||||
|
||||
// generate code for each action
|
||||
if (action == slsDetectorDefs::GET_ACTION) {
|
||||
if (args.size() == 0) {
|
||||
auto t = det->getROI(std::vector<int>{det_id});
|
||||
os << t << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
if (args.size() == 2) {
|
||||
defs::ROI t =
|
||||
defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]));
|
||||
if (det_id == -1 && det->size() > 1) {
|
||||
throw RuntimeError("Cannot execute ROI at multi module level");
|
||||
}
|
||||
det->setROI(t, det_id);
|
||||
os << t << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::romode(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
@ -12440,7 +12285,7 @@ std::string Caller::serialnumber(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb]
|
||||
Serial number of detector. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -12576,8 +12421,6 @@ std::string Caller::settings(int action) {
|
||||
os << R"V0G0N([standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]
|
||||
Detector Settings
|
||||
[Jungfrau] - [ gain0 | highgain0]
|
||||
[Gotthard] - [dynamicgain | highgain | lowgain | mediumgain | veryhighgain]
|
||||
[Gotthard] Also loads default dacs on to the detector.
|
||||
[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]
|
||||
[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp.
|
||||
[Eiger] Use threshold or thresholdnotb.
|
||||
@ -13885,7 +13728,7 @@ std::string Caller::temp_adc(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_value]
|
||||
[Jungfrau][Moench][Gotthard] ADC Temperature )V0G0N"
|
||||
[Jungfrau][Moench] ADC Temperature )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -14089,7 +13932,7 @@ std::string Caller::temp_fpga(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_value]
|
||||
[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature )V0G0N"
|
||||
[Eiger][Jungfrau][Moench][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -14590,7 +14433,7 @@ std::string Caller::timing(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([auto|trigger|gating|burst_trigger|trigger_gating]
|
||||
Timing Mode of detector.
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]
|
||||
[Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]
|
||||
[Mythen3] [auto|trigger|gating|trigger_gating]
|
||||
[Eiger] [auto|trigger|gating|burst_trigger] )V0G0N"
|
||||
<< std::endl;
|
||||
@ -15053,7 +14896,7 @@ std::string Caller::triggersl(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used. )V0G0N"
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -15534,7 +15377,7 @@ std::string Caller::type(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
Returns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard )V0G0N"
|
||||
Returns detector type. Can be Eiger, Jungfrau, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -16228,7 +16071,7 @@ std::string Caller::update(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
Without tftp: [server_name (incl fullpath)] [fname.pof (incl full path)] This does not use tftp.
|
||||
[Jungfrau][Moench][Gotthard][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller.
|
||||
[Jungfrau][Moench][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller.
|
||||
[Mythen3][Gotthard2] will require a script to start up the shorter named server link at start up.
|
||||
server_name is full path name of detector server binary
|
||||
fname is full path of programming file )V0G0N"
|
||||
|
@ -82,7 +82,6 @@ class Caller {
|
||||
std::string chipversion(int action);
|
||||
std::string clearbit(int action);
|
||||
std::string clearbusy(int action);
|
||||
std::string clearroi(int action);
|
||||
std::string clientversion(int action);
|
||||
std::string clkdiv(int action);
|
||||
std::string clkfreq(int action);
|
||||
@ -120,7 +119,6 @@ class Caller {
|
||||
std::string exptime1(int action);
|
||||
std::string exptime2(int action);
|
||||
std::string exptime3(int action);
|
||||
std::string exptimel(int action);
|
||||
std::string extrastoragecells(int action);
|
||||
std::string extsampling(int action);
|
||||
std::string extsamplingsrc(int action);
|
||||
@ -230,7 +228,6 @@ class Caller {
|
||||
std::string reg(int action);
|
||||
std::string resetdacs(int action);
|
||||
std::string resetfpga(int action);
|
||||
std::string roi(int action);
|
||||
std::string romode(int action);
|
||||
std::string row(int action);
|
||||
std::string runclk(int action);
|
||||
@ -428,7 +425,6 @@ class Caller {
|
||||
{"chipversion", &Caller::chipversion},
|
||||
{"clearbit", &Caller::clearbit},
|
||||
{"clearbusy", &Caller::clearbusy},
|
||||
{"clearroi", &Caller::clearroi},
|
||||
{"clientversion", &Caller::clientversion},
|
||||
{"clkdiv", &Caller::clkdiv},
|
||||
{"clkfreq", &Caller::clkfreq},
|
||||
@ -466,7 +462,6 @@ class Caller {
|
||||
{"exptime1", &Caller::exptime1},
|
||||
{"exptime2", &Caller::exptime2},
|
||||
{"exptime3", &Caller::exptime3},
|
||||
{"exptimel", &Caller::exptimel},
|
||||
{"extrastoragecells", &Caller::extrastoragecells},
|
||||
{"extsampling", &Caller::extsampling},
|
||||
{"extsamplingsrc", &Caller::extsamplingsrc},
|
||||
@ -579,7 +574,6 @@ class Caller {
|
||||
{"reg", &Caller::reg},
|
||||
{"resetdacs", &Caller::resetdacs},
|
||||
{"resetfpga", &Caller::resetfpga},
|
||||
{"roi", &Caller::roi},
|
||||
{"romode", &Caller::romode},
|
||||
{"row", &Caller::row},
|
||||
{"runclk", &Caller::runclk},
|
||||
@ -784,13 +778,9 @@ class Caller {
|
||||
{"vishaper", "dac"},
|
||||
{"iodelay", "dac"},
|
||||
{"vref_ds", "dac"},
|
||||
{"vcascn_pb", "dac"},
|
||||
{"vcascp_pb", "dac"},
|
||||
{"vout_cm", "dac"},
|
||||
{"vcasc_out", "dac"},
|
||||
{"vin_cm", "dac"},
|
||||
{"vref_comp", "dac"},
|
||||
{"ib_test_c", "dac"},
|
||||
{"vrshaper_n", "dac"},
|
||||
{"vipre", "dac"},
|
||||
{"vdcsh", "dac"},
|
||||
|
@ -112,10 +112,6 @@ IpAddr Caller::getDstIpFromAuto() {
|
||||
}
|
||||
|
||||
IpAddr Caller::getSrcIpFromAuto() {
|
||||
if (det->getDetectorType().squash() == defs::GOTTHARD) {
|
||||
throw RuntimeError(
|
||||
"Cannot use 'auto' for udp_srcip for GotthardI Detector.");
|
||||
}
|
||||
std::string hostname =
|
||||
det->getHostname(std::vector<int>{det_id}).squash("none");
|
||||
// Hostname could be ip try to decode otherwise look up the hostname
|
||||
@ -511,7 +507,7 @@ std::string Caller::udp_srcip(int action) {
|
||||
"ip.\n\t[Eiger] Set only for 10G. For 1G, detector will replace "
|
||||
"with its own DHCP IP address. \n\tOne can also set this to "
|
||||
"'auto' for 1 GbE data and virtual detectors. It will set to IP "
|
||||
"of detector. Not available for GotthardI"
|
||||
"of detector."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
auto t = det->getSourceUDPIP(std::vector<int>{det_id});
|
||||
|
@ -215,10 +215,6 @@ std::vector<defs::detectorSettings> Detector::getSettingsList() const {
|
||||
return std::vector<defs::detectorSettings>{
|
||||
defs::STANDARD, defs::HIGHGAIN, defs::LOWGAIN, defs::VERYHIGHGAIN,
|
||||
defs::VERYLOWGAIN};
|
||||
case defs::GOTTHARD:
|
||||
return std::vector<defs::detectorSettings>{
|
||||
defs::HIGHGAIN, defs::DYNAMICGAIN, defs::LOWGAIN, defs::MEDIUMGAIN,
|
||||
defs::VERYHIGHGAIN};
|
||||
case defs::JUNGFRAU:
|
||||
return std::vector<defs::detectorSettings>{defs::GAIN0,
|
||||
defs::HIGHGAIN0};
|
||||
@ -684,7 +680,6 @@ std::vector<defs::dacIndex> Detector::getTemperatureList() const {
|
||||
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};
|
||||
case defs::EIGER:
|
||||
@ -747,10 +742,6 @@ std::vector<defs::dacIndex> Detector::getDacList() const {
|
||||
defs::VCAL, defs::VCMP_RL, defs::RXB_RB, defs::RXB_LB,
|
||||
defs::VCMP_RR, defs::VCP, defs::VCN, defs::VISHAPER,
|
||||
defs::VTHRESHOLD};
|
||||
case defs::GOTTHARD:
|
||||
return std::vector<defs::dacIndex>{
|
||||
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:
|
||||
return std::vector<defs::dacIndex>{
|
||||
defs::VB_COMP, defs::VDD_PROT, defs::VIN_COM, defs::VREF_PRECH,
|
||||
@ -1818,27 +1809,6 @@ void Detector::setCollectionMode(defs::collectionMode value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setCollectionMode, pos, value);
|
||||
}
|
||||
|
||||
// Gotthard Specific
|
||||
|
||||
Result<defs::ROI> Detector::getROI(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getROI, pos);
|
||||
}
|
||||
|
||||
void Detector::setROI(defs::ROI value, int module_id) {
|
||||
if (module_id < 0 && size() > 1) {
|
||||
throw RuntimeError("Cannot set ROI for all modules simultaneously");
|
||||
}
|
||||
pimpl->Parallel(&Module::setROI, {module_id}, value);
|
||||
}
|
||||
|
||||
void Detector::clearROI(Positions pos) {
|
||||
pimpl->Parallel(&Module::clearROI, pos);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getExptimeLeft(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getExptimeLeft, pos);
|
||||
}
|
||||
|
||||
// Gotthard2 Specific
|
||||
|
||||
Result<int64_t> Detector::getNumberOfBursts(Positions pos) const {
|
||||
|
@ -230,9 +230,9 @@ void DetectorImpl::addModule(const std::string &name) {
|
||||
// get type by connecting
|
||||
detectorType type = Module::getTypeFromDetector(hostname, port);
|
||||
|
||||
// gotthard cannot have more than 2 modules (50um=1, 25um=2
|
||||
if ((type == GOTTHARD || type == GOTTHARD2) && modules.size() > 2) {
|
||||
throw RuntimeError("Gotthard cannot have more than 2 modules. Please "
|
||||
// gotthard2 cannot have more than 2 modules (50um=1, 25um=2
|
||||
if (type == GOTTHARD2 && modules.size() > 2) {
|
||||
throw RuntimeError("GotthardII cannot have more than 2 modules. Please "
|
||||
"free the shared memory and start again.");
|
||||
}
|
||||
|
||||
@ -1187,11 +1187,6 @@ int DetectorImpl::acquire() {
|
||||
if (acquisition_finished != nullptr) {
|
||||
// status
|
||||
auto statusList = Parallel(&Module::getRunStatus, {});
|
||||
// if any slave still waiting, wait up to 1s (gotthard)
|
||||
for (int i = 0; i != 20 && statusList.any(WAITING); ++i) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
statusList = Parallel(&Module::getRunStatus, {});
|
||||
}
|
||||
runStatus status = statusList.squash(ERROR);
|
||||
// inconsistent status (squash error), but none of them in error
|
||||
if (status == ERROR && (!statusList.any(ERROR))) {
|
||||
@ -1235,7 +1230,6 @@ bool DetectorImpl::handleSynchronization(Positions pos) {
|
||||
switch (shm()->detType) {
|
||||
case defs::MYTHEN3:
|
||||
case defs::GOTTHARD2:
|
||||
case defs::GOTTHARD:
|
||||
handleSync = true;
|
||||
break;
|
||||
case defs::JUNGFRAU:
|
||||
@ -1290,11 +1284,6 @@ void DetectorImpl::startAcquisition(const bool blocking, Positions pos) {
|
||||
// ensure all status normal (slaves not blocking)
|
||||
// to catch those slaves that are still 'waiting'
|
||||
auto statusList = Parallel(&Module::getRunStatus, pos);
|
||||
// if any slave still waiting, wait up to 1s (gotthard)
|
||||
for (int i = 0; i != 20 && statusList.any(WAITING); ++i) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
statusList = Parallel(&Module::getRunStatus, pos);
|
||||
}
|
||||
if (!statusList.contains_only(IDLE, STOPPED, RUN_FINISHED)) {
|
||||
throw RuntimeError("Acquisition not successful. "
|
||||
"Unexpected detector status");
|
||||
@ -1442,7 +1431,6 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
}
|
||||
break;
|
||||
case EIGER:
|
||||
case GOTTHARD:
|
||||
throw RuntimeError("programfpga not implemented for this detector");
|
||||
default:
|
||||
throw RuntimeError(
|
||||
|
@ -93,35 +93,19 @@ 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 ??");
|
||||
}
|
||||
if (dac == "vcascn_pb") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
|
||||
}
|
||||
if (dac == "vcascp_pb") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
|
||||
"\n\t[Jungfrau] Dac for ??");
|
||||
}
|
||||
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");
|
||||
}
|
||||
if (dac == "vcasc_out") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
|
||||
"\n\t[Moench] Dac for 5");
|
||||
}
|
||||
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[Moench] Dac for 2");
|
||||
}
|
||||
if (dac == "vref_comp") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard][Jungfrau] Dac for ??");
|
||||
}
|
||||
if (dac == "ib_test_c") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
|
||||
"\n\t[Jungfrau] Dac for ??");
|
||||
}
|
||||
if (dac == "vrshaper_n") {
|
||||
return std::string(
|
||||
|
@ -1967,29 +1967,6 @@ void Module::setCollectionMode(const defs::collectionMode value) {
|
||||
sendToDetector(F_SET_COLLECTION_MODE, static_cast<int>(value), nullptr);
|
||||
}
|
||||
|
||||
// Gotthard Specific
|
||||
|
||||
slsDetectorDefs::ROI Module::getROI() const {
|
||||
return sendToDetector<slsDetectorDefs::ROI>(F_GET_ROI);
|
||||
}
|
||||
|
||||
void Module::setROI(slsDetectorDefs::ROI arg) {
|
||||
if (arg.xmin < 0 || arg.xmax >= getNumberOfChannels().x) {
|
||||
arg.xmin = -1;
|
||||
arg.xmax = -1;
|
||||
}
|
||||
sendToDetector(F_SET_ROI, arg, nullptr);
|
||||
if (shm()->useReceiverFlag) {
|
||||
sendToReceiver(F_RECEIVER_SET_DETECTOR_ROI, arg, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void Module::clearROI() { setROI(slsDetectorDefs::ROI{}); }
|
||||
|
||||
int64_t Module::getExptimeLeft() const {
|
||||
return sendToDetectorStop<int64_t>(F_GET_EXPTIME_LEFT);
|
||||
}
|
||||
|
||||
// Gotthard2 Specific
|
||||
|
||||
int64_t Module::getNumberOfBursts() const {
|
||||
@ -3440,8 +3417,6 @@ const std::string Module::getDetectorAPI() const {
|
||||
return APIEIGER;
|
||||
case JUNGFRAU:
|
||||
return APIJUNGFRAU;
|
||||
case GOTTHARD:
|
||||
return APIGOTTHARD;
|
||||
case CHIPTESTBOARD:
|
||||
return APICTB;
|
||||
case MOENCH:
|
||||
|
@ -418,16 +418,6 @@ class Module : public virtual slsDetectorDefs {
|
||||
defs::collectionMode getCollectionMode() const;
|
||||
void setCollectionMode(const defs::collectionMode enable);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* Gotthard Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
slsDetectorDefs::ROI getROI() const;
|
||||
void setROI(slsDetectorDefs::ROI arg);
|
||||
void clearROI();
|
||||
int64_t getExptimeLeft() const;
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* Gotthard2 Specific *
|
||||
|
@ -426,18 +426,6 @@ int InferAction::clearbusy() {
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::clearroi() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
return slsDetectorDefs::PUT_ACTION;
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError("Could not infer action: Wrong number of arguments");
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::clientversion() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
@ -1032,22 +1020,6 @@ int InferAction::exptime3() {
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::exptimel() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
return slsDetectorDefs::GET_ACTION;
|
||||
}
|
||||
|
||||
if (args.size() == 1) {
|
||||
return slsDetectorDefs::GET_ACTION;
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError("Could not infer action: Wrong number of arguments");
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::extrastoragecells() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
@ -2482,22 +2454,6 @@ int InferAction::resetfpga() {
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::roi() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
return slsDetectorDefs::GET_ACTION;
|
||||
}
|
||||
|
||||
if (args.size() == 2) {
|
||||
return slsDetectorDefs::PUT_ACTION;
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError("Could not infer action: Wrong number of arguments");
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::romode() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
|
@ -39,7 +39,6 @@ class InferAction {
|
||||
int chipversion();
|
||||
int clearbit();
|
||||
int clearbusy();
|
||||
int clearroi();
|
||||
int clientversion();
|
||||
int clkdiv();
|
||||
int clkfreq();
|
||||
@ -77,7 +76,6 @@ class InferAction {
|
||||
int exptime1();
|
||||
int exptime2();
|
||||
int exptime3();
|
||||
int exptimel();
|
||||
int extrastoragecells();
|
||||
int extsampling();
|
||||
int extsamplingsrc();
|
||||
@ -187,7 +185,6 @@ class InferAction {
|
||||
int reg();
|
||||
int resetdacs();
|
||||
int resetfpga();
|
||||
int roi();
|
||||
int romode();
|
||||
int row();
|
||||
int runclk();
|
||||
@ -373,7 +370,6 @@ class InferAction {
|
||||
{"chipversion", &InferAction::chipversion},
|
||||
{"clearbit", &InferAction::clearbit},
|
||||
{"clearbusy", &InferAction::clearbusy},
|
||||
{"clearroi", &InferAction::clearroi},
|
||||
{"clientversion", &InferAction::clientversion},
|
||||
{"clkdiv", &InferAction::clkdiv},
|
||||
{"clkfreq", &InferAction::clkfreq},
|
||||
@ -411,7 +407,6 @@ class InferAction {
|
||||
{"exptime1", &InferAction::exptime1},
|
||||
{"exptime2", &InferAction::exptime2},
|
||||
{"exptime3", &InferAction::exptime3},
|
||||
{"exptimel", &InferAction::exptimel},
|
||||
{"extrastoragecells", &InferAction::extrastoragecells},
|
||||
{"extsampling", &InferAction::extsampling},
|
||||
{"extsamplingsrc", &InferAction::extsamplingsrc},
|
||||
@ -524,7 +519,6 @@ class InferAction {
|
||||
{"reg", &InferAction::reg},
|
||||
{"resetdacs", &InferAction::resetdacs},
|
||||
{"resetfpga", &InferAction::resetfpga},
|
||||
{"roi", &InferAction::roi},
|
||||
{"romode", &InferAction::romode},
|
||||
{"row", &InferAction::row},
|
||||
{"runclk", &InferAction::runclk},
|
||||
|
Reference in New Issue
Block a user