bugfix: corrected stimated size for emulated tracks (Theodor)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Dec 2009 12:58:10 +0000 (12:58 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Dec 2009 12:58:10 +0000 (12:58 +0000)
HLT/TRD/AliHLTTRDUtils.cxx

index b865419..c89b702 100644 (file)
@@ -229,7 +229,7 @@ void AliHLTTRDUtils::EmulateHLTClusters(TClonesArray* clusterArray)
 
 void AliHLTTRDUtils::EmulateHLTTracks(TClonesArray* trackArray)
 {
-  AliHLTUInt32_t estimatedSize = trackArray->GetEntriesFast()*(sizeof(AliHLTTRDTrack)+6*(sizeof(AliHLTTRDTracklet)+30*sizeof(AliHLTTRDCluster)));
+  AliHLTUInt32_t estimatedSize = (trackArray->GetEntriesFast()+1)*(sizeof(AliHLTTRDTrack)+6*(sizeof(AliHLTTRDTracklet)+30*sizeof(AliHLTTRDCluster)));
   AliHLTUInt8_t* pBlock = (AliHLTUInt8_t*)malloc(estimatedSize);
   AliHLTUInt32_t size = AddTracksToOutput(trackArray, pBlock);
   trackArray->Delete();