]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/hough/AliL3Histogram1D.h
Compilation on Alpha
[u/mrichter/AliRoot.git] / HLT / hough / AliL3Histogram1D.h
1 // @(#) $Id$
2
3 #ifndef ALIL3_HISTOGRAM1D
4 #define ALIL3_HISTOGRAM1D
5
6 #include "AliL3RootTypes.h"
7
8 #ifdef use_root
9 #include <TH1.h>
10 #endif
11
12 class AliL3Histogram1D {
13   
14  private:
15   
16   Double_t *fContent; //!
17   Char_t fName[100];
18   Int_t fNbins;
19   Int_t fNcells;
20   Int_t fEntries;
21
22   Int_t fThreshold;
23   Double_t fXmin;
24   Double_t fXmax;
25
26   
27 #ifdef use_root
28   TH1F *fRootHisto;
29 #endif  
30
31  public:
32   AliL3Histogram1D();
33   AliL3Histogram1D(Char_t *name,Char_t *id,Int_t nxbin,Double_t xmin,Double_t xmax);
34   virtual ~AliL3Histogram1D();
35   
36   void Reset();
37   void Fill(Double_t x,Int_t weight=1);
38   void AddBinContent(Int_t bin,Int_t weight);
39   Int_t GetMaximumBin();
40   Int_t FindBin(Double_t x);
41   Double_t GetBinContent(Int_t bin);
42   Double_t GetBinCenter(Int_t bin);
43   Int_t GetNEntries() {return fEntries;}
44   
45   void SetBinContent(Int_t bin,Int_t value);
46   void SetThreshold(Int_t i) {fThreshold = i;}
47   
48
49 #ifdef use_root
50   void Draw(Char_t *option="hist");
51   TH1F *GetRootHisto() {return fRootHisto;}
52 #endif
53   
54   ClassDef(AliL3Histogram1D,1) //1D histogram class
55     
56 };
57
58 #endif