]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TRD/AliHLTTRDClusterizer.h
read magnetic field from local GRP
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDClusterizer.h
index a4171b4c2c0198df2f9012e169911622be731076..06f23e7e11e8e347931bbdddd141c29d2239383e 100644 (file)
 ////////////////////////////////////////////////////////////////////////////
 
 #include "AliTRDclusterizer.h"
+#include "AliTRDReconstructor.h"
 #include "AliHLTTRDCluster.h"
 #include "AliHLTDataTypes.h"
+#include "AliHLTTRDTrackletWordArray.h"
 
-class AliTRDReconstructor;
-class TClonesArray;
+class AliHLTTRDTrackletWord;
 
 class AliHLTTRDClusterizer : public AliTRDclusterizer
 {
@@ -25,20 +26,33 @@ class AliHLTTRDClusterizer : public AliTRDclusterizer
   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(); fNoOfClusters=0;  //if IsProcessingTracklets() is enabled we always reserve a data block of size GetTrMemBlockSize() for the tracklets
+    }else{
+      fClMemBlock=ptr; fNoOfClusters=0;
+    }
+  }
+  AliHLTUInt8_t*  GetClMemBlock(){return fClMemBlock;}
+  AliHLTUInt8_t*  GetTrMemBlock(){return fTrMemBlock;}
+  UInt_t          GetAddedClSize(){return fNoOfClusters*sizeof(AliHLTTRDCluster);}
+  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            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;
 
-  ClassDef(AliHLTTRDClusterizer, 0)
+  ClassDef(AliHLTTRDClusterizer, 1)
 };
 
 #endif