X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2FTRD%2FAliHLTTRDClusterizer.h;h=5de4fd6608efaffcb7c45b62bedf1331ce0a4e9b;hb=10a5dc4c5d3962f07dad5d0786cdb9909d2ff4d8;hp=a4171b4c2c0198df2f9012e169911622be731076;hpb=18ada816fc48ecbd756f412a29b2ca1f47c39f09;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/TRD/AliHLTTRDClusterizer.h b/HLT/TRD/AliHLTTRDClusterizer.h index a4171b4c2c0..5de4fd6608e 100644 --- a/HLT/TRD/AliHLTTRDClusterizer.h +++ b/HLT/TRD/AliHLTTRDClusterizer.h @@ -1,7 +1,11 @@ +//-*- Mode: C++ -*- +// $Id$ + #ifndef ALIHLTTRDCLUSTERIZER_H #define ALIHLTTRDCLUSTERIZER_H -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ +//* This file is property of and copyright by the ALICE HLT Project * +//* ALICE Experiment at CERN, All rights reserved. * +//* See cxx source for full Copyright notice * //////////////////////////////////////////////////////////////////////////// // // @@ -10,35 +14,55 @@ //////////////////////////////////////////////////////////////////////////// #include "AliTRDclusterizer.h" -#include "AliHLTTRDCluster.h" +#include "AliTRDReconstructor.h" #include "AliHLTDataTypes.h" +#include "AliHLTTRDTrackletWordArray.h" -class AliTRDReconstructor; -class TClonesArray; - +class AliHLTTRDClustersArray; class AliHLTTRDClusterizer : public AliTRDclusterizer { public: AliHLTTRDClusterizer(const AliTRDReconstructor *const rec = 0x0); AliHLTTRDClusterizer(const Text_t *const name, const Text_t *const title, const AliTRDReconstructor *const rec = 0x0); AliHLTTRDClusterizer(const AliHLTTRDClusterizer& c); + virtual ~AliHLTTRDClusterizer() {}; AliHLTTRDClusterizer& operator=(const AliHLTTRDClusterizer& c); void Copy(TObject& c) const; - void SetMemBlock(AliHLTUInt8_t* ptr){fMemBlock=ptr;fNoOfClusters=0;} - AliHLTUInt8_t* GetMemBlock(){return fMemBlock;} - UInt_t GetAddedSize(){return fNoOfClusters*sizeof(AliHLTTRDCluster);} + void SetMemBlock(AliHLTUInt8_t* ptr){ + if(fReconstructor->IsProcessingTracklets()){ + fTrMemBlock=ptr; fTrMemCurrPtr=ptr; + fClMemBlock=ptr+GetTrMemBlockSize(); //if IsProcessingTracklets() is enabled we always reserve a data block of size GetTrMemBlockSize() for the tracklets + }else{ + fClMemBlock=ptr; + } + fNoOfClusters=0; + fAddedSize=0; + fLastDet=-1; + fClusters=NULL; + } + AliHLTUInt8_t* GetClMemBlock(){return fClMemBlock;} + AliHLTUInt8_t* GetTrMemBlock(){return fTrMemBlock;} + UInt_t GetAddedClSize(){return fAddedSize;} + UInt_t GetAddedTrSize(){return (AliHLTUInt8_t*)fTrMemCurrPtr-(AliHLTUInt8_t*)fTrMemBlock;} + UInt_t GetTrMemBlockSize(){return 30*(sizeof(AliHLTTRDTrackletWordArray)+512*sizeof(UInt_t));} protected: - void AddClusterToArray(AliTRDcluster *cluster); + void AddClusterToArray(AliTRDcluster* cluster); + void AddTrackletsToArray(); - TClonesArray* RecPoints(){return 0x0;} //these are functions in the parents class. must not be used in hlt! - void SetClustersOwner(Bool_t /*own*/){} //if used accidentally it may give an compilation error because are protected, - //but the error can also appear in run time + TClonesArray* RecPoints(){return 0x0;} //these are functions in the parents class and must not be used in hlt! + TClonesArray* TrackletsArray(){return 0x0;} //if used accidentally it may give a compilation error because they are protected, + void SetClustersOwner(Bool_t /*own*/){} //but it could be that the error appears only in run time - AliHLTUInt8_t* fMemBlock; + AliHLTUInt8_t* fClMemBlock; + AliHLTUInt8_t* fTrMemBlock; + AliHLTUInt8_t* fTrMemCurrPtr; + Int_t fLastDet; + AliHLTTRDClustersArray* fClusters; + AliHLTUInt32_t fAddedSize; - ClassDef(AliHLTTRDClusterizer, 0) + ClassDef(AliHLTTRDClusterizer, 1) }; #endif