fix of a time window frame bug reported in MUSR-138

This commit is contained in:
nemu
2010-08-11 13:12:31 +00:00
parent e94d869534
commit 91c66651aa
2 changed files with 33 additions and 6 deletions

View File

@@ -371,7 +371,11 @@ void PFourier::PrepareFFTwInputData(UInt_t apodizationTag)
}
// 2nd fill fIn
UInt_t start = (UInt_t)(fStartTime/fTimeResolution) + t0bin;
Int_t val = static_cast<Int_t>(fStartTime/fTimeResolution) + t0bin;
UInt_t start = 0;
if (val >= 0) {
start = static_cast<UInt_t>(static_cast<Int_t>(fStartTime/fTimeResolution) + t0bin);
}
for (UInt_t i=0; i<fNoOfData; i++) {
fIn[i][0] = fData->GetBinContent(i+start);
fIn[i][1] = 0.0;