28 bool hasNewMetric =
false;
29 std::array<Metric2DViewIndex*, 2> model = {&(*
mContext.
infos)[
mIndex].inputChannelMetricsViewIndex,
33 auto newMetricCallback = [&](std::string
const&
name,
MetricInfo const& metric,
int value,
size_t metricIndex) {
34 updateMetricsViews(model,
name, metric,
value, metricIndex);
37 std::string_view tokenSV(
frame,
s);
47 LOG(debug3) <<
"Data received: " << std::string_view(
frame,
s);
59 std::string_view
const token(
frame,
s);
60 std::match_results<std::string_view::const_iterator>
match;
65 LOG(debug2) <<
"Found configuration information for pid " <<
mPid;
67 LOG(
error) <<
"Unexpected control data: " << std::string_view(
frame,
s);
82 "Processing metrics from device %zu (had new metric: %d)",
96 statusHandler->sendUpdate(
mIndex);
99 std::fill(metricsInfo.changed.begin(), metricsInfo.changed.end(),
false);
102 "Done processing metrics from device %zu",
mIndex);
107 if (
headers.count(
"x-dpl-pid")) {
109 this->
mPid = std::stoi(
s->second);
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
char error[CURL_ERROR_SIZE]
#define O2_DECLARE_DYNAMIC_LOG(name)
#define O2_SIGNPOST_END(log, id, name, format,...)
#define O2_SIGNPOST_ID_GENERATE(name, log)
#define O2_SIGNPOST_START(log, id, name, format,...)
bool match(const std::vector< std::string > &queries, const char *pattern)
GLuint const GLchar * name
GLsizei const GLfloat * value
Defining ITS Vertex explicitly as messageable.
static bool parseControl(std::string_view const &s, std::match_results< std::string_view::const_iterator > &match)
static void processCommand(std::vector< DeviceInfo > &infos, std::vector< DataProcessingStates > &allStates, pid_t pid, std::string const &command, std::string const &arg)
size_t mIndex
The index of the remote process associated to this handler.
void headers(std::map< std::string, std::string > const &headers) override
ControlWebSocketHandler(DriverServerContext &context)
DriverServerContext & mContext
void frame(char const *frame, size_t s) override
static bool processConfig(ParsedConfigMatch &results, DeviceInfo &info)
static bool parseConfig(std::string_view const s, ParsedConfigMatch &results)
static bool parseMetric(std::string_view const s, ParsedMetricMatch &results)
Helper function to parse a metric string.
static bool processMetric(ParsedMetricMatch &results, DeviceMetricsInfo &info, NewMetricCallback newMetricCallback=nullptr)
std::vector< ServiceMetricHandling > * metricProcessingCallbacks
std::vector< DeviceSpec > * specs
std::vector< DeviceMetricsInfo > * metrics
std::vector< StatusWebSocketHandler * > statusHandlers
std::vector< DataProcessingStates > * states
std::vector< DeviceInfo > * infos
ServiceRegistryRef registry
static Updater getUpdater()
Get the right updated function given a list of Metric views.
Temporary struct to hold a configuration parameter.
Temporary struct to hold a metric after it has been parsed.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"