Changed behaviour for the case where LGB > Histo Size. New: LGB = (Histo Size - 1) together with a warning instead of issuing an error.
This commit is contained in:
@ -1560,11 +1560,17 @@ Bool_t PRunSingleHisto::GetProperDataRange()
|
||||
return false;
|
||||
}
|
||||
// 3rd check if end is within proper bounds
|
||||
if ((end < 0) || (end > (Int_t)fForward.size())) {
|
||||
if (end < 0) {
|
||||
cerr << endl << ">> PRunSingleHisto::GetProperDataRange(): **ERROR** end data bin (" << end << ") doesn't make any sense!";
|
||||
cerr << endl;
|
||||
return false;
|
||||
}
|
||||
if (end > (Int_t)fForward.size()) {
|
||||
cerr << endl << ">> PRunSingleHisto::GetProperDataRange(): **WARNING** end data bin (" << end << ") > histo length (" << (Int_t)fForward.size() << ").";
|
||||
cerr << endl << ">> Will set end = (histo length - 1). Consider to change it in the msr-file." << endl;
|
||||
cerr << endl;
|
||||
end = (Int_t)fForward.size()-1;
|
||||
}
|
||||
|
||||
// keep good bins for potential later use
|
||||
fGoodBins[0] = start;
|
||||
|
Reference in New Issue
Block a user