@@ -185,14 +185,15 @@ o2::framework::ServiceSpec CommonServices::streamContextSpec()
185185 auto & routes = processingContext.services ().get <DeviceSpec const >().outputs ;
186186 auto & timeslice = processingContext.services ().get <TimingInfo>().timeslice ;
187187 auto & messageContext = processingContext.services ().get <MessageContext>();
188+ auto dispatchState = messageContext.dispatchState ();
188189 O2_SIGNPOST_ID_FROM_POINTER (cid, stream_context, service);
189190 // Do not report discarded messages as missing outputs.
190- if (messageContext. dispatchState () == MessageContext::DispatchState::Discarded) {
191+ if (dispatchState == MessageContext::DispatchState::Discarded) {
191192 O2_SIGNPOST_EVENT_EMIT_ERROR (stream_context, cid, " postProcessingCallbacks" , " Output messages discarded." );
192193 return ;
193194 }
194195 // Check if we never created any data for this timeslice
195- // if we did not, but we still have didDispatched set to true
196+ // if we did not, but messages were dispatched,
196197 // it means it was created out of band.
197198 bool userDidCreate = false ;
198199 for (size_t ri = 0 ; ri < routes.size (); ++ri) {
@@ -203,14 +204,14 @@ o2::framework::ServiceSpec CommonServices::streamContextSpec()
203204 }
204205 O2_SIGNPOST_EVENT_EMIT (stream_context, cid, " postProcessingCallbacks" , " userDidCreate == %d && didDispatch == %d" ,
205206 userDidCreate,
206- messageContext. didDispatch () );
207- if (userDidCreate == false && messageContext. didDispatch () == true ) {
207+ dispatchState == MessageContext::DispatchState::Dispatched );
208+ if (userDidCreate == false && dispatchState == MessageContext::DispatchState::Dispatched ) {
208209 O2_SIGNPOST_EVENT_EMIT (stream_context, cid, " postProcessingCallbacks" , " Data created out of band userDidCreate == %d && messageContext.didDispatch == %d" ,
209210 userDidCreate,
210- messageContext. didDispatch () );
211+ dispatchState == MessageContext::DispatchState::Dispatched );
211212 return ;
212213 }
213- if (userDidCreate == false && messageContext. didDispatch () == false ) {
214+ if (userDidCreate == false && dispatchState == MessageContext::DispatchState::NotDispatched ) {
214215 O2_SIGNPOST_ID_FROM_POINTER (cid, stream_context, service);
215216 O2_SIGNPOST_EVENT_EMIT (stream_context, cid, " postProcessingCallbacks" , " No data created." );
216217 return ;
0 commit comments