#include <cerrno>
#include <string>
+#include "AliTRDrawStream.h"
+#include "AliTRDrawFastStream.h"
+
ClassImp(AliHLTTRDClusterizerComponent)
-AliHLTTRDClusterizerComponent::AliHLTTRDClusterizerComponent():
- AliHLTProcessor(),
+AliHLTTRDClusterizerComponent::AliHLTTRDClusterizerComponent()
+: AliHLTProcessor(),
fOutputPercentage(500),
fOutputConst(0),
fClusterizer(NULL),
fyPosMethod(1),
fgeometryFileName(""),
fProcessTracklets(kFALSE),
- fHLTstreamer(kFALSE)
+ fHLTstreamer(kTRUE),
+ fTC(kFALSE)
{
// Default constructor
{
// Get the list of input data
list.clear(); // We do not have any requirements for our input data type(s).
- list.push_back( (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD) );
+ list.push_back(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD);
}
-AliHLTComponent_DataType AliHLTTRDClusterizerComponent::GetOutputDataType()
+AliHLTComponentDataType AliHLTTRDClusterizerComponent::GetOutputDataType()
{
// Get the output data type
return kAliHLTMultipleDataType;
if(fReconstructor->IsProcessingTracklets())
fOutputConst = fClusterizer->GetTrMemBlockSize();
-
+
return iResult;
}
fMemReader->SetEquipmentID( id );
fClusterizer->SetMemBlock(outputPtr+offset);
- Bool_t iclustered = fClusterizer->Raw2ClustersChamber(fMemReader);
- if (iclustered == kTRUE)
+ Bool_t bclustered = fClusterizer->Raw2ClustersChamber(fMemReader);
+ if(bclustered)
{
- HLTDebug( "Clustered successfully");
+ HLTDebug("Clustered successfully");
}
else
{
return -1;
}
- // put the tree into output
- //fcTree->Print();
-
AliHLTUInt32_t addedSize;
if(fReconstructor->IsProcessingTracklets()){
addedSize = fClusterizer->GetAddedTrSize();
bd.fSpecification = block.fSpecification;
bd.fDataType = AliHLTTRDDefinitions::fgkMCMtrackletDataType;
outputBlocks.push_back( bd );
- HLTDebug( "BD fPtr 0x%x, fOffset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
+ HLTDebug( "BD ptr 0x%x, offset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
}
offset = totalSize;
}
addedSize = fClusterizer->GetAddedClSize();
if (addedSize > 0){
- // Using low-level interface
- // with interface classes
+
+ Int_t* nTimeBins = (Int_t*)(outputPtr+offset+fClusterizer->GetAddedClSize());
+ *nTimeBins = fClusterizer->GetNTimeBins();
+ addedSize += sizeof(*nTimeBins);
+
totalSize += addedSize;
if ( totalSize > size )
{
totalSize, size );
return EMSGSIZE;
}
-
+
// Fill block
AliHLTComponentBlockData bd;
FillBlockData( bd );
bd.fSpecification = block.fSpecification;
bd.fDataType = AliHLTTRDDefinitions::fgkClusterDataType;
outputBlocks.push_back( bd );
- HLTDebug( "BD fPtr 0x%x, fOffset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
+ HLTDebug( "BD ptr 0x%x, offset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
offset = totalSize;
-
}
- else
+ else{
HLTDebug("Array of clusters is empty!");
+ }
}
fReconstructor->SetClusters(0x0);
fgeometryFileName=((TObjString*)pTokens->At(i))->GetString();
continue;
}
- if (argument.CompareTo("-lowflux")==0) {
+ else if (argument.CompareTo("-lowflux")==0) {
fRecoParamType = 0;
HLTInfo("Low flux reconstruction selected");
continue;
}
- if (argument.CompareTo("-highflux")==0) {
+ else if (argument.CompareTo("-highflux")==0) {
fRecoParamType = 1;
HLTInfo("High flux reconstruction selected");
continue;
}
- if (argument.CompareTo("-cosmics")==0) {
+ else if (argument.CompareTo("-cosmics")==0) {
fRecoParamType = 2;
HLTInfo("Cosmics reconstruction selected");
continue;
}
- if (argument.CompareTo("-simulation")==0) {
+ else if (argument.CompareTo("-simulation")==0) {
fRecoDataType = 0;
HLTInfo("Awaiting simulated data");
continue;
}
- if (argument.CompareTo("-experiment")==0) {
+ else if (argument.CompareTo("-experiment")==0) {
fRecoDataType = 1;
HLTInfo("Awaiting real data");
continue;
}
- if (argument.CompareTo("-processTracklets")==0) {
+ else if (argument.CompareTo("-processTracklets")==0) {
fProcessTracklets = kTRUE;
- HLTInfo("Processing L1 Tracklets");
+ HLTInfo("Writing L1 tracklets to output");
continue;
}
- if (argument.CompareTo("-noZS")==0) {
+ else if (argument.CompareTo("-noZS")==0) {
fOutputPercentage = 100;
HLTInfo("Awaiting non zero surpressed data");
continue;
}
- if (argument.CompareTo("-faststreamer")==0) {
+ else if (argument.CompareTo("-faststreamer")==0) {
fHLTstreamer = kTRUE;
HLTInfo("Useing fast raw streamer");
continue;
}
+ else if (argument.CompareTo("-nofaststreamer")==0) {
+ fHLTstreamer = kFALSE;
+ HLTInfo("Don't use fast raw streamer");
+ continue;
+ }
+ else if (argument.CompareTo("-tailcancellation")==0) {
+ fTC = kTRUE;
+ HLTInfo("Useing tailcancellation");
+ continue;
+ }
else if (argument.CompareTo("-rawver")==0) {
if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
HLTInfo("Raw data version is: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
break;
}
continue;
- }
+ }
else {
HLTError("unknown argument: %s", argument.Data());
HLTError("Could not load geometry");
return -EINVAL;
}
+ HLTInfo("Applying Alignment from CDB object");
+ AliGeomManager::ApplyAlignObjsFromCDB("TRD");
}
else{
HLTInfo("Geometry Already Loaded!");
}
- TString recoOptions="hlt,!cw,sl_cl_0";
-
- switch(fRecoDataType){
- case 0: recoOptions += ",tc"; break;
- case 1: recoOptions += ",!tc"; break;
- }
- switch(fyPosMethod){
- case 0: recoOptions += ",!gs,!lut"; break;
- case 1: recoOptions += ",!gs,lut"; break;
- case 2: recoOptions += ",gs,!lut"; break;
- }
- if(fProcessTracklets) recoOptions += ",tp";
- else recoOptions += ",!tp";
-
-
if (fRecoParamType == 0)
{
HLTDebug("Low flux params init.");
return -EINVAL;
}
+ // backward compatibility to AliTRDrecoParam < r34995
+# ifndef HAVE_NOT_ALITRDRECOPARAM_r34995
+# define AliTRDRecoParamSetTailCancelation(b) fRecoParam->SetTailCancelation(b)
+# define AliTRDRecoParamSetGAUS(b) fRecoParam->SetGAUS(b)
+# define AliTRDRecoParamSetLUT(b) fRecoParam->SetLUT(b)
+# else
+# define AliTRDRecoParamSetTailCancelation(b) fRecoParam->SetTailCancelation()
+# define AliTRDRecoParamSetGAUS(b) fRecoParam->SetGAUS()
+# define AliTRDRecoParamSetLUT(b) fRecoParam->SetLUT()
+# endif
+
+ if(fTC){AliTRDRecoParamSetTailCancelation(kTRUE); HLTDebug("Enableing Tail Cancelation"); }
+ else{AliTRDRecoParamSetTailCancelation(kFALSE); HLTDebug("Enableing Tail Cancelation"); }
+
+ switch(fyPosMethod){
+ case 0: AliTRDRecoParamSetGAUS(kFALSE); AliTRDRecoParamSetLUT(kFALSE); break;
+ case 1: AliTRDRecoParamSetGAUS(kFALSE); AliTRDRecoParamSetLUT(kTRUE); break;
+ case 2: AliTRDRecoParamSetGAUS(kTRUE); AliTRDRecoParamSetLUT(kFALSE); break;
+ }
+
+ fRecoParam->SetStreamLevel(AliTRDrecoParam::kClusterizer, 0);
fReconstructor->SetRecoParam(fRecoParam);
- fReconstructor->SetStreamLevel(0, AliTRDReconstructor::kClusterizer);
+
+ TString recoOptions="hlt,!cw";
+ if(fProcessTracklets) recoOptions += ",tp";
+ else recoOptions += ",!tp";
HLTDebug("Reconstructor options are: %s",recoOptions.Data());
fReconstructor->SetOption(recoOptions.Data());