Skip to content

Improve MuDst accessors to prevent using nullptrs #765

@jdbrice

Description

@jdbrice

While discussing the FwdPicoDst integration several places where MuDst uses potentially unsafe pointers came up, see for example:

  • primaryTracks()
  • primaryVertex()
static StMuPrimaryVertex* primaryVertex() { return (StMuPrimaryVertex*)arrays[muPrimaryVertex]->UncheckedAt(mCurrVertexId); }

e.g.
arrays[muPrimaryVertex] can be null in rare cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions