Skip to content

Commit

Permalink
Merge pull request #153 from JeffersonLab/aaust_BeamProperties_Infini…
Browse files Browse the repository at this point in the history
…teLoop

Guard against no flux entries in CCDB
  • Loading branch information
T-Britton authored Sep 14, 2020
2 parents 81eb5fc + b608250 commit cdfc7ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libraries/UTILITIES/BeamProperties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@ void BeamProperties::fillFluxFromCCDB() {
if(accept < 0.01) flux = 0; // remove very low acceptance regions to avoid fluctuations
fluxVsEgamma->Fill(energy, flux);
}

if (fluxVsEgamma->Integral() == 0){
cout << "ERROR: Flux in CCDB not available for this energy range!" << endl;
exit(101);
}

return;
}
Expand Down

0 comments on commit cdfc7ef

Please sign in to comment.