Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Feb 16, 2024
1 parent 7d0324b commit a867bf4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions DataFormats/Headers/include/Headers/DataHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ struct BaseHeader {
union {
uint32_t flags;
struct {
uint32_t flagsNextHeader : 1, // do we have a next header after this one?
flagsReserved : 15, // reserved for future use
flagsDerivedHeader : 16; // reserved for usage by the derived header
uint32_t flagsNextHeader : 1, // do we have a next header after this one?
flagsReserved : 15, // reserved for future use
flagsDerivedHeader : 16; // reserved for usage by the derived header
};
};

Expand Down
4 changes: 2 additions & 2 deletions Framework/Core/include/Framework/DeviceContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ struct DeviceContext {
int expectedRegionCallbacks = 0;
// The timeout for the data processing to stop on this device.
// After this is reached, incoming data not marked to be kept will
// be dropped and the data processing will be stopped. However the
// be dropped and the data processing will be stopped. However the
// calibrations will still be done and objects resulting from calibrations
// will be marked to be kept.
int dataProcessingTimeout = 0;
// The timeout for the whole processing to stop on this device.
// This includes the grace period for processing and the time
// This includes the grace period for processing and the time
// for the calibrations to be done.
int exitTransitionTimeout = 0;
};
Expand Down
13 changes: 6 additions & 7 deletions Framework/Core/src/DataProcessingDevice.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void on_idle_timer(uv_timer_t* handle)
void on_transition_requested_expired(uv_timer_t* handle)
{
ZoneScopedN("Transition expired");
auto *state = (DeviceState*)handle->data;
auto* state = (DeviceState*)handle->data;
state->loopReason |= DeviceState::TIMER_EXPIRED;
LOGP(info, "Grace period for Data Processing & calibration expired.");
state->transitionHandling = TransitionHandlingState::Expired;
Expand All @@ -129,7 +129,7 @@ void on_transition_requested_expired(uv_timer_t* handle)
void on_data_processing_grace_expired(uv_timer_t* handle)
{
ZoneScopedN("Transition expired");
auto *state = (DeviceState*)handle->data;
auto* state = (DeviceState*)handle->data;
state->loopReason |= DeviceState::TIMER_EXPIRED;
LOGP(info, "Grace period for Data Processing Expired. Waiting for calibration.");
state->transitionHandling = TransitionHandlingState::DataProcessingExpired;
Expand Down Expand Up @@ -1292,7 +1292,7 @@ void DataProcessingDevice::Run()
if (onlyTimers) {
state.streaming = StreamingState::EndOfStreaming;
}

if (deviceContext.exitTransitionTimeout != 0 && state.streaming != StreamingState::Idle) {
state.transitionHandling = TransitionHandlingState::Requested;
ref.get<CallbackService>().call<CallbackService::Id::ExitRequested>(ServiceRegistryRef{ref});
Expand Down Expand Up @@ -1323,8 +1323,7 @@ void DataProcessingDevice::Run()
}
}
// If we are Idle, we can then consider the transition to be expired when it was requested or when the data processing timeout expired.
if ((state.transitionHandling == TransitionHandlingState::Requested || state.transitionHandling == TransitionHandlingState::DataProcessingExpired)
&& state.streaming == StreamingState::Idle) {
if ((state.transitionHandling == TransitionHandlingState::Requested || state.transitionHandling == TransitionHandlingState::DataProcessingExpired) && state.streaming == StreamingState::Idle) {
O2_SIGNPOST_EVENT_EMIT(device, lid, "run_loop", "State transition requested and we are now in Idle. We can consider it to be completed.");
state.transitionHandling = TransitionHandlingState::Expired;
}
Expand Down Expand Up @@ -1523,7 +1522,7 @@ void DataProcessingDevice::doPrepare(ServiceRegistryRef ref)
auto currentNewest = state.inputChannelInfos[pollOrder.back()].oldestForChannel;
auto delta = currentNewest.value - currentOldest.value;
O2_SIGNPOST_EVENT_EMIT(device, dpid, "do_prepare", "Oldest possible timeframe range %" PRIu64 " => %" PRIu64 " delta %" PRIu64,
(int64_t)currentOldest.value, (int64_t)currentNewest.value, (int64_t)delta);
(int64_t)currentOldest.value, (int64_t)currentNewest.value, (int64_t)delta);
auto& infos = state.inputChannelInfos;

if (context.balancingInputs) {
Expand Down Expand Up @@ -1695,7 +1694,7 @@ void DataProcessingDevice::doRun(ServiceRegistryRef ref)
relayer.processDanglingInputs(context.expirationHandlers, *context.registry, false);
}

auto &timingInfo = ref.get<TimingInfo>();
auto& timingInfo = ref.get<TimingInfo>();
// We should keep the data generated at end of stream only for those
// which are not sources.
timingInfo.keepAtEndOfStream = (hasOnlyGenerated == false);
Expand Down

0 comments on commit a867bf4

Please sign in to comment.