Skip to content

Commit

Permalink
Set primary type when setting interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Sep 12, 2024
1 parent 9094ed8 commit f9eb0ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/injection/private/Process.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Process & Process::operator=(Process && other) {

void Process::SetInteractions(std::shared_ptr<interactions::InteractionCollection> _interactions) {
interactions = _interactions;
primary_type = interactions->GetPrimaryType();
}

std::shared_ptr<interactions::InteractionCollection> Process::GetInteractions() const {
Expand All @@ -33,6 +34,8 @@ std::shared_ptr<interactions::InteractionCollection> Process::GetInteractions()

void Process::SetPrimaryType(siren::dataclasses::ParticleType _primary_type) {
primary_type = _primary_type;
if(interactions)
interactions->SetPrimaryType(_primary_type);
}

siren::dataclasses::ParticleType Process::GetPrimaryType() const {
Expand Down

0 comments on commit f9eb0ca

Please sign in to comment.