Provide views as separate arguments
At the moment, it is cumbersome to pass parameters in Allen, since every view requires two or more parameters to be instantiated. For instance, here is the VELO consolidated tracks container:
const Velo::Consolidated::Tracks velo_tracks {
parameters.dev_offsets_all_velo_tracks,
parameters.dev_offsets_velo_track_hit_number,
event_number,
number_of_events};
Instead, it would be much more readable and maintainable to pass around a Velo::Consolidated::ConstTracks
object after its creation, such that subsequent algorithms do not need dev_offsets_all_velo_tracks
and dev_offsets_velo_track_hit_number
, but just a single parameter like:
(DEVICE_INPUT(dev_velo_tracks_t, Velo::Consolidated::ConstTracks), dev_velo_tracks)
The only reason why this would not work yet is that the lifetime of the object dev_velo_tracks
needs to be linked to the lifetime of objects dev_offsets_all_velo_tracks
and dev_offsets_velo_track_hit_number
. The backend of the framework should evolve to support this feature, perhaps by creating yet another type of OUTPUT
, for instance a COMPOSITE_DEVICE_OUTPUT
(and COMPOSITE_HOST_OUTPUT
).