]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TRD/AliHLTTRDClusterizer.h
PHOS mapping with 20 objects: one per module per RCU
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDClusterizer.h
1 #ifndef ALIHLTTRDCLUSTERIZER_H
2 #define ALIHLTTRDCLUSTERIZER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 ////////////////////////////////////////////////////////////////////////////
7 //                                                                        //
8 //  HLT TRD cluster finder                                                //
9 //                                                                        //
10 ////////////////////////////////////////////////////////////////////////////
11
12 #include "AliTRDclusterizer.h"
13 #include "AliTRDReconstructor.h"
14 #include "AliHLTTRDCluster.h"
15 #include "AliHLTDataTypes.h"
16 #include "AliHLTTRDTrackletWordArray.h"
17
18 class AliHLTTRDTrackletWord;
19
20 class AliHLTTRDClusterizer : public AliTRDclusterizer
21 {
22  public:
23   AliHLTTRDClusterizer(const AliTRDReconstructor *const rec = 0x0);
24   AliHLTTRDClusterizer(const Text_t *const name, const Text_t *const title, const AliTRDReconstructor *const rec = 0x0);
25   AliHLTTRDClusterizer(const AliHLTTRDClusterizer& c);
26   AliHLTTRDClusterizer& operator=(const AliHLTTRDClusterizer& c);
27
28   void            Copy(TObject& c) const;
29   void            SetMemBlock(AliHLTUInt8_t* ptr){
30     if(fReconstructor->IsProcessingTracklets()){
31       fTrMemBlock=ptr; fTrMemCurrPtr=ptr;
32       fClMemBlock=ptr+GetTrMemBlockSize(); fNoOfClusters=0;  //if IsProcessingTracklets() is enabled we always reserve a data block of size GetTrMemBlockSize() for the tracklets
33     }else{
34       fClMemBlock=ptr; fNoOfClusters=0;
35     }
36   }
37   AliHLTUInt8_t*  GetClMemBlock(){return fClMemBlock;}
38   AliHLTUInt8_t*  GetTrMemBlock(){return fTrMemBlock;}
39   UInt_t          GetAddedClSize(){return fNoOfClusters*sizeof(AliHLTTRDCluster);}
40   UInt_t          GetAddedTrSize(){return (AliHLTUInt8_t*)fTrMemCurrPtr-(AliHLTUInt8_t*)fTrMemBlock;}
41   UInt_t          GetTrMemBlockSize(){return 30*(sizeof(AliHLTTRDTrackletWordArray)+512*sizeof(UInt_t));}
42
43  protected:
44   void            AddClusterToArray(AliTRDcluster *cluster);
45   void            AddTrackletsToArray();
46
47   TClonesArray*   RecPoints(){return 0x0;}       //these are functions in the parents class and must not be used in hlt!
48   TClonesArray*   TrackletsArray(){return 0x0;}  //if used accidentally it may give a compilation error because they are protected,
49   void  SetClustersOwner(Bool_t /*own*/){}       //but it could be that the error appears only in  run time
50   
51   AliHLTUInt8_t*  fClMemBlock;
52   AliHLTUInt8_t*  fTrMemBlock;
53   AliHLTUInt8_t*  fTrMemCurrPtr;
54
55   ClassDef(AliHLTTRDClusterizer, 1)
56 };
57
58 #endif