Skip to content
Snippets Groups Projects
Commit fe74bcb2 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau Committed by Pierre-Alain Loizeau
Browse files

Use at accessor instead of [] in CbmMatch to throw in case of invalid access, #2003

parent bdcb8504
No related branches found
No related tags found
1 merge request!1105Change Link accces in Matches to at accessor + catch nullptr when matching clusters in MatchRecoToMc, #2003 #2737
......@@ -36,9 +36,9 @@ public:
virtual ~CbmMatch();
/* Accessors */
const CbmLink& GetLink(int32_t i) const { return fLinks[i]; }
const CbmLink& GetLink(int32_t i) const { return fLinks.at(i); }
const std::vector<CbmLink>& GetLinks() const { return fLinks; }
const CbmLink& GetMatchedLink() const { return fLinks[fMatchedIndex]; }
const CbmLink& GetMatchedLink() const { return fLinks.at(fMatchedIndex); }
int32_t GetNofLinks() const { return fLinks.size(); }
double GetTotalWeight() const { return fTotalWeight; }
......
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