Project
Loading...
Searching...
No Matches
DriverInfo.h
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
12#ifndef O2_FRAMEWORK_DRIVERINFO_H_
13#define O2_FRAMEWORK_DRIVERINFO_H_
14
15#include <cstddef>
16#include <vector>
17
18#include <csignal>
19#include <sys/select.h>
20
30#include "DataProcessorInfo.h"
31#include "ResourcePolicy.h"
32
33namespace o2::framework
34{
35
36struct ConfigContext;
37
68enum struct DriverState {
69 INIT = 0,
70 SCHEDULE,
71 RUNNING,
72 REDEPLOY_GUI,
73 QUIT_REQUESTED,
74 HANDLE_CHILDREN,
75 EXIT,
76 UNKNOWN,
77 PERFORM_CALLBACKS,
78 MATERIALISE_WORKFLOW,
79 IMPORT_CURRENT_WORKFLOW,
80 DO_CHILD,
81 MERGE_CONFIGS,
82 BIND_GUI_PORT,
83 LAST
84};
85
88struct DriverInfo {
90 std::vector<DriverState> states;
91
92 // Signal handler for children
93 struct sigaction sa_handle_child;
94 bool sigintRequested;
95 bool sigchldRequested;
99 std::vector<ChannelConfigurationPolicy> channelPolicies;
102 std::vector<CompletionPolicy> completionPolicies;
105 std::vector<DispatchPolicy> dispatchPolicies;
106
109 std::vector<ResourcePolicy> resourcePolicies;
110
113 std::vector<SendingPolicy> sendingPolicies;
116 std::vector<ForwardingPolicy> forwardingPolicies;
118 int argc;
120 char** argv;
122 ProcessingPolicies processingPolicies;
124 std::vector<CallbacksPolicy> callbacksPolicies;
126 uint64_t startTime;
128 uint64_t startTimeMsFromEpoch;
131 double timeout;
134 std::string deployHostname;
138 std::string resources;
141 std::vector<DataProcessorInfo> processorInfo;
143 ConfigContext const* configContext;
145 float frameCost;
147 float frameLatency;
149 std::string uniqueWorkflowId = "";
151 unsigned short resourcesMonitoringInterval = 0;
153 unsigned short resourcesMonitoringDumpInterval = 0;
155 unsigned short port = 0;
157 LogParsingHelpers::LogLevel minFailureLevel = LogParsingHelpers::LogLevel::Fatal;
158
160 DeviceMetricsInfo metrics;
162 bool noSHMCleanup;
167 std::string defaultDriverClient = "invalid";
168
170 std::string lastError;
172 DriverMode mode = DriverMode::STANDALONE;
173};
174
175struct DriverInfoHelper {
176 static char const* stateToString(enum DriverState state);
177};
178
179} // namespace o2::framework
180
181#endif // O2_FRAMEWORK_DRIVERINFO_H_
benchmark::State & state
GLenum mode
Definition glcorearb.h:266
GLsizei GLenum const void GLuint GLsizei GLfloat * metrics
Definition glcorearb.h:5500
GLbitfield GLuint64 timeout
Definition glcorearb.h:1573
GLuint * states
Definition glcorearb.h:4932
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20