cleaned up signed/unsigned int issues.

This commit is contained in:
2018-06-06 16:04:27 +02:00
parent 342da696db
commit 4a881fad56
11 changed files with 33 additions and 35 deletions

View File

@ -493,7 +493,7 @@ Bool_t PRunSingleHistoRRF::PrepareData()
addRunSize = addRunData->GetDataBin(histoNo[k])->size();
for (UInt_t j=0; j<addRunData->GetDataBin(histoNo[k])->size(); j++) { // loop over the bin indices
// make sure that the index stays in the proper range
if ((j+(Int_t)fAddT0s[i-1][k]-(Int_t)fT0s[k] >= 0) && (j+(Int_t)fAddT0s[i-1][k]-(Int_t)fT0s[k] < addRunSize)) {
if (((Int_t)j+(Int_t)fAddT0s[i-1][k]-(Int_t)fT0s[k] >= 0) && (j+(Int_t)fAddT0s[i-1][k]-(Int_t)fT0s[k] < addRunSize)) {
forward[k][j] += addRunData->GetDataBin(histoNo[k])->at(j+(Int_t)fAddT0s[i-1][k]-(Int_t)fT0s[k]);
}
}
@ -511,7 +511,7 @@ Bool_t PRunSingleHistoRRF::PrepareData()
for (UInt_t i=1; i<histoNo.size(); i++) { // loop over the groupings
for (UInt_t j=0; j<runData->GetDataBin(histoNo[i])->size(); j++) { // loop over the bin indices
// make sure that the index stays within proper range
if ((j+fT0s[i]-fT0s[0] >= 0) && (j+fT0s[i]-fT0s[0] < runData->GetDataBin(histoNo[i])->size())) {
if (((Int_t)j+fT0s[i]-fT0s[0] >= 0) && (j+fT0s[i]-fT0s[0] < runData->GetDataBin(histoNo[i])->size())) {
fForward[j] += forward[i][j+(Int_t)fT0s[i]-(Int_t)fT0s[0]];
}
}
@ -1173,7 +1173,7 @@ Bool_t PRunSingleHistoRRF::EstimateBkg(UInt_t histoNo)
}
// check if start is within histogram bounds
if ((start < 0) || (start >= fForward.size())) {
if (start >= fForward.size()) {
cerr << endl << ">> PRunSingleHistoRRF::EstimatBkg(): **ERROR** background bin values out of bound!";
cerr << endl << ">> histo lengths = " << fForward.size();
cerr << endl << ">> background start = " << start;
@ -1182,7 +1182,7 @@ Bool_t PRunSingleHistoRRF::EstimateBkg(UInt_t histoNo)
}
// check if end is within histogram bounds
if ((end < 0) || (end >= fForward.size())) {
if (end >= fForward.size()) {
cerr << endl << ">> PRunSingleHistoRRF::EstimatBkg(): **ERROR** background bin values out of bound!";
cerr << endl << ">> histo lengths = " << fForward.size();
cerr << endl << ">> background end = " << end;