added more histo length versus fgb, lgb checks.

This commit is contained in:
2025-07-11 13:05:49 +02:00
parent 06a509a420
commit 392a0b089d
4 changed files with 55 additions and 3 deletions

View File

@@ -1003,6 +1003,15 @@ Bool_t PRunSingleHistoRRF::GetProperDataRange()
fGoodBins[0] = start;
fGoodBins[1] = end;
// make sure that fGoodBins are in proper range for fForward
if (fGoodBins[0] < 0)
fGoodBins[0]=0;
if (fGoodBins[1] > fForward.size()) {
std::cerr << std::endl << ">> PRunSingleHisto::GetProperDataRange **WARNING** needed to shift forward lgb,";
std::cerr << std::endl << ">> from " << fGoodBins[1] << " to " << fForward.size()-1 << std::endl;
fGoodBins[1]=fForward.size()-1;
}
return true;
}