You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOGP(fatal, "Failed to open selected run/timespans file {}", flname);
485
+
}
486
+
std::string line;
487
+
size_t cntl = 0, cntr = 0;
488
+
while (std::getline(inputFile, line)) {
489
+
cntl++;
490
+
for (char& ch : line) { // Replace semicolons and tabs with spaces for uniform processing
491
+
if (ch == ';' || ch == '\t' || ch == ',') {
492
+
ch = '';
493
+
}
494
+
}
495
+
o2::utils::Str::trim(line);
496
+
if (line.size() < 1 || line[0] == '#') {
497
+
continue;
498
+
}
499
+
auto tokens = o2::utils::Str::tokenize(line, '');
500
+
auto logError = [&cntl, &line]() { LOGP(error, "Expected format for selection is tripplet <run> <range_min> <range_max>, failed on line#{}: {}", cntl, line); };
501
+
if (tokens.size() >= 3) {
502
+
int run = 0;
503
+
long rmin, rmax;
504
+
try {
505
+
run = std::stoi(tokens[0]);
506
+
rmin = std::stol(tokens[1]);
507
+
rmax = std::stol(tokens[2]);
508
+
} catch (...) {
509
+
logError();
510
+
continue;
511
+
}
512
+
513
+
constexprlong ISTimeStamp = 1514761200000L;
514
+
int convmn = rmin > ISTimeStamp ? 1 : 0, convmx = rmax > ISTimeStamp ? 1 : 0; // values above ISTimeStamp are timestamps (need to be converted to orbits)
515
+
if (rmin > rmax) {
516
+
LOGP(fatal, "Provided range limits are not in increasing order, entry is {}", line);
517
+
}
518
+
if (mConvRunTimeRangesToOrbits == -1) {
519
+
if (convmn != convmx) {
520
+
LOGP(fatal, "Provided range limits should be both consistent either with orbit number or with unix timestamp in ms, entry is {}", line);
521
+
}
522
+
mConvRunTimeRangesToOrbits = convmn; // need to convert to orbit if time
if (mConvRunTimeRangesToOrbits != convmn || mConvRunTimeRangesToOrbits != convmx) {
526
+
LOGP(fatal, "Provided range limits should are not consistent with previously determined {} input, entry is {}", mConvRunTimeRangesToOrbits == 1 ? "timestamps" : "orbits", line);
527
+
}
528
+
}
529
+
530
+
mRunTimeRanges[run].emplace_back(rmin, rmax);
531
+
cntr++;
532
+
} else {
533
+
logError();
534
+
}
535
+
}
536
+
LOGP(info, "Read {} time-spans for {} runs from {}", cntr, mRunTimeRanges.size(), flname);
options.push_back(ConfigParamSpec{"disable-dummy-output", VariantType::Bool, false, {"Disable sending empty output if corresponding data is not found in the data"}});
options.push_back(ConfigParamSpec{"timeframes-shm-limit", VariantType::String, "0", {"Minimum amount of SHM required in order to publish data"}});
42
+
options.push_back(ConfigParamSpec{"run-time-span-file", VariantType::String, "", {"If non empty, inject selected IRFrames from this text file (run, min/max orbit or unix time)"}});
43
+
options.push_back(ConfigParamSpec{"invert-irframe-selection", VariantType::Bool, false, {"Select only frames mentioned in ir-frames-file (skip-skimmed-out-tf applied to TF not selected!)"}});
42
44
options.push_back(ConfigParamSpec{"metric-feedback-channel-format", VariantType::String, "name=metric-feedback,type=pull,method=connect,address=ipc://{}metric-feedback-{},transport=shmem,rateLogging=0", {"format for the metric-feedback channel for TF rate limiting"}});
0 commit comments