Skip to content

Commit

Permalink
Documentation fixes as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Dec 2, 2024
1 parent 58aa607 commit 46bc442
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ libraries.
## The `LinkNavigator` utility

`podio::LinkCollection`s store each link separately even if a given object is
present in several links. Additionally, they don't offer any real way to look up
objects that are linked easily (apart from manually looping and comparing
present in several links. Additionally, they don't offer any really easy way to
look up objects that are linked (apart from manually looping and comparing
elements). To alleviate these issues, we provide the `podio::LinkNavigator`
utility class that facilitates navigating links and lookups. It can be
constructed from any `podio::LinkCollection` and can then be used to retrieve
linked objects. E.g.

```cpp
const auto& recoMcLinks = event.get<edm4hep::RecoMCParticleLinkCollection>("mcrecolinks");
const auto& recoMcLinks = event.get<edm4hep::RecoMCParticleLinkCollection>("RecoMCLinks");
const auto linkNavigator = podio::LinkNavigator(recoMcLinks);
// For podio::LinkCollections with disparate types just use getLinked
Expand Down

0 comments on commit 46bc442

Please sign in to comment.