+//-*- 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 *
////////////////////////////////////////////////////////////////////////////
// //
////////////////////////////////////////////////////////////////////////////
#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