Simplify Pr::Tracks
Implements ideas to simplify Pr::Tracks.
Goes with Rec!2239 (merged) Phys!812 (merged)
@olupton @peilian @chasse @sstahl @sponce
- Remove the need for the end-user to write variadic template code
- Provide default (base_class) proxies to reduce boilerplate
- Give more meaning to the Tags allowing to generate index computation and sanity checks automatically, avoiding user mistakes
- Remove the need of preprocessor macros for defining proxies
- Simplify zipping and proxy implementation
Before/after track definition example:
Before:
- https://gitlab.cern.ch/lhcb/LHCb/-/blob/master/Event/TrackEvent/Event/PrDownstreamTracks.h
- https://gitlab.cern.ch/lhcb/LHCb/-/blob/master/Event/TrackEvent/Event/PrTracksTag.h#L123
After:
New Proxy/Zipping implementation:
- https://gitlab.cern.ch/lhcb/LHCb/-/blob/87a56ca04cba1cb956e137dfdd5a471765defeb1/Event/EventBase/Event/Proxy.h
- https://gitlab.cern.ch/lhcb/LHCb/-/blob/87a56ca04cba1cb956e137dfdd5a471765defeb1/Event/EventBase/Event/SOAZip.h
This zipping/proxy is used by default when requesting an iterator on an SOACollection derived container:
for (auto proxy : tracks.scalar()) {}
for (auto proxy : tracks.simd()) {}
It can also be used as an alternative to the current zipping:
auto zipped = LHCb::v2::Event::make_zip( tracks, muonPIDs );
// instead of
auto zipped = LHCb::Pr::make_zip( tracks, muonPIDs );
- to continue using the current zipping, the macro-style proxy must also be defined
- the new proxy support reading and writing
Edited by Peilian Li