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