mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
jf: timing info decoder (#987)
* timing_info_decoder command with options swissfel (default) and shine. added to python, command line generation, autocomplete, tostring, tests.
This commit is contained in:
@ -679,6 +679,17 @@ std::string ToString(const defs::polarity s) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string ToString(const defs::timingInfoDecoder s) {
|
||||
switch (s) {
|
||||
case defs::SWISSFEL:
|
||||
return std::string("swissfel");
|
||||
case defs::SHINE:
|
||||
return std::string("shine");
|
||||
default:
|
||||
return std::string("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
std::string ToString(const defs::collectionMode s) {
|
||||
switch (s) {
|
||||
case defs::HOLE:
|
||||
@ -1115,6 +1126,14 @@ template <> defs::polarity StringTo(const std::string &s) {
|
||||
throw RuntimeError("Unknown polarity mode " + s);
|
||||
}
|
||||
|
||||
template <> defs::timingInfoDecoder StringTo(const std::string &s) {
|
||||
if (s == "swissfel")
|
||||
return defs::SWISSFEL;
|
||||
if (s == "shine")
|
||||
return defs::SHINE;
|
||||
throw RuntimeError("Unknown Timing Info Decoder " + s);
|
||||
}
|
||||
|
||||
template <> defs::collectionMode StringTo(const std::string &s) {
|
||||
if (s == "hole")
|
||||
return defs::HOLE;
|
||||
|
Reference in New Issue
Block a user