some necessary cleanup

This commit is contained in:
nemu
2009-05-26 05:51:48 +00:00
parent 2760785bce
commit 5cadc57e13
3 changed files with 16 additions and 15 deletions

View File

@ -557,7 +557,7 @@ bool PRunSingleHisto::PrepareRawViewData(PRawRunData* runData, const unsigned in
// start = the first bin which is a multiple of packing backward from first good data bin
int start = fRunInfo->fDataRange[0] - (fRunInfo->fDataRange[0]/fRunInfo->fPacking)*fRunInfo->fPacking;
// end = last bin starting from start which is a multipl of packing and still within the data
int end = start + ((runData->fDataBin[histoNo].size()-start-1)/fRunInfo->fPacking)*fRunInfo->fPacking;
int end = start + ((runData->fDataBin[histoNo].size()-start)/fRunInfo->fPacking)*fRunInfo->fPacking;
// check if start, end, and t0 make any sense
// 1st check if start and end are in proper order
if (end < start) { // need to swap them
@ -712,8 +712,8 @@ bool PRunSingleHisto::PrepareViewData(PRawRunData* runData, const unsigned int h
// start = the first bin which is a multiple of packing backward from first good data bin
int start = fRunInfo->fDataRange[0] - (fRunInfo->fDataRange[0]/fRunInfo->fPacking)*fRunInfo->fPacking;
// end = last bin starting from start which is a multipl of packing and still within the data
int end = start + ((runData->fDataBin[histoNo].size()-start-1)/fRunInfo->fPacking)*fRunInfo->fPacking;
// end = last bin starting from start which is a multiple of packing and still within the data
int end = start + ((runData->fDataBin[histoNo].size()-start)/fRunInfo->fPacking)*fRunInfo->fPacking;
// check if start, end, and t0 make any sense
// 1st check if start and end are in proper order