diff --git a/slsDetectorSoftware/src/CallerSpecial.cpp b/slsDetectorSoftware/src/CallerSpecial.cpp index 341a63400..0dc3e72f8 100644 --- a/slsDetectorSoftware/src/CallerSpecial.cpp +++ b/slsDetectorSoftware/src/CallerSpecial.cpp @@ -485,14 +485,10 @@ std::string Caller::trimen(int action) { auto t = det->getTrimEnergies(std::vector{det_id}); os << OutString(t) << '\n'; } else if (action == defs::PUT_ACTION) { - std::vector t(args.size()); - if (!args.empty()) { - for (size_t i = 0; i < t.size(); ++i) { - t[i] = StringTo(args[i]); - } - } + // accepts both "4500 5400" and "4500,5400", empty list clears + auto t = StringTo>(join(args, ',')); det->setTrimEnergies(t, std::vector{det_id}); - os << ToString(args) << '\n'; + os << ToString(t) << '\n'; } else { throw RuntimeError("Unknown action"); }