mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 00:37:12 +02:00
M3badchannels (#526)
* badchannels for m3 and modify for g2 (file from single and multi) * m3: invert polarity of bit 7 and 11 signals from setmodule, allow commas in bad channel file * badchannel file can take commas, colons and comments (also taking care of spaces at the end of channel numbers) * tests 'badchannels' and 'Channel file reading' added, removing duplicates in badchannel list, defining macro for num counters in client side * fix segfault when list from file is empty, * fix tests assertion for ctbconfig (adding message) for c++11 * fixed badchannels in m3server (clocking in trimming) * badchannel tests can be run from any folder (finds the file)
This commit is contained in:
@ -540,6 +540,32 @@ std::string CmdProxy::GapPixels(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string CmdProxy::BadChannels(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[fname]\n\t[Gotthard2][Mythen3] Sets the bad channels (from "
|
||||
"file of bad channel numbers) to be masked out."
|
||||
"\n\t[Mythen3] Also does trimming"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (args.size() != 1) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
det->getBadChannels(args[0], std::vector<int>{det_id});
|
||||
os << "successfully retrieved" << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
if (args.size() != 1) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
det->setBadChannels(args[0], std::vector<int>{det_id});
|
||||
os << "successfully loaded" << '\n';
|
||||
} else {
|
||||
throw RuntimeError("Unknown action");
|
||||
}
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* acquisition parameters */
|
||||
|
||||
std::string CmdProxy::Exptime(int action) {
|
||||
@ -2320,31 +2346,6 @@ std::string CmdProxy::ConfigureADC(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string CmdProxy::BadChannels(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[fname]\n\t[Gotthard2] Sets the bad channels (from file of bad "
|
||||
"channel numbers) to be masked out."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (args.size() != 1) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
det->getBadChannels(args[0], std::vector<int>{det_id});
|
||||
os << "successfully retrieved" << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
if (args.size() != 1) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
det->setBadChannels(args[0], std::vector<int>{det_id});
|
||||
os << "successfully loaded" << '\n';
|
||||
} else {
|
||||
throw RuntimeError("Unknown action");
|
||||
}
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* Mythen3 Specific */
|
||||
|
||||
std::string CmdProxy::Counters(int action) {
|
||||
|
Reference in New Issue
Block a user