L3 becomes HLT
[u/mrichter/AliRoot.git] / HLT / hough / AliHLTHistogram1D.h
CommitLineData
3e87ef69 1// @(#) $Id$
2
bd2f8772 3#ifndef ALIL3HISTOGRAM1D_H
4#define ALIL3HISTOGRAM1D_H
f7473b79 5
4aa41877 6#include "AliHLTRootTypes.h"
f7473b79 7
95a00d93 8#ifdef use_root
bd2f8772 9class TH1F;
95a00d93 10#endif
f7473b79 11
4aa41877 12class AliHLTHistogram1D {
f7473b79 13
f7473b79 14 public:
4aa41877 15 AliHLTHistogram1D();
16 AliHLTHistogram1D(Char_t *name,Char_t *id,Int_t nxbin,Double_t xmin,Double_t xmax);
17 virtual ~AliHLTHistogram1D();
f7473b79 18
19 void Reset();
20 void Fill(Double_t x,Int_t weight=1);
21 void AddBinContent(Int_t bin,Int_t weight);
bd2f8772 22 Int_t GetMaximumBin() const;
23 Int_t FindBin(Double_t x) const;
24 Double_t GetBinContent(Int_t bin) const;
25 Double_t GetBinCenter(Int_t bin) const;
26 Int_t GetNEntries() const {return fEntries;}
f7473b79 27
28 void SetBinContent(Int_t bin,Int_t value);
29 void SetThreshold(Int_t i) {fThreshold = i;}
30
31
32#ifdef use_root
33 void Draw(Char_t *option="hist");
34 TH1F *GetRootHisto() {return fRootHisto;}
35#endif
36
bd2f8772 37 private:
38
39 Double_t *fContent; //!
40 Char_t fName[100];//Histogram title
41 Int_t fNbins;//Number of bins
42 Int_t fNcells;//Number of cells
43 Int_t fEntries;//Number of entries
44
45 Int_t fThreshold;//Bin content threshold
46 Double_t fXmin;//Lower limit in X
47 Double_t fXmax;//Upper limit in X
48
49
50#ifdef use_root
51 TH1F *fRootHisto;//The corresponding ROOT histogram
52#endif
53
4aa41877 54 ClassDef(AliHLTHistogram1D,1) //1D histogram class
f7473b79 55
56};
57
4aa41877 58typedef AliHLTHistogram1D AliL3Histogram1D; // for backward compatibility
59
f7473b79 60#endif