@@ -588,68 +588,68 @@ o2::framework::ServiceSpec ArrowSupport::arrowBackendSpec()
588588 auto builder = std::find_if (workflow.begin (), workflow.end (), [](DataProcessorSpec const & spec) { return spec.name == " internal-dpl-aod-index-builder" ; });
589589 auto reader = std::find_if (workflow.begin (), workflow.end (), [](DataProcessorSpec const & spec) { return spec.name == " internal-dpl-aod-reader" ; });
590590 auto writer = std::find_if (workflow.begin (), workflow.end (), [](DataProcessorSpec const & spec) { return spec.name == " internal-dpl-aod-writer" ; });
591- auto &ac = ctx.services ().get <AnalysisContext >();
592- ac .requestedAODs .clear ();
593- ac .requestedDYNs .clear ();
594- ac .providedDYNs .clear ();
595- ac .providedTIMs .clear ();
596- ac .requestedTIMs .clear ();
591+ auto &dec = ctx.services ().get <DanglingEdgesContext >();
592+ dec .requestedAODs .clear ();
593+ dec .requestedDYNs .clear ();
594+ dec .providedDYNs .clear ();
595+ dec .providedTIMs .clear ();
596+ dec .requestedTIMs .clear ();
597597
598598 auto inputSpecLessThan = [](InputSpec const & lhs, InputSpec const & rhs) { return DataSpecUtils::describe (lhs) < DataSpecUtils::describe (rhs); };
599599 auto outputSpecLessThan = [](OutputSpec const & lhs, OutputSpec const & rhs) { return DataSpecUtils::describe (lhs) < DataSpecUtils::describe (rhs); };
600600
601601 if (builder != workflow.end ()) {
602602 // collect currently requested IDXs
603- ac .requestedIDXs .clear ();
603+ dec .requestedIDXs .clear ();
604604 for (auto & d : workflow | views::exclude_by_name (builder->name )) {
605605 d.inputs |
606606 views::partial_match_filter (header::DataOrigin{" IDX" }) |
607- sinks::update_input_list{ac .requestedIDXs };
607+ sinks::update_input_list{dec .requestedIDXs };
608608 }
609609 // recreate inputs and outputs
610610 builder->inputs .clear ();
611611 builder->outputs .clear ();
612612 // replace AlgorithmSpec
613613 // FIXME: it should be made more generic, so it does not need replacement...
614614 builder->algorithm = PluginManager::loadAlgorithmFromPlugin (" O2FrameworkOnDemandTablesSupport" , " IndexTableBuilder" , ctx); // readers::AODReaderHelpers::indexBuilderCallback(ctx);
615- AnalysisSupportHelpers::addMissingOutputsToBuilder (ac .requestedIDXs , ac .requestedAODs , ac .requestedDYNs , *builder);
615+ AnalysisSupportHelpers::addMissingOutputsToBuilder (dec .requestedIDXs , dec .requestedAODs , dec .requestedDYNs , *builder);
616616 }
617617
618618 if (spawner != workflow.end ()) {
619619 // collect currently requested DYNs
620620 for (auto & d : workflow | views::exclude_by_name (spawner->name )) {
621621 d.inputs |
622622 views::partial_match_filter (header::DataOrigin{" DYN" }) |
623- sinks::update_input_list{ac .requestedDYNs };
623+ sinks::update_input_list{dec .requestedDYNs };
624624 d.outputs |
625625 views::partial_match_filter (header::DataOrigin{" DYN" }) |
626- sinks::append_to{ac .providedDYNs };
626+ sinks::append_to{dec .providedDYNs };
627627 }
628- std::sort (ac .requestedDYNs .begin (), ac .requestedDYNs .end (), inputSpecLessThan);
629- std::sort (ac .providedDYNs .begin (), ac .providedDYNs .end (), outputSpecLessThan);
630- ac .spawnerInputs .clear ();
631- ac .requestedDYNs |
632- views::filter_not_matching (ac .providedDYNs ) |
633- sinks::append_to{ac .spawnerInputs };
628+ std::sort (dec .requestedDYNs .begin (), dec .requestedDYNs .end (), inputSpecLessThan);
629+ std::sort (dec .providedDYNs .begin (), dec .providedDYNs .end (), outputSpecLessThan);
630+ dec .spawnerInputs .clear ();
631+ dec .requestedDYNs |
632+ views::filter_not_matching (dec .providedDYNs ) |
633+ sinks::append_to{dec .spawnerInputs };
634634 // recreate inputs and outputs
635635 spawner->outputs .clear ();
636636 spawner->inputs .clear ();
637- AnalysisSupportHelpers::addMissingOutputsToSpawner ({}, ac .spawnerInputs , ac .requestedAODs , *spawner);
637+ AnalysisSupportHelpers::addMissingOutputsToSpawner ({}, dec .spawnerInputs , dec .requestedAODs , *spawner);
638638 // replace AlgorithmSpec
639639 // FIXME: it should be made more generic, so it does not need replacement...
640640 spawner->algorithm = PluginManager::loadAlgorithmFromPlugin (" O2FrameworkOnDemandTablesSupport" , " ExtendedTableSpawner" , ctx);
641641 }
642642
643643 if (analysisCCDB != workflow.end ()) {
644644 for (auto & d : workflow | views::exclude_by_name (analysisCCDB->name )) {
645- d.inputs | views::partial_match_filter (header::DataOrigin{" ATIM" }) | sinks::update_input_list{ac .requestedTIMs };
646- d.outputs | views::partial_match_filter (header::DataOrigin{" ATIM" }) | sinks::append_to{ac .providedTIMs };
645+ d.inputs | views::partial_match_filter (header::DataOrigin{" ATIM" }) | sinks::update_input_list{dec .requestedTIMs };
646+ d.outputs | views::partial_match_filter (header::DataOrigin{" ATIM" }) | sinks::append_to{dec .providedTIMs };
647647 }
648- std::sort (ac .requestedTIMs .begin (), ac .requestedTIMs .end (), inputSpecLessThan);
649- std::sort (ac .providedTIMs .begin (), ac .providedTIMs .end (), outputSpecLessThan);
648+ std::sort (dec .requestedTIMs .begin (), dec .requestedTIMs .end (), inputSpecLessThan);
649+ std::sort (dec .providedTIMs .begin (), dec .providedTIMs .end (), outputSpecLessThan);
650650 // Use ranges::to<std::vector<>> in C++23...
651- ac .analysisCCDBInputs .clear ();
652- ac .requestedTIMs | views::filter_not_matching (ac .providedTIMs ) | sinks::append_to{ac .analysisCCDBInputs };
651+ dec .analysisCCDBInputs .clear ();
652+ dec .requestedTIMs | views::filter_not_matching (dec .providedTIMs ) | sinks::append_to{dec .analysisCCDBInputs };
653653
654654 // recreate inputs and outputs
655655 analysisCCDB->outputs .clear ();
@@ -658,7 +658,7 @@ o2::framework::ServiceSpec ArrowSupport::arrowBackendSpec()
658658 // FIXME: it should be made more generic, so it does not need replacement...
659659 // FIXME how can I make the lookup depend on DYN tables as well??
660660 analysisCCDB->algorithm = PluginManager::loadAlgorithmFromPlugin (" O2FrameworkCCDBSupport" , " AnalysisCCDBFetcherPlugin" , ctx);
661- AnalysisSupportHelpers::addMissingOutputsToBuilder (ac .analysisCCDBInputs , ac .requestedAODs , ac .requestedDYNs , *analysisCCDB);
661+ AnalysisSupportHelpers::addMissingOutputsToBuilder (dec .analysisCCDBInputs , dec .requestedAODs , dec .requestedDYNs , *analysisCCDB);
662662 }
663663
664664 if (writer != workflow.end ()) {
@@ -671,12 +671,12 @@ o2::framework::ServiceSpec ArrowSupport::arrowBackendSpec()
671671 for (auto & d : workflow) {
672672 d.inputs |
673673 views::partial_match_filter (AODOrigins) |
674- sinks::update_input_list{ac .requestedAODs };
674+ sinks::update_input_list{dec .requestedAODs };
675675 }
676676
677677 // remove unmatched outputs
678678 auto o_end = std::remove_if (reader->outputs .begin (), reader->outputs .end (), [&](OutputSpec const & o) {
679- return !DataSpecUtils::partialMatch (o, o2::header::DataDescription{" TFNumber" }) && !DataSpecUtils::partialMatch (o, o2::header::DataDescription{" TFFilename" }) && std::none_of (ac .requestedAODs .begin (), ac .requestedAODs .end (), [&](InputSpec const & i) { return DataSpecUtils::match (i, o); });
679+ return !DataSpecUtils::partialMatch (o, o2::header::DataDescription{" TFNumber" }) && !DataSpecUtils::partialMatch (o, o2::header::DataDescription{" TFFilename" }) && std::none_of (dec .requestedAODs .begin (), dec .requestedAODs .end (), [&](InputSpec const & i) { return DataSpecUtils::match (i, o); });
680680 });
681681 reader->outputs .erase (o_end, reader->outputs .end ());
682682 if (reader->outputs .empty ()) {
@@ -694,22 +694,22 @@ o2::framework::ServiceSpec ArrowSupport::arrowBackendSpec()
694694 // select outputs of type AOD which need to be saved
695695 // ATTENTION: if there are dangling outputs the getGlobalAODSink
696696 // has to be created in any case!
697- ac .outputsInputsAOD .clear ();
697+ dec .outputsInputsAOD .clear ();
698698
699699 for (auto ii = 0u ; ii < outputsInputs.size (); ii++) {
700700 if (DataSpecUtils::partialMatch (outputsInputs[ii], extendedAODOrigins)) {
701701 auto ds = dod->getDataOutputDescriptors (outputsInputs[ii]);
702702 if (!ds.empty () || isDangling[ii]) {
703- ac .outputsInputsAOD .emplace_back (outputsInputs[ii]);
703+ dec .outputsInputsAOD .emplace_back (outputsInputs[ii]);
704704 }
705705 }
706706 }
707707
708708 // file sink for any AOD output
709- if (!ac .outputsInputsAOD .empty ()) {
709+ if (!dec .outputsInputsAOD .empty ()) {
710710 // add TFNumber and TFFilename as input to the writer
711- ac .outputsInputsAOD .emplace_back (" tfn" , " TFN" , " TFNumber" );
712- ac .outputsInputsAOD .emplace_back (" tff" , " TFF" , " TFFilename" );
711+ dec .outputsInputsAOD .emplace_back (" tfn" , " TFN" , " TFNumber" );
712+ dec .outputsInputsAOD .emplace_back (" tff" , " TFF" , " TFFilename" );
713713 workflow.push_back (AnalysisSupportHelpers::getGlobalAODSink (ctx));
714714 }
715715 // Move the dummy sink at the end, if needed
0 commit comments