Skip to content

Commit 230c821

Browse files
ktfdavidrohr
authored andcommitted
DPL: improve message for missing data
1 parent 1a6f6e4 commit 230c821

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Framework/Core/src/ExternalFairMQDeviceProxy.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,19 @@ void injectMissingData(fair::mq::Device& device, fair::mq::Parts& parts, std::ve
247247
bool hassih = false;
248248

249249
// Do not check anything which has DISTSUBTIMEFRAME in it.
250+
size_t expectedDataSpecs = 0;
250251
for (size_t pi = 0; pi < present.size(); ++pi) {
251252
auto& spec = routes[pi].matcher;
252253
if (DataSpecUtils::asConcreteDataTypeMatcher(spec).description == header::DataDescription("DISTSUBTIMEFRAME")) {
253254
present[pi] = true;
254255
continue;
255256
}
257+
if (routes[pi].timeslice == 0) {
258+
++expectedDataSpecs;
259+
}
256260
}
257261

262+
size_t foundDataSpecs = 0;
258263
for (int msgidx = 0; msgidx < parts.Size(); msgidx += 2) {
259264
const auto dh = o2::header::get<DataHeader*>(parts.At(msgidx)->GetData());
260265
auto const sih = o2::header::get<SourceInfoHeader*>(parts.At(msgidx)->GetData());
@@ -294,6 +299,7 @@ void injectMissingData(fair::mq::Device& device, fair::mq::Parts& parts, std::ve
294299
OutputSpec query{dh->dataOrigin, dh->dataDescription, dh->subSpecification};
295300
if (DataSpecUtils::match(spec, query)) {
296301
present[pi] = true;
302+
++foundDataSpecs;
297303
break;
298304
}
299305
}
@@ -357,7 +363,7 @@ void injectMissingData(fair::mq::Device& device, fair::mq::Parts& parts, std::ve
357363
static int maxWarn = 10; // Correct would be o2::conf::VerbosityConfig::Instance().maxWarnDeadBeef, but Framework does not depend on CommonUtils..., but not so critical since receives will send correct number of DEADBEEF messages
358364
static int contDeadBeef = 0;
359365
if (++contDeadBeef <= maxWarn) {
360-
LOGP(alarm, "Found {}/{} data specs, missing data specs: {}, injecting 0xDEADBEEF", present.size() - unmatchedDescriptions.size(), present.size(), missing);
366+
LOGP(alarm, "Found {}/{} data specs, missing data specs: {}, injecting 0xDEADBEEF", foundDataSpecs, expectedDataSpecs, missing);
361367
}
362368
}
363369
}

0 commit comments

Comments
 (0)