]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking/AliHLTTPCHistogram1D.h
make hough tracking code compiling
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking / AliHLTTPCHistogram1D.h
1 // @(#) $Id$
2 // origin: hough/AliL3Histogram1D.h,v 1.5 Thu Jun 17 13:18:42 2004 UTC by cvetan 
3
4 #ifndef ALIHLTTPCHISTOGRAM1D_H
5 #define ALIHLTTPCHISTOGRAM1D_H
6
7 #include "AliHLTTPCRootTypes.h"
8
9 class TH1F;
10
11 class AliHLTTPCHistogram1D {
12   
13  public:
14   AliHLTTPCHistogram1D();
15   AliHLTTPCHistogram1D(Char_t *name,Char_t *id,Int_t nxbin,Double_t xmin,Double_t xmax);
16   virtual ~AliHLTTPCHistogram1D();
17   
18   void Reset();
19   void Fill(Double_t x,Int_t weight=1);
20   void AddBinContent(Int_t bin,Int_t weight);
21   Int_t GetMaximumBin() const;
22   Int_t FindBin(Double_t x) const;
23   Double_t GetBinContent(Int_t bin) const;
24   Double_t GetBinCenter(Int_t bin) const;
25   Int_t GetNEntries() const {return fEntries;}
26   
27   void SetBinContent(Int_t bin,Int_t value);
28   void SetThreshold(Int_t i) {fThreshold = i;}
29   
30
31 #ifdef use_root
32   void Draw(Char_t *option="hist");
33   TH1F *GetRootHisto() {return fRootHisto;}
34 #endif
35   
36  private:
37   
38   Double_t *fContent; //!
39   Char_t fName[100];//Histogram title
40   Int_t fNbins;//Number of bins
41   Int_t fNcells;//Number of cells
42   Int_t fEntries;//Number of entries
43
44   Int_t fThreshold;//Bin content threshold
45   Double_t fXmin;//Lower limit in X
46   Double_t fXmax;//Upper limit in X
47
48   
49   TH1F *fRootHisto;//The corresponding ROOT histogram
50
51   ClassDef(AliHLTTPCHistogram1D,1) //1D histogram class
52     
53 };
54
55 #endif