Protection for negative time bin added
authorsgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Aug 2011 16:01:48 +0000 (16:01 +0000)
committersgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Aug 2011 16:01:48 +0000 (16:01 +0000)
HLT/TPCLib/HWCFemulator/AliHLTTPCHWCFProcessorUnit.cxx

index b16a617..2d577c1 100644 (file)
@@ -206,7 +206,7 @@ const AliHLTTPCHWCFClusterFragment *AliHLTTPCHWCFProcessorUnit::OutputStream()
   fBunchIndex = clusterStart;  
   AliHLTInt32_t bunchTime = fkBunch->fTime - clusterStart;
 
-  for( ; fBunchIndex < clusterEnd; fBunchIndex++, bunchTime-- ){
+  for( ; fBunchIndex < clusterEnd && bunchTime>=0; fBunchIndex++, bunchTime-- ){
     AliHLTUInt64_t q = fkBunch->fData[fBunchIndex]*fkBunch->fGain;
     if (fOutput.fQmax < q) fOutput.fQmax = q;
     fOutput.fQ += q;