This commit is contained in:
Erik Frojdh
2019-08-08 17:13:02 +02:00
parent ce9f76d017
commit d1d730b779
3 changed files with 124 additions and 17 deletions

View File

@ -295,28 +295,32 @@ class Detector {
void setReadNLines(const int value, Positions pos = {}); void setReadNLines(const int value, Positions pos = {});
/** /**
* Get Detector Control TCP port (for client communication with Detector control server) * Get Detector Control TCP port (for client communication with Detector
* control server)
* @param pos detector position * @param pos detector position
* @returns control TCP port * @returns control TCP port
*/ */
Result<int> getControlPort(Positions pos = {}) const; Result<int> getControlPort(Positions pos = {}) const;
/** /**
* Set Detector Control TCP port (for client communication with Detector control server) * Set Detector Control TCP port (for client communication with Detector
* control server)
* @param value port number * @param value port number
* @param pos detector position * @param pos detector position
*/ */
void setControlPort(int value, Positions pos = {}); void setControlPort(int value, Positions pos = {});
/** /**
* Get Detector Stop TCP port (for client communication with Detector Stop server) * Get Detector Stop TCP port (for client communication with Detector Stop
* server)
* @param pos detector position * @param pos detector position
* @returns Stop TCP port * @returns Stop TCP port
*/ */
Result<int> getStopPort(Positions pos = {}) const; Result<int> getStopPort(Positions pos = {}) const;
/** /**
* Set Detector Stop TCP port (for client communication with Detector Stop server) * Set Detector Stop TCP port (for client communication with Detector Stop
* server)
* @param value port number * @param value port number
* @param pos detector position * @param pos detector position
*/ */
@ -336,7 +340,6 @@ class Detector {
*/ */
void setReceiverPort(int value, Positions pos = {}); void setReceiverPort(int value, Positions pos = {});
// Erik // Erik
Result<int> getFramesCaughtByReceiver(Positions pos = {}) const; Result<int> getFramesCaughtByReceiver(Positions pos = {}) const;
@ -563,7 +566,6 @@ class Detector {
void copyDetectorServer(const std::string &fname, void copyDetectorServer(const std::string &fname,
const std::string &hostname, Positions pos = {}); const std::string &hostname, Positions pos = {});
/** [not Eiger] */ /** [not Eiger] */
void resetFPGA(Positions pos = {}); void resetFPGA(Positions pos = {});
@ -578,7 +580,59 @@ class Detector {
Result<int> getStorageCellStart(Positions pos = {}) const; Result<int> getStorageCellStart(Positions pos = {}) const;
/** [Jungfrau] 1 there was an temperature event */
void setTemperatureEvent(int val, Positions pos = {});
/** [Jungfrau] */
Result<int> getTemperatureEvent(Positions pos = {}) const;
/** [Jungfrau] */
void setTemperatureControl(bool enable, Positions pos = {});
/** [Jungfrau] */
Result<bool> getTemperatureControl(Positions pos = {}) const;
/**
* [Jungfrau]Set threshold temperature
* @param val value in millidegrees TODO! Verify
*/
void setThresholdTemperature(int temp, Positions pos = {});
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;
}; };
} // namespace sls } // namespace sls

View File

@ -1601,7 +1601,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
* @returns number of trim energies * @returns number of trim energies
*/ */
int setTrimEn(std::vector<int> energies, int detPos = -1); int setTrimEn(std::vector<int> energies, int detPos = -1); //
/** /**
* Returns the number of trim energies and their value (Eiger) * Returns the number of trim energies and their value (Eiger)
@ -1609,7 +1609,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
* @returns vector of trim energies * @returns vector of trim energies
*/ */
std::vector<int> getTrimEn(int detPos = -1); std::vector<int> getTrimEn(int detPos = -1); //
/** /**
* Pulse Pixel (Eiger) * Pulse Pixel (Eiger)
@ -1618,7 +1618,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param y is y coordinate * @param y is y coordinate
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
*/ */
void pulsePixel(int n = 0, int x = 0, int y = 0, int detPos = -1); void pulsePixel(int n = 0, int x = 0, int y = 0, int detPos = -1); //
/** /**
* Pulse Pixel and move by a relative value (Eiger) * Pulse Pixel and move by a relative value (Eiger)
@ -1627,14 +1627,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param y is relative y value * @param y is relative y value
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
*/ */
void pulsePixelNMove(int n = 0, int x = 0, int y = 0, int detPos = -1); void pulsePixelNMove(int n = 0, int x = 0, int y = 0, int detPos = -1);//
/** /**
* Pulse Chip (Eiger) * Pulse Chip (Eiger)
* @param n is number of times to pulse * @param n is number of times to pulse
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
*/ */
void pulseChip(int n = 0, int detPos = -1); void pulseChip(int n = 0, int detPos = -1);//
/** /**
* Set/gets threshold temperature (Jungfrau) * Set/gets threshold temperature (Jungfrau)
@ -1642,7 +1642,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
* @returns threshold temperature in millidegrees * @returns threshold temperature in millidegrees
*/ */
int setThresholdTemperature(int val = -1, int detPos = -1); int setThresholdTemperature(int val = -1, int detPos = -1); //
/** /**
* Enables/disables temperature control (Jungfrau) * Enables/disables temperature control (Jungfrau)
@ -1650,7 +1650,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
* @returns temperature control enable * @returns temperature control enable
*/ */
int setTemperatureControl(int val = -1, int detPos = -1); int setTemperatureControl(int val = -1, int detPos = -1); //
/** /**
* Resets/ gets over-temperature event (Jungfrau) * Resets/ gets over-temperature event (Jungfrau)
@ -1658,7 +1658,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
* @returns over-temperature event * @returns over-temperature event
*/ */
int setTemperatureEvent(int val = -1, int detPos = -1); int setTemperatureEvent(int val = -1, int detPos = -1); //
/** /**
* Set storage cell that stores first acquisition of the series (Jungfrau) * Set storage cell that stores first acquisition of the series (Jungfrau)
@ -1666,7 +1666,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position * @param detPos -1 for all detectors in list or specific detector position
* @returns the storage cell that stores the first acquisition of the series * @returns the storage cell that stores the first acquisition of the series
*/ */
int setStoragecellStart(int pos = -1, int detPos = -1); int setStoragecellStart(int pos = -1, int detPos = -1);//
/** /**
* Programs FPGA with pof file (Not Eiger) * Programs FPGA with pof file (Not Eiger)

View File

@ -210,7 +210,8 @@ Result<defs::coordinates> Detector::getDetectorOffsets(Positions pos) const {
void Detector::setDetectorOffsets(defs::coordinates value, Positions pos) { void Detector::setDetectorOffsets(defs::coordinates value, Positions pos) {
pimpl->Parallel(&slsDetector::setDetectorOffsets, pos, value); pimpl->Parallel(&slsDetector::setDetectorOffsets, pos, value);
//pimpl->Parallel<defs::coordinates>(&slsDetector::setDetectorOffset, pos, value); // pimpl->Parallel<defs::coordinates>(&slsDetector::setDetectorOffset, pos,
// value);
} }
Result<bool> Detector::getQuad(Positions pos) const { Result<bool> Detector::getQuad(Positions pos) const {
@ -253,7 +254,6 @@ void Detector::setReceiverPort(int value, Positions pos) {
pimpl->Parallel(&slsDetector::setReceiverPort, pos, value); pimpl->Parallel(&slsDetector::setReceiverPort, pos, value);
} }
// Erik // Erik
Result<int> Detector::getFramesCaughtByReceiver(Positions pos) const { Result<int> Detector::getFramesCaughtByReceiver(Positions pos) const {
return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos); return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos);
@ -508,4 +508,57 @@ Result<int> Detector::getStorageCellStart(Positions pos) const {
return pimpl->Parallel(&slsDetector::setStoragecellStart, pos, -1); return pimpl->Parallel(&slsDetector::setStoragecellStart, pos, -1);
} }
void Detector::setTemperatureEvent(int val, Positions pos) {
pimpl->Parallel(&slsDetector::setTemperatureEvent, pos, val);
}
Result<int> Detector::getTemperatureEvent(Positions pos) const {
return pimpl->Parallel(&slsDetector::setTemperatureEvent, pos, -1);
}
void Detector::setTemperatureControl(bool enable, Positions pos) {
pimpl->Parallel(&slsDetector::setTemperatureControl, pos,
static_cast<int>(enable));
}
Result<bool> Detector::getTemperatureControl(Positions pos) const {
return pimpl->Parallel(&slsDetector::setTemperatureControl, pos, -1);
}
void Detector::setThresholdTemperature(int temp, Positions pos) {
pimpl->Parallel(&slsDetector::setThresholdTemperature, pos, temp);
}
Result<int> Detector::getThresholdTemperature(Positions pos) const {
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->Parallel(&slsDetector::enableGapPixels, pos, static_cast<int>(enable));
}
Result<bool> Detector::getGapPixelEnable(Positions pos) const{
return pimpl->Parallel(&slsDetector::enableGapPixels, pos, -1);
}
} // namespace sls } // namespace sls