mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 00:07:13 +02:00
Removed Padding option for Deactivated half modules.
This commit is contained in:
@ -1669,50 +1669,6 @@ std::string CmdProxy::RateCorrection(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string CmdProxy::Activate(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[0, 1] [(optional) padding|nopadding]\n\t[Eiger] 1 is default. "
|
||||
"0 deactivates readout and does not send data. \n\tPadding will "
|
||||
"pad data files for deactivates readouts."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
WrongNumberOfParameters(0);
|
||||
}
|
||||
auto t = det->getActive(std::vector<int>{det_id});
|
||||
auto p = det->getRxPadDeactivatedMode(std::vector<int>{det_id});
|
||||
Result<std::string> pResult(p.size());
|
||||
for (unsigned int i = 0; i < p.size(); ++i) {
|
||||
pResult[i] = p[i] ? "padding" : "nopadding";
|
||||
}
|
||||
os << OutString(t) << ' ' << OutString(pResult) << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
if (args.empty() || args.size() > 2) {
|
||||
WrongNumberOfParameters(2);
|
||||
}
|
||||
int t = StringTo<int>(args[0]);
|
||||
det->setActive(t, std::vector<int>{det_id});
|
||||
os << args[0];
|
||||
if (args.size() == 2) {
|
||||
bool p = true;
|
||||
if (args[1] == "nopadding") {
|
||||
p = false;
|
||||
} else if (args[1] != "padding") {
|
||||
throw sls::RuntimeError(
|
||||
"Unknown argument for deactivated padding.");
|
||||
}
|
||||
det->setRxPadDeactivatedMode(p, std::vector<int>{det_id});
|
||||
os << ' ' << args[1];
|
||||
}
|
||||
os << '\n';
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown action");
|
||||
}
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string CmdProxy::PulsePixel(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
|
@ -925,7 +925,7 @@ class CmdProxy {
|
||||
{"interruptsubframe", &CmdProxy::interruptsubframe},
|
||||
{"measuredperiod", &CmdProxy::measuredperiod},
|
||||
{"measuredsubperiod", &CmdProxy::measuredsubperiod},
|
||||
{"activate", &CmdProxy::Activate},
|
||||
{"activate", &CmdProxy::activate},
|
||||
{"partialreset", &CmdProxy::partialreset},
|
||||
{"pulse", &CmdProxy::PulsePixel},
|
||||
{"pulsenmove", &CmdProxy::PulsePixelAndMove},
|
||||
@ -1131,7 +1131,6 @@ class CmdProxy {
|
||||
std::string ZMQHWM(int action);
|
||||
/* Eiger Specific */
|
||||
std::string RateCorrection(int action);
|
||||
std::string Activate(int action);
|
||||
std::string PulsePixel(int action);
|
||||
std::string PulsePixelAndMove(int action);
|
||||
std::string PulseChip(int action);
|
||||
@ -1857,6 +1856,11 @@ class CmdProxy {
|
||||
"[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured sub "
|
||||
"frame period between last sub frame and previous one.");
|
||||
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
activate, getActive, setActive, StringTo<int>,
|
||||
"[0, 1] \n\t[Eiger] 1 is default. 0 deactivates readout and does not send data.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
partialreset, getPartialReset, setPartialReset, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger] Sets up detector to do partial or complete reset at "
|
||||
|
@ -1430,13 +1430,6 @@ void Detector::setActive(const bool active, Positions pos) {
|
||||
pimpl->Parallel(&Module::setActivate, pos, active);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getRxPadDeactivatedMode(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getDeactivatedRxrPaddingMode, pos);
|
||||
}
|
||||
|
||||
void Detector::setRxPadDeactivatedMode(bool pad, Positions pos) {
|
||||
pimpl->Parallel(&Module::setDeactivatedRxrPaddingMode, pos, pad);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getPartialReset(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getCounterBit, pos);
|
||||
|
@ -1559,15 +1559,6 @@ void Module::setActivate(const bool enable) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Module::getDeactivatedRxrPaddingMode() const {
|
||||
return sendToReceiver<int>(F_GET_RECEIVER_DEACTIVATED_PADDING);
|
||||
}
|
||||
|
||||
void Module::setDeactivatedRxrPaddingMode(bool padding) {
|
||||
sendToReceiver(F_SET_RECEIVER_DEACTIVATED_PADDING,
|
||||
static_cast<int>(padding), nullptr);
|
||||
}
|
||||
|
||||
bool Module::getCounterBit() const {
|
||||
return (
|
||||
!static_cast<bool>(sendToDetector<int>(F_SET_COUNTER_BIT, GET_FLAG)));
|
||||
|
@ -349,8 +349,6 @@ class Module : public virtual slsDetectorDefs {
|
||||
int64_t getMeasuredSubFramePeriod() const;
|
||||
bool getActivate() const;
|
||||
void setActivate(const bool enable);
|
||||
bool getDeactivatedRxrPaddingMode() const;
|
||||
void setDeactivatedRxrPaddingMode(bool padding);
|
||||
bool getCounterBit() const;
|
||||
void setCounterBit(bool cb);
|
||||
void pulsePixel(int n = 0, int x = 0, int y = 0);
|
||||
|
Reference in New Issue
Block a user