mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
WIP
This commit is contained in:
parent
d9be3250ad
commit
0a34192a8d
@ -1141,13 +1141,13 @@ class Detector {
|
|||||||
void setCounterBit(bool value, Positions pos = {});
|
void setCounterBit(bool value, Positions pos = {});
|
||||||
|
|
||||||
/** [Gotthard, CTB] subset modules not allowed */
|
/** [Gotthard, CTB] subset modules not allowed */
|
||||||
Result<std::vector<defs::ROI>> getROI(Positions pos = {}) const;
|
//Result<std::vector<defs::ROI>> getROI(Positions pos = {}) const;
|
||||||
/**
|
/**
|
||||||
* [Gotthard Options: Only a single chip or all chips, only 1 ROI allowed]
|
* [Gotthard Options: Only a single chip or all chips, only 1 ROI allowed]
|
||||||
* [CTB: multiple ROIs allowed]
|
* [CTB: multiple ROIs allowed]
|
||||||
* subset modules not allowed
|
* subset modules not allowed
|
||||||
*/
|
*/
|
||||||
void setROI(std::vector<defs::ROI> value, Positions pos = {});
|
//void setROI(std::vector<defs::ROI> value, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB]*/
|
/** [CTB]*/
|
||||||
Result<uint32_t> getADCEnableMask(Positions pos = {}) const;
|
Result<uint32_t> getADCEnableMask(Positions pos = {}) const;
|
||||||
@ -1188,13 +1188,65 @@ class Detector {
|
|||||||
/** [Gotthard][Jungfrau][CTB] not possible to read back*/
|
/** [Gotthard][Jungfrau][CTB] not possible to read back*/
|
||||||
void writeAdcRegister(uint32_t addr, uint32_t value, Positions pos = {});
|
void writeAdcRegister(uint32_t addr, uint32_t value, Positions pos = {});
|
||||||
|
|
||||||
|
/** [Eiger] */
|
||||||
|
Result<bool> getActive(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/** [Eiger] */
|
||||||
|
void setActive(bool active, Positions pos = {});
|
||||||
|
|
||||||
|
/** [Eiger] */
|
||||||
|
Result<bool> getBottom(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/** [Eiger] for gui purposes */
|
||||||
|
void setBottom(bool value, Positions pos = {});
|
||||||
|
|
||||||
|
/** [Eiger]
|
||||||
|
* @returns -1 if they are all different
|
||||||
|
*/
|
||||||
|
Result<int> getAllTrimbits(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**[Eiger] */
|
||||||
|
void setAllTrimbits(int value, Positions pos = {});
|
||||||
|
|
||||||
|
/**[Eiger] */
|
||||||
|
Result<bool> getGapPixelsEnable(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [Eiger]
|
||||||
|
* 4 bit mode not implemented in Receiver, but in client data call back
|
||||||
|
* Fills in gap pixels in data
|
||||||
|
*/
|
||||||
|
void setGapPixelsEnable(bool enable);
|
||||||
|
|
||||||
|
/**[Eiger] Returns energies in eV where the module is trimmed */
|
||||||
|
Result<std::vector<int>> getTrimEnergies(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/** [Eiger] Set the energies where the detector is trimmed */
|
||||||
|
void setTrimEnergies(std::vector<int> energies, Positions pos = {});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [Eiger] Pulse Pixel n times at x and y coordinates
|
||||||
|
*/
|
||||||
|
void pulsePixel(int n, int x, int y, Positions pos = {});
|
||||||
|
|
||||||
|
/** [Eiger] Pulse Pixel n times and move by a relative value of x and y coordinates */
|
||||||
|
void pulsePixelNMove(int n, int x, int y, Positions pos = {});
|
||||||
|
|
||||||
|
/** [Eiger] Pulse chip n times */
|
||||||
|
void pulseChip(int n, Positions pos = {});
|
||||||
|
|
||||||
|
|
||||||
|
/** [Eiger] */
|
||||||
|
Result<bool> getRxPadDeactivatedMod(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [Eiger] Set deactivated Receiver padding mode
|
||||||
|
*/
|
||||||
|
void setRxPadDeactivatedMod(bool pad, Positions pos = {});
|
||||||
|
|
||||||
|
|
||||||
Result<int64_t> getReceiverUDPSocketBufferSize(Positions pos = {}) const;
|
Result<int64_t> getReceiverUDPSocketBufferSize(Positions pos = {}) const;
|
||||||
|
|
||||||
void setReceiverUDPSocketBufferSize(int64_t udpsockbufsize,
|
void setReceiverUDPSocketBufferSize(int64_t udpsockbufsize,
|
||||||
Positions pos = {});
|
Positions pos = {});
|
||||||
Result<int64_t>
|
Result<int64_t>
|
||||||
@ -1466,64 +1518,19 @@ class Detector {
|
|||||||
|
|
||||||
Result<int> getThresholdTemperature(Positions pos = {}) const;
|
Result<int> getThresholdTemperature(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Eiger] */
|
|
||||||
void pulseChip(int n, Positions pos = {});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [Eiger] Pulse Pixel and move by a relative value
|
|
||||||
* @param n is number of times to pulse
|
|
||||||
* @param x is relative x value
|
|
||||||
* @param y is relative y value
|
|
||||||
*/
|
|
||||||
void pulsePixelNMove(int n, int x, int y, Positions pos = {});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [Eiger] Pulse Pixel
|
|
||||||
* @param n is number of times to pulse
|
|
||||||
* @param x is x coordinate
|
|
||||||
* @param y is y coordinate
|
|
||||||
* @param detPos -1 for all detectors in list or specific detector position
|
|
||||||
*/
|
|
||||||
void pulsePixel(int n, int x, int y, Positions pos = {});
|
|
||||||
|
|
||||||
/**[Eiger] Returns energies in eV where the module is trimmed */
|
|
||||||
Result<std::vector<int>> getTrimEn(Positions pos = {}) const;
|
|
||||||
|
|
||||||
/** [Eiger] Set the energies where the detector is trimmed */
|
|
||||||
void setTrimEn(std::vector<int> energies, Positions pos = {});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [Eiger] not 4 bit mode
|
|
||||||
* Fills in gap pixels in data
|
|
||||||
*/
|
|
||||||
void setGapPixelsEnable(bool enable, Positions pos = {});
|
|
||||||
|
|
||||||
Result<bool> getGapPixelEnable(Positions pos = {}) const;
|
|
||||||
|
|
||||||
/**[Eiger] */
|
|
||||||
void setAllTrimbits(int value, Positions pos = {});
|
|
||||||
|
|
||||||
/** [Eiger] TODO! only Eiger? */
|
|
||||||
void setFlippedData(defs::dimension d, bool flipped, Positions pos = {});
|
|
||||||
|
|
||||||
Result<bool> getFlippedData(defs::dimension d, Positions pos = {}) const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [Eiger] Set deactivated Receiver padding mode
|
|
||||||
* @param padding padding option for deactivated receiver. Can be true
|
|
||||||
* (padding), false (no padding)
|
|
||||||
*/
|
|
||||||
void setRxPadDeactivatedMod(bool pad, Positions pos = {});
|
|
||||||
|
|
||||||
Result<bool> getRxPadDeactivatedMod(Positions pos = {}) const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [Eiger] Activates/Deactivates the detector
|
|
||||||
* @param true = active or false inactive
|
|
||||||
*/
|
|
||||||
void setActive(bool active, Positions pos = {});
|
|
||||||
|
|
||||||
Result<bool> getActive(Positions pos = {}) const;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1124,7 +1124,7 @@ Result<bool> Detector::getCounterBit(Positions pos) const {
|
|||||||
void Detector::setCounterBit(bool value, Positions pos) {
|
void Detector::setCounterBit(bool value, Positions pos) {
|
||||||
pimpl->Parallel(&slsDetector::setCounterBit, pos, value);
|
pimpl->Parallel(&slsDetector::setCounterBit, pos, value);
|
||||||
}
|
}
|
||||||
|
/*TODO:
|
||||||
Result<std::vector<defs::ROI>> Detector::getROI(Positions pos) const {
|
Result<std::vector<defs::ROI>> Detector::getROI(Positions pos) const {
|
||||||
int n = 0;
|
int n = 0;
|
||||||
if (pos.empty() || (pos.size() == 1 && pos[0] == -1)) {
|
if (pos.empty() || (pos.size() == 1 && pos[0] == -1)) {
|
||||||
@ -1150,7 +1150,7 @@ void Detector::setROI(std::vector<defs::ROI> value, Positions pos) {
|
|||||||
} else {
|
} else {
|
||||||
pimpl->Parallel(&slsDetector::setROI, pos, static_cast<int>(value.size()), value.data());
|
pimpl->Parallel(&slsDetector::setROI, pos, static_cast<int>(value.size()), value.data());
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
Result<uint32_t> Detector::getADCEnableMask(Positions pos) const {
|
Result<uint32_t> Detector::getADCEnableMask(Positions pos) const {
|
||||||
return pimpl->Parallel(&slsDetector::getADCEnableMask, pos);
|
return pimpl->Parallel(&slsDetector::getADCEnableMask, pos);
|
||||||
@ -1204,11 +1204,68 @@ void Detector::writeAdcRegister(uint32_t addr, uint32_t value, Positions pos) {
|
|||||||
pimpl->Parallel(&slsDetector::writeAdcRegister, pos, addr, value);
|
pimpl->Parallel(&slsDetector::writeAdcRegister, pos, addr, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result<bool> Detector::getActive(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::activate, pos, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setActive(bool active, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::activate, pos, static_cast<int>(active));
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<bool> Detector::getBottom(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::getFlippedData, pos, defs::X);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setBottom(bool value, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::setFlippedData, pos, defs::X, static_cast<int>(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<int> Detector::getAllTrimbits(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::setAllTrimbits, pos, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setAllTrimbits(int value, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::setAllTrimbits, pos, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<bool> Detector::getGapPixelsEnable(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::enableGapPixels, pos, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setGapPixelsEnable(bool enable) {
|
||||||
|
pimpl->setGapPixelsEnable(enable, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<std::vector<int>> Detector::getTrimEnergies(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::getTrimEn, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setTrimEnergies(std::vector<int> energies, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::setTrimEn, pos, energies);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::pulsePixel(int n, int x, int y, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::pulsePixel, pos, n, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::pulsePixelNMove(int n, int x, int y, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::pulsePixelNMove, pos, n, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::pulseChip(int n, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::pulseChip, pos, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Result<bool> Detector::getRxPadDeactivatedMod(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::setDeactivatedRxrPaddingMode, pos, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setRxPadDeactivatedMod(bool pad, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::setDeactivatedRxrPaddingMode, pos,
|
||||||
|
static_cast<int>(pad));
|
||||||
|
}
|
||||||
|
|
||||||
Result<int64_t> Detector::getReceiverUDPSocketBufferSize(Positions pos) const {
|
Result<int64_t> Detector::getReceiverUDPSocketBufferSize(Positions pos) const {
|
||||||
return pimpl->Parallel(&slsDetector::getReceiverUDPSocketBufferSize, pos);
|
return pimpl->Parallel(&slsDetector::getReceiverUDPSocketBufferSize, pos);
|
||||||
@ -1531,63 +1588,18 @@ Result<int> Detector::getThresholdTemperature(Positions pos) const {
|
|||||||
return pimpl->Parallel(&slsDetector::setThresholdTemperature, pos, -1);
|
return pimpl->Parallel(&slsDetector::setThresholdTemperature, pos, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Detector::pulseChip(int n, Positions pos) {
|
|
||||||
pimpl->Parallel(&slsDetector::pulseChip, pos, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::pulsePixelNMove(int n, int x, int y, Positions pos) {
|
|
||||||
pimpl->Parallel(&slsDetector::pulsePixelNMove, pos, n, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::pulsePixel(int n, int x, int y, Positions pos) {
|
|
||||||
pimpl->Parallel(&slsDetector::pulsePixel, pos, n, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<std::vector<int>> Detector::getTrimEn(Positions pos) const {
|
|
||||||
return pimpl->Parallel(&slsDetector::getTrimEn, pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::setTrimEn(std::vector<int> energies, Positions pos) {
|
|
||||||
pimpl->Parallel(&slsDetector::setTrimEn, pos, energies);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::setGapPixelsEnable(bool enable, Positions pos) {
|
|
||||||
pimpl->setGapPixelsEnable(enable, pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<bool> Detector::getGapPixelEnable(Positions pos) const {
|
|
||||||
return pimpl->Parallel(&slsDetector::enableGapPixels, pos, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::setAllTrimbits(int value, Positions pos) {
|
|
||||||
pimpl->Parallel(&slsDetector::setAllTrimbits, pos, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::setFlippedData(defs::dimension d, bool flipped, Positions pos) {
|
|
||||||
pimpl->Parallel(&slsDetector::setFlippedData, pos, d,
|
|
||||||
static_cast<int>(flipped));
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<bool> Detector::getFlippedData(defs::dimension d, Positions pos) const {
|
|
||||||
return pimpl->Parallel(&slsDetector::getFlippedData, pos, d);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::setRxPadDeactivatedMod(bool pad, Positions pos) {
|
|
||||||
pimpl->Parallel(&slsDetector::setDeactivatedRxrPaddingMode, pos,
|
|
||||||
static_cast<int>(pad));
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<bool> Detector::getRxPadDeactivatedMod(Positions pos) const {
|
|
||||||
return pimpl->Parallel(&slsDetector::setDeactivatedRxrPaddingMode, pos, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::setActive(bool active, Positions pos) {
|
|
||||||
pimpl->Parallel(&slsDetector::activate, pos, static_cast<int>(active));
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<bool> Detector::getActive(Positions pos) const {
|
|
||||||
return pimpl->Parallel(&slsDetector::activate, pos, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user