Skip to content
Snippets Groups Projects
Commit 461a007c authored by Roel Aaij's avatar Roel Aaij
Browse files

Merge branch 'decianm-addLHCbIDsMethodToV3Tracks' into 'master'

Add LHCbIDs method to v3::Tracks

See merge request !3393
parents 5bc83b79 7e79f3a2
No related branches found
No related tags found
2 merge requests!3702merge counter decoder into Louis' original branch,!3393Add LHCbIDs method to v3::Tracks
Pipeline #3611652 passed
......@@ -197,6 +197,8 @@ namespace LHCb::Event::v3 {
using base_t = typename Tag::Track_t<Tracks>;
using StateLocation = detail::StateLocation;
constexpr static auto MaxLHCbIDs = TracksInfo::MaxFTHits + TracksInfo::MaxVPHits + TracksInfo::MaxUTHits;
using base_t::allocator_type;
Tracks( TrackType trackType, LHCb::UniqueIDGenerator const& unique_id_gen,
Zipping::ZipFamilyNumber zipIdentifier = Zipping::generateZipIdentifier(), allocator_type alloc = {} )
......@@ -332,6 +334,15 @@ namespace LHCb::Event::v3 {
}
[[nodiscard, gnu::always_inline]] auto type() const { return this->container()->type(); }
// Retrieve the (sorted) set of LHCbIDs
[[nodiscard]] std::vector<LHCbID> lhcbIDs() const {
static_assert( width() == 1, "lhcbIDs() method cannot be used on vector proxies" );
std::vector<LHCbID> ids;
ids.reserve( Tracks::MaxLHCbIDs );
for ( auto i = 0; i < nHits().cast(); i++ ) { ids.emplace_back( lhcbID( i ).LHCbID() ); }
return ids;
}
};
template <SIMDWrapper::InstructionSet simd, LHCb::Pr::ProxyBehaviour behaviour, typename ContainerType>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment