X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2FTRD%2FAliHLTTRDClusterizerComponent.cxx;h=0b809f2b7975731844eb6fb8ee06a1d38ba97d3a;hb=10a5dc4c5d3962f07dad5d0786cdb9909d2ff4d8;hp=271788b12bcc09534179703204e727575c1e9f1d;hpb=5ac89957e50aa5120a2b673027e0907089dcd57e;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/TRD/AliHLTTRDClusterizerComponent.cxx b/HLT/TRD/AliHLTTRDClusterizerComponent.cxx index 271788b12bc..0b809f2b797 100644 --- a/HLT/TRD/AliHLTTRDClusterizerComponent.cxx +++ b/HLT/TRD/AliHLTTRDClusterizerComponent.cxx @@ -28,10 +28,6 @@ // or // // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt // -#if __GNUC__ >= 3 -using namespace std; -#endif - #include "TTree.h" #include "TFile.h" #include "TBranch.h" @@ -47,7 +43,7 @@ using namespace std; #include "AliCDBStorage.h" #include "AliCDBEntry.h" #include "AliTRDrecoParam.h" -#include "AliTRDrawStreamBase.h" +#include "AliTRDrawStream.h" #include "AliTRDcluster.h" #include "AliRawReaderMemory.h" @@ -63,6 +59,8 @@ using namespace std; #include #include +using namespace std; + ClassImp(AliHLTTRDClusterizerComponent) AliHLTTRDClusterizerComponent::AliHLTTRDClusterizerComponent() @@ -185,10 +183,9 @@ int AliHLTTRDClusterizerComponent::DoDeinit() delete fClusterizer; fClusterizer = 0; - fReconstructor->SetClusters(0x0); + //fReconstructor->SetClusters(0x0); delete fReconstructor; fReconstructor = 0x0; - return 0; if (fRecoParam) { @@ -196,6 +193,8 @@ int AliHLTTRDClusterizerComponent::DoDeinit() delete fRecoParam; fRecoParam = 0; } + + return 0; } int AliHLTTRDClusterizerComponent::DoEvent( const AliHLTComponentEventData& evtData, @@ -207,9 +206,16 @@ int AliHLTTRDClusterizerComponent::DoEvent( const AliHLTComponentEventData& evtD { // Process an event +#ifdef HAVE_VALGRIND_CALLGRIND_H if (evtData.fEventID == 10) CALLGRIND_START_INSTRUMENTATION; + if(GetFirstInputBlock(kAliHLTDataTypeEOR)) + CALLGRIND_STOP_INSTRUMENTATION; +#endif + + if(!IsDataEvent())return 0; + HLTDebug( "NofBlocks %i", evtData.fBlockCnt ); // Process an event AliHLTUInt32_t totalSize = 0, offset = 0; @@ -236,8 +242,6 @@ int AliHLTTRDClusterizerComponent::DoEvent( const AliHLTComponentEventData& evtD evtData.fEventID, evtData.fEventID, DataType2Text(inputDataType).c_str(), DataType2Text(expectedDataType).c_str()); - if(block.fDataType == kAliHLTDataTypeEOR) - CALLGRIND_STOP_INSTRUMENTATION; continue; } else @@ -336,15 +340,22 @@ int AliHLTTRDClusterizerComponent::DoEvent( const AliHLTComponentEventData& evtD HLTDebug("Array of clusters is empty!"); } } - fReconstructor->SetClusters(0x0); + //fReconstructor->SetClusters(0x0); size = totalSize; HLTDebug("Event is done. size written to the output is %i", size); return 0; } -void AliHLTTRDClusterizerComponent::PrintObject( TClonesArray* inClustersArray) +void AliHLTTRDClusterizerComponent::PrintObject( +#ifdef __DEBUG + TClonesArray* inClustersArray +#else + TClonesArray* +#endif + ) { +#ifdef __DEBUG AliTRDcluster* cluster=0x0; for (Int_t i=0; i < inClustersArray->GetEntriesFast(); i++){ @@ -354,7 +365,7 @@ void AliHLTTRDClusterizerComponent::PrintObject( TClonesArray* inClustersArray) HLTDebug(" Detector = %i, Amplitude = %f, Center = %f", cluster->GetDetector(), cluster->GetQ(), cluster->GetCenter()); HLTDebug(" LocalTimeBin = %i; NPads = %i; maskedPosition: %s, status: %s", cluster->GetLocalTimeBin(), cluster->GetNPads(),cluster->GetPadMaskedPosition(),cluster->GetPadMaskedPosition()); } - +#endif } int AliHLTTRDClusterizerComponent::Configure(const char* arguments){ @@ -571,15 +582,31 @@ int AliHLTTRDClusterizerComponent::SetParams() HLTInfo("RecoParam already set!"); }else{ if(fRecoParamType == 0){ - HLTDebug("Low flux params init."); - fRecoParam = AliTRDrecoParam::GetLowFluxParam(); +#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621 + if(fHLTflag){ + HLTInfo("Low flux HLT params init."); + fRecoParam = AliTRDrecoParam::GetLowFluxHLTParam(); + }else +#endif + { + HLTInfo("Low flux params init."); + fRecoParam = AliTRDrecoParam::GetLowFluxParam(); + } } if(fRecoParamType == 1){ - HLTDebug("High flux params init."); - fRecoParam = AliTRDrecoParam::GetHighFluxParam(); +#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621 + if(fHLTflag){ + HLTInfo("High flux HLT params init."); + fRecoParam = AliTRDrecoParam::GetHighFluxHLTParam(); + }else +#endif + { + HLTInfo("High flux params init."); + fRecoParam = AliTRDrecoParam::GetHighFluxParam(); + } } if(fRecoParamType == 2){ - HLTDebug("Cosmic Test params init."); + HLTInfo("Cosmic Test params init."); fRecoParam = AliTRDrecoParam::GetCosmicTestParam(); } } @@ -590,32 +617,33 @@ int AliHLTTRDClusterizerComponent::SetParams() 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){fRecoParam->SetTailCancelation(kTRUE); HLTDebug("Enableing Tail Cancelation"); } else{fRecoParam->SetTailCancelation(kFALSE); HLTDebug("Disableing 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; + case 0: fRecoParam->SetGAUS(kFALSE); fRecoParam->SetLUT(kFALSE); break; + case 1: fRecoParam->SetGAUS(kFALSE); fRecoParam->SetLUT(kTRUE); break; + case 2: fRecoParam->SetGAUS(kTRUE); fRecoParam->SetLUT(kFALSE); break; } fRecoParam->SetStreamLevel(AliTRDrecoParam::kClusterizer, 0); fReconstructor->SetRecoParam(fRecoParam); + if(!fClusterizer){ + fClusterizer = new AliHLTTRDClusterizer("TRDCclusterizer", "TRDCclusterizer"); + HLTDebug("TRDClusterizer at 0x%x", fClusterizer); + } + TString recoOptions="!cw"; - if(fHLTflag) + if(fHLTflag){ recoOptions += ",hlt"; + + // we transfer clusters that do no contain the XYZ coodrinates (AliHLTTRDCluster), + // thus this coordinate transformation ist useless +#ifndef HAVE_NOT_ALITRD_CLUSTERIZER_r42837 + fClusterizer->SetSkipTransform(); +#endif + } if(fProcessTracklets) recoOptions += ",tp"; else recoOptions += ",!tp"; @@ -630,27 +658,14 @@ int AliHLTTRDClusterizerComponent::SetParams() if (fRecoDataType == 0) { - AliTRDrawStreamBase::SetRawStreamVersion(AliTRDrawStreamBase::kTRDsimStream); HLTDebug("Data type expected is SIMULATION!"); } if (fRecoDataType == 1) { - AliTRDrawStreamBase::SetRawStreamVersion(AliTRDrawStreamBase::kTRDrealStream); HLTDebug("Data type expected is EXPERIMENT!"); } - if (fHLTstreamer) - { - AliTRDrawStreamBase::SetRawStreamVersion("FAST"); - HLTDebug("fast rawstreamer used"); - } - - if(!fClusterizer){ - fClusterizer = new AliHLTTRDClusterizer("TRDCclusterizer", "TRDCclusterizer"); - HLTDebug("TRDClusterizer at 0x%x", fClusterizer); - } - fClusterizer->SetRawVersion(fRawDataVersion); return iResult; @@ -685,3 +700,19 @@ int AliHLTTRDClusterizerComponent::Reconfigure(const char* cdbEntry, const char* return iResult; } + +void AliHLTTRDClusterizerComponent::GetOCDBObjectDescription(TMap* const targetMap){ + // Get a list of OCDB object description needed for the particular component + if (!targetMap) return; + targetMap->Add(new TObjString("HLT/ConfigTRD/ClusterizerComponent"), new TObjString("component arguments")); + targetMap->Add(new TObjString("TRD/Calib/ChamberGainFactor"), new TObjString("gain factor of chambers")); + targetMap->Add(new TObjString("TRD/Calib/ChamberT0"), new TObjString("T0 of chambers")); + targetMap->Add(new TObjString("TRD/Calib/ChamberVdrift"), new TObjString("drift velocity of chambers")); + targetMap->Add(new TObjString("TRD/Calib/DetNoise"), new TObjString("noise of chambers")); + targetMap->Add(new TObjString("TRD/Calib/LocalGainFactor"), new TObjString("per pad gain factor")); + targetMap->Add(new TObjString("TRD/Calib/LocalT0"), new TObjString("per pad T0")); + targetMap->Add(new TObjString("TRD/Calib/LocalVdrift"), new TObjString("per pad drift velocity")); + targetMap->Add(new TObjString("TRD/Calib/PadNoise"), new TObjString("per pad noise")); + targetMap->Add(new TObjString("TRD/Calib/PadStatus"), new TObjString("pad status")); + targetMap->Add(new TObjString("TRD/Calib/PRFWidth"), new TObjString("pad response function")); +}