mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
gotthard2: changed order of burst mode enums, added a 4th burst mode cw internal burst mode
This commit is contained in:
@ -391,9 +391,10 @@ typedef struct {
|
||||
* burst mode for gotthard2
|
||||
*/
|
||||
enum burstMode {
|
||||
BURST_OFF,
|
||||
BURST_INTERNAL,
|
||||
BURST_EXTERNAL,
|
||||
CONTINUOUS_INTERNAL,
|
||||
CONTINUOUS_EXTERNAL,
|
||||
NUM_BURST_MODES
|
||||
};
|
||||
|
||||
@ -437,7 +438,7 @@ typedef struct {
|
||||
uint32_t adc10gMask{0};
|
||||
ROI roi;
|
||||
uint32_t countermask{0};
|
||||
burstMode burstType{BURST_OFF};
|
||||
burstMode burstType{BURST_INTERNAL};
|
||||
int64_t expTime1Ns{0};
|
||||
int64_t expTime2Ns{0};
|
||||
int64_t expTime3Ns{0};
|
||||
|
@ -555,12 +555,14 @@ std::string ToString(const std::vector<defs::dacIndex> &vec) {
|
||||
|
||||
std::string ToString(const defs::burstMode s) {
|
||||
switch (s) {
|
||||
case defs::BURST_OFF:
|
||||
return std::string("off");
|
||||
case defs::BURST_INTERNAL:
|
||||
return std::string("internal");
|
||||
return std::string("burst_internal");
|
||||
case defs::BURST_EXTERNAL:
|
||||
return std::string("external");
|
||||
return std::string("burst_external");
|
||||
case defs::CONTINUOUS_INTERNAL:
|
||||
return std::string("cw_internal");
|
||||
case defs::CONTINUOUS_EXTERNAL:
|
||||
return std::string("cw_external");
|
||||
default:
|
||||
return std::string("Unknown");
|
||||
}
|
||||
@ -918,12 +920,14 @@ template <> defs::dacIndex StringTo(const std::string &s) {
|
||||
}
|
||||
|
||||
template <> defs::burstMode StringTo(const std::string &s) {
|
||||
if (s == "off")
|
||||
return defs::BURST_OFF;
|
||||
if (s == "internal")
|
||||
if (s == "burst_internal")
|
||||
return defs::BURST_INTERNAL;
|
||||
if (s == "external")
|
||||
if (s == "burst_external")
|
||||
return defs::BURST_EXTERNAL;
|
||||
if (s == "cw_internal")
|
||||
return defs::CONTINUOUS_INTERNAL;
|
||||
if (s == "cw_external")
|
||||
return defs::CONTINUOUS_EXTERNAL;
|
||||
throw sls::RuntimeError("Unknown burst mode " + s);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user