mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-26 05:31:36 +00:00
fix(device): print --print-channels and --version output to stdout
- DeviceRunner sets the console log severity to "nolog" for both options, but printed their output with LOGV(info), so both options printed nothing - Add Device::PrintRegisteredChannels(std::ostream&) for the machine-readable channel list; the version goes to std::cout, like --help and --print-options - Enable DeviceRunner.PrintChannels and DeviceRunner.Version - Update the documentation pages that described the defect, and the source line links into the changed files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <functional>
|
||||
#include <memory> // unique_ptr
|
||||
#include <mutex>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
@@ -360,6 +361,15 @@ class Device
|
||||
return ok;
|
||||
}
|
||||
|
||||
/// @brief Print the registered channels in a machine-readable format
|
||||
/// @param os output stream, one line per channel: <name>:<min sub-channels>:<max sub-channels>
|
||||
void PrintRegisteredChannels(std::ostream& os) const
|
||||
{
|
||||
for (const auto& c : fChannelRegistry) {
|
||||
os << c.first << ":" << c.second.first << ":" << c.second.second << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
void PrintRegisteredChannels()
|
||||
{
|
||||
if (fChannelRegistry.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user