]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDclusterizer.h
7fd3183ba8ba8c8c8292906089f6448c1e0d0c8b
[u/mrichter/AliRoot.git] / TRD / AliTRDclusterizer.h
1 #ifndef ALITRDCLUSTERIZER_H
2 #define ALITRDCLUSTERIZER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 #include <TNamed.h>
9 #include <TObjArray.h>
10
11 class TFile;
12 class TTree;
13 class AliRunLoader;
14 class AliTRDparameter;
15 class AliTRD;
16
17 ///////////////////////////////////////////////////////
18 //  Finds and handles cluster                        //
19 ///////////////////////////////////////////////////////
20
21 class AliTRDclusterizer : public TNamed {
22
23  public:
24
25   AliTRDclusterizer();
26   AliTRDclusterizer(const Text_t* name, const Text_t* title);
27   AliTRDclusterizer(const AliTRDclusterizer &c);
28   virtual ~AliTRDclusterizer();
29   AliTRDclusterizer &operator=(const AliTRDclusterizer &c);
30
31   virtual void    Copy(TObject &c);
32   virtual Bool_t  Open(const Char_t *name, Int_t nEvent = 0);
33   
34   virtual Bool_t  OpenInput(Int_t nEvent = 0);
35   virtual Bool_t  OpenOutput();
36   virtual Bool_t  MakeClusters() = 0;
37   virtual Bool_t  WriteClusters(Int_t det);
38   virtual void     SetParameter(AliTRDparameter *par)      { fPar           = par; };
39   void     SetVerbose(Int_t v = 1)                 { fVerbose       = v;   };
40
41   AliTRDparameter *GetParameter()                    const { return fPar;          };
42
43   TObjArray*      RecPoints() {if (!fRecPoints) fRecPoints = new TObjArray(400); return fRecPoints;}
44   virtual void    AddCluster(Float_t *pos, Int_t det, Float_t amp, Int_t *tracks
45                              , Float_t *sig, Int_t iType);
46   void            ResetRecPoints() {if (fRecPoints) fRecPoints->Delete();}
47
48
49  protected:
50
51   AliRunLoader * fRunLoader;       //! Run Loader
52   
53   TTree           *fClusterTree;   //! Tree with the cluster
54   AliTRDparameter *fPar;           //  TRD digitization parameter object
55
56   TObjArray*       fRecPoints;     //! Array of clusters
57   Int_t            fVerbose;       //  Sets the verbose level
58
59   ClassDef(AliTRDclusterizer,3)    //  TRD-Cluster manager base class
60
61 };
62
63 #endif