@@ -241,14 +241,13 @@ AlgorithmSpec AODWriterHelpers::getOutputTTreeWriter(ConfigContext const& ctx)
241241 };
242242}
243243
244- AlgorithmSpec AODWriterHelpers::getOutputObjHistWriter (ConfigContext const & ctx)
244+ AlgorithmSpec AODWriterHelpers::getOutputObjHistWriter (ConfigContext const & /* ctx*/ )
245245{
246- using namespace monitoring ;
247- auto & ac = ctx.services ().get <DanglingEdgesContext>();
248- auto tskmap = ac.outTskMap ;
249- auto objmap = ac.outObjHistMap ;
250-
251- return AlgorithmSpec{[objmap, tskmap](InitContext& ic) -> std::function<void (ProcessingContext&)> {
246+ return AlgorithmSpec{[](InitContext& ic) -> std::function<void (ProcessingContext&)> {
247+ using namespace monitoring ;
248+ auto & dec = ic.services ().get <DanglingEdgesContext>();
249+ auto tskmap = dec.outTskMap ;
250+ auto objmap = dec.outObjHistMap ;
252251 auto & callbacks = ic.services ().get <CallbackService>();
253252 auto inputObjects = std::make_shared<std::vector<std::pair<InputObjectRoute, InputObject>>>();
254253
@@ -278,7 +277,7 @@ AlgorithmSpec AODWriterHelpers::getOutputObjHistWriter(ConfigContext const& ctx)
278277
279278 callbacks.set <CallbackService::Id::EndOfStream>(endofdatacb);
280279 return [inputObjects, objmap, tskmap](ProcessingContext& pc) mutable -> void {
281- auto mergePart = [&inputObjects, &objmap, &tskmap, &pc ](DataRef const & ref) {
280+ auto mergePart = [&inputObjects, &objmap, &tskmap](DataRef const & ref) {
282281 O2_SIGNPOST_ID_GENERATE (hid, histogram_registry);
283282 O2_SIGNPOST_START (histogram_registry, hid, " mergePart" , " Merging histogram" );
284283 if (!ref.header ) {
@@ -474,7 +473,7 @@ AlgorithmSpec AODWriterHelpers::getOutputObjHistWriter(ConfigContext const& ctx)
474473 };
475474 O2_SIGNPOST_ID_GENERATE (rid, histogram_registry);
476475 O2_SIGNPOST_START (histogram_registry, rid, " processParts" , " Start merging %zu parts received together." , pc.inputs ().getNofParts (0 ));
477- for (int pi = 0 ; pi < pc.inputs ().getNofParts (0 ); ++pi) {
476+ for (auto pi = 0U ; pi < pc.inputs ().getNofParts (0 ); ++pi) {
478477 mergePart (pc.inputs ().get (" x" , pi));
479478 }
480479 O2_SIGNPOST_END (histogram_registry, rid, " processParts" , " Done histograms in multipart message." );
0 commit comments