fDoMerge = 1;
- if (iResult>=0) iResult = ConfigureFromCDBTObjString(fgkOCDBEntry);
+ //!! if (iResult>=0) iResult = ConfigureFromCDBTObjString(fgkOCDBEntry);
if (iResult>=0 && argc>0) iResult = ConfigureFromArgumentString(argc, argv);
// see header file for class documentation
fDoMerge = 1;
- int iResult = ConfigureFromCDBTObjString(fgkOCDBEntry);
+ int iResult = 0;
+ //!! iResult = ConfigureFromCDBTObjString(fgkOCDBEntry);
if ( iResult>=0 ) iResult = InitClusterMerger();
return iResult;
}
// OCDB entries for component arguments
- targetMap->Add(new TObjString(fgkOCDBEntry), new TObjString("component argument for HW cluster decoder"));
+ //!! targetMap->Add(new TObjString(fgkOCDBEntry), new TObjString("component argument for HW cluster decoder"));
}
fBenchmark.StartNewEvent();
fBenchmark.Start(0);
- UInt_t outputBlocksSize = outputBlocks.size();
+ AliHLTUInt8_t* origOutputPtr = outputPtr;
+ UInt_t origOutputBlocksSize = outputBlocks.size();
for( unsigned long ndx=0; ndx<evtData.fBlockCnt; ndx++ ){
AliHLTComponentBlockData bd;
FillBlockData( bd );
bd.fOffset = size;
- bd.fSize = iter->fSize;
- bd.fPtr = outputPtr;
+ bd.fSize = iter->fSize;
bd.fSpecification = iter->fSpecification;
bd.fDataType = iter->fDataType;
outputBlocks.push_back( bd );
// fill into HLT output data
AliHLTComponentBlockData bdRawClusters;
FillBlockData( bdRawClusters );
- bdRawClusters.fOffset = size;
- bdRawClusters.fPtr = outputPtr;
+ bdRawClusters.fOffset = size;
bdRawClusters.fSize = sizeof(AliHLTTPCRawClusterData)+outputRaw->fCount*sizeof(AliHLTTPCRawCluster);
bdRawClusters.fSpecification = iter->fSpecification;
bdRawClusters.fDataType = AliHLTTPCDefinitions::fgkRawClustersDataType | kAliHLTDataOriginTPC;
if( fDoMerge && fpClusterMerger ){
fpClusterMerger->Clear();
- for( UInt_t i=outputBlocksSize; i<outputBlocks.size(); i++){
+ fpClusterMerger->SetDataPointer(origOutputPtr);
+ for( UInt_t i=origOutputBlocksSize; i<outputBlocks.size(); i++){
fpClusterMerger->SetDataBlock(&(outputBlocks[i]));
}
int nMerged = fpClusterMerger->Merge();
fpClusterMerger->Clear();
HLTInfo("Merged %d clusters",nMerged);
}
-
+
fBenchmark.Stop(0);
HLTInfo(fBenchmark.GetStatistics());
, fNBorders(0)
, fMapping(0)
, fBorders()
+ , fpData(NULL)
, fRawClusterBlocks(NULL)
, fMCBlocks(NULL)
{
}
}
+ Clear();
+
return iResult;
}
HLTError("Input NULL pointer to data block");
return -1;
}
-
- if( !block->fPtr ){
- HLTError("fPtr pointer to data is not set in the input data block");
- return -1;
- }
Int_t blockType=0;
// fClusters.~vector<AliClusterRecord>();
// new(&fClusters) vector<AliClusterRecord>;
+ fpData = NULL;
for( int i=0; i<fkNSlices*fkNPatches; i++){
fRawClusterBlocks[i] = NULL;
fMCBlocks[i] = NULL;
if( !fMapping ) Init();
if( !fMapping ) return 0;
+ if( !fpData ){
+ HLTError("Pointer to input data is not set");
+ return -1;
+ }
+
+
int iResult = 0;
int count = 0;
for( int iBorder=0; iBorder<fNBorders; iBorder++) fBorderClusters[iBorder].clear();
for( int iPatch=0; iPatch<fkNPatches; iPatch++){
- int iSlicePatch = iSlice*fkNSlices+iPatch;
+ int iSlicePatch = iSlice*fkNPatches+iPatch;
AliHLTComponentBlockData *block = fRawClusterBlocks[iSlicePatch];
if( !block ) continue;
- AliHLTTPCRawClusterData* clusters= (AliHLTTPCRawClusterData*)(block->fPtr);
+ AliHLTTPCRawClusterData* clusters= (AliHLTTPCRawClusterData*)( fpData + block->fOffset);
if(!clusters) continue;
AliHLTComponentBlockData *mcblock = fMCBlocks[iSlicePatch];
AliHLTTPCClusterMCData* mclabels = 0;
- if( mcblock ) mclabels = (AliHLTTPCClusterMCData*)(mcblock->fPtr);
+ if( mcblock ) mclabels = (AliHLTTPCClusterMCData*)(fpData + mcblock->fOffset );
if( mclabels && mclabels->fCount != clusters->fCount ){
HLTError("Slice %d, patch %d: Number of MC labels (%d) not equal to N clusters (%d)", iSlice, iPatch, mclabels->fCount, clusters->fCount );
mclabels->fCount = 0;
mclabels = 0;
fMCBlocks[iSlicePatch] = 0;
}
-
+
for( UInt_t iCluster=0; iCluster<clusters->fCount; iCluster++){
AliHLTTPCRawCluster &cluster = clusters->fClusters[iCluster];
} // patches
- for( int iBorder=0; iBorder<fNBorders; iBorder+=2){
+ for( int iBorder=0; iBorder<fNBorders; iBorder+=2){
vector<AliBorderRecord> &border1 = fBorderClusters[iBorder];
vector<AliBorderRecord> &border2 = fBorderClusters[iBorder+1];
UInt_t n1 = border1.size();
- UInt_t n2 = border2.size();
+ UInt_t n2 = border2.size();
if( n1==0 || n2==0 ) continue;
// sort
}
} // iBorder
+
// remove merged clusters from data
for( int iPatch=0; iPatch<fkNPatches; iPatch++){
- int iSlicePatch = iSlice*fkNSlices+iPatch;
+ int iSlicePatch = iSlice*fkNPatches+iPatch;
AliHLTComponentBlockData *block = fRawClusterBlocks[iSlicePatch];
if( !block ) continue;
- AliHLTTPCRawClusterData* clusters= (AliHLTTPCRawClusterData*)(block->fPtr);
+ AliHLTTPCRawClusterData* clusters= (AliHLTTPCRawClusterData*)(fpData + block->fOffset);
if(!clusters) continue;
AliHLTUInt32_t nClustersOrig = clusters->fCount;
AliHLTComponentBlockData *mcblock = fMCBlocks[iSlicePatch];
AliHLTTPCClusterMCData* mclabels = 0;
- if( mcblock ) mclabels = (AliHLTTPCClusterMCData*)(mcblock->fPtr);
+ if( mcblock ) mclabels = (AliHLTTPCClusterMCData*)(fpData + mcblock->fOffset);
if( mclabels && mclabels->fCount != nClustersOrig ) mclabels = 0;
clusters->fCount=0;