mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-11-18 17:24:04 +01:00
updated trimen
This commit is contained in:
1 parent
7d0ce1820e
commit
f19b176465
1 file changed
+3
-7
@@ -485,14 +485,10 @@ std::string Caller::trimen(int action) {
|
||||
auto t = det->getTrimEnergies(std::vector<int>{det_id});
|
||||
os << OutString(t) << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
std::vector<int> t(args.size());
|
||||
if (!args.empty()) {
|
||||
for (size_t i = 0; i < t.size(); ++i) {
|
||||
t[i] = StringTo<int>(args[i]);
|
||||
}
|
||||
}
|
||||
// accepts both "4500 5400" and "4500,5400", empty list clears
|
||||
auto t = StringTo<std::vector<int>>(join(args, ','));
|
||||
det->setTrimEnergies(t, std::vector<int>{det_id});
|
||||
os << ToString(args) << '\n';
|
||||
os << ToString(t) << '\n';
|
||||
} else {
|
||||
throw RuntimeError("Unknown action");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user