Project
Loading...
Searching...
No Matches
SpyService.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#include "SpyService.h"
12#include <uv.h>
17#include "SpyServiceHelpers.h"
18
19#include <string>
20#include <string_view>
21
22namespace o2::framework
23{
25 : mRegistry{registry},
26 mDeviceState{deviceState}
27{
29}
30
32{
33 return new ServiceSpec{
34 .name = "spy",
35 .init = [](ServiceRegistryRef services, DeviceState& state, fair::mq::ProgOptions& options) -> ServiceHandle {
36 return ServiceHandle{TypeIdHelpers::uniqueId<SpyService>(), new SpyService(services, state)};
37 },
39 .preSendingMessages = [](ServiceRegistryRef registry, fair::mq::Parts& parts, ChannelIndex channelIndex) {
40 auto &spy = registry.get<SpyService>();
41 spy.parts = &parts;
42 spy.partsAlive = false;
43
44 auto loop = registry.get<DeviceState>().loop;
46
47 if (renderer->guiConnected && uv_now(loop) > spy.enableAfter) {
48 LOG(info) << "Sending Policy uv_run";
49 registry.get<SpyService>().partsAlive = true;
50 uv_run(loop, UV_RUN_DEFAULT);
51 } },
52 .postRenderGUI = [](ServiceRegistryRef registry) { SpyServiceHelpers::webGUI(registry); },
53 .kind = ServiceKind::Serial};
54};
55
56} // namespace o2::framework
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h renderer
SurfaceTrackState state
static void webGUI(ServiceRegistryRef registry)
SpyService(ServiceRegistryRef registry, DeviceState &deviceState)
fair::mq::Parts * parts
Definition SpyService.h:40
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
static ServiceConfigureCallback noConfiguration()
Running state information of a given device.
Definition DeviceState.h:34
std::string name
Name of the service.
auto create() -> ServiceSpec *final
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"