[ATR-20274]Change viewIndex decoration from simple index to ElementLink<ROI>
As per ATR-20274, when an online in-Views collection is collapsed into a single collection to be recorded to the bytestream, a bookeeping decoration is added to reference which View each object came from.
Offline it is then possible to see which tracks (say) came from View #0, View #1, etc. But not then which ROI was being processed by View #0 etc.
This MR changes the type of the viewIndex
decoration from int
to ElementLink<TrigRoiDescriptorCollection>
.
- The element link can still be used as a simple index, if required, but also references the ROI collection hence can be used to cross-reference with a trigger Feature's ROI allowing for a mapping of trigger Features to arbitrary persistent collections produced in-Views.
- A setter and getter is added inside
SimpleView
to cache the ROI EL entered at create-time until view-merge-time. This is because we need the EL to the persistifiableRoiDescriptor
in the global store - not the in-View shallow container used to seed the View itself. - A dictionary is added for the
ElementLink<TrigRoiDescriptorCollection>
type. Get runtime errors without this. - The Muon EVCreator spawns one new ROI per muon. This class & the EDM was updated to persist these ROI such that they are also accessible offline.
- After this MR, for every in-view object which gets written out we increase the bookeeping payload from a single simple
int32_t
calledviewIndex
to twouint32_t
as the element links persist both am_persKey
and am_persIndex
.
cc @bwynne - please check if you're OK with this. Also note that in the testing algs I left the viewIndex as an int so as to not add too much extra there. Let me know if you'd prefer this to change too.
cc @sutt - IDTrig is a prime user of this change in the monitoring
cc @sshaw, @markowen, @nakahama - I had to touch the muon code a little bit here, but the trigger logic should be unchanged. All I add is the writing to BS of the ROIs created around the muons in EventViewCreatorAlgorithmWithMuons