Skip to content

Commit

Permalink
Update Injector.cxx to fixes failed_tries bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nickkamp1 authored Aug 22, 2024
1 parent a6d66aa commit 4414cbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/injection/private/Injector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ siren::dataclasses::InteractionRecord Injector::SampleSecondaryProcess(siren::da
size_t tries = 0;
size_t failed_tries = 0;
while(true) {
tries += 1;
// // std::cout << "gotcha" << std::endl;
// for(auto & distribution : secondary_distributions) {
// // std::cout << "sample distribution" << std::endl;
Expand Down Expand Up @@ -364,7 +365,7 @@ siren::dataclasses::InteractionRecord Injector::SampleSecondaryProcess(siren::da
}
continue;
}
if(failed_tries > max_tries) {
if(tries > max_tries) {
throw(siren::utilities::InjectionFailure("Failed to generate secondary process!"));
break;
}
Expand Down

0 comments on commit 4414cbb

Please sign in to comment.