Skip to content

Commit

Permalink
warn that the multi id is ignored in config file? or throw?
Browse files Browse the repository at this point in the history
  • Loading branch information
thattil committed Feb 21, 2025
1 parent 7494e41 commit a63a7ee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions slsDetectorSoftware/src/Detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,15 @@ void Detector::loadParameters(const std::string &fname) {
void Detector::loadParameters(const std::vector<std::string> &parameters) {
Caller caller(this);
CmdParser parser;
const int detShmId = getShmId();
for (const auto &current_line : parameters) {
parser.Parse(current_line);
int m_id = parser.multi_id();
if (m_id != detShmId) {
LOG(logWARNING)
<< "Ignoring multi-detector index [" + std::to_string(m_id) +
"] in config file. Maybe for 'config' command?";
}
caller.call(parser.command(), parser.arguments(), parser.detector_id(),
defs::PUT_ACTION, std::cout, parser.receiver_id());
}
Expand Down

0 comments on commit a63a7ee

Please sign in to comment.