mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
WIP
This commit is contained in:
parent
1f549d51fa
commit
2f61764fd7
@ -950,6 +950,7 @@ class Detector {
|
||||
/** [CTB] Value between 0-63 */
|
||||
void setExternalSamplingSource(int value, Positions pos = {});
|
||||
|
||||
// TODO! does any of them need the option to take positions
|
||||
/** [CTB] */
|
||||
uint32_t getADCInvert() const;
|
||||
|
||||
@ -957,13 +958,62 @@ class Detector {
|
||||
void setADCInvert(uint32_t value);
|
||||
|
||||
/** [CTB]*/
|
||||
uint32_t getADCEnableMask(int detPos = -1);
|
||||
uint32_t getADCEnableMask() const;
|
||||
|
||||
/** [CTB]*/
|
||||
void setADCEnableMask(uint32_t mask);
|
||||
|
||||
/** [CTB]*/
|
||||
uint32_t getADCEnableMask() const;
|
||||
/** [Gotthard] */
|
||||
Result<int> getCounterBit(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard] possible values? */
|
||||
void setCounterBit(int i, Positions pos = {});
|
||||
|
||||
/**
|
||||
* [Gotthard] startACQ = 1 to start acq after resetting counter
|
||||
* TODO! does it make sense to call one detector?
|
||||
*
|
||||
*/
|
||||
void resetCounterBlock(int startACQ = 0, Positions pos = {});
|
||||
|
||||
// TODO getROI, setROI, verifyMinMaxROI
|
||||
|
||||
// writeCounterBlockFile
|
||||
|
||||
void loadImageToDetector(defs::imageType index, const std::string &fname,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Gotthard]
|
||||
* @param value 1 to set or 0 to clear the digital test bit -1?
|
||||
*/
|
||||
Result<int> digitalTest(defs::digitalTestMode mode, int ival = -1,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Eiger] */
|
||||
void setFlowControl10G(bool enable, Positions pos = {});
|
||||
|
||||
/** [Eiger] */
|
||||
Result<bool> getFlowControl10G(Positions pos = {}) const;
|
||||
|
||||
Result<int64_t>
|
||||
getReceiverRealUDPSocketBufferSize(Positions pos = {}) const;
|
||||
|
||||
Result<int64_t> getReceiverUDPSocketBufferSize(Positions pos = {}) const;
|
||||
|
||||
void setReceiverUDPSocketBufferSize(int64_t udpsockbufsize,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Moench] TODO! How do we do this best??? Can be refactored to something
|
||||
* else? Use a generic zmq message passing system...
|
||||
* For now limiting to all detectors working the same*/
|
||||
int setDetectorMode(defs::detectorModeType value);
|
||||
int setFrameMode(defs::frameModeType value);
|
||||
int setDetectorMinMaxEnergyThreshold(const int index, int value);
|
||||
|
||||
void setAdditionalJsonHeader(const std::string &jsonheader,
|
||||
Positions pos = {});
|
||||
|
||||
Result<std::string> getAdditionalJsonHeader(Positions pos = {}) const;
|
||||
};
|
||||
|
||||
} // namespace sls
|
@ -1297,7 +1297,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
std::string setAdditionalJsonParameter(const std::string &key,
|
||||
const std::string &value,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the additional json header parameter value
|
||||
@ -1307,7 +1307,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* empty if no parameter found in additional json header
|
||||
*/
|
||||
std::string getAdditionalJsonParameter(const std::string &key,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Sets the detector minimum/maximum energy threshold in processor (for
|
||||
@ -1318,7 +1318,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* error in computing json parameter value)
|
||||
*/
|
||||
int setDetectorMinMaxEnergyThreshold(const int index, int value,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Sets the frame mode in processor (Moench only)
|
||||
@ -1345,21 +1345,21 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @returns receiver udp socket buffer size
|
||||
*/
|
||||
int64_t setReceiverUDPSocketBufferSize(int64_t udpsockbufsize = -1,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP socket buffer size
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP socket buffer size
|
||||
*/
|
||||
int64_t getReceiverUDPSocketBufferSize(int detPos = -1);
|
||||
int64_t getReceiverUDPSocketBufferSize(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver real UDP socket buffer size
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver real UDP socket buffer size
|
||||
*/
|
||||
int64_t getReceiverRealUDPSocketBufferSize(int detPos = -1);
|
||||
int64_t getReceiverRealUDPSocketBufferSize(int detPos = -1); //
|
||||
|
||||
/** (users only)
|
||||
* Set 10GbE Flow Control (Eiger)
|
||||
@ -1367,7 +1367,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns 10GbE flow Control
|
||||
*/
|
||||
int setFlowControl10G(int enable = -1, int detPos = -1);
|
||||
int setFlowControl10G(int enable = -1, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Execute a digital test (Gotthard)
|
||||
@ -1385,7 +1385,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void loadImageToDetector(imageType index, const std::string &fname,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Writes the counter memory block from the detector (Gotthard)
|
||||
@ -1401,7 +1401,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param startACQ is 1 to start acquisition after resetting counter
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void resetCounterBlock(int startACQ = 0, int detPos = -1);
|
||||
void resetCounterBlock(int startACQ = 0, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Set/get counter bit in detector (Gotthard)
|
||||
@ -1410,7 +1410,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the counter bit in detector
|
||||
*/
|
||||
int setCounterBit(int i = -1, int detPos = -1);
|
||||
int setCounterBit(int i = -1, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Ensures that min is less than max in both dimensions (Gotthard)
|
||||
|
@ -366,15 +366,18 @@ void Detector::setNumberOfCycles(int64_t value) {
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfStorageCells() const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, {}, defs::STORAGE_CELL_NUMBER, -1);
|
||||
return pimpl->Parallel(&slsDetector::setTimer, {},
|
||||
defs::STORAGE_CELL_NUMBER, -1);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfStorageCells(int64_t value) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, {}, defs::STORAGE_CELL_NUMBER, value);
|
||||
pimpl->Parallel(&slsDetector::setTimer, {}, defs::STORAGE_CELL_NUMBER,
|
||||
value);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfAnalogSamples(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::ANALOG_SAMPLES, -1);
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::ANALOG_SAMPLES,
|
||||
-1);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfAnalogSamples(int64_t value, Positions pos) {
|
||||
@ -382,7 +385,8 @@ void Detector::setNumberOfAnalogSamples(int64_t value, Positions pos) {
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfDigitalSamples(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::DIGITAL_SAMPLES, -1);
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::DIGITAL_SAMPLES,
|
||||
-1);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfDigitalSamples(int64_t value, Positions pos) {
|
||||
@ -800,8 +804,8 @@ void Detector::setExternalSamplingSource(int value, Positions pos) {
|
||||
}
|
||||
|
||||
uint32_t Detector::getADCInvert() const {
|
||||
auto res = pimpl->Parallel(&slsDetector::getADCInvert, {});
|
||||
return res.tsquash("Different Values for function getADCInvert");
|
||||
return pimpl->Parallel(&slsDetector::getADCInvert, {})
|
||||
.tsquash("Different Values for function getADCInvert");
|
||||
}
|
||||
|
||||
void Detector::setADCInvert(uint32_t value) {
|
||||
@ -817,4 +821,72 @@ void Detector::setADCEnableMask(uint32_t mask) {
|
||||
pimpl->Parallel(&slsDetector::setADCEnableMask, {}, mask);
|
||||
}
|
||||
|
||||
Result<int> Detector::getCounterBit(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setCounterBit, pos, -1);
|
||||
}
|
||||
|
||||
void Detector::setCounterBit(int i, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setCounterBit, pos, i);
|
||||
}
|
||||
|
||||
void Detector::resetCounterBlock(int startACQ, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::resetCounterBlock, pos, startACQ);
|
||||
}
|
||||
|
||||
void Detector::loadImageToDetector(defs::imageType index,
|
||||
const std::string &fname, Positions pos) {
|
||||
// TODO! optimize away multiple loads
|
||||
pimpl->Parallel(&slsDetector::loadImageToDetector, pos, index, fname);
|
||||
}
|
||||
|
||||
Result<int> Detector::digitalTest(defs::digitalTestMode mode, int ival,
|
||||
Positions pos) {
|
||||
return pimpl->Parallel(&slsDetector::digitalTest, pos, mode, ival);
|
||||
}
|
||||
|
||||
void Detector::setFlowControl10G(bool enable, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setDetectorNetworkParameter, pos,
|
||||
defs::FLOW_CONTROL_10G, static_cast<int>(enable));
|
||||
}
|
||||
|
||||
Result<bool> Detector::getFlowControl10G(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setDetectorNetworkParameter, pos,
|
||||
defs::FLOW_CONTROL_10G, -1);
|
||||
}
|
||||
|
||||
Result<int64_t>
|
||||
Detector::getReceiverRealUDPSocketBufferSize(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverRealUDPSocketBufferSize,
|
||||
pos);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getReceiverUDPSocketBufferSize(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverUDPSocketBufferSize, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverUDPSocketBufferSize(int64_t udpsockbufsize,
|
||||
Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverUDPSocketBufferSize, pos,
|
||||
udpsockbufsize);
|
||||
}
|
||||
|
||||
int Detector::setDetectorMode(defs::detectorModeType value) {
|
||||
return pimpl->setDetectorMode(value);
|
||||
}
|
||||
int Detector::setFrameMode(defs::frameModeType value) {
|
||||
return pimpl->setFrameMode(value);
|
||||
}
|
||||
int Detector::setDetectorMinMaxEnergyThreshold(const int index, int value) {
|
||||
return pimpl->setDetectorMinMaxEnergyThreshold(index, value);
|
||||
}
|
||||
|
||||
void Detector::setAdditionalJsonHeader(const std::string &jsonheader,
|
||||
Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setAdditionalJsonHeader, pos, jsonheader);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getAdditionalJsonHeader(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getAdditionalJsonHeader, pos);
|
||||
}
|
||||
|
||||
} // namespace sls
|
Loading…
x
Reference in New Issue
Block a user