@@ -573,6 +573,9 @@ struct OutputForTable {
573573 }
574574};
575575
576+ // / In a multi-origin case the origin is provided by the type
577+ // / FIXME: in a rewritten origin case, we need to modify the output designation
578+
576579// / This helper class allows you to declare things which will be created by a
577580// / given analysis task. Notice how the actual cursor is implemented by the
578581// / means of the WritingCursor helper class, from which produces actually
@@ -598,6 +601,9 @@ struct ProducesGroup {
598601template <typename T>
599602concept is_produces_group = std::derived_from<T, ProducesGroup>;
600603
604+ // / In a multi-origin case the origin is provided by the type
605+ // / FIXME: In a rewritten origin case, we need to modify the output designation
606+
601607// / Helper template for table transformations
602608template <soa::is_metadata M, soa::TableRef Ref>
603609struct TableTransform {
@@ -648,6 +654,10 @@ constexpr auto transformBase()
648654 return TableTransform<metadata, metadata::template extension_table_t_from<o2::aod::Hash<T::originals[T::originals.size () - 1 ].origin_hash >>::ref>{};
649655}
650656
657+
658+ // / In a multi-origin case the origin is provided by the type
659+ // / FIXME: In a rewritten origin case the output designation needs to be changed (through base class)
660+ // / The extraction of the elements needs to be changed in AnalysisManagers using the origin information from the base class
651661template <is_spawnable T>
652662struct Spawns : decltype (transformBase<T>()) {
653663 using spawnable_t = T;
@@ -692,11 +702,14 @@ concept is_spawns = requires(T t) {
692702 requires std::same_as<decltype (t.projector ), std::shared_ptr<gandiva::Projector>>;
693703};
694704
705+ // / In a multi-origin case the origin is provided by the type
706+ // / FIXME: In a rewritten origin case the output designation needs to be changed (through base class)
707+ // / The extraction of the elements needs to be changed in AnalysisManagers using the origin information from the base class
708+
695709// / This helper struct allows you to declare extended tables with dynamically-supplied
696710// / expressions to be created by the task
697711// / The actual expressions have to be set in init() for the configurable expression
698712// / columns, used to define the table
699-
700713template <is_dynamically_spawnable T, bool DELAYED = false >
701714struct Defines : decltype (transformBase<T>()) {
702715 static constexpr bool delayed = DELAYED;
@@ -761,14 +774,17 @@ struct Sparse {
761774};
762775
763776// / This helper struct allows you to declare index tables to be created in a task
764-
765777template <soa::is_index_table T>
766778constexpr auto transformBase ()
767779{
768780 using metadata = typename aod::MetadataTrait<o2::aod::Hash<T::ref.desc_hash >>::metadata;
769781 return TableTransform<metadata, T::ref>{};
770782}
771783
784+ // / In a multi-origin case the origin is provided by the type
785+ // / FIXME: In a rewritten origin case the output designation needs to be changed (through base class)
786+ // / The extraction of the elements needs to be changed in AnalysisManagers using the origin information from the base class
787+
772788template <soa::is_index_table T>
773789struct Builds : decltype (transformBase<T>()) {
774790 using buildable_t = T;
@@ -818,6 +834,10 @@ concept is_builds = requires(T t) {
818834 requires std::same_as<decltype (t.map ), std::vector<soa::IndexRecord>>;
819835};
820836
837+
838+ // / a task with rewritten origin, if running together with a task with the default, will
839+ // / have a different name and thus its output would be routed separately
840+
821841// / This helper class allows you to declare things which will be created by a
822842// / given analysis task. Currently wrapped objects are limited to be TNamed
823843// / descendants. Objects will be written to a ROOT file at the end of the
@@ -958,6 +978,13 @@ auto getTableFromFilter(soa::is_not_filtered_table auto const& table, soa::Selec
958978
959979void initializePartitionCaches (std::set<uint32_t > const & hashes, std::shared_ptr<arrow::Schema> const & schema, expressions::Filter const & filter, gandiva::NodePtr& tree, gandiva::FilterPtr& gfilter);
960980
981+ // / Partition ties directly to the argument type
982+ // / in a case with several origins in subscriptions it will get the correct input, as the type contains the origin
983+ // / in a case with rewritten origin the type stays the same, so the association stays correct
984+ // / FIXME: currently partition has to rerun the selection each time the invokeProcess is called
985+ // / the real reason is to provide grouped parts for the process functions that request it
986+ // / better solution would be to "slice" the selection, as is already done in GroupSlicer
987+ // / for the same purpose, instead of reapplying the filtering
961988template <typename T>
962989struct Partition {
963990 using content_t = T;
0 commit comments