Project

General

Profile

Bug #13777

MCTruth::Add should have its argument constant

Added by Gianluca Petrillo about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
09/06/2016
Due date:
% Done:

0%

Estimated time:
Duration:

Description

simb::MCTruth declares Add() as:

void simb::MCTruth::Add(simb::MCParticle& part);

but it does not performs any non-const operation on the part parameter. It should therefore be changed to:
void simb::MCTruth::Add(simb::MCParticle const& part);

The addition of a move version would also be welcome:

void simb::MCTruth::Add(simb::MCParticle&& part)
  { fPartList.push_back(std::move(part)); }



Also available in: Atom PDF