34struct CCDBFetcherHelper {
35 struct CCDBCacheInfo {
62 std::unordered_map<std::string, o2::ccdb::CcdbApi>
apis;
76 if (
pos == std::string::npos) {
80 auto pos2 =
path.rfind(
'/',
pos);
81 if (pos2 == std::string::npos || pos2 ==
pos - 1 || pos2 == 0) {
90bool isPrefix(std::string_view prefix, std::string_view full)
92 return prefix == full.substr(0, prefix.size());
97 std::unordered_map<std::string, std::string>
remappings;
98 std::string currentUrl =
"";
107 ParsingStates
state = IN_BEGIN;
115 state = IN_BEGIN_URL;
118 if ((strncmp(
"http://",
str, 7) != 0) && (strncmp(
"https://",
str, 8) != 0 && (strncmp(
"file://",
str, 7) != 0))) {
119 return {
remappings,
"URL should start with either http:// or https:// or file://"};
124 char const*
c = strchr(
str,
'=');
126 return {
remappings,
"Expecting at least one target path, missing `='?"};
128 if ((
c -
str) == 0) {
131 currentUrl = std::string_view(
str,
c -
str);
132 state = IN_BEGIN_TARGET;
135 case IN_BEGIN_TARGET: {
139 state = IN_END_TARGET;
141 case IN_END_TARGET: {
142 char const*
c = strpbrk(
str,
",;");
145 return {
remappings, fmt::format(
"Path {} requested more than once.",
str)};
150 if ((
c -
str) == 0) {
155 return {
remappings, fmt::format(
"Path {} requested more than once.",
key)};
159 state = IN_BEGIN_URL;
161 state = IN_BEGIN_TARGET;
171 std::unordered_map<std::string, bool> accountedSpecs;
172 auto defHost = options.
get<std::string>(
"condition-backend");
173 auto checkRate = options.
get<
int>(
"condition-tf-per-query");
174 auto checkMult = options.
get<
int>(
"condition-tf-per-query-multiplier");
175 helper.useTFSlice = options.
get<
int>(
"condition-use-slice-for-prescaling");
176 helper.timeToleranceMS = options.
get<int64_t>(
"condition-time-tolerance");
177 helper.queryPeriodGlo = checkRate > 0 ? checkRate : std::numeric_limits<int>::max();
178 helper.queryPeriodFactor = checkMult == 0 ? 1 : checkMult;
179 std::string extraCond{};
180 if (helper.useTFSlice) {
181 extraCond =
". Use TFSlice";
182 if (helper.useTFSlice > 0) {
183 extraCond += fmt::format(
" + max TFcounter jump <= {}", helper.useTFSlice);
186 LOGP(info,
"CCDB Backend at: {}, validity check for every {} TF{}{}", defHost, helper.queryPeriodGlo,
187 helper.queryPeriodFactor == 1 ? std::string{} : (helper.queryPeriodFactor > 0 ? fmt::format(
", (query for high-rate objects downscaled by {})", helper.queryPeriodFactor) : fmt::format(
", (query downscaled as TFcounter%{})", -helper.queryPeriodFactor)),
189 LOGP(info,
"Hook to enable signposts for CCDB messages at {}", (
void*)&private_o2_log_ccdb->stacktrace);
190 auto remapString = options.
get<std::string>(
"condition-remap");
192 if (!
result.error.empty()) {
195 helper.remappings =
result.remappings;
196 helper.apis[
""].init(defHost);
197 LOGP(info,
"Initialised default CCDB host {}", defHost);
199 for (
auto&
entry : helper.remappings) {
200 if (helper.apis.find(
entry.second) == helper.apis.end()) {
202 LOGP(info,
"Initialised custom CCDB host {}",
entry.second);
204 LOGP(info,
"{} is remapped to {}",
entry.first,
entry.second);
206 helper.createdNotBefore =
std::to_string(options.
get<int64_t>(
"condition-not-before"));
207 helper.createdNotAfter =
std::to_string(options.
get<int64_t>(
"condition-not-after"));
209 for (
auto& route : outputRoutes) {
210 if (route.matcher.lifetime != Lifetime::Condition) {
214 if (accountedSpecs.find(specStr) != accountedSpecs.end()) {
217 accountedSpecs[specStr] =
true;
218 helper.routes.push_back(route);
220 for (
auto& metadata : route.matcher.metadata) {
222 LOGP(info,
"- {}: {}", metadata.name, metadata.defaultValue.asString());
230 Int_t previousErrorLevel = gErrorIgnoreLevel;
231 gErrorIgnoreLevel = kFatal;
232 TMemFile memFile(
"name",
const_cast<char*
>(
v.data()),
v.size(),
"READ");
233 gErrorIgnoreLevel = previousErrorLevel;
234 if (memFile.IsZombie()) {
237 TClass* tcl = TClass::GetClass(
typeid(std::vector<Long64_t>));
240 throw runtime_error_f(
"Couldn't retrieve object corresponding to %s from TFile", tcl->GetName());
243 auto* ctp = (std::vector<Long64_t>*)
result;
254 std::unordered_map<std::string, DataAllocator::CacheId>
const& cache,
255 std::string
const&
path,
261 auto oldIt = cache.find(
path);
263 if (oldIt != cache.end()) {
275 std::string ccdbMetadataPrefix =
"ccdb-metadata-";
282 O2_SIGNPOST_START(ccdb, sid,
"populateCacheWith",
"Starting to populate cache with CCDB objects");
283 for (
auto& route : helper->routes) {
284 int64_t timestampToUse = timestamp;
289 auto&&
v = allocator.makeVector<
char>(
output);
290 std::map<std::string, std::string> metadata;
291 std::map<std::string, std::string> headers;
292 std::string
path =
"";
293 std::string
etag =
"";
294 int chRate = helper->queryPeriodGlo;
295 bool checkValidity =
false;
296 for (
auto& meta : route.matcher.metadata) {
297 if (meta.name ==
"ccdb-path") {
298 path = meta.defaultValue.get<std::string>();
299 }
else if (meta.name ==
"ccdb-run-dependent" && meta.defaultValue.get<
int>() > 0) {
300 if (meta.defaultValue.get<
int>() == 1) {
301 metadata[
"runNumber"] = dtc.runNumber;
302 }
else if (meta.defaultValue.get<
int>() == 2) {
303 timestampToUse = std::stoi(dtc.runNumber);
305 LOGP(fatal,
"Undefined ccdb-run-dependent option {} for spec {}/{}/{}", meta.defaultValue.get<
int>(), concrete.origin.as<std::string>(), concrete.description.as<std::string>(),
int(concrete.subSpec));
307 }
else if (
isPrefix(ccdbMetadataPrefix, meta.name)) {
308 std::string
key = meta.name.substr(ccdbMetadataPrefix.size());
309 auto value = meta.defaultValue.get<std::string>();
312 }
else if (meta.name ==
"ccdb-query-rate") {
313 chRate = std::max(1, meta.defaultValue.get<
int>()) * helper->queryPeriodFactor;
316 const auto url2uuid = helper->mapURL2UUID.find(
path);
317 if (url2uuid != helper->mapURL2UUID.end()) {
318 etag = url2uuid->second.etag;
320 uint64_t validUntil = url2uuid->second.cacheValidUntil;
325 bool cacheExpired = (validUntil <= timestampToUse) || (timestamp <
cachePopulatedAt);
326 if (isOnline || cacheExpired) {
327 if (!helper->useTFSlice) {
328 checkValidity = chRate > 0 ? (std::abs(
int(timingInfo.tfCounter - url2uuid->second.lastCheckedTF)) >= chRate) : (timingInfo.tfCounter % -chRate) == 0;
330 checkValidity = chRate > 0 ? (std::abs(
int(timingInfo.timeslice - url2uuid->second.lastCheckedSlice)) >= chRate) : (timingInfo.timeslice % -chRate) == 0;
331 if (!checkValidity && helper->useTFSlice > std::abs(chRate)) {
332 checkValidity = std::abs(
int(timingInfo.tfCounter) - url2uuid->second.lastCheckedTF) > helper->useTFSlice;
337 checkValidity =
true;
340 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"populateCacheWith",
"checkValidity is %{public}s for tf%{public}s %zu of %{public}s", checkValidity ?
"true" :
"false", helper->useTFSlice ?
"ID" :
"Slice", helper->useTFSlice ? timingInfo.timeslice : timingInfo.tfCounter,
path.data());
342 const auto& api = helper->getAPI(
path);
343 if (checkValidity && (!api.isSnapshotMode() ||
etag.empty())) {
344 LOGP(detail,
"Loading {} for timestamp {}",
path, timestampToUse);
345 api.loadFileToMemory(
v,
path, metadata, timestampToUse, &headers,
etag, helper->createdNotAfter, helper->createdNotBefore);
346 if ((headers.count(
"Error") != 0) || (
etag.empty() &&
v.empty())) {
347 LOGP(fatal,
"Unable to find CCDB object {}/{}",
path, timestampToUse);
352 if (headers.find(
"default") != headers.end()) {
353 LOGP(detail,
"******** Default entry used for {} ********",
path);
355 helper->mapURL2UUID[
path].lastCheckedTF = timingInfo.tfCounter;
356 helper->mapURL2UUID[
path].lastCheckedSlice = timingInfo.timeslice;
358 helper->mapURL2UUID[
path].etag = headers[
"ETag"];
359 helper->mapURL2UUID[
path].cachePopulatedAt = timestampToUse;
360 helper->mapURL2UUID[
path].cacheMiss++;
361 helper->mapURL2UUID[
path].size =
v.size();
362 helper->mapURL2UUID[
path].minSize = std::min(
v.size(), helper->mapURL2UUID[
path].minSize);
363 helper->mapURL2UUID[
path].maxSize = std::max(
v.size(), helper->mapURL2UUID[
path].maxSize);
364 helper->totalFetchedBytes +=
v.size();
365 helper->totalRequestedBytes +=
v.size();
366 api.appendFlatHeader(
v, headers);
368 helper->mapURL2DPLCache[
path] = cacheId;
369 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"populateCacheWith",
"Caching %{public}s for %{public}s (DPL id %" PRIu64
")",
path.data(), headers[
"ETag"].data(), cacheId.value);
373 helper->mapURL2UUID[
path].etag = headers[
"ETag"];
374 helper->mapURL2UUID[
path].cachePopulatedAt = timestampToUse;
375 helper->mapURL2UUID[
path].cacheValidUntil = headers[
"Cache-Valid-Until"].empty() ? 0 : std::stoul(headers[
"Cache-Valid-Until"]);
376 helper->mapURL2UUID[
path].cacheMiss++;
377 helper->mapURL2UUID[
path].size =
v.size();
378 helper->mapURL2UUID[
path].minSize = std::min(
v.size(), helper->mapURL2UUID[
path].minSize);
379 helper->mapURL2UUID[
path].maxSize = std::max(
v.size(), helper->mapURL2UUID[
path].maxSize);
380 helper->totalFetchedBytes +=
v.size();
381 helper->totalRequestedBytes +=
v.size();
382 api.appendFlatHeader(
v, headers);
384 helper->mapURL2DPLCache[
path] = cacheId;
385 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"populateCacheWith",
"Caching %{public}s for %{public}s (DPL id %" PRIu64
")",
path.data(), headers[
"ETag"].data(), cacheId.value);
389 helper->mapURL2UUID[
path].cacheValidUntil = headers[
"Cache-Valid-Until"].empty() ? 0 : std::stoul(headers[
"Cache-Valid-Until"]);
393 auto cacheId = helper->mapURL2DPLCache[
path];
394 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"populateCacheWith",
"Reusing %{public}s for %{public}s (DPL id %" PRIu64
")",
path.data(), headers[
"ETag"].data(), cacheId.value);
395 helper->mapURL2UUID[
path].cacheHit++;
396 helper->totalRequestedBytes += helper->mapURL2UUID[
path].size;
400 O2_SIGNPOST_END(ccdb, sid,
"populateCacheWith",
"Finished populating cache with CCDB objects");
406 std::shared_ptr<CCDBFetcherHelper> helper = std::make_shared<CCDBFetcherHelper>();
408 auto forcedTimestamp = options.
get<int64_t>(
"condition-timestamp");
412 LOGP(info,
"CCDB cache miss/hit ratio ({} fetched / {} requested bytes):", helper->totalFetchedBytes, helper->totalRequestedBytes);
413 for (
auto&
entry : helper->mapURL2UUID) {
414 LOGP(info,
" {}: {}/{} ({}-{} bytes)",
entry.first,
entry.second.cacheMiss,
entry.second.cacheHit,
entry.second.minSize,
entry.second.maxSize);
421 static Long64_t orbitResetTime = -1;
422 static size_t lastTimeUsed = -1;
424 LOGP(info,
"Dummy creation time is not supported for CCDB objects. Setting creation to last one used {}.", lastTimeUsed);
428 auto lookupTimestamp = forcedTimestamp > 0 ? forcedTimestamp :
static_cast<int64_t
>(timingInfo.
creation);
431 const std::string
path =
"CTP/Calib/OrbitReset";
432 std::map<std::string, std::string> metadata;
433 std::map<std::string, std::string> headers;
436 bool checkValidity = std::abs(
int(
counter - helper->lastCheckedTFCounterOrbReset)) >= helper->queryPeriodGlo;
437 const auto url2uuid = helper->mapURL2UUID.find(
path);
438 if (url2uuid != helper->mapURL2UUID.end()) {
439 etag = url2uuid->second.etag;
441 checkValidity =
true;
443 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"fetchFromCCDB",
"checkValidity is %{public}s for tf%{public}s %d of %{public}s",
444 checkValidity ?
"true" :
"false", helper->useTFSlice ?
"ID" :
"Slice",
counter,
path.data());
446 Long64_t newOrbitResetTime = orbitResetTime;
448 const auto& api = helper->getAPI(
path);
449 if (checkValidity && (!api.isSnapshotMode() ||
etag.empty())) {
450 helper->lastCheckedTFCounterOrbReset =
counter;
451 api.loadFileToMemory(
v,
path, metadata, lookupTimestamp, &headers,
etag, helper->createdNotAfter, helper->createdNotBefore);
452 if ((headers.count(
"Error") != 0) || (
etag.empty() &&
v.empty())) {
453 LOGP(fatal,
"Unable to find CCDB object {}/{}",
path, lookupTimestamp);
458 helper->mapURL2UUID[
path].etag = headers[
"ETag"];
459 helper->mapURL2UUID[
path].cacheMiss++;
460 helper->mapURL2UUID[
path].size =
v.size();
461 helper->mapURL2UUID[
path].minSize = std::min(
v.size(), helper->mapURL2UUID[
path].minSize);
462 helper->mapURL2UUID[
path].maxSize = std::max(
v.size(), helper->mapURL2UUID[
path].maxSize);
463 helper->totalFetchedBytes +=
v.size();
464 helper->totalRequestedBytes +=
v.size();
466 api.appendFlatHeader(
v, headers);
468 helper->mapURL2DPLCache[
path] = cacheId;
469 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"fetchFromCCDB",
"Caching %{public}s for %{public}s (DPL id %" PRIu64
")",
path.data(), headers[
"ETag"].data(), cacheId.value);
470 }
else if (
v.size()) {
471 helper->mapURL2UUID[
path].etag = headers[
"ETag"];
472 helper->mapURL2UUID[
path].cacheMiss++;
473 helper->mapURL2UUID[
path].size =
v.size();
474 helper->mapURL2UUID[
path].minSize = std::min(
v.size(), helper->mapURL2UUID[
path].minSize);
475 helper->mapURL2UUID[
path].maxSize = std::max(
v.size(), helper->mapURL2UUID[
path].maxSize);
476 helper->totalFetchedBytes +=
v.size();
477 helper->totalRequestedBytes +=
v.size();
479 api.appendFlatHeader(
v, headers);
481 helper->mapURL2DPLCache[
path] = cacheId;
482 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"fetchFromCCDB",
"Caching %{public}s for %{public}s (DPL id %" PRIu64
")",
path.data(), headers[
"ETag"].data(), cacheId.value);
486 auto cacheId = helper->mapURL2DPLCache[
path];
487 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"fetchFromCCDB",
"Reusing %{public}s for %{public}s (DPL id %" PRIu64
")",
path.data(), headers[
"ETag"].data(), cacheId.value);
488 helper->mapURL2UUID[
path].cacheHit++;
489 helper->totalRequestedBytes += helper->mapURL2UUID[
path].size;
492 if (newOrbitResetTime != orbitResetTime) {
493 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"fetchFromCCDB",
"Orbit reset time changed from %lld to %lld", orbitResetTime, newOrbitResetTime);
494 orbitResetTime = newOrbitResetTime;
499 int64_t timestamp = ceil((timingInfo.
firstTForbit * o2::constants::lhc::LHCOrbitNS / 1000 + orbitResetTime) / 1000);
500 if (std::abs(int64_t(timingInfo.
creation) - timestamp) > helper->timeToleranceMS) {
501 static bool notWarnedYet =
true;
503 LOGP(warn,
"timestamp {} for orbit {} and orbit reset time {} differs by >{} from the TF creation time {}, use the latter", timestamp, timingInfo.
firstTForbit, orbitResetTime / 1000, helper->timeToleranceMS, timingInfo.
creation);
504 notWarnedYet =
false;
510 if (forcedTimestamp > 0) {
511 timestamp = forcedTimestamp;
514 O2_SIGNPOST_EVENT_EMIT(ccdb, sid,
"fetchFromCCDB",
"Fetching objects. Run %{public}s. OrbitResetTime %lld. Creation %lld. Timestamp %lld. firstTForbit %" PRIu32,
std::unordered_map< std::string, std::string > remappings
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
Header to collect LHC related constants.
#define O2_DECLARE_DYNAMIC_LOG(name)
#define O2_SIGNPOST_END(log, id, name, format,...)
#define O2_SIGNPOST_EVENT_EMIT(log, id, name, format,...)
#define O2_SIGNPOST_START(log, id, name, format,...)
static void * extractFromTFile(TFile &file, TClass const *cl, const char *what=CCDBOBJECT_ENTRY)
T get(const char *key) const
o2::pmr::vector< T > makeVector(const Output &spec, Args &&... args)
void pruneFromCache(CacheId id)
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)
GLsizei const GLfloat * value
GLsizei const GLchar *const * path
Defining ITS Vertex explicitly as messageable.
RuntimeErrorRef runtime_error(const char *)
auto populateCacheWith(std::shared_ptr< CCDBFetcherHelper > const &helper, int64_t timestamp, TimingInfo &timingInfo, DataTakingContext &dtc, DataAllocator &allocator) -> void
bool isOnlineRun(DataTakingContext const &dtc)
bool isPrefix(std::string_view prefix, std::string_view full)
@ CCDB_CACHE_FETCHED_BYTES
@ CCDB_CACHE_REQUESTED_BYTES
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
RuntimeErrorRef runtime_error_f(const char *,...)
auto getOrbitResetTime(o2::pmr::vector< char > const &v) -> Long64_t
void initialiseHelper(CCDBFetcherHelper &helper, ConfigParamRegistry const &options, std::vector< o2::framework::OutputRoute > const &outputRoutes)
AlgorithmSpec::InitCallback adaptStateful(LAMBDA l)
std::vector< T, fair::mq::pmr::polymorphic_allocator< T > > vector
std::string to_string(gsl::span< T, Size > span)
size_t totalRequestedBytes
o2::ccdb::CcdbApi & getAPI(const std::string &path)
std::vector< OutputRoute > routes
uint32_t lastCheckedTFCounterOrbReset
std::unordered_map< std::string, std::string > remappings
std::unordered_map< std::string, DataAllocator::CacheId > mapURL2DPLCache
std::unordered_map< std::string, o2::ccdb::CcdbApi > apis
std::string createdNotBefore
std::string createdNotAfter
std::unordered_map< std::string, CCDBCacheInfo > mapURL2UUID
static DataAllocator::CacheId adoptAndReplaceCachedMessage(DataAllocator &allocator, std::unordered_map< std::string, DataAllocator::CacheId > const &cache, std::string const &path, Output const &output, o2::pmr::vector< char > &&v, o2::header::SerializationMethod method, DataAllocator::CacheStrategy strategy=DataAllocator::CacheStrategy::Always)
static ParserResult parseRemappings(char const *)
static AlgorithmSpec fetchFromCCDB()
Helper struct to hold statistics about the data processing happening.
static std::string describe(InputSpec const &spec)
static ConcreteDataMatcher asConcreteDataMatcher(InputSpec const &input)
long orbitResetTimeMUS
The start time of the first orbit in microseconds(!)
DeploymentMode deploymentMode
Where we thing this is running.
std::string runNumber
The current run number.
std::vector< OutputRoute > outputs
header::DataOrigin origin
uint32_t tfCounter
the orbit the TF begins