#include "AliTPCcalibDB.h"
#include "AliTPCCalPad.h"
#include "AliTPCParam.h"
+//#include "AliHLTTPCCAInputDataCompressorComponent.h"
+//#include "AliHLTTPCCADef.h"
#include <cstdlib>
#include <cerrno>
#include "AliCDBManager.h"
#include "AliCDBStorage.h"
#include "TGeoGlobalMagField.h"
+#include "AliGeomManager.h"
#include <sys/time.h>
fFirstTimeBin(-1),
fLastTimeBin(-1),
fDoMC(kFALSE),
- fReleaseMemory( kFALSE )
+ fReleaseMemory( kFALSE ),
+ fBenchmark("TPCClusterFinder")
{
// see header file for class documentation
// or
tgtList.clear();
tgtList.push_back(AliHLTTPCDefinitions::fgkClustersDataType);
tgtList.push_back(kAliHLTDataTypeHwAddr16);
+ //tgtList.push_back(AliHLTTPCCADefinitions::fgkCompressedInputDataType);
return tgtList.size();
}
AliTPCcalibDB* calib=AliTPCcalibDB::Instance();
//
if(!calib){
- HLTError("AliTPCcalibCD does not exist");
+ HLTError("AliTPCcalibDB does not exist");
return -ENOENT;
}
+ calib->SetRun(GetRunNo());
+ calib->UpdateRunInformations(GetRunNo());
AliTPCCalPad * time0TPC = calib->GetPadTime0();
if(!time0TPC){
HLTError("OCDB entry TPC/Calib/PadTime0 (AliTPCcalibDB::GetPadTime0()) is not available.");
HLTError("magnetic field not initialized, please set up TGeoGlobalMagField and AliMagF");
return -ENODEV;
}
+ calib->SetExBField(GetBz());
+
+ if(!AliGeomManager::GetGeometry()){
+ AliGeomManager::LoadGeometry();
+ }
fClusterFinder = new AliHLTTPCClusterFinder();
if(fLastTimeBin>0 && fLastTimeBin>fFirstTimeBin && fLastTimeBin<=AliHLTTPCTransform::GetNTimeBins()){
fClusterFinder->SetLastTimeBin(fLastTimeBin);
}
+ fBenchmark.Reset();
+ fBenchmark.SetTimer(0,"total");
+ fBenchmark.SetTimer(1,"reco");
return iResult;
}
{
// see header file for class documentation
int iResult=0;
+ //SG!!!
+ //fDeconvTime = kTRUE;
+ //fClusterFinder->SetDeconvTime(fDeconvTime);
+ // fDeconvPad = kTRUE;
+ //fClusterFinder->SetDeconvPad(fDeconvPad);
+
if(fReader == NULL){
HLTFatal("Digit reader not initialized, skipping HLT TPC cluster reconstruction.");
return 0;
}
+ fBenchmark.StartNewEvent();
+ fBenchmark.Start(0);
+
// == init iter (pointer to datablock)
const AliHLTComponentBlockData* iter = NULL;
unsigned long ndx;
}
+ fBenchmark.AddInput(iter->fSize);
+
slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter );
patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
fClusterFinder->InitSlice( slice, patch, maxPoints );
fClusterFinder->SetOutputArray( (AliHLTTPCSpacePointData*)outPtr->fSpacePoints );
+ fBenchmark.Start(1);
+
if(fUnsorted){
if(fGetActivePads){
fClusterFinder->SetDoPadSelection(kTRUE);
fClusterFinder->Read(iter->fPtr, iter->fSize );
fClusterFinder->ProcessDigits();
}
+ fBenchmark.Stop(1);
+
fReader->Reset();
realPoints = fClusterFinder->GetNumberOfClusters();
bd.fSpecification = iter->fSpecification;
bd.fDataType = AliHLTTPCDefinitions::fgkClustersDataType;
outputBlocks.push_back( bd );
-
+
+ fBenchmark.AddOutput(bd.fSize);
+
tSize += mysize;
outBPtr += mysize;
outPtr = (AliHLTTPCClusterData*)outBPtr;
bdHW.fDataType = kAliHLTDataTypeHwAddr16;
outputBlocks.push_back( bdHW );
+ fBenchmark.AddOutput(bdHW.fSize);
tSize+=nHWAdd*sizeof(AliHLTUInt16_t);
}
+ /*
+ { // compressed output for the CA tracker
+
+ AliHLTUInt32_t dSize = 0;
+
+ int ret = AliHLTTPCCAInputDataCompressorComponent::Compress( (AliHLTTPCClusterData*)( outputPtr + bd.fOffset ),
+ size - tSize,
+ outputPtr+tSize,
+ dSize );
+
+ if ( ret!=0 || tSize + dSize > size )
+ {
+ Logging( kHLTLogFatal, "HLT::TPCClusterFinder::DoEvent", "Too much data",
+ "Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.",
+ tSize + dSize, size );
+ iResult=-ENOSPC;
+ break;
+ }
+
+ AliHLTComponentBlockData bdCompressed;
+ FillBlockData( bdCompressed );
+ bdCompressed.fOffset = tSize ;
+ bdCompressed.fSize = dSize;
+ bdCompressed.fSpecification = iter->fSpecification;
+ bdCompressed.fDataType = AliHLTTPCCADefinitions::fgkCompressedInputDataType;
+ outputBlocks.push_back( bdCompressed );
+
+ tSize += dSize;
+ outBPtr += dSize;
+ outPtr = (AliHLTTPCClusterData*)outBPtr;
+ }
+ */
+
if(fDoMC){
Int_t maxNumberOfClusterMCInfo = (Int_t)((size-tSize)/sizeof(AliHLTTPCClusterFinder::ClusterMCInfo)-1);
AliHLTTPCClusterFinder::ClusterMCInfo* outputMCInfo= (AliHLTTPCClusterFinder::ClusterMCInfo*)(outputPtr+tSize);
bdMCInfo.fSpecification = iter->fSpecification;
bdMCInfo.fDataType = AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo;
outputBlocks.push_back( bdMCInfo );
-
+ fBenchmark.AddOutput(bdMCInfo.fSize);
+
tSize+=nMCInfo*sizeof(AliHLTTPCClusterFinder::ClusterMCInfo);
}
if (iResult>=0)
size = tSize;
+ fBenchmark.Stop(0);
+ HLTInfo(fBenchmark.GetStatistics());
return iResult;
}
return 2;
}
- AliTPCcalibDB* calib=AliTPCcalibDB::Instance();
- if(!calib){
- HLTError("CalibDB not availible");
- } else {
- calib->SetExBField(GetBz());
- HLTInfo("SolenoidBz is set to %f in the calibDB", GetBz());
- }
-
if (argument.CompareTo("-update-calibdb")==0 || argument.CompareTo("-update-transform")==0 ){
if(fClusterFinder->UpdateCalibDB()){
HLTDebug("CalibDB and offline transform successfully updated.");
return iResult;
}
+void AliHLTTPCClusterFinderComponent::GetOCDBObjectDescription( TMap* const targetMap){
+// Get a list of OCDB object description needed for the particular component
+
+ 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"));
+
+ // OCDB entries to be fetched by the TAXI (access via the AliTPCcalibDB class)
+ targetMap->Add(new TObjString("TPC/Calib/Parameters"), new TObjString("unknown content"));
+ targetMap->Add(new TObjString("TPC/Calib/TimeDrift"), new TObjString("drift velocity calibration"));
+ targetMap->Add(new TObjString("TPC/Calib/Temperature"), new TObjString("temperature map"));
+ targetMap->Add(new TObjString("TPC/Calib/PadGainFactor"), new TObjString("gain factor pad by pad"));
+ targetMap->Add(new TObjString("TPC/Calib/ClusterParam"), new TObjString("cluster parameters"));
+
+ // OCDB entries needed to be fetched by the Pendolino
+ targetMap->Add(new TObjString("TPC/Calib/AltroConfig"), new TObjString("contains the altro config, e.g. info about the L0 trigger timing"));
+ targetMap->Add(new TObjString("GRP/CTP/CTPtiming"), new TObjString("content used in the cluster coordinate transformation in relation to the L0 trigger timing"));
+
+ // OCDB entries necessary for replaying data on the HLT cluster
+ targetMap->Add(new TObjString("GRP/GRP/Data"), new TObjString("contains magnetic field info"));
+
+ // OCDB entries needed to suppress fatals/errors/warnings during reconstruction
+ targetMap->Add(new TObjString("TPC/Calib/PadTime0"), new TObjString("time0 offset pad by pad"));
+ targetMap->Add(new TObjString("TPC/Calib/PadNoise"), new TObjString("pad noise values"));
+ targetMap->Add(new TObjString("TPC/Calib/Pedestals"), new TObjString("pedestal info"));
+ targetMap->Add(new TObjString("TPC/Calib/Pulser"), new TObjString("pulser info"));
+ targetMap->Add(new TObjString("TPC/Calib/CE"), new TObjString("CE laser calibration result"));
+ targetMap->Add(new TObjString("TPC/Calib/Raw"), new TObjString("unknown content"));
+ targetMap->Add(new TObjString("TPC/Calib/QA"), new TObjString("not important"));
+ targetMap->Add(new TObjString("TPC/Calib/Mapping"), new TObjString("unknown content"));
+ targetMap->Add(new TObjString("TPC/Calib/Goofie"), new TObjString("Goofie values, not used at the moment (05.03.2010)"));
+ targetMap->Add(new TObjString("TPC/Calib/HighVoltage"), new TObjString("high voltage values, not used"));
+ targetMap->Add(new TObjString("TPC/Calib/Ref"), new TObjString("unknown content"));
+}