mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 14:27:13 +02:00
merge conflict fix
This commit is contained in:
@ -784,6 +784,7 @@ class CmdProxy {
|
||||
{"trimen", &CmdProxy::TrimEnergies},
|
||||
{"gappixels", &CmdProxy::GapPixels},
|
||||
{"fliprows", &CmdProxy::fliprows},
|
||||
{"master", &CmdProxy::master},
|
||||
|
||||
/* acquisition parameters */
|
||||
{"acquire", &CmdProxy::Acquire},
|
||||
@ -942,6 +943,7 @@ class CmdProxy {
|
||||
{"pulsechip", &CmdProxy::PulseChip},
|
||||
{"quad", &CmdProxy::Quad},
|
||||
{"datastream", &CmdProxy::DataStream},
|
||||
{"top", &CmdProxy::top},
|
||||
|
||||
/* Jungfrau Specific */
|
||||
{"chipversion", &CmdProxy::chipversion},
|
||||
@ -1109,7 +1111,6 @@ class CmdProxy {
|
||||
/* acquisition parameters */
|
||||
std::string Acquire(int action);
|
||||
std::string Exptime(int action);
|
||||
std::string DynamicRange(int action);
|
||||
std::string ReadoutSpeed(int action);
|
||||
std::string Adcphase(int action);
|
||||
std::string Dbitphase(int action);
|
||||
@ -1281,6 +1282,12 @@ class CmdProxy {
|
||||
"interfaces must be set to 2. slsReceiver and slsDetectorGui "
|
||||
"does not handle.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID_GET(
|
||||
master, getMaster, setMaster, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger] Sets half module to master and "
|
||||
"others to slaves.\n\t[Gotthard][Gotthard2][Mythen3][Eiger] "
|
||||
"Gets if the current module/ half module is master.");
|
||||
|
||||
/* acquisition parameters */
|
||||
|
||||
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||
@ -1328,7 +1335,7 @@ class CmdProxy {
|
||||
dr, getDynamicRange, setDynamicRange, StringTo<int>,
|
||||
"[value]\n\tDynamic Range or number of bits per "
|
||||
"pixel in detector.\n\t"
|
||||
"[Eiger] Options: 4, 8, 16, 32. If set to 32, also sets "
|
||||
"[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets "
|
||||
"clkdivider to 2, else to 0.\n\t"
|
||||
"[Mythen3] Options: 8, 16, 32\n\t"
|
||||
"[Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16");
|
||||
@ -1901,6 +1908,10 @@ class CmdProxy {
|
||||
"start of acquisition. 0 complete reset, 1 partial reset. Default is "
|
||||
"complete reset. Advanced function!");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
top, getTop, setTop, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger] Sets half module to top (1), else bottom.");
|
||||
|
||||
/* Jungfrau Specific */
|
||||
|
||||
GET_COMMAND(chipversion, getChipVersion,
|
||||
|
@ -298,6 +298,23 @@ void Detector::setFlipRows(bool value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setFlipRows, pos, value);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getMaster(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::isMaster, pos);
|
||||
}
|
||||
|
||||
void Detector::setMaster(bool master, int pos) {
|
||||
// multi mod, set slaves first
|
||||
if (master && size() > 1) {
|
||||
if (pos == -1) {
|
||||
throw RuntimeError("Master can be set only to a single module");
|
||||
}
|
||||
pimpl->Parallel(&Module::setMaster, {}, false);
|
||||
pimpl->Parallel(&Module::setMaster, {pos}, master);
|
||||
} else {
|
||||
pimpl->Parallel(&Module::setMaster, {pos}, master);
|
||||
}
|
||||
}
|
||||
|
||||
Result<bool> Detector::isVirtualDetectorServer(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::isVirtualDetectorServer, pos);
|
||||
}
|
||||
@ -387,7 +404,7 @@ void Detector::setDynamicRange(int value) {
|
||||
std::vector<int> Detector::getDynamicRangeList() const {
|
||||
switch (getDetectorType().squash()) {
|
||||
case defs::EIGER:
|
||||
return std::vector<int>{4, 8, 16, 32};
|
||||
return std::vector<int>{4, 8, 12, 16, 32};
|
||||
case defs::MYTHEN3:
|
||||
return std::vector<int>{8, 16, 32};
|
||||
default:
|
||||
@ -1507,6 +1524,14 @@ void Detector::setDataStream(const defs::portPosition port, const bool enable,
|
||||
pimpl->Parallel(&Module::setDataStream, pos, port, enable);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getTop(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getTop, pos);
|
||||
}
|
||||
|
||||
void Detector::setTop(bool value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setTop, pos, value);
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
Result<double> Detector::getChipVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getChipVersion, pos);
|
||||
@ -1826,10 +1851,6 @@ Detector::getGateDelayForAllGates(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getGateDelayForAllGates, pos);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getMaster(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::isMaster, pos);
|
||||
}
|
||||
|
||||
Result<int> Detector::getChipStatusRegister(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getChipStatusRegister, pos);
|
||||
}
|
||||
|
@ -509,6 +509,13 @@ void Module::setFlipRows(bool value) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Module::isMaster() const { return sendToDetectorStop<int>(F_GET_MASTER); }
|
||||
|
||||
void Module::setMaster(const bool master) {
|
||||
sendToDetector(F_SET_MASTER, static_cast<int>(master), nullptr);
|
||||
sendToDetectorStop(F_SET_MASTER, static_cast<int>(master), nullptr);
|
||||
}
|
||||
|
||||
bool Module::isVirtualDetectorServer() const {
|
||||
return sendToDetector<int>(F_IS_VIRTUAL);
|
||||
}
|
||||
@ -1673,6 +1680,14 @@ void Module::setDataStream(const portPosition port, const bool enable) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Module::getTop() const {
|
||||
return (static_cast<bool>(sendToDetector<int>(F_GET_TOP)));
|
||||
}
|
||||
|
||||
void Module::setTop(bool value) {
|
||||
sendToDetector(F_SET_TOP, static_cast<int>(value), nullptr);
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
double Module::getChipVersion() const {
|
||||
return (sendToDetector<int>(F_GET_CHIP_VERSION)) / 10.00;
|
||||
@ -2197,8 +2212,6 @@ std::array<time::ns, 3> Module::getGateDelayForAllGates() const {
|
||||
return sendToDetector<std::array<time::ns, 3>>(F_GET_GATE_DELAY_ALL_GATES);
|
||||
}
|
||||
|
||||
bool Module::isMaster() const { return sendToDetectorStop<int>(F_GET_MASTER); }
|
||||
|
||||
int Module::getChipStatusRegister() const {
|
||||
return sendToDetector<int>(F_GET_CSR);
|
||||
}
|
||||
|
@ -120,6 +120,9 @@ class Module : public virtual slsDetectorDefs {
|
||||
int setTrimEn(const std::vector<int> &energies = {});
|
||||
bool getFlipRows() const;
|
||||
void setFlipRows(bool value);
|
||||
bool isMaster() const;
|
||||
void setMaster(const bool master);
|
||||
|
||||
bool isVirtualDetectorServer() const;
|
||||
|
||||
/**************************************************
|
||||
@ -184,6 +187,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setDBITPipeline(int value);
|
||||
int getReadNRows() const;
|
||||
void setReadNRows(const int value);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* Acquisition *
|
||||
@ -365,6 +369,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setQuad(const bool enable);
|
||||
bool getDataStream(const portPosition port) const;
|
||||
void setDataStream(const portPosition port, const bool enable);
|
||||
bool getTop() const;
|
||||
void setTop(bool value);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
@ -456,7 +462,6 @@ class Module : public virtual slsDetectorDefs {
|
||||
int64_t getGateDelay(int gateIndex) const;
|
||||
void setGateDelay(int gateIndex, int64_t value);
|
||||
std::array<time::ns, 3> getGateDelayForAllGates() const;
|
||||
bool isMaster() const;
|
||||
int getChipStatusRegister() const;
|
||||
void setGainCaps(int caps);
|
||||
int getGainCaps();
|
||||
|
Reference in New Issue
Block a user