vetoalg added hits and raw

This commit is contained in:
2021-08-11 16:08:32 +02:00
parent 0dbb6ff512
commit 7a76064223
13 changed files with 120 additions and 77 deletions

View File

@ -608,8 +608,10 @@ std::string ToString(const defs::streamingInterface s) {
std::string ToString(const defs::vetoAlgorithm s) {
switch (s) {
case defs::DEFAULT_ALGORITHM:
return std::string("default");
case defs::ALG_HITS:
return std::string("hits");
case defs::ALG_RAW:
return std::string("raw");
default:
return std::string("Unknown");
}
@ -1014,8 +1016,10 @@ template <> defs::streamingInterface StringTo(const std::string &s) {
}
template <> defs::vetoAlgorithm StringTo(const std::string &s) {
if (s == "default")
return defs::DEFAULT_ALGORITHM;
if (s == "hits")
return defs::ALG_HITS;
if (s == "raw")
return defs::ALG_RAW;
throw sls::RuntimeError("Unknown veto algorithm " + s);
}