@@ -131,14 +131,6 @@ struct ClusterSourceInput {
131131 RuntimeROFViews rofViews{};
132132};
133133
134- // / Clear and fill a configured frame. On failure, the caller must reset the
135- // / frame before reuse; partially loaded data must not be published.
136- void loadSources (TimeFrame&, const SurfaceCatalogView&,
137- gsl::span<const ClusterSourceInput>,
138- const o2::InteractionRecord&,
139- std::vector<std::vector<uint32_t >>* externalIndicesBySurface = nullptr ,
140- std::vector<std::vector<uint32_t >>* clusterSizesBySurface = nullptr );
141-
142134// / Reset, decode, and normalize all sources into a configured TimeFrame.
143135// / Invalid input throws. On failure, the caller must reset the frame before
144136// / reuse; partially loaded data must not be published.
@@ -150,12 +142,11 @@ void loadTimeFrameSources(TimeFrame&, gsl::span<const ClusterSourceInput>,
150142namespace detail
151143{
152144void prepareSources (TimeFrame&, const SurfaceCatalogView&, gsl::span<const ClusterSourceInput>,
153- std::vector<std::vector<uint32_t >>*, std::vector<std::vector<uint32_t >>*);
145+ std::vector<std::vector<uint32_t >>*, std::vector<std::vector<uint32_t >>*, bool requireCompleteMapping = false );
154146void validateSource (const ClusterSourceInput&, const o2::InteractionRecord&);
155147void appendCluster (TimeFrame&, const SurfaceCatalogView&, const ClusterSourceInput&, const DecodedCluster&,
156148 uint32_t , uint32_t , std::vector<std::vector<uint32_t >>&, std::vector<std::vector<uint32_t >>&);
157- void finishTimeFrameLoading (TimeFrame&, const SurfaceCatalogView&, gsl::span<const ClusterSourceInput>,
158- const std::vector<std::vector<uint32_t >>&);
149+ void bindSourceROFNavigation (TimeFrame&, const ClusterSourceInput&, const std::vector<std::vector<int >>&);
159150
160151// Internal loading loop; geometry decoding and synthetic fixtures share the
161152// same stream consumption, diagnostics and measurement insertion.
@@ -164,6 +155,7 @@ void loadDecodedSource(TimeFrame& frame, const SurfaceCatalogView& catalog, cons
164155 const Decode& decode, std::vector<std::vector<uint32_t >>& externalIndices,
165156 std::vector<std::vector<uint32_t >>& clusterSizes)
166157{
158+ std::vector<std::vector<int >> boundaries (src.layerToSurface .size (), std::vector<int >(src.rofs .size () + 1 , 0 ));
167159 auto patterns = src.patterns .begin ();
168160 for (uint32_t r = 0 ; r < src.rofs .size (); ++r) {
169161 const auto & rof = src.rofs [r];
@@ -181,10 +173,14 @@ void loadDecodedSource(TimeFrame& frame, const SurfaceCatalogView& catalog, cons
181173 }
182174 appendCluster (frame, catalog, src, decoded, r, externalIndex, externalIndices, clusterSizes);
183175 }
176+ for (size_t layer = 0 ; layer < src.layerToSurface .size (); ++layer) {
177+ boundaries[layer][r + 1 ] = static_cast <int >(externalIndices[src.layerToSurface [layer].value ()].size ());
178+ }
184179 }
185180 if (patterns != src.patterns .end ()) {
186181 throw std::runtime_error (std::format (" Trailing cluster pattern data source={} rof={} clusterIndex={}" , src.id .value (), static_cast <uint32_t >(src.rofs .size ()), static_cast <uint32_t >(src.clusters .size ())));
187182 }
183+ bindSourceROFNavigation (frame, src, boundaries);
188184}
189185} // namespace detail
190186
0 commit comments