gotthard2: first edit

This commit is contained in:
2020-01-20 12:13:23 +01:00
parent 6e47f0b7f7
commit 6cfd0f8962
17 changed files with 322 additions and 53 deletions

View File

@ -788,6 +788,7 @@ class CmdProxy {
{"vetophoton", &CmdProxy::VetoPhoton},
{"vetoref", &CmdProxy::VetoReference},
{"burstmode", &CmdProxy::burstmode},
{"bursttype", &CmdProxy::bursttype},
/* Mythen3 Specific */
{"counters", &CmdProxy::Counters},
@ -1547,6 +1548,9 @@ class CmdProxy {
INTEGER_COMMAND(burstmode, getBurstMode, setBurstMode, std::stoi,
"[0, 1]\n\t[Gotthard2] 1 sets to burst mode. 0 sets to continuous mode. Default is burst mode.");
INTEGER_COMMAND(bursttype, getBurstType, setBurstType, sls::StringTo<slsDetectorDefs::burstModeType>,
"[internal, external]\n\t[Gotthard2] Default is internal type.");
/* Mythen3 Specific */
/* CTB Specific */

View File

@ -1180,13 +1180,21 @@ void Detector::setVetoReference(const int gainIndex, const int value, Positions
pimpl->Parallel(&slsDetector::setVetoReference, pos, gainIndex, value);
}
Result<bool> Detector::getBurstMode(Positions pos) {
return pimpl->Parallel(&slsDetector::getBurstMode, pos);
}
void Detector::setBurstMode(bool enable, Positions pos) {
pimpl->Parallel(&slsDetector::setBurstMode, pos, enable);
}
Result<bool> Detector::getBurstMode(Positions pos) {
return pimpl->Parallel(&slsDetector::getBurstMode, pos);
}
Result<defs::burstModeType> Detector::getBurstType(Positions pos) {
return pimpl->Parallel(&slsDetector::getBurstType, pos);
}
void Detector::setBurstType(defs::burstModeType value, Positions pos) {
pimpl->Parallel(&slsDetector::setBurstType, pos, value);
}
// Mythen3 Specific

View File

@ -2488,6 +2488,19 @@ void slsDetector::setBurstMode(bool enable) {
sendToDetector(F_SET_BURST_MODE, arg, nullptr);
}
slsDetectorDefs::burstModeType slsDetector::getBurstType() {
int retval = -1;
sendToDetector(F_GET_BURST_TYPE, nullptr, retval);
FILE_LOG(logDEBUG1) << "Burst mode:" << retval;
return static_cast<burstModeType>(retval);
}
void slsDetector::setBurstType (burstModeType val) {
int arg = static_cast<int>(val);
FILE_LOG(logDEBUG1) << "Setting burst type to " << ToString(val);
sendToDetector(F_SET_BURST_TYPE, arg, nullptr);
}
int slsDetector::setCounterBit(int cb) {
int retval = -1;
FILE_LOG(logDEBUG1) << "Sending counter bit " << cb;

View File

@ -1125,12 +1125,18 @@ class slsDetector : public virtual slsDetectorDefs {
void setVetoReference(const int gainIndex, const int value);
/** [Gotthard2] burst mode or continuous mode */
void setBurstMode(bool enable);
/** [Gotthard2] */
bool getBurstMode();
/** [Gotthard2] true = burst mode or false = continuous mode */
void setBurstMode(bool enable);
/** [Gotthard2] */
burstModeType getBurstType();
/** [Gotthard2] Options: INTERNAL, EXTERNAL */
void setBurstType(burstModeType val);
/**
* Set/get counter bit in detector (Gotthard)
* @param i is -1 to get, 0 to reset and any other value to set the counter