// HitWeights, ClusterDataIndex
fNumberOfHitsPlusAlign * 2 * sizeof( int );
- if ( 1 ){// fMemorySize < memorySize ) { // release the memory on CPU
- fMemorySize = memorySize;
- if (allocate && !fIsGpuSliceData)
+ if ( 1 )// fMemorySize < memorySize ) { // release the memory on CPU
+ {
+ fMemorySize = memorySize + 4;
+ if (allocate)
{
- if (fMemory)
+ if (!fIsGpuSliceData)
+ {
+ if (fMemory)
+ {
+ delete[] fMemory;
+ }
+ fMemory = new char[fMemorySize];// kVectorAlignment];
+ }
+ else
{
- delete[] fMemory;
+ if (fMemorySize > HLTCA_GPU_SLICE_DATA_MEMORY)
+ {
+ return(0);
+ }
}
- fMemory = new char[fMemorySize + 4];// kVectorAlignment];
}
}
}
const int memorySize = fNumberOfHits * sizeof( short_v::Type )
*/
- SetPointers(&data, true);
+ if (SetPointers(&data, true) == 0) return;
////////////////////////////////////
// 2. fill HitData and FirstHitInBin
Logging( kHLTLogDebug, "HLT::TPCCATracker::DoEvent", "Reading hits",
"Total %d hits to read for slice %d", nClustersTotal, slice );
+ if (nClustersTotal > 500000)
+ {
+ HLTWarning( "Too many clusters in tracker input: Slice %d, Number of Clusters %d, some clusters are droped", slice, nClustersTotal );
+ nClustersTotal = 500000;
+ }
+
clusterData[islice].StartReading( slice, nClustersTotal );
+ int nSliceClust = 0;
for ( std::vector<unsigned long>::iterator pIter = patchIndices.begin(); pIter != patchIndices.end(); pIter++ ) {
ndx = *pIter;
HLTError( "Wrong TPC cluster with row number %d received", c->fPadRow );
continue;
}
- clusterData[islice].ReadCluster( c->fID, c->fPadRow, c->fX, c->fY, c->fZ, c->fCharge );
+ if (nSliceClust < nClustersTotal)
+ {
+ clusterData[islice].ReadCluster( c->fID, c->fPadRow, c->fX, c->fY, c->fZ, c->fCharge );
+ nSliceClust++;
+ }
}
} else
if ( iter->fDataType == AliHLTTPCCADefinitions::fgkCompressedInputDataType){
UInt_t cluId = AliHLTTPCSpacePointData::GetID( jslice, jpatch, nPatchClust );
//cout<<"clu "<<i<<": "<<x<<" "<<y<<" "<<z<<" "<<cluId<<endl;
- if ( CAMath::Abs( z ) <= fClusterZCut ){
+ if ( CAMath::Abs( z ) <= fClusterZCut && nSliceClust < nClustersTotal){
clusterData[islice].ReadCluster( cluId, jrow, x, y, z, 0 );
+ nSliceClust++;
}
nPatchClust++;
}
for (int islice = 0;islice < slicecount;islice++)
{
if( outputControl.fEndOfSpace ){
- HLTWarning( "Output buffer size exceed, tracks are not stored" );
+ HLTWarning( "Output buffer size exceed (buffer size %d, current size %d), tracks are not stored", maxBufferSize, mySize );
ret = -ENOSPC;
error = 1;
break;
}
else
{
- HLTWarning( "Output buffer size exceed (buffer size %d, current size %d), tracks are not stored", maxBufferSize, mySize );
+ HLTWarning( "Error during Tracking, no tracks stored" );
mySize = 0;
ret = -ENOSPC;
ntracks = 0;