accept comma separated rx_dbitlist#1463
Conversation
| item.erase(std::remove_if(item.begin(), item.end(), | ||
| [](char c) { | ||
| return c == '[' || c == ']' || c == '"' || | ||
| c == ' '; |
There was a problem hiding this comment.
Should we throw if start of string is [ and end is not closing ] ?
There was a problem hiding this comment.
We could but then we need to keep track of which symbols we found. I'm not sure it's needed but can be convinced.
| } | ||
| if (std::any_of(args.cbegin(), args.cend(), [](std::string s) { | ||
| return (StringTo<int>(s) < 0 || StringTo<int>(s) > 2); | ||
| //convert args to string and then to a vector of ints |
There was a problem hiding this comment.
Update the help string in both commands - such that it includes comma seperated values and list
| int val = StringTo<int>(args[i]); | ||
| for (auto val : counters) { | ||
| // already enabled earlier | ||
| if (mask & (1 << val)) { |
There was a problem hiding this comment.
Maybe add the end use: os << ToString(counters) << '\n'; instead of args. Returns what you actually set.
| t = StringTo<std::vector<int>>(ToString(args)); | ||
| } | ||
| det->setRxDbitList(t, std::vector<int>{det_id}); | ||
| os << ToString(args) << '\n'; |
There was a problem hiding this comment.
Also here ToString(t)
AliceMazzoleni99
left a comment
There was a problem hiding this comment.
Looks good. I think there is still an issue with command trimen and threshold for mythen. Also update the Release Notes.
PR included fix to github actions needed for conda build to work
https://github.com/slsdetectorgroup/aare/pull/309
Actual change to detector software:
Open question should we do a get, reformat args or just print what the user put in?