mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 22:07:12 +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:
@ -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);
|
||||
|
Reference in New Issue
Block a user