using namespace std;
#endif
#include "AliHLTTPCClusterFinderComponent.h"
-#include "AliHLTTPCDigitReaderPacked.h"
#include "AliHLTTPCDigitReaderUnpacked.h"
-#include "AliHLTTPCDigitReaderDecoder.h"
#include "AliHLTTPCDigitReader32Bit.h"
#include "AliHLTTPCClusterFinder.h"
#include "AliHLTTPCSpacePointData.h"
#include "AliTPCcalibDB.h"
#include "AliTPCCalPad.h"
#include "AliTPCParam.h"
+#include "AliTPCTransform.h"
+#include "AliHLTTPCClusterMCData.h"
+
//#include "AliHLTTPCCAInputDataCompressorComponent.h"
//#include "AliHLTTPCCADef.h"
fClusterFinder(NULL),
fReader(NULL),
fDeconvTime(kFALSE),
+ fTS(0),
fDeconvPad(kFALSE),
fClusterDeconv(false),
fXYClusterError(-1),
fLastTimeBin(-1),
fDoMC(kFALSE),
fReleaseMemory( kFALSE ),
+ fPublishRawClusters(kFALSE),
fBenchmark("TPCClusterFinder")
{
// see header file for class documentation
// see header file for class documentation
list.clear();
switch(fModeSwitch){
- case kClusterFinderPacked:
- list.push_back( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC );
- break;
case kClusterFinderUnpacked:
list.push_back( AliHLTTPCDefinitions::fgkUnpackedRawDataType );
break;
- case kClusterFinderDecoder:
- list.push_back( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC );
- break;
+ case kClusterFinderDecoder: // deprecated, falling back to 32bit reader
+ case kClusterFinderPacked: // deprecated, falling back to 32bit reader
case kClusterFinder32Bit:
list.push_back( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC );
break;
// XXX TODO: Find more realistic values.
constBase = 0;
switch(fModeSwitch){
- case kClusterFinderPacked:
- inputMultiplier = (6 * 0.4);
- break;
case kClusterFinderUnpacked:
inputMultiplier = 0.4;
break;
- case kClusterFinderDecoder:
- inputMultiplier = (6 * 0.4);
- break;
+ case kClusterFinderDecoder: // deprecated, falling back to 32bit reader
+ case kClusterFinderPacked: // deprecated, falling back to 32bit reader
case kClusterFinder32Bit:
inputMultiplier = (6 * 0.4);
break;
HLTError("AliTPCcalibDB does not exist");
return -ENOENT;
}
+
+ fTS = calib->GetTransform();
+
calib->SetRun(GetRunNo());
calib->UpdateRunInformations(GetRunNo());
AliTPCCalPad * time0TPC = calib->GetPadTime0();
// Choose reader
if (fModeSwitch==kClusterFinderPacked) {
- HLTDebug("using AliHLTTPCDigitReaderPacked");
- fReader = new AliHLTTPCDigitReaderPacked();
- if(fUnsorted==1){ fReader->SetUnsorted(kTRUE); }
- fClusterFinder->SetReader(fReader);
+ HLTWarning("AliHLTTPCDigitReaderPacked is deprecated, falling back to AliHLTTPCDigitReader32Bit");
}
- else if(fModeSwitch==kClusterFinderUnpacked){
+ else if(fModeSwitch==kClusterFinderDecoder){
+ HLTWarning("AliHLTTPCDigitReaderPacked is deprecated, falling back to AliHLTTPCDigitReader32Bit");
+ }
+
+ if(fModeSwitch==kClusterFinderUnpacked){
HLTDebug("using AliHLTTPCDigitReaderUnpacked");
fReader = new AliHLTTPCDigitReaderUnpacked();
if(fUnsorted==1){ fReader->SetUnsorted(kTRUE); }
fClusterFinder->SetReader(fReader);
}
- else if(fModeSwitch==kClusterFinderDecoder){
- HLTDebug("using AliHLTTPCDigitReaderDecoder");
- fReader = new AliHLTTPCDigitReaderDecoder();
- fClusterFinder->SetReader(fReader);
- }
- else if(fModeSwitch==kClusterFinder32Bit){
+ else if(fModeSwitch==kClusterFinder32Bit ||
+ fModeSwitch==kClusterFinderPacked ||
+ fModeSwitch==kClusterFinderDecoder){
HLTDebug("using AliHLTTPCDigitReader32Bit");
fReader = new AliHLTTPCDigitReader32Bit();
fClusterFinder->SetReader(fReader);
// fDeconvPad = kTRUE;
//fClusterFinder->SetDeconvPad(fDeconvPad);
+
+ fTS->SetCurrentTimeStamp(GetTimeStamp());
+ //fTS->SetCurrentTimeStamp(0);
if(fReader == NULL){
HLTFatal("Digit reader not initialized, skipping HLT TPC cluster reconstruction.");
DataType2Text( iter->fDataType).c_str(),
DataType2Text(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC).c_str());
- if (iter->fDataType == AliHLTTPCDefinitions::fgkDDLPackedRawDataType &&
- GetEventCount()<2) {
- HLTWarning("data type %s is depricated, use %s (kAliHLTDataTypeDDLRaw)!",
- DataType2Text(AliHLTTPCDefinitions::fgkDDLPackedRawDataType).c_str(),
- DataType2Text(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC).c_str());
- }
-
- if ( iter->fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC) &&
- iter->fDataType != AliHLTTPCDefinitions::fgkDDLPackedRawDataType ) continue;
+ if ( iter->fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC)) continue;
}
else if(fModeSwitch==1){
maxPoints = (size-tSize-sizeof(AliHLTTPCClusterData))/sizeof(AliHLTTPCSpacePointData);
+ fClusterFinder->SetFillRawClusters(fPublishRawClusters);
fClusterFinder->InitSlice( slice, patch, maxPoints );
fClusterFinder->SetOutputArray( (AliHLTTPCSpacePointData*)outPtr->fSpacePoints );
*/
if(fDoMC){
- Int_t maxNumberOfClusterMCInfo = (Int_t)((size-tSize)/sizeof(AliHLTTPCClusterFinder::ClusterMCInfo)-1);
- AliHLTTPCClusterFinder::ClusterMCInfo* outputMCInfo= (AliHLTTPCClusterFinder::ClusterMCInfo*)(outputPtr+tSize);
- Int_t nMCInfo = fClusterFinder->FillOutputMCInfo(outputMCInfo, maxNumberOfClusterMCInfo);
-
- AliHLTComponentBlockData bdMCInfo;
- FillBlockData( bdMCInfo );
- bdMCInfo.fOffset = tSize ;
- bdMCInfo.fSize = nMCInfo*sizeof(AliHLTTPCClusterFinder::ClusterMCInfo);
- bdMCInfo.fSpecification = iter->fSpecification;
- bdMCInfo.fDataType = AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo;
- outputBlocks.push_back( bdMCInfo );
- fBenchmark.AddOutput(bdMCInfo.fSize);
-
- tSize+=nMCInfo*sizeof(AliHLTTPCClusterFinder::ClusterMCInfo);
+ Int_t maxNumberOfClusterMCInfo = (Int_t)((size-tSize-sizeof(AliHLTTPCClusterMCData))/sizeof(AliHLTTPCClusterMCLabel)-1);
+ if( maxNumberOfClusterMCInfo>0 ){
+ AliHLTTPCClusterMCData* outputMCInfo= (AliHLTTPCClusterMCData*)(outputPtr+tSize);
+ outputMCInfo->fCount = fClusterFinder->FillOutputMCInfo(outputMCInfo->fLabels, maxNumberOfClusterMCInfo);
+
+ AliHLTComponentBlockData bdMCInfo;
+ FillBlockData( bdMCInfo );
+ bdMCInfo.fOffset = tSize;
+ bdMCInfo.fSize = sizeof(AliHLTTPCClusterMCData)+outputMCInfo->fCount*sizeof(AliHLTTPCClusterMCLabel);
+ bdMCInfo.fSpecification = iter->fSpecification;
+ bdMCInfo.fDataType = AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo;
+ outputBlocks.push_back( bdMCInfo );
+ fBenchmark.AddOutput(bdMCInfo.fSize);
+ tSize+=bdMCInfo.fSize;
+ }
+ }
+ if (fPublishRawClusters) {
+ AliHLTTPCRawClusterData* outputRaw= (AliHLTTPCRawClusterData*)(outputPtr+tSize);
+ outputRaw->fCount = fClusterFinder->FillOutputRaw(outputRaw->fClusters, size-tSize);
+
+ AliHLTComponentBlockData bdRawClusters;
+ FillBlockData( bdRawClusters );
+ bdRawClusters.fOffset = tSize;
+ bdRawClusters.fSize = sizeof(AliHLTTPCRawClusterData)+outputRaw->fCount*sizeof(AliHLTTPCRawCluster);
+ bdRawClusters.fSpecification = iter->fSpecification;
+ bdRawClusters.fDataType = AliHLTTPCDefinitions::fgkRawClustersDataType;
+ outputBlocks.push_back( bdRawClusters );
+ fBenchmark.AddOutput(bdRawClusters.fSize);
+ tSize+=bdRawClusters.fSize;
}
}
HLTDebug("Setting fReleaseMemory to true.");
return 1;
}
+ if (argument.CompareTo("-publish-raw")==0) {
+ fPublishRawClusters=kTRUE;
+ fClusterFinder->SetFillRawClusters(fPublishRawClusters);
+ return 1;
+ }
if (argument.CompareTo("-active-pads")==0 || argument.CompareTo("activepads")==0){
if(argument.CompareTo("activepads" )==0){
if (!targetMap) return;
// OCDB entries for component arguments
- targetMap->Add(new TObjString("HLT/ConfigTPC/TPCClusterFinder32Bit"), new TObjString("component arguments, empty at the moment"));
- targetMap->Add(new TObjString("HLT/ConfigTPC/TPCClusterFinderPacked"), new TObjString("component arguments, empty at the moment"));
- targetMap->Add(new TObjString("HLT/ConfigTPC/TPCClusterFinderUnpacked"), new TObjString("component arguments, empty at the moment"));
- targetMap->Add(new TObjString("HLT/ConfigTPC/TPCClusterFinderDecoder"), new TObjString("component arguments, empty at the moment"));
+ switch(fModeSwitch){
+ case kClusterFinderPacked:
+ // deprecated but kept for a short while to support porting to release
+ targetMap->Add(new TObjString("HLT/ConfigTPC/TPCClusterFinderPacked"), new TObjString("component arguments, empty at the moment"));
+ break;
+ case kClusterFinderUnpacked:
+ targetMap->Add(new TObjString("HLT/ConfigTPC/TPCClusterFinderUnpacked"), new TObjString("component arguments, empty at the moment"));
+ break;
+ case kClusterFinderDecoder:
+ // deprecated but kept for a short while to support porting to release
+ targetMap->Add(new TObjString("HLT/ConfigTPC/TPCClusterFinderDecoder"), new TObjString("component arguments, empty at the moment"));
+ break;
+ case kClusterFinder32Bit:
+ targetMap->Add(new TObjString("HLT/ConfigTPC/TPCClusterFinder32Bit"), new TObjString("component arguments, empty at the moment"));
+ break;
+ }
// OCDB entries to be fetched by the TAXI (access via the AliTPCcalibDB class)
targetMap->Add(new TObjString("TPC/Calib/Parameters"), new TObjString("unknown content"));