1 #include "otsdaq/ARTDAQSupervisor/ARTDAQSupervisorTRACEController.h"
4 ots::ARTDAQSupervisorTRACEController::ARTDAQSupervisorTRACEController() {}
6 ots::ITRACEController::HostTraceLevelMap ots::ARTDAQSupervisorTRACEController::GetTraceLevels()
8 HostTraceLevelMap output;
11 auto commanders = theSupervisor_->makeCommandersFromProcessInfo();
13 for(
auto& comm : commanders)
15 if(output.count(comm.first.host) == 0)
17 auto lvlstring = comm.second->send_trace_get(
"ALL");
18 auto lvls = ARTDAQSupervisor::tokenize_(lvlstring);
22 std::istringstream iss(lvl);
24 uint64_t lvlM, lvlS, lvlT;
26 iss >> name >> lvlM >> lvlS >> lvlT;
28 output[comm.first.host][name].M = lvlM;
29 output[comm.first.host][name].S = lvlS;
30 output[comm.first.host][name].T = lvlT;
39 void ots::ARTDAQSupervisorTRACEController::SetTraceLevelMask(std::string trace_name, TraceMasks
const& lvl, std::string host)
43 auto commanders = theSupervisor_->makeCommandersFromProcessInfo();
45 for(
auto& comm : commanders)
47 if(comm.first.host == host)
49 comm.second->send_trace_set(trace_name,
"M", std::to_string(lvl.M));
50 comm.second->send_trace_set(trace_name,
"S", std::to_string(lvl.S));
51 comm.second->send_trace_set(trace_name,
"T", std::to_string(lvl.T));