File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -256,15 +256,17 @@ void GRunAction::publish_run_data(const std::shared_ptr<GRunDataCollection> &run
256256 " no run streamer map available - run data will not be published." );
257257 }
258258
259+ // Normalize once, before publishing: normalize_run_data() mutates run_data_collaction
260+ // in place and is NOT idempotent, so running it per streamer would divide the run
261+ // observables by events_processed once for every configured run streamer.
262+ normalize_run_data (run_data_collaction);
263+
259264 for (const auto &[name, gstreamer]: *gstreamer_run_map) {
260265 if (gstreamer == nullptr ) {
261266 log->error (ERR_STREAMERMAP_NOT_EXISTING , FUNCTION_NAME ,
262267 " null gstreamer instance for run streamer " , name);
263268 }
264269
265-
266- normalize_run_data (run_data_collaction);
267-
268270 gstreamer->publishRunData (run_data_collaction);
269271 }
270272}
You can’t perform that action at this time.
0 commit comments