Skip to content

Commit

Permalink
DPL: Take runNumber and timeSlice for CCDB message from timingInfo, i…
Browse files Browse the repository at this point in the history
…nstead of first random message
  • Loading branch information
davidrohr committed Oct 20, 2023
1 parent 1e23267 commit ce9b4ea
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Framework/Core/src/CommonServices.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ o2::framework::ServiceSpec CommonServices::ccdbSupportSpec()
LOGP(debug, "We are w/o outputs, do not automatically add DISTSUBTIMEFRAME to outgoing messages");
return;
}
const auto ref = pc.inputs().getFirstValid(true);
const auto* dh = DataRefUtils::getHeader<o2::header::DataHeader*>(ref);
const auto* dph = DataRefUtils::getHeader<DataProcessingHeader*>(ref);
auto& timingInfo = pc.services().get<TimingInfo>();

// For any output that is a FLP/DISTSUBTIMEFRAME with subspec != 0,
// we create a new message.
Expand All @@ -424,9 +422,9 @@ o2::framework::ServiceSpec CommonServices::ccdbSupportSpec()
continue;
}
auto& stfDist = pc.outputs().make<o2::header::STFHeader>(Output{concrete.origin, concrete.description, concrete.subSpec, output.matcher.lifetime});
stfDist.id = dph->startTime;
stfDist.firstOrbit = dh->firstTForbit;
stfDist.runNumber = dh->runNumber;
stfDist.id = timingInfo.timeslice;
stfDist.firstOrbit = timingInfo.firstTForbit;
stfDist.runNumber = timingInfo.runNumber;
}
} },
.kind = ServiceKind::Global};
Expand Down

0 comments on commit ce9b4ea

Please sign in to comment.