mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +02:00
WIP
This commit is contained in:
parent
c34190f9f2
commit
6080e90bbb
@ -193,7 +193,7 @@ class Detector {
|
|||||||
* Get Detector type as an enum
|
* Get Detector type as an enum
|
||||||
* @returns detector type
|
* @returns detector type
|
||||||
*/
|
*/
|
||||||
defs::detectorType getDetectorTypeAsEnum() const;
|
defs::detectorType getDetectorType() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Detector type as an enum
|
* Get Detector type as an enum
|
||||||
@ -411,7 +411,8 @@ class Detector {
|
|||||||
* @param tb 1 to include trimbits, 0 to exclude
|
* @param tb 1 to include trimbits, 0 to exclude
|
||||||
* @param pos detector position
|
* @param pos detector position
|
||||||
*/
|
*/
|
||||||
void setThresholdEnergy(int value, defs::detectorSettings sett = defs::GET_SETTINGS,
|
void setThresholdEnergy(int value,
|
||||||
|
defs::detectorSettings sett = defs::GET_SETTINGS,
|
||||||
int tb = 1, Positions pos = {});
|
int tb = 1, Positions pos = {});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -444,6 +445,57 @@ class Detector {
|
|||||||
*/
|
*/
|
||||||
void saveSettingsFile(const std::string &value, Positions pos = {});
|
void saveSettingsFile(const std::string &value, Positions pos = {});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Detector run status
|
||||||
|
* @param pos detector position
|
||||||
|
* @returns status
|
||||||
|
*/
|
||||||
|
Result<defs::runStatus> getRunStatus(Positions pos = {});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepares detector for acquisition (Eiger)
|
||||||
|
*/
|
||||||
|
void prepareAcquisition();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start detector acquisition (Non blocking)
|
||||||
|
*/
|
||||||
|
void startAcquisition();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop detector acquisition
|
||||||
|
*/
|
||||||
|
void stopAcquisition();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Give an internal software trigger to the detector (Eiger only)
|
||||||
|
* @param pos detector position
|
||||||
|
*/
|
||||||
|
void sendSoftwareTrigger(Positions pos = {});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start detector acquisition and read all data (Blocking until end of
|
||||||
|
* acquisition)
|
||||||
|
*/
|
||||||
|
void startAndReadAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start readout (without exposure or interrupting exposure) (Eiger store in
|
||||||
|
* ram)
|
||||||
|
*/
|
||||||
|
void startReadOut();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests and receives all data from the detector (Eiger store in ram)
|
||||||
|
*/
|
||||||
|
void readAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures in detector the destination for UDP packets
|
||||||
|
* @param pos detector position
|
||||||
|
*/
|
||||||
|
void configureMAC(Positions pos = {});
|
||||||
|
|
||||||
// Erik
|
// Erik
|
||||||
|
|
||||||
Result<int> getFramesCaughtByReceiver(Positions pos = {}) const;
|
Result<int> getFramesCaughtByReceiver(Positions pos = {}) const;
|
||||||
|
@ -157,7 +157,7 @@ void Detector::setHostname(const std::vector<std::string> &value) {
|
|||||||
pimpl->setHostname(value);
|
pimpl->setHostname(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
defs::detectorType Detector::getDetectorTypeAsEnum() const {
|
defs::detectorType Detector::getDetectorType() const {
|
||||||
return pimpl->getDetectorTypeAsEnum();
|
return pimpl->getDetectorTypeAsEnum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,7 +290,8 @@ Result<int> Detector::getThresholdEnergy(Positions pos) const {
|
|||||||
return pimpl->Parallel(&slsDetector::getThresholdEnergy, pos);
|
return pimpl->Parallel(&slsDetector::getThresholdEnergy, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Detector::setThresholdEnergy(int value, defs::detectorSettings sett, int tb, Positions pos) {
|
void Detector::setThresholdEnergy(int value, defs::detectorSettings sett,
|
||||||
|
int tb, Positions pos) {
|
||||||
pimpl->Parallel(&slsDetector::setThresholdEnergy, pos, value, sett, tb);
|
pimpl->Parallel(&slsDetector::setThresholdEnergy, pos, value, sett, tb);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,6 +311,48 @@ void Detector::saveSettingsFile(const std::string &value, Positions pos) {
|
|||||||
pimpl->Parallel(&slsDetector::saveSettingsFile, pos, value);
|
pimpl->Parallel(&slsDetector::saveSettingsFile, pos, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result<defs::runStatus> Detector::getRunStatus(Positions pos) {
|
||||||
|
return pimpl->Parallel(&slsDetector::getRunStatus, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::prepareAcquisition() {
|
||||||
|
pimpl->Parallel(&slsDetector::prepareAcquisition, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::startAcquisition() {
|
||||||
|
if (getDetectorType() == defs::EIGER) {
|
||||||
|
prepareAcquisition();
|
||||||
|
}
|
||||||
|
pimpl->Parallel(&slsDetector::startAcquisition, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::stopAcquisition() {
|
||||||
|
pimpl->Parallel(&slsDetector::stopAcquisition, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::sendSoftwareTrigger(Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::sendSoftwareTrigger, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::startAndReadAll() {
|
||||||
|
if (getDetectorType() == defs::EIGER) {
|
||||||
|
prepareAcquisition();
|
||||||
|
}
|
||||||
|
pimpl->Parallel(&slsDetector::startAndReadAll, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::startReadOut() {
|
||||||
|
pimpl->Parallel(&slsDetector::startReadOut, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::readAll() {
|
||||||
|
pimpl->Parallel(&slsDetector::readAll, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::configureMAC(Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::configureMAC, pos);
|
||||||
|
}
|
||||||
|
|
||||||
// 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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user