Project
Loading...
Searching...
No Matches
AnalysisCCDBHelpers.cxx
Go to the documentation of this file.
1// Copyright 2019-2025 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#include "AnalysisCCDBHelpers.h"
13#include "CCDBFetcherHelper.h"
22#include "Framework/Output.h"
23#include "Framework/Signpost.h"
27#include <fairmq/Version.h>
28#include <arrow/array/builder_binary.h>
29#include <arrow/io/memory.h>
30#include <arrow/ipc/writer.h>
31#include <arrow/type.h>
32#include <arrow/type_fwd.h>
33#include <arrow/util/key_value_metadata.h>
34#include <arrow/table.h>
35#include <arrow/array.h>
36#include <arrow/builder.h>
37#include <fmt/base.h>
38#include <ctime>
39#include <memory>
40#include "CCDBPathTable.h"
41
42#include <string>
43#include <unordered_map>
44#include <vector>
45
47
48namespace o2::framework
49{
50// Fill valid routes. Notice that for analysis the timestamps are associated to
51// a ATIM table and there might be multiple CCDB objects of the same kind for
52// dataframe.
53// For this reason rather than matching the Lifetime::Condition, we match the
54// origin.
55namespace
56{
57void fillValidRoutes(CCDBFetcherHelper& helper, std::vector<o2::framework::OutputRoute> const& outputRoutes, std::unordered_map<std::string, int>& bindings)
58{
59 for (auto& route : outputRoutes) {
60 if (std::ranges::none_of(route.matcher.metadata, [](auto const& m) { return m.name.starts_with("ccdb:"); })) {
61 continue;
62 }
63 auto specStr = DataSpecUtils::describe(route.matcher);
64 if (bindings.find(specStr) != bindings.end()) {
65 continue;
66 }
67 bindings[specStr] = helper.routes.size();
68 helper.routes.push_back(route);
69 LOGP(info, "The following route needs condition objects {} ", DataSpecUtils::describe(route.matcher));
70 for (auto& metadata : route.matcher.metadata) {
71 if (metadata.type == VariantType::String) {
72 LOGP(info, "- {}: {}", metadata.name, metadata.defaultValue.asString());
73 }
74 }
75 }
76}
77} // namespace
78
80{
81 return adaptStateful([](ConfigParamRegistry const& options, DeviceSpec const& spec, InitContext& ic) {
82 auto& dec = ic.services().get<DanglingEdgesContext>();
83 // The effective default for each ccdb: option was already resolved at topology
84 // time by ArrowSupport (consulting task Configurables) and registered on this
85 // device's options. Here we just read the final value — honouring any further
86 // runtime override supplied via CLI or JSON config.
87 std::unordered_map<std::string, std::string> ccdbUrls;
88 std::unordered_map<std::string, std::string> runDependent;
89 for (auto& input : dec.analysisCCDBInputs) {
90 for (auto& m : input.metadata) {
91 if (m.name.starts_with("ccdb-run-dependent:")) {
92 runDependent.emplace(m.name, m.defaultValue.asString());
93 continue;
94 }
95 if (!m.name.starts_with("ccdb:") || ccdbUrls.count(m.name)) {
96 continue;
97 }
98 std::string url = m.defaultValue.asString();
99 if (ConfigParamsHelper::hasOption(spec.options, m.name)) {
100 url = options.get<std::string>(m.name.c_str());
101 }
102 LOGP(info, "CCDB path resolved for {}: {}", m.name, url);
103 ccdbUrls.emplace(m.name, std::move(url));
104 }
105 }
106 std::vector<std::shared_ptr<arrow::Schema>> schemas;
107 for (auto& input : dec.analysisCCDBInputs) {
108 auto schemaMetadata = std::make_shared<arrow::KeyValueMetadata>();
109 std::vector<std::shared_ptr<arrow::Field>> fields;
110 schemaMetadata->Append("outputRoute", DataSpecUtils::describe(input));
111 schemaMetadata->Append("outputBinding", input.binding);
112 for (auto& m : input.metadata) {
113 if (m.name.starts_with("input:")) {
114 auto name = m.name.substr(6);
115 schemaMetadata->Append("sourceTable", name);
116 schemaMetadata->Append("sourceMatcher", DataSpecUtils::describe(std::get<ConcreteDataMatcher>(DataSpecUtils::fromMetadataString(m.defaultValue.get<std::string>()).matcher)));
117 continue;
118 }
119 if (m.name == "timestamp-column" || m.name == "uniformity-column") {
120 schemaMetadata->Append(m.name, m.defaultValue.asString());
121 continue;
122 }
123 if (!m.name.starts_with("ccdb:")) {
124 continue;
125 }
126 auto fieldMetadata = std::make_shared<arrow::KeyValueMetadata>();
127 auto it = ccdbUrls.find(m.name);
128 fieldMetadata->Append("url", it != ccdbUrls.end() ? it->second : m.defaultValue.asString());
129 auto runDep = runDependent.find("ccdb-run-dependent:" + m.name.substr(strlen("ccdb:")));
130 fieldMetadata->Append("runDependent", runDep != runDependent.end() ? runDep->second : "0");
131 auto pos = m.name.rfind(std::string_view{"::"});
132 auto columnName = fmt::format("f{}", m.name.substr(pos + 2, m.name.size()));
133 fields.emplace_back(std::make_shared<arrow::Field>(columnName, soa::asArrowDataType<int64_t[3]>(), false, fieldMetadata));
134 }
135 schemas.emplace_back(std::make_shared<arrow::Schema>(fields, schemaMetadata));
136 }
137
138 // Parse the declared path mappings once; they are fixed for the run of the workflow.
139 std::vector<std::vector<PathTable>> pathTables;
140 for (auto const& schema : schemas) {
141 auto& tables = pathTables.emplace_back();
142 for (auto const& field : schema->fields()) {
143 tables.push_back(PathTable::parse(*field->metadata()->Get("url")));
144 }
145 }
146
147 std::vector<std::pair<uint32_t, std::shared_ptr<arrow::FixedSizeListBuilder>>> allbuilders;
148 allbuilders.resize([&schemas]() { size_t size = 0; for (auto& schema : schemas) { size += schema->num_fields(); }; return size; }());
149 auto* pool = arrow::default_memory_pool();
150
151 int idx = 0;
152 int sidx = 0;
153 for (auto const& schema : schemas) {
154 for (auto const& _ : schema->fields()) {
155 auto value_builder = std::make_shared<arrow::Int64Builder>();
156 allbuilders[idx] = std::make_pair(sidx, std::make_shared<arrow::FixedSizeListBuilder>(pool, std::move(value_builder), 3));
157 ++idx;
158 }
159 ++sidx;
160 }
161
162 std::shared_ptr<CCDBFetcherHelper> helper = std::make_shared<CCDBFetcherHelper>();
163 CCDBFetcherHelper::initialiseHelper(*helper, options);
164 std::unordered_map<std::string, int> bindings;
165 fillValidRoutes(*helper, spec.outputs, bindings);
166
167 return adaptStateless([schemas, bindings, helper, allbuilders, pathTables](InputRecord& inputs, DataTakingContext& dtc, DataAllocator& allocator, ArrowContext& arrowContext, TimingInfo& timingInfo, DataProcessingStats& stats) {
168 O2_SIGNPOST_ID_GENERATE(sid, ccdb);
169 O2_SIGNPOST_START(ccdb, sid, "fetchFromAnalysisCCDB", "Fetching CCDB objects for analysis%" PRIu64, (uint64_t)timingInfo.timeslice);
170 std::ranges::for_each(allbuilders, [](auto& builder) { builder.second->Reset(); });
171 for (auto i = 0U; i < schemas.size(); ++i) {
172 auto& schema = schemas[i];
173 std::vector<CCDBFetcherHelper::FetchOp> ops;
174 auto inputBinding = *schema->metadata()->Get("sourceTable");
175 auto outRouteDesc = *schema->metadata()->Get("outputRoute");
176 std::string outBinding = *schema->metadata()->Get("outputBinding");
177 auto timestampColumnName = schema->metadata()->Contains("timestamp-column") ? *schema->metadata()->Get("timestamp-column") : std::string{"fTimestamp"};
178 auto uniformityColumnName = schema->metadata()->Contains("uniformity-column") ? *schema->metadata()->Get("uniformity-column") : timestampColumnName;
179 O2_SIGNPOST_EVENT_EMIT_INFO(ccdb, sid, "fetchFromAnalysisCCDB",
180 "Fetching CCDB objects for %{public}s's columns with timestamps from %{public}s and putting them in route %{public}s",
181 outBinding.c_str(), inputBinding.c_str(), outRouteDesc.c_str());
182 // The timestamp and uniformity columns may live in different source tables (the
183 // run number is on aod::BCs, the timestamp on aod::Timestamps). Locate each by
184 // name across every declared source, and read them positionally.
185 std::shared_ptr<arrow::ChunkedArray> timestampColumn;
186 std::shared_ptr<arrow::ChunkedArray> uniformityColumn;
187 auto const& schemaKeys = schema->metadata()->keys();
188 auto const& schemaValues = schema->metadata()->values();
189 for (size_t mi = 0; mi < schemaKeys.size(); ++mi) {
190 if (schemaKeys[mi] != "sourceMatcher") {
191 continue;
192 }
193 auto sourceTable = inputs.get<TableConsumer>(DataSpecUtils::fromString(schemaValues[mi]))->asArrowTable();
194 if (auto column = sourceTable->GetColumnByName(timestampColumnName); column && !timestampColumn) {
195 timestampColumn = column;
196 }
197 if (auto column = sourceTable->GetColumnByName(uniformityColumnName); column && !uniformityColumn) {
198 uniformityColumn = column;
199 }
200 }
201 if (!timestampColumn) {
202 LOGP(fatal, "No source table of {} provides the timestamp column \"{}\"", outBinding, timestampColumnName);
203 }
204 if (!uniformityColumn) {
205 LOGP(fatal, "No source table of {} provides the uniformity column \"{}\"", outBinding, uniformityColumnName);
206 }
207 // Positional reading is only sound if the two sources are row-aligned; ASoA has
208 // no type-level way to state that, so it is checked here.
209 if (uniformityColumn->length() != timestampColumn->length()) {
210 LOGP(fatal, "Uniformity column \"{}\" has {} rows but timestamp column \"{}\" has {}; the two sources of {} are not row-aligned",
211 uniformityColumnName, uniformityColumn->length(), timestampColumnName, timestampColumn->length(), outBinding);
212 }
213 auto reserveSize = timestampColumn->length();
214 O2_SIGNPOST_EVENT_EMIT_INFO(ccdb, sid, "fetchFromAnalysisCCDB",
215 "There are %zu bindings available", bindings.size());
216 for (auto const& binding : bindings) {
217 O2_SIGNPOST_EVENT_EMIT_INFO(ccdb, sid, "fetchFromAnalysisCCDB",
218 "* %{public}s: %d",
219 binding.first.c_str(), binding.second);
220 }
221 int outputRouteIndex = bindings.at(outRouteDesc);
222 auto& spec = helper->routes[outputRouteIndex].matcher;
223 auto concrete = DataSpecUtils::asConcreteDataMatcher(spec);
224 Output output{concrete.origin, concrete.description, concrete.subSpec};
225 auto builders = allbuilders | std::views::filter([&i](auto const& builder) { return builder.first == i; });
226 unsigned int numBuilders = std::ranges::count_if(allbuilders, [&i](auto const& builder) { return builder.first == i; });
227 arrow::Status status;
228 std::ranges::for_each(builders, [&status, &reserveSize](auto& builder) {
229 if (reserveSize > builder.second->capacity()) {
230 status &= builder.second->Reserve(reserveSize - builder.second->capacity());
231 }
232 });
233 if (!status.ok()) {
234 throw framework::runtime_error_f("Failed to reserve arrays: ", status.ToString().c_str());
235 }
236
237 std::vector<DataAllocator::CacheId> lastIds(numBuilders, DataAllocator::CacheId{.value = -1, .handle = -1, .segment = -1});
238 std::vector<DataAllocator::CacheId> referenced;
239
240 // Rows sharing a uniformity value resolve to the same objects, so the query is
241 // issued once per distinct value and the resulting handles are repeated for the
242 // rest of the run. When uniformity is the timestamp itself (the default) the
243 // query is issued once per run of consecutive rows with the same timestamp.
244 std::vector<int64_t> uniformity;
245 bool const shortCircuit = uniformityColumn.get() != timestampColumn.get();
246 if (shortCircuit) {
247 uniformity.reserve(reserveSize);
248 for (auto uci = 0; uci < uniformityColumn->num_chunks(); ++uci) {
249 auto uchunk = uniformityColumn->chunk(uci);
250 auto const length = uchunk->data()->length;
251 switch (uchunk->type_id()) {
252 case arrow::Type::INT32:
253 for (int64_t ui = 0; ui < length; ++ui) {
254 uniformity.push_back(uchunk->data()->GetValuesSafe<int32_t>(1)[ui]);
255 }
256 break;
257 case arrow::Type::INT64:
258 case arrow::Type::UINT64:
259 for (int64_t ui = 0; ui < length; ++ui) {
260 uniformity.push_back(uchunk->data()->GetValuesSafe<int64_t>(1)[ui]);
261 }
262 break;
263 default:
264 LOGP(fatal, "Uniformity column \"{}\" of {} has unsupported arrow type {}",
265 uniformityColumnName, outBinding, uchunk->type()->ToString());
266 }
267 }
268 }
269 int64_t row = -1;
270 int64_t previousUniformity = 0;
271 bool haveResponses = false;
272 std::vector<CCDBFetcherHelper::Response> responses;
273
274 for (auto ci = 0; ci < timestampColumn->num_chunks(); ++ci) {
275 std::shared_ptr<arrow::Array> chunk = timestampColumn->chunk(ci);
276 auto const* timestamps = chunk->data()->GetValuesSafe<size_t>(1);
277
278 for (int64_t ri = 0; ri < chunk->data()->length; ri++) {
279 ++row;
280 ops.clear();
281 int64_t timestamp = timestamps[ri];
282 // Key the path lookup on the uniformity value; when uniformity is the
283 // timestamp itself the mapping expresses validity intervals instead.
284 int64_t const uniformityKey = shortCircuit ? uniformity[row] : timestamp;
285 bool const sameAsPrevious = haveResponses && uniformityKey == previousUniformity;
286 previousUniformity = uniformityKey;
287 int fi = 0;
288 for (auto& field : schema->fields()) {
289 auto const& url = pathTables[i][fi++].resolve(uniformityKey, field->name());
290 // Time to actually populate the blob
291 // A run-dependent object is queried with the run number rather than by
292 // timestamp alone. The run comes from the uniformity value, so the column's
293 // table has to be uniform in the run number for this to mean anything.
294 int const fieldRunDependent = field->metadata()->Contains("runDependent")
295 ? std::stoi(*field->metadata()->Get("runDependent"))
296 : 0;
297 if (fieldRunDependent != 0 && uniformityColumnName != "fRunNumber") {
298 LOGP(fatal, R"(Column "{}" of {} is declared run-dependent, but its table is uniform in "{}" rather than fRunNumber, so no run number is available to query with. Declare the table with DECLARE_SOA_UNIFORM_TABLE(..., aod::BCs, o2::aod::bc::RunNumber, ...).)",
299 field->name(), outBinding, uniformityColumnName);
300 }
301 ops.push_back({
302 .spec = spec,
303 .url = url,
304 .timestamp = timestamp,
305 .runNumber = fieldRunDependent != 0 ? static_cast<int>(uniformityKey) : 1,
306 .runDependent = fieldRunDependent,
307 .queryRate = 0,
308 });
309 }
310 if (!sameAsPrevious) {
311 responses = CCDBFetcherHelper::populateCacheWith(helper, ops, timingInfo, dtc, allocator);
312 haveResponses = true;
313 }
314 O2_SIGNPOST_START(ccdb, sid, "handlingResponses",
315 "Got %zu responses from server.",
316 responses.size());
317 if (numBuilders != responses.size()) {
318 LOGP(fatal, "Not enough responses (expected {}, found {})", numBuilders, responses.size());
319 }
320 arrow::Status result;
321
322 int bi = 0;
323 for (auto& builder : builders) {
324 auto& response = responses[bi];
325 auto& lastId = lastIds[bi];
326 if (response.id.value != lastId.value) {
327 lastId.value = response.id.value;
328 referenced.push_back(response.id);
329 }
330 result &= builder.second->Append();
331 auto* value_builder = dynamic_cast<arrow::Int64Builder*>(builder.second->value_builder());
332 result &= value_builder->Append(response.id.handle);
333 result &= value_builder->Append(response.id.segment);
334 result &= value_builder->Append(response.size);
335 ++bi;
336 }
337 if (!result.ok()) {
338 LOGP(fatal, "Error adding results from CCDB");
339 }
340 O2_SIGNPOST_END(ccdb, sid, "handlingResponses", "Done processing responses");
341 }
342 }
343 arrow::ArrayVector arrays;
344 std::ranges::for_each(builders, [&arrays](auto& builder) { arrays.push_back(*builder.second->Finish()); });
345 // The table is sent by the message backend, followed by the objects it refers to,
346 // so that they all leave in one multipart and the consumer relays them into the
347 // same slot. Through the arrow backend, the table would leave on its own first.
348 auto stream = arrow::io::BufferOutputStream::Create().ValueOrDie();
349 auto writer = arrow::ipc::MakeStreamWriter(stream, schema).ValueOrDie();
350 if (!writer->WriteRecordBatch(*arrow::RecordBatch::Make(schema, reserveSize, arrays)).ok()) {
351 LOGP(fatal, "Unable to serialise the table of {}", outBinding);
352 }
353 auto buffer = stream->Finish().ValueOrDie();
354 auto payload = allocator.makeVector<char>(output);
355 payload.assign(buffer->data(), buffer->data() + buffer->size());
357 // Accounted for like the tables of the arrow backend, for the rate limiting.
359 arrowContext.updateBytesSent(buffer->size());
360 arrowContext.updateMessagesSent(1);
361 for (auto const& id : referenced) {
363 }
364 }
365
366 stats.updateStats({(int)ProcessingStatsId::CCDB_CACHE_FETCHED_BYTES, DataProcessingStats::Op::Set, (int64_t)helper->totalFetchedBytes});
367 stats.updateStats({(int)ProcessingStatsId::CCDB_CACHE_REQUESTED_BYTES, DataProcessingStats::Op::Set, (int64_t)helper->totalRequestedBytes});
368 O2_SIGNPOST_END(ccdb, sid, "fetchFromAnalysisCCDB", "Fetching CCDB objects");
369 });
370 });
371}
372
373} // namespace o2::framework
std::string binding
std::string url
std::shared_ptr< arrow::Schema > schema
std::vector< std::shared_ptr< arrow::Field > > fields
int32_t i
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 First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
uint16_t pos
Definition RawData.h:3
#define O2_DECLARE_DYNAMIC_LOG(name)
Definition Signpost.h:490
#define O2_SIGNPOST_EVENT_EMIT_INFO(log, id, name, format,...)
Definition Signpost.h:532
#define O2_SIGNPOST_END(log, id, name, format,...)
Definition Signpost.h:609
#define O2_SIGNPOST_ID_GENERATE(name, log)
Definition Signpost.h:507
#define O2_SIGNPOST_START(log, id, name, format,...)
Definition Signpost.h:603
void updateMessagesSent(size_t value)
void updateBytesSent(size_t value)
o2::pmr::vector< T > makeVector(const Output &spec, Args &&... args)
void adoptFromCache(Output const &spec, CacheId id, header::SerializationMethod method=header::gSerializationMethodNone)
Adopt an already cached message, using an already provided CacheId.
CacheId adoptContainer(const Output &, ContainerT &, CacheStrategy, o2::header::SerializationMethod)
o2::header::DataHeader * findMessageHeader(const Output &spec)
ServiceRegistryRef services()
Definition InitContext.h:34
The input API of the Data Processing Layer This class holds the inputs which are valid for processing...
decltype(auto) get(R binding, int part=0) const
const GLfloat * m
Definition glcorearb.h:4066
GLuint64EXT * result
Definition glcorearb.h:5662
GLsizeiptr size
Definition glcorearb.h:659
GLuint const GLchar * name
Definition glcorearb.h:781
GLuint GLsizei GLsizei * length
Definition glcorearb.h:790
const GLuint * arrays
Definition glcorearb.h:1314
GLuint GLuint stream
Definition glcorearb.h:1806
constexpr framework::ConcreteDataMatcher matcher()
Definition ASoA.h:388
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
RuntimeErrorRef runtime_error_f(const char *,...)
AlgorithmSpec::InitCallback adaptStateful(LAMBDA l)
constexpr o2::header::SerializationMethod gSerializationMethodArrow
Definition DataHeader.h:334
constexpr o2::header::SerializationMethod gSerializationMethodCCDB
Definition DataHeader.h:332
std::shared_ptr< arrow::DataType > asArrowDataType(int list_size=1)
Definition ArrowTypes.h:174
static AlgorithmSpec fetchFromCCDB(ConfigContext const &)
static auto populateCacheWith(std::shared_ptr< CCDBFetcherHelper > const &helper, std::vector< FetchOp > const &ops, TimingInfo &timingInfo, DataTakingContext &dtc, DataAllocator &allocator) -> std::vector< Response >
static void initialiseHelper(CCDBFetcherHelper &helper, ConfigParamRegistry const &options)
static bool hasOption(const std::vector< ConfigParamSpec > &specs, const std::string &optName)
Check if option is defined.
Helper struct to hold statistics about the data processing happening.
static InputSpec fromMetadataString(std::string s)
Create an InputSpec from metadata string.
static std::string describe(InputSpec const &spec)
static ConcreteDataMatcher asConcreteDataMatcher(InputSpec const &input)
static ConcreteDataMatcher fromString(std::string s)
Create a concrete data matcher from serialized string.
std::vector< ConfigParamSpec > options
Definition DeviceSpec.h:57
std::vector< OutputRoute > outputs
Definition DeviceSpec.h:63
std::variant< ConcreteDataMatcher, data_matcher::DataDescriptorMatcher > matcher
The actual matcher for the input spec.
Definition InputSpec.h:70
header::DataOrigin origin
Definition Output.h:28
static PathTable parse(std::string const &spec)
o2::header::SerializationMethod serialization
header serialization method, set by derived header
Definition DataHeader.h:391
std::vector< int > row