mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
added the other gain modes
This commit is contained in:
@ -414,7 +414,15 @@ typedef struct {
|
||||
|
||||
enum vetoAlgorithm { DEFAULT_ALGORITHM };
|
||||
|
||||
enum gainMode { NORMAL_GAIN_MODE, FORCE_SWITCH_G1, FORCE_SWITCH_G2 };
|
||||
enum gainMode {
|
||||
NORMAL_GAIN_MODE,
|
||||
FORCE_SWITCH_G1,
|
||||
FORCE_SWITCH_G2,
|
||||
FIX_G1,
|
||||
FIX_G2,
|
||||
FIX_G0,
|
||||
FIX_HG0
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
|
@ -587,6 +587,14 @@ std::string ToString(const defs::gainMode s) {
|
||||
return std::string("forceswitchg1");
|
||||
case defs::FORCE_SWITCH_G2:
|
||||
return std::string("forceswitchg2");
|
||||
case defs::FIX_G1:
|
||||
return std::string("fixg1");
|
||||
case defs::FIX_G2:
|
||||
return std::string("fixg2");
|
||||
case defs::FIX_G0:
|
||||
return std::string("fixg0");
|
||||
case defs::FIX_HG0:
|
||||
return std::string("fixhg0");
|
||||
default:
|
||||
return std::string("Unknown");
|
||||
}
|
||||
@ -982,6 +990,14 @@ template <> defs::gainMode StringTo(const std::string &s) {
|
||||
return defs::FORCE_SWITCH_G1;
|
||||
if (s == "forceswitchg2")
|
||||
return defs::FORCE_SWITCH_G2;
|
||||
if (s == "fixg1")
|
||||
return defs::FIX_G1;
|
||||
if (s == "fixg2")
|
||||
return defs::FIX_G2;
|
||||
if (s == "fixg0")
|
||||
return defs::FIX_G0;
|
||||
if (s == "fixhg0")
|
||||
return defs::FIX_HG0;
|
||||
throw sls::RuntimeError("Unknown gain mode " + s);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user